fixed up zone-add

This commit is contained in:
Sandy Walsh 2011-08-31 11:55:01 -07:00
parent 7f3237e143
commit 1b64a3823f
3 changed files with 4 additions and 4 deletions

View File

@ -108,7 +108,7 @@ class ZoneManager(local_base.BootingManagerWithFind):
:param weight_scale: The child zone's weight scale. :param weight_scale: The child zone's weight scale.
""" """
body = {"zone": { body = {"zone": {
"zone_name": zone_name, "name": zone_name,
"api_url": api_url, "api_url": api_url,
"username": username, "username": username,
"password": password, "password": password,

View File

@ -107,7 +107,7 @@ class ZoneManager(base.BootingManagerWithFind):
:param weight_scale: The child zone's weight scale. :param weight_scale: The child zone's weight scale.
""" """
body = {"zone": { body = {"zone": {
"zone_name": zone_name, "name": zone_name,
"api_url": api_url, "api_url": api_url,
"username": username, "username": username,
"password": password, "password": password,

View File

@ -317,7 +317,7 @@ class ShellTest(utils.TestCase):
'--weight_offset=0.0 --weight_scale=1.0') '--weight_offset=0.0 --weight_scale=1.0')
self.assert_called( self.assert_called(
'POST', '/zones', 'POST', '/zones',
{'zone': {'zone_name': 'child_zone', {'zone': {'name': 'child_zone',
'api_url': 'http://zzz', 'username': 'frank', 'api_url': 'http://zzz', 'username': 'frank',
'password': 'xxx', 'password': 'xxx',
'weight_offset': '0.0', 'weight_scale': '1.0'}} 'weight_offset': '0.0', 'weight_scale': '1.0'}}
@ -327,7 +327,7 @@ class ShellTest(utils.TestCase):
self.run_command('zone-add child_zone http://zzz') self.run_command('zone-add child_zone http://zzz')
self.assert_called( self.assert_called(
'POST', '/zones', 'POST', '/zones',
{'zone': {'zone_name': 'child_zone', {'zone': {'name': 'child_zone',
'api_url': 'http://zzz', 'api_url': 'http://zzz',
'username': None, 'username': None,
'password': None, 'password': None,