diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2013-01-08 08:13:12 +0000 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2013-01-09 08:15:43 +0000 |
| commit | 39a46f48bfcaae1ca4500ba145c1c08c6bf009f1 (patch) | |
| tree | e6c6ea5637c8d1d2fc90b93cdce345ad71a0d6f2 /nova/compute | |
| parent | 41ef13a34c4fa41052ae72cc87e552dfd8ed91ba (diff) | |
Move vpn_image_id to pipelib
Apart from checking whether a given image is the cloudpipe image, the
vpn_image_id option is only used within pipelib itself.
Add a is_vpn_image() helper method and move the option into pipelib.
Some rejiggering of how pipelib imports ec2 opts is required to avoid
circular imports.
blueprint: scope-config-opts
Change-Id: Ie984b2bb81681c24d3cee803082960083992a535
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/manager.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 5627687fc..dc8dd843a 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -42,6 +42,7 @@ import uuid from eventlet import greenthread from nova import block_device +from nova.cloudpipe import pipelib from nova import compute from nova.compute import instance_types from nova.compute import power_state @@ -177,7 +178,6 @@ CONF.import_opt('host', 'nova.config') CONF.import_opt('my_ip', 'nova.config') CONF.import_opt('network_manager', 'nova.service') CONF.import_opt('reclaim_instance_interval', 'nova.config') -CONF.import_opt('vpn_image_id', 'nova.config') CONF.import_opt('my_ip', 'nova.config') QUOTAS = quota.QUOTAS @@ -938,7 +938,7 @@ class ComputeManager(manager.SchedulerDependentManager): vm_state=vm_states.BUILDING, task_state=task_states.NETWORKING, expected_task_state=None) - is_vpn = instance['image_ref'] == str(CONF.vpn_image_id) + is_vpn = pipelib.is_vpn_image(instance['image_ref']) try: # allocate and get network info network_info = self.network_api.allocate_for_instance( |
