Add compute microversion 2.70

Compute 2.70 [1] added the tag parameter to the server interface and
volume attachment response bodies.

[1] https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id64

Change-Id: Ibde8e269db82d610d142b7785f1b1d8b91f495b0
This commit is contained in:
Ryan Zimmerman
2021-02-17 23:21:14 -08:00
parent e68c69d025
commit 3371e2b0ed
4 changed files with 12 additions and 0 deletions

View File

@@ -37,3 +37,7 @@ class ServerInterface(resource.Resource):
port_state = resource.Body('port_state')
#: The ID for the server.
server_id = resource.URI('server_id')
#: Tags for the virtual interfaces.
tag = resource.Body('tag')
# tag introduced in 2.70
_max_microversion = '2.70'

View File

@@ -37,3 +37,7 @@ class VolumeAttachment(resource.Resource):
volume_id = resource.Body('volumeId')
#: The ID of the attachment you want to delete or update.
attachment_id = resource.Body('attachment_id', alternate_id=True)
#: Virtual device tags for the attachment.
tag = resource.Body('tag')
# tag introduced in 2.70
_max_microversion = '2.70'

View File

@@ -27,6 +27,7 @@ EXAMPLE = {
'port_id': '4',
'port_state': '5',
'server_id': '6',
'tag': '7',
}
@@ -51,3 +52,4 @@ class TestServerInterface(base.TestCase):
self.assertEqual(EXAMPLE['port_id'], sot.port_id)
self.assertEqual(EXAMPLE['port_state'], sot.port_state)
self.assertEqual(EXAMPLE['server_id'], sot.server_id)
self.assertEqual(EXAMPLE['tag'], sot.tag)

View File

@@ -18,6 +18,7 @@ EXAMPLE = {
'device': '1',
'id': '2',
'volume_id': '3',
'tag': '4',
}
@@ -44,3 +45,4 @@ class TestServerInterface(base.TestCase):
self.assertEqual(EXAMPLE['device'], sot.device)
self.assertEqual(EXAMPLE['id'], sot.id)
self.assertEqual(EXAMPLE['volume_id'], sot.volume_id)
self.assertEqual(EXAMPLE['tag'], sot.tag)