Merge "novaclient: Convert v3 boot command with v2.1 spec (security-groups)"

This commit is contained in:
Jenkins 2014-09-17 01:24:37 +00:00 committed by Gerrit Code Review
commit 3cdfc609e5
2 changed files with 3 additions and 3 deletions

View File

@ -273,8 +273,8 @@ class ShellTest(utils.TestCase):
self.assert_called_anytime(
'POST', '/servers',
{'server': {
'os-security-groups:security_groups': [{'name': 'secgroup1'},
{'name': 'secgroup2'}],
'security_groups': [{'name': 'secgroup1'},
{'name': 'secgroup2'}],
'flavor_ref': '1',
'name': 'some-server',
'image_ref': '1',

View File

@ -428,7 +428,7 @@ class ServerManager(base.BootingManagerWithFind):
body["server"]["os-multiple-create:max_count"] = max_count
if security_groups:
body["server"]["os-security-groups:security_groups"] = \
body["server"]["security_groups"] = \
[{'name': sg} for sg in security_groups]
if availability_zone: