From ffacfe0b248b2cc4329e6bd8e793a64be98cc6f2 Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Wed, 13 Jul 2016 08:22:08 +0300 Subject: [PATCH] Integrate QoS constants change patch I4f10ef3c1cbaa2a868de2b8e3abc4c39eb1f44c7 broke our code Change-Id: Ib24866e9e2f4d3f0412cc2e793ecb4711cb10732 --- vmware_nsx/plugins/nsx_v/plugin.py | 2 +- vmware_nsx/plugins/nsx_v3/plugin.py | 2 +- vmware_nsx/services/qos/nsx_v/utils.py | 2 +- vmware_nsx/tests/unit/services/qos/test_nsxv_notification.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vmware_nsx/plugins/nsx_v/plugin.py b/vmware_nsx/plugins/nsx_v/plugin.py index 3e03307961..1321b54a90 100644 --- a/vmware_nsx/plugins/nsx_v/plugin.py +++ b/vmware_nsx/plugins/nsx_v/plugin.py @@ -152,7 +152,7 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin, "router_availability_zone"] supported_qos_rule_types = [qos_consts.RULE_TYPE_BANDWIDTH_LIMIT, - qos_consts.RULE_TYPE_DSCP_MARK] + qos_consts.RULE_TYPE_DSCP_MARKING] __native_bulk_support = True __native_pagination_support = True diff --git a/vmware_nsx/plugins/nsx_v3/plugin.py b/vmware_nsx/plugins/nsx_v3/plugin.py index 1ae44baab2..9d9cf0f9ec 100644 --- a/vmware_nsx/plugins/nsx_v3/plugin.py +++ b/vmware_nsx/plugins/nsx_v3/plugin.py @@ -142,7 +142,7 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin, "security-group-logging"] supported_qos_rule_types = [qos_consts.RULE_TYPE_BANDWIDTH_LIMIT, - qos_consts.RULE_TYPE_DSCP_MARK] + qos_consts.RULE_TYPE_DSCP_MARKING] @resource_registry.tracked_resources( network=models_v2.Network, diff --git a/vmware_nsx/services/qos/nsx_v/utils.py b/vmware_nsx/services/qos/nsx_v/utils.py index 7ef6219ba6..35d47b398b 100644 --- a/vmware_nsx/services/qos/nsx_v/utils.py +++ b/vmware_nsx/services/qos/nsx_v/utils.py @@ -80,7 +80,7 @@ class NsxVQosRule(object): self.peakBandwidth = self.averageBandwidth # burstSize: kbps (neutron) -> Bytes (nsxv) self.burstSize = rule_obj['max_burst_kbps'] * 128 - if rule_obj['type'] == qos_consts.RULE_TYPE_DSCP_MARK: + if rule_obj['type'] == qos_consts.RULE_TYPE_DSCP_MARKING: self.dscpMarkEnabled = True self.dscpMarkValue = rule_obj['dscp_mark'] diff --git a/vmware_nsx/tests/unit/services/qos/test_nsxv_notification.py b/vmware_nsx/tests/unit/services/qos/test_nsxv_notification.py index a8bbab3ae5..ba9a31f6d4 100644 --- a/vmware_nsx/tests/unit/services/qos/test_nsxv_notification.py +++ b/vmware_nsx/tests/unit/services/qos/test_nsxv_notification.py @@ -80,7 +80,7 @@ class TestQosNsxVNotification(test_plugin.NsxVPluginV2TestCase, 'dscp_marking_rule': { 'id': uuidutils.generate_uuid(), 'dscp_mark': 22, - 'type': qos_consts.RULE_TYPE_DSCP_MARK}} + 'type': qos_consts.RULE_TYPE_DSCP_MARKING}} self.policy = policy_object.QosPolicy( self.ctxt, **self.policy_data['policy'])