summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorisethi <iccha.sethi@rackspace.com>2012-07-31 19:52:49 +0000
committerisethi <iccha.sethi@rackspace.com>2012-08-15 20:58:22 +0000
commit045b084d34c08aee910cee2362cf209fd80d3c6d (patch)
treec718d781f1382b9328be0fbb9b2249d09b0840f2 /nova/api
parent40a34547198b8eb32e4afbcf57b5d8f9207b35f3 (diff)
downloadnova-045b084d34c08aee910cee2362cf209fd80d3c6d.tar.gz
nova-045b084d34c08aee910cee2362cf209fd80d3c6d.tar.xz
nova-045b084d34c08aee910cee2362cf209fd80d3c6d.zip
Changes default behavior of ec2
Changes the default behaviour of create instance min/max count logic in ec2 to match the default behavior of OS API Fixes bug 989799 Change-Id: I1aa42c7d47674ce68442367fab487152b3e7fa67
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/ec2/cloud.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index 80f3a5012..834b5b7e2 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -1163,7 +1163,7 @@ class CloudController(object):
return {'return': "true"}
def run_instances(self, context, **kwargs):
- max_count = int(kwargs.get('max_count', 1))
+ min_count = int(kwargs.get('min_count', 1))
if kwargs.get('kernel_id'):
kernel = self._get_image(context, kwargs['kernel_id'])
kwargs['kernel_id'] = ec2utils.id_to_glance_id(context,
@@ -1190,8 +1190,8 @@ class CloudController(object):
instance_type=instance_types.get_instance_type_by_name(
kwargs.get('instance_type', None)),
image_href=image_uuid,
- min_count=int(kwargs.get('min_count', max_count)),
- max_count=max_count,
+ max_count=int(kwargs.get('max_count', min_count)),
+ min_count=min_count,
kernel_id=kwargs.get('kernel_id'),
ramdisk_id=kwargs.get('ramdisk_id'),
key_name=kwargs.get('key_name'),