Add QoS support to Network object.

Added "qos_policy_id" member to Network class.

Change-Id: I668ab6724d79503699b71cccd556ffdcd13ccd00
Closes-Bug: #1627069
This commit is contained in:
Rodolfo Alonso Hernandez 2016-09-23 17:37:08 +01:00
parent 8d583936c8
commit 69d79c97e8
2 changed files with 4 additions and 0 deletions

View File

@ -78,6 +78,8 @@ class Network(resource.Resource):
#: An isolated segment ID on the physical network. The provider
#: network type defines the segmentation model.
provider_segmentation_id = resource.prop('provider:segmentation_id')
#: The ID of the QoS policy attached to the port.
qos_policy_id = resource.prop('qos_policy_id')
#: Revision number of the network. *Type: int*
revision_number = resource.prop('revision_number', type=int)
segments = resource.prop('segments')

View File

@ -35,6 +35,7 @@ EXAMPLE = {
'ipv4_address_scope': '17',
'ipv6_address_scope': '18',
'description': '19',
'qos_policy_id': '20',
'created_at': '2016-03-09T12:14:57.233772',
'updated_at': '2016-07-09T12:14:57.233772',
'is_default': False,
@ -85,6 +86,7 @@ class TestNetwork(testtools.TestCase):
self.assertEqual(EXAMPLE['ipv6_address_scope'],
sot.ipv6_address_scope_id)
self.assertEqual(EXAMPLE['description'], sot.description)
self.assertEqual(EXAMPLE['qos_policy_id'], sot.qos_policy_id)
self.assertEqual(EXAMPLE['created_at'], sot.created_at)
self.assertEqual(EXAMPLE['updated_at'], sot.updated_at)
self.assertFalse(sot.is_default)