"qos_network_policy_id" attribute added to port resource

Change-Id: I0dd2104e26e49119ad384d35318ac0f4d21a21ad
Partial-Bug: #1851362
This commit is contained in:
Rodolfo Alonso Hernandez 2019-11-06 20:04:31 +00:00
parent 999e38cf08
commit 37ec175817
3 changed files with 11 additions and 0 deletions

View File

@ -105,6 +105,9 @@ class Port(resource.Resource, resource.TagMixin):
#: Whether to propagate uplink status of the port. *Type: bool*
propagate_uplink_status = resource.Body('propagate_uplink_status',
type=bool)
#: Read-only. The ID of the QoS policy attached to the network where the
# port is bound.
qos_network_policy_id = resource.Body('qos_network_policy_id')
#: The ID of the QoS policy attached to the port.
qos_policy_id = resource.Body('qos_policy_id')
#: Read-only. The port-resource-request exposes Placement resources

View File

@ -38,6 +38,7 @@ EXAMPLE = {
'name': '17',
'network_id': '18',
'port_security_enabled': True,
'qos_network_policy_id': '32',
'qos_policy_id': '21',
'propagate_uplink_status': False,
'resource_request': {
@ -127,6 +128,8 @@ class TestPort(base.TestCase):
self.assertEqual(EXAMPLE['name'], sot.name)
self.assertEqual(EXAMPLE['network_id'], sot.network_id)
self.assertTrue(sot.is_port_security_enabled)
self.assertEqual(EXAMPLE['qos_network_policy_id'],
sot.qos_network_policy_id)
self.assertEqual(EXAMPLE['qos_policy_id'], sot.qos_policy_id)
self.assertEqual(EXAMPLE['propagate_uplink_status'],
sot.propagate_uplink_status)

View File

@ -0,0 +1,5 @@
---
features:
- |
``qos_network_policy_id`` attribute support has been added to the network
port resource