diff --git a/openstack/compute/v2/server_interface.py b/openstack/compute/v2/server_interface.py index f12213c54..52d3bffa8 100644 --- a/openstack/compute/v2/server_interface.py +++ b/openstack/compute/v2/server_interface.py @@ -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' diff --git a/openstack/compute/v2/volume_attachment.py b/openstack/compute/v2/volume_attachment.py index 750a62a58..770395c7d 100644 --- a/openstack/compute/v2/volume_attachment.py +++ b/openstack/compute/v2/volume_attachment.py @@ -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' diff --git a/openstack/tests/unit/compute/v2/test_server_interface.py b/openstack/tests/unit/compute/v2/test_server_interface.py index 9b4fa7f2b..5c3ef7e68 100644 --- a/openstack/tests/unit/compute/v2/test_server_interface.py +++ b/openstack/tests/unit/compute/v2/test_server_interface.py @@ -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) diff --git a/openstack/tests/unit/compute/v2/test_volume_attachment.py b/openstack/tests/unit/compute/v2/test_volume_attachment.py index 66068dce9..7a7a55c7d 100644 --- a/openstack/tests/unit/compute/v2/test_volume_attachment.py +++ b/openstack/tests/unit/compute/v2/test_volume_attachment.py @@ -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)