|
@@ -381,7 +381,7 @@ class ConductorServerEndpoint(object):
|
|
|
def create_instances_replica(self, ctxt, origin_endpoint_id,
|
|
def create_instances_replica(self, ctxt, origin_endpoint_id,
|
|
|
destination_endpoint_id,
|
|
destination_endpoint_id,
|
|
|
destination_environment, instances,
|
|
destination_environment, instances,
|
|
|
- notes=None):
|
|
|
|
|
|
|
+ network_map, notes=None):
|
|
|
origin_endpoint = self.get_endpoint(ctxt, origin_endpoint_id)
|
|
origin_endpoint = self.get_endpoint(ctxt, origin_endpoint_id)
|
|
|
destination_endpoint = self.get_endpoint(ctxt, destination_endpoint_id)
|
|
destination_endpoint = self.get_endpoint(ctxt, destination_endpoint_id)
|
|
|
self._check_endpoints(ctxt, origin_endpoint, destination_endpoint)
|
|
self._check_endpoints(ctxt, origin_endpoint, destination_endpoint)
|
|
@@ -395,6 +395,7 @@ class ConductorServerEndpoint(object):
|
|
|
replica.executions = []
|
|
replica.executions = []
|
|
|
replica.info = {}
|
|
replica.info = {}
|
|
|
replica.notes = notes
|
|
replica.notes = notes
|
|
|
|
|
+ replica.network_map = network_map
|
|
|
|
|
|
|
|
db_api.add_replica(ctxt, replica)
|
|
db_api.add_replica(ctxt, replica)
|
|
|
LOG.info("Replica created: %s", replica.id)
|
|
LOG.info("Replica created: %s", replica.id)
|
|
@@ -487,6 +488,7 @@ class ConductorServerEndpoint(object):
|
|
|
migration.origin_endpoint_id = replica.origin_endpoint_id
|
|
migration.origin_endpoint_id = replica.origin_endpoint_id
|
|
|
migration.destination_endpoint_id = replica.destination_endpoint_id
|
|
migration.destination_endpoint_id = replica.destination_endpoint_id
|
|
|
migration.destination_environment = replica.destination_environment
|
|
migration.destination_environment = replica.destination_environment
|
|
|
|
|
+ migration.network_map = replica.network_map
|
|
|
migration.instances = instances
|
|
migration.instances = instances
|
|
|
migration.replica = replica
|
|
migration.replica = replica
|
|
|
migration.info = replica.info
|
|
migration.info = replica.info
|
|
@@ -575,7 +577,8 @@ class ConductorServerEndpoint(object):
|
|
|
|
|
|
|
|
def migrate_instances(self, ctxt, origin_endpoint_id,
|
|
def migrate_instances(self, ctxt, origin_endpoint_id,
|
|
|
destination_endpoint_id, destination_environment,
|
|
destination_endpoint_id, destination_environment,
|
|
|
- instances, skip_os_morphing=False, notes=None):
|
|
|
|
|
|
|
+ instances, network_map, skip_os_morphing=False,
|
|
|
|
|
+ notes=None):
|
|
|
origin_endpoint = self.get_endpoint(ctxt, origin_endpoint_id)
|
|
origin_endpoint = self.get_endpoint(ctxt, origin_endpoint_id)
|
|
|
destination_endpoint = self.get_endpoint(ctxt, destination_endpoint_id)
|
|
destination_endpoint = self.get_endpoint(ctxt, destination_endpoint_id)
|
|
|
self._check_endpoints(ctxt, origin_endpoint, destination_endpoint)
|
|
self._check_endpoints(ctxt, origin_endpoint, destination_endpoint)
|
|
@@ -588,6 +591,7 @@ class ConductorServerEndpoint(object):
|
|
|
migration.origin_endpoint = origin_endpoint
|
|
migration.origin_endpoint = origin_endpoint
|
|
|
migration.destination_endpoint = destination_endpoint
|
|
migration.destination_endpoint = destination_endpoint
|
|
|
migration.destination_environment = destination_environment
|
|
migration.destination_environment = destination_environment
|
|
|
|
|
+ migration.network_map = network_map
|
|
|
execution = models.TasksExecution()
|
|
execution = models.TasksExecution()
|
|
|
execution.status = constants.EXECUTION_STATUS_RUNNING
|
|
execution.status = constants.EXECUTION_STATUS_RUNNING
|
|
|
execution.number = 1
|
|
execution.number = 1
|