diff options
| author | Alex Meade <alex.meade@rackspace.com> | 2011-08-18 16:27:49 -0400 |
|---|---|---|
| committer | Alex Meade <alex.meade@rackspace.com> | 2011-08-18 16:27:49 -0400 |
| commit | cca07a461d6c826a9dcc902b7b88afe602377756 (patch) | |
| tree | 3db3e1c3695788293af0d7aa27e406c5489c0318 /nova/api | |
| parent | 9033d4879556452d3b7c0ee9fa9fcafbea59e5be (diff) | |
updated PUT to severs/id to handle accessIPv4 and accessIPv6
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/servers.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py index f06ee6b62..df55d981a 100644 --- a/nova/api/openstack/servers.py +++ b/nova/api/openstack/servers.py @@ -163,7 +163,7 @@ class Controller(object): @scheduler_api.redirect_handler def update(self, req, id, body): - """Update server name then pass on to version-specific controller""" + """Update server then pass on to version-specific controller""" if len(req.body) == 0: raise exc.HTTPUnprocessableEntity() @@ -178,6 +178,14 @@ class Controller(object): self.helper._validate_server_name(name) update_dict['display_name'] = name.strip() + if 'accessIPv4' in body['server']: + access_ipv4 = body['server']['accessIPv4'] + update_dict['access_ip_v4'] = access_ipv4.strip() + + if 'accessIPv6' in body['server']: + access_ipv6 = body['server']['accessIPv6'] + update_dict['access_ip_v6'] = access_ipv6.strip() + try: self.compute_api.update(ctxt, id, **update_dict) except exception.NotFound: |
