Add qos_network_policy_id to network port tests

Added "qos_network_policy_id" to "port show" command. Because this is
just a read-only parameter and is read from the SDK port definition,
this patch only modifies the corresponding tests.

This patch is adding this new parameter to the test bench.

Change-Id: Ice7423e0e0b98a39cc36622b70eae5a8493a037c
Closes-Bug: #1851362
This commit is contained in:
Rodolfo Alonso Hernandez 2020-01-09 17:52:37 +00:00
parent d15bbada73
commit 2745b178a4
2 changed files with 3 additions and 0 deletions
openstackclient/tests/unit/network/v2

@ -639,6 +639,7 @@ class FakePort(object):
'security_group_ids': [],
'status': 'ACTIVE',
'tenant_id': 'project-id-' + uuid.uuid4().hex,
'qos_network_policy_id': 'qos-policy-id-' + uuid.uuid4().hex,
'qos_policy_id': 'qos-policy-id-' + uuid.uuid4().hex,
'tags': [],
'uplink_status_propagation': False,

@ -61,6 +61,7 @@ class TestPort(network_fakes.TestNetworkV2):
'network_id',
'port_security_enabled',
'project_id',
'qos_network_policy_id',
'qos_policy_id',
'security_group_ids',
'status',
@ -91,6 +92,7 @@ class TestPort(network_fakes.TestNetworkV2):
fake_port.network_id,
fake_port.port_security_enabled,
fake_port.project_id,
fake_port.qos_network_policy_id,
fake_port.qos_policy_id,
format_columns.ListColumn(fake_port.security_group_ids),
fake_port.status,