Skip to content

Commit c36dec0

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Add QoS support to Network Port object."
2 parents c735694 + bad3db6 commit c36dec0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

openstack/network/v2/port.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ class Port(resource.Resource):
8989
#: The ID of the project who owns the network. Only administrative
9090
#: users can specify a project ID other than their own.
9191
project_id = resource.prop('tenant_id')
92+
#: The ID of the QoS policy attached to the port.
93+
qos_policy_id = resource.prop('qos_policy_id')
9294
#: The IDs of any attached security groups.
9395
#: *Type: list of strs of the security group IDs*
9496
security_group_ids = resource.prop('security_groups', type=list)

openstack/tests/unit/network/v2/test_port.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
'dns_assignment': [{'19': 19}],
3939
'dns_name': '20',
4040
'description': '21',
41+
'qos_policy_id': '22',
4142
'created_at': '2016-03-09T12:14:57.233772',
4243
'updated_at': '2016-07-09T12:14:57.233772',
4344
}
@@ -83,5 +84,6 @@ def test_make_it(self):
8384
self.assertEqual(EXAMPLE['dns_assignment'], sot.dns_assignment)
8485
self.assertEqual(EXAMPLE['dns_name'], sot.dns_name)
8586
self.assertEqual(EXAMPLE['description'], sot.description)
87+
self.assertEqual(EXAMPLE['qos_policy_id'], sot.qos_policy_id)
8688
self.assertEqual(EXAMPLE['created_at'], sot.created_at)
8789
self.assertEqual(EXAMPLE['updated_at'], sot.updated_at)

0 commit comments

Comments
 (0)