Add "vlan_qinq" attribute to the "network" resource

Depends-On: https://review.opendev.org/c/openstack/python-openstackclient/+/940111

Related-Bug: #1915151
Change-Id: I58e9a8bde3dc9425c8ea698a6f4ec07ce21f1e5a
This commit is contained in:
Slawek Kaplonski
2025-01-21 11:50:04 +01:00
parent da17a2762e
commit bf86293362
4 changed files with 11 additions and 0 deletions

View File

@@ -115,6 +115,8 @@ class Network(_base.NetworkResource, _base.TagMixinNetwork):
updated_at = resource.Body('updated_at')
#: Indicates the VLAN transparency mode of the network
is_vlan_transparent = resource.Body('vlan_transparent', type=bool)
#: Indicates the VLAN QinQ mode of the network
is_vlan_qinq = resource.Body('vlan_qinq', type=bool)
class DHCPAgentHostingNetwork(Network):

View File

@@ -162,6 +162,7 @@ class TestNetworks(base.TestCase):
'mtu': 0,
'dns_domain': 'sample.openstack.org.',
'vlan_transparent': None,
'vlan_qinq': None,
'segments': None,
}

View File

@@ -42,6 +42,7 @@ EXAMPLE = {
'subnets': ['18', '19'],
'updated_at': '2016-07-09T12:14:57.233772',
'vlan_transparent': False,
'vlan_qinq': False,
}
@@ -97,6 +98,7 @@ class TestNetwork(base.TestCase):
self.assertEqual(EXAMPLE['subnets'], sot.subnet_ids)
self.assertEqual(EXAMPLE['updated_at'], sot.updated_at)
self.assertEqual(EXAMPLE['vlan_transparent'], sot.is_vlan_transparent)
self.assertEqual(EXAMPLE['vlan_qinq'], sot.is_vlan_qinq)
self.assertDictEqual(
{

View File

@@ -0,0 +1,6 @@
---
features:
- |
Add ``vlan_qinq`` attribute to the ``network`` resource. Users can use this
attribute to create network which will allow to configure VLANs
transparently in the guest VM and will use ethertype ``0x8a88 (802.1ad)``.