-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agent dscp #1
base: feature/dscp
Are you sure you want to change the base?
Agent dscp #1
Changes from all commits
a897e69
a7d9bff
a4cda5f
0c5954b
6492a14
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[gerrit] | ||
host=review.openstack.org | ||
port=29418 | ||
project=openstack/neutron.git | ||
defaultbranch=stable/liberty | ||
#[gerrit] | ||
#host=review.openstack.org | ||
#port=29418 | ||
#project=openstack/neutron.git | ||
#defaultbranch=stable/liberty |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,8 @@ | |
|
||
TEST_POLICY_ID1 = "a2d72369-4246-4f19-bd3c-af51ec8d70cd" | ||
TEST_POLICY_ID2 = "46ebaec0-0570-43ac-82f6-60d2b03168c5" | ||
TEST_DSCP_TAG_1 = 1 | ||
TEST_DSCP_TAG_2 = 2 | ||
TEST_BW_LIMIT_RULE_1 = rule.QosBandwidthLimitRule( | ||
context=None, | ||
qos_policy_id=TEST_POLICY_ID1, | ||
|
@@ -107,6 +109,18 @@ def wait_until_bandwidth_limit_rule_applied(self, port, rule): | |
l2_extensions.wait_until_bandwidth_limit_rule_applied( | ||
self.agent.int_br, port['vif_name'], rule) | ||
|
||
def _assert_dscp_marking_rule_is_set(self, qos_policy, dscp_tag): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggest: _assert_dscp_marking_rule_is_set(self, port, rule) (and likewise for the next two methods) |
||
current_dscp_tag = self.agent.int_br.get_dscp_marking_rule(qos_policy) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggest: current_dscp_tag = self.agent.int_br.get_dscp_mark(port['ofport']) (and similarly, for next two methods) the argument here, port['ofport'], might instead be port.ofport or something else; i'll try to figure this out if you don't readily know. |
||
self.assertEqual(dscp_tag, current_dscp_tag) | ||
|
||
def _assert_dscp_marking_rule_not_set(self, qos_policy, port): | ||
current_dscp_tag = self.agent.int_br.get_dscp_marking_rule(qos_policy) | ||
self.assertIsNone(current_dscp_tag) | ||
|
||
def wait_until_dscp_marking_rule_applied(self, qos_policy, dscp_tag): | ||
l2_extensions.wait_until_dscp_marking_rule_applied( | ||
self.agent.int_br, qos_policy, dscp_tag) | ||
|
||
def _create_port_with_qos(self): | ||
port_dict = self._create_test_port_dict() | ||
port_dict['qos_policy_id'] = TEST_POLICY_ID1 | ||
|
@@ -185,7 +199,11 @@ def test_port_qos_update_policy_id(self): | |
self.agent.port_update(None, port=port_dict) | ||
|
||
self.wait_until_bandwidth_limit_rule_applied(port_dict, | ||
TEST_BW_LIMIT_RULE_2) | ||
TEST_BW_LIMIT_RULE_1) | ||
self.wait_until_dscp_marking_rule_applied(TEST_POLICY_ID1, | ||
TEST_DSCP_TAG_1) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggest TEST_DSCP_RULE_1 (and similarly for line 206) |
||
self.wait_until_dscp_marking_rule_applied(TEST_POLICY_ID2, | ||
TEST_DSCP_TAG_2) | ||
|
||
def test_policy_rule_delete(self): | ||
port_dict = self._create_port_with_qos() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two things: