diff options
| author | Brian Waldon <bcwaldon@gmail.com> | 2012-01-20 15:12:01 -0800 |
|---|---|---|
| committer | Brian Waldon <bcwaldon@gmail.com> | 2012-01-20 19:47:46 -0800 |
| commit | c7646aa88d564694b99a569c3cdd2c7ffbbb745d (patch) | |
| tree | 2fab0252183edb69fd9e99afa79dce2f41a050d2 /nova/compute | |
| parent | 16ea348a1623f055809d0d9b7fe9f046515b5dd1 (diff) | |
Add SchedulerHints compute extension
This allows arbitrary key/values to be passed in on a compute create
request or rebuild/resize action. That data will be made available to the
compute api as a filter_properties dictionary.
Change-Id: Ie2ec57dcbc0d1d178e06606cb41027f9e46719a2
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 138d70b66..2f3749ca0 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -179,7 +179,7 @@ class API(base.Base): reservation_id, access_ip_v4, access_ip_v6, requested_networks, config_drive, block_device_mapping, auto_disk_config, - create_instance_here=False): + create_instance_here=False, scheduler_hints=None): """Verify all the input parameters regardless of the provisioning strategy being performed and schedule the instance(s) for creation.""" @@ -298,6 +298,8 @@ class API(base.Base): else: filter_properties = {} + filter_properties['scheduler_hints'] = scheduler_hints + base_options = { 'reservation_id': reservation_id, 'image_ref': image_href, @@ -571,7 +573,7 @@ class API(base.Base): reservation_id=None, block_device_mapping=None, access_ip_v4=None, access_ip_v6=None, requested_networks=None, config_drive=None, - auto_disk_config=None): + auto_disk_config=None, scheduler_hints=None): """ Provision instances, sending instance information to the scheduler. The scheduler will determine where the instance(s) @@ -610,7 +612,8 @@ class API(base.Base): reservation_id, access_ip_v4, access_ip_v6, requested_networks, config_drive, block_device_mapping, auto_disk_config, - create_instance_here=create_instance_here) + create_instance_here=create_instance_here, + scheduler_hints=scheduler_hints) if create_instance_here or instances is None: return (instances, reservation_id) |
