From 2745b178a43f51ba837c485eed08c8ef6011a9ea Mon Sep 17 00:00:00 2001
From: Rodolfo Alonso Hernandez <ralonsoh@redhat.com>
Date: Thu, 9 Jan 2020 17:52:37 +0000
Subject: [PATCH] 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
---
 openstackclient/tests/unit/network/v2/fakes.py     | 1 +
 openstackclient/tests/unit/network/v2/test_port.py | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/openstackclient/tests/unit/network/v2/fakes.py b/openstackclient/tests/unit/network/v2/fakes.py
index 35f0b1a59c..e2e09cbadf 100644
--- a/openstackclient/tests/unit/network/v2/fakes.py
+++ b/openstackclient/tests/unit/network/v2/fakes.py
@@ -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,
diff --git a/openstackclient/tests/unit/network/v2/test_port.py b/openstackclient/tests/unit/network/v2/test_port.py
index c30d682f59..ec063b17a4 100644
--- a/openstackclient/tests/unit/network/v2/test_port.py
+++ b/openstackclient/tests/unit/network/v2/test_port.py
@@ -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,