Add "numa_affinity_policy" attribute to "port"

Change-Id: I467ac83f04d0724897fb59b789ae9b666942e1ea
Related-Bug: #1886798
This commit is contained in:
Rodolfo Alonso Hernandez 2020-07-10 08:56:06 +00:00
parent 6f9cd3f7a7
commit 1124c32dd2
3 changed files with 11 additions and 0 deletions

View File

@ -104,6 +104,8 @@ class Port(_base.NetworkResource, resource.TagMixin):
name = resource.Body('name')
#: The ID of the attached network.
network_id = resource.Body('network_id')
#: The NUMA affinity policy defined for this port.
numa_affinity_policy = resource.Body('numa_affinity_policy')
#: The ID of the project who owns the network. Only administrative
#: users can specify a project ID other than their own.
project_id = resource.Body('tenant_id')

View File

@ -38,6 +38,7 @@ EXAMPLE = {
'mac_address': '16',
'name': '17',
'network_id': '18',
'numa_affinity_policy': False,
'port_security_enabled': True,
'qos_network_policy_id': '32',
'qos_policy_id': '21',
@ -130,6 +131,8 @@ class TestPort(base.TestCase):
self.assertEqual(EXAMPLE['mac_address'], sot.mac_address)
self.assertEqual(EXAMPLE['name'], sot.name)
self.assertEqual(EXAMPLE['network_id'], sot.network_id)
self.assertEqual(EXAMPLE['numa_affinity_policy'],
sot.numa_affinity_policy)
self.assertTrue(sot.is_port_security_enabled)
self.assertEqual(EXAMPLE['qos_network_policy_id'],
sot.qos_network_policy_id)

View File

@ -0,0 +1,6 @@
---
features:
- |
Add ``numa_affinity_policy`` attribute to ``port`` resource. Users
can set this attribute to ``required``, ``deferred`` or ``legacy``.
This parameter is nullable.