Skip to content

Commit

Permalink
Merge "Remove accessips attribute from V2.1 POST server resp"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Feb 27, 2015
2 parents 057aa08 + 1c29a25 commit c48a7da
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 23 deletions.
2 changes: 0 additions & 2 deletions doc/v3/api_samples/all_extensions/server-post-resp.json
Expand Up @@ -13,8 +13,6 @@
"rel": "bookmark"
}
],
"accessIPv4": "",
"accessIPv6": "",
"security_groups": [
{
"name": "default"
Expand Down
4 changes: 1 addition & 3 deletions doc/v3/api_samples/os-access-ips/server-post-resp.json
Expand Up @@ -11,8 +11,6 @@
"href": "http://openstack.example.com/servers/934760e1-2b0b-4f9e-a916-eac1e69839dc",
"rel": "bookmark"
}
],
"accessIPv4": "1.2.3.4",
"accessIPv6": "fe80::"
]
}
}
7 changes: 0 additions & 7 deletions nova/api/openstack/compute/plugins/v3/access_ips.py
Expand Up @@ -30,13 +30,6 @@ def _extend_server(self, req, server):
server['accessIPv6'] = (
str(ip_v6) if ip_v6 is not None else '')

@wsgi.extends
def create(self, req, resp_obj, body):
context = req.environ['nova.context']
if authorize(context) and 'server' in resp_obj.obj:
server = resp_obj.obj['server']
self._extend_server(req, server)

@wsgi.extends
def show(self, req, resp_obj, id):
context = req.environ['nova.context']
Expand Down
Expand Up @@ -17,8 +17,6 @@
{
"name": "default"
}
],
"accessIPv4": "",
"accessIPv6": ""
]
}
}
@@ -1,7 +1,5 @@
{
"server": {
"accessIPv4": "%(access_ip_v4)s",
"accessIPv6": "%(access_ip_v6)s",
"adminPass": "%(password)s",
"id": "%(id)s",
"links": [
Expand Down
Expand Up @@ -350,12 +350,6 @@ def _test_without_access_ips(self, func, kwargs={'id': 'fake'}):
self.assertEqual(resp_obj.obj['server'][access_ips.AccessIPs.v6_key],
'')

def test_create(self):
self._test_with_access_ips(self.controller.create, {'body': {}})

def test_create_without_access_ips(self):
self._test_with_access_ips(self.controller.create, {'body': {}})

def test_show(self):
self._test_with_access_ips(self.controller.show)

Expand Down

0 comments on commit c48a7da

Please sign in to comment.