diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-08-21 16:49:22 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-08-21 16:49:22 +0000 |
| commit | 96e72e7295909cbe2ddb835283f68168cef883c1 (patch) | |
| tree | deca06fb5ba6bda001145cb2687e14b157e4c51c /nova/compute | |
| parent | 4e864a5f95621b3e62ebde0b6414dc21be10e9ba (diff) | |
| parent | 3313cffde85a9f02d56f57b401c2aec5b91d6df8 (diff) | |
Merge "Remove stub_network flag"
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/manager.py | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index e45c3333d..1991beb0f 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -422,11 +422,7 @@ class ComputeManager(manager.SchedulerDependentManager): return self.driver.refresh_provider_fw_rules(**kwargs) def _get_instance_nw_info(self, context, instance): - """Get a list of dictionaries of network data of an instance. - Returns an empty list if stub_network flag is set.""" - if FLAGS.stub_network: - return network_model.NetworkInfo() - + """Get a list of dictionaries of network data of an instance.""" # get the network info from network network_info = self.network_api.get_instance_nw_info(context, instance) @@ -734,10 +730,6 @@ class ComputeManager(manager.SchedulerDependentManager): def _allocate_network(self, context, instance, requested_networks): """Allocate networks for an instance and return the network info""" - if FLAGS.stub_network: - LOG.debug(_('Skipping network allocation for instance'), - instance=instance) - return network_model.NetworkInfo() self._instance_update(context, instance['uuid'], vm_state=vm_states.BUILDING, task_state=task_states.NETWORKING) @@ -804,10 +796,8 @@ class ComputeManager(manager.SchedulerDependentManager): extra_usage_info=extra_usage_info, host=self.host) def _deallocate_network(self, context, instance): - if not FLAGS.stub_network: - LOG.debug(_('Deallocating network for instance'), - instance=instance) - self.network_api.deallocate_for_instance(context, instance) + LOG.debug(_('Deallocating network for instance'), instance=instance) + self.network_api.deallocate_for_instance(context, instance) def _get_instance_volume_bdms(self, context, instance_uuid): bdms = self.db.block_device_mapping_get_all_by_instance(context, |
