Remove OS-EXT-IPS attributes from V2.1 server ips
V2.1 server ips response contain 'OS-EXT-IPS:type' & 'OS-EXT-IPS-MAC:mac_addr' also which are new attributes compared to V2 response. These new attributes are found during tempest testing by blocking additional properties in schema -https://review.openstack.org/#/c/156130/ V2.1 must be identical with V2 and must not contain any new attributes in response. This commit removes these new attributes from V2.1 API. Partially implements blueprint v2-on-v3-api Change-Id: Id9fcce0c9629c3d325b87cf9b35f13f1ba15b13f
This commit is contained in:
parent
8f98f8205b
commit
6931bedb9e
|
@ -2,8 +2,6 @@
|
|||
"private": [
|
||||
{
|
||||
"addr": "192.168.0.3",
|
||||
"OS-EXT-IPS-MAC:mac_addr": "aa:bb:cc:dd:ee:ff",
|
||||
"OS-EXT-IPS:type": "fixed",
|
||||
"version": 4
|
||||
}
|
||||
]
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
"private": [
|
||||
{
|
||||
"addr": "192.168.0.3",
|
||||
"OS-EXT-IPS-MAC:mac_addr": "aa:bb:cc:dd:ee:ff",
|
||||
"OS-EXT-IPS:type": "fixed",
|
||||
"version": 4
|
||||
}
|
||||
]
|
||||
|
|
|
@ -28,8 +28,11 @@ authorize = extensions.os_compute_authorizer(ALIAS)
|
|||
|
||||
class IPsController(wsgi.Controller):
|
||||
"""The servers addresses API controller for the OpenStack API."""
|
||||
|
||||
_view_builder_class = views_addresses.ViewBuilderV3
|
||||
# Note(gmann): here using V2 view builder instead of V3 to have V2.1
|
||||
# server ips response same as V2 which does not include "OS-EXT-IPS:type"
|
||||
# & "OS-EXT-IPS-MAC:mac_addr". If needed those can be added with
|
||||
# microversion by using V3 view builder.
|
||||
_view_builder_class = views_addresses.ViewBuilder
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super(IPsController, self).__init__(**kwargs)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
"private": [
|
||||
{
|
||||
"addr": "%(ip)s",
|
||||
"OS-EXT-IPS-MAC:mac_addr": "aa:bb:cc:dd:ee:ff",
|
||||
"OS-EXT-IPS:type": "fixed",
|
||||
"version": 4
|
||||
}
|
||||
]
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
"private": [
|
||||
{
|
||||
"addr": "%(ip)s",
|
||||
"OS-EXT-IPS-MAC:mac_addr": "aa:bb:cc:dd:ee:ff",
|
||||
"OS-EXT-IPS:type": "fixed",
|
||||
"version": 4
|
||||
}
|
||||
]
|
||||
|
|
|
@ -477,26 +477,14 @@ class ServersControllerTest(ControllerTest):
|
|||
expected = {
|
||||
'addresses': {
|
||||
'private': [
|
||||
{'version': 4, 'addr': '192.168.0.3',
|
||||
'OS-EXT-IPS:type': 'fixed',
|
||||
'OS-EXT-IPS-MAC:mac_addr': 'bb:bb:bb:bb:bb:bb'},
|
||||
{'version': 4, 'addr': '192.168.0.4',
|
||||
'OS-EXT-IPS:type': 'fixed',
|
||||
'OS-EXT-IPS-MAC:mac_addr': 'bb:bb:bb:bb:bb:bb'},
|
||||
{'version': 4, 'addr': '192.168.0.3'},
|
||||
{'version': 4, 'addr': '192.168.0.4'},
|
||||
],
|
||||
'public': [
|
||||
{'version': 4, 'addr': '172.19.0.1',
|
||||
'OS-EXT-IPS:type': 'fixed',
|
||||
'OS-EXT-IPS-MAC:mac_addr': 'aa:aa:aa:aa:aa:aa'},
|
||||
{'version': 4, 'addr': '172.19.0.2',
|
||||
'OS-EXT-IPS:type': 'fixed',
|
||||
'OS-EXT-IPS-MAC:mac_addr': 'aa:aa:aa:aa:aa:aa'},
|
||||
{'version': 4, 'addr': '1.2.3.4',
|
||||
'OS-EXT-IPS:type': 'fixed',
|
||||
'OS-EXT-IPS-MAC:mac_addr': 'aa:aa:aa:aa:aa:aa'},
|
||||
{'version': 6, 'addr': 'b33f::fdee:ddff:fecc:bbaa',
|
||||
'OS-EXT-IPS:type': 'fixed',
|
||||
'OS-EXT-IPS-MAC:mac_addr': 'aa:aa:aa:aa:aa:aa'},
|
||||
{'version': 4, 'addr': '172.19.0.1'},
|
||||
{'version': 4, 'addr': '172.19.0.2'},
|
||||
{'version': 4, 'addr': '1.2.3.4'},
|
||||
{'version': 6, 'addr': 'b33f::fdee:ddff:fecc:bbaa'},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue