diff options
| author | Thorsten Tarrach <thorsten@atomia.com> | 2012-01-30 11:38:06 +0100 |
|---|---|---|
| committer | Thorsten Tarrach <thorsten@atomia.com> | 2012-02-01 16:00:45 +0100 |
| commit | 553982fb8b7e2f8a90b7e873010452fe3b174018 (patch) | |
| tree | bd0f6a6af811da76a9e8c15e8f3567ccef532851 | |
| parent | c9ac6e1671df689c3ba4a4d55f8740bd8f2e8f0e (diff) | |
fixed bug 920856
Changed the responses to match that of Amazon EC2
Changed test to expect that response
Change-Id: Ia03a0ea663614944067c0a0193058ba91e149ad2
| -rw-r--r-- | Authors | 1 | ||||
| -rw-r--r-- | nova/api/ec2/cloud.py | 6 | ||||
| -rw-r--r-- | nova/tests/api/ec2/test_cloud.py | 2 |
3 files changed, 5 insertions, 4 deletions
@@ -148,6 +148,7 @@ Tim Simpson <tim.simpson@rackspace.com> Todd Willey <todd@ansolabs.com> Tomoe Sugihara <tomoe@midokura.com> Tomoya Masuko<masukotm@nttdata.co.jp> +Thorsten Tarrach <thorsten@atomia.com> Trey Morris <trey.morris@rackspace.com> Troy Toman <troy.toman@rackspace.com> Tushar Patil <tushar.vitthal.patil@gmail.com> diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 5a3b952a9..55969b2eb 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -1201,7 +1201,7 @@ class CloudController(object): def release_address(self, context, public_ip, **kwargs): LOG.audit(_("Release address %s"), public_ip, context=context) self.network_api.release_floating_ip(context, address=public_ip) - return {'releaseResponse': ["Address released."]} + return {'return': "true"} def associate_address(self, context, instance_id, public_ip, **kwargs): LOG.audit(_("Associate address %(public_ip)s to" @@ -1211,12 +1211,12 @@ class CloudController(object): self.compute_api.associate_floating_ip(context, instance, address=public_ip) - return {'associateResponse': ["Address associated."]} + return {'return': "true"} def disassociate_address(self, context, public_ip, **kwargs): LOG.audit(_("Disassociate address %s"), public_ip, context=context) self.network_api.disassociate_floating_ip(context, address=public_ip) - return {'disassociateResponse': ["Address disassociated."]} + return {'return': "true"} def run_instances(self, context, **kwargs): max_count = int(kwargs.get('max_count', 1)) diff --git a/nova/tests/api/ec2/test_cloud.py b/nova/tests/api/ec2/test_cloud.py index d5fccffb9..ee0f31821 100644 --- a/nova/tests/api/ec2/test_cloud.py +++ b/nova/tests/api/ec2/test_cloud.py @@ -196,7 +196,7 @@ class CloudTestCase(test.TestCase): 'pool': 'nova', 'project_id': self.project_id}) result = self.cloud.release_address(self.context, address) - self.assertEqual(result['releaseResponse'], ['Address released.']) + self.assertEqual(result.get('return', None), 'true') def test_associate_disassociate_address(self): """Verifies associate runs cleanly without raising an exception""" |
