Skip to content

Commit bbd1e08

Browse files
committed
Add qos_policy_id to ports
1 parent 9886899 commit bbd1e08

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

src/Networking/v2/Api.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ public function postSinglePort(): array
237237
'deviceOwner' => $this->params->deviceOwner(),
238238
'deviceId' => $this->params->deviceId(),
239239
'portSecurityEnabled' => $this->params->portSecurityEnabled(),
240+
'qosPolicyId' => $this->params->qosPolicy(),
240241
],
241242
];
242243
}
@@ -287,6 +288,7 @@ public function putPort(): array
287288
'allowedAddressPairs' => $this->params->allowedAddrPairs(),
288289
'deviceOwner' => $this->params->deviceOwner(),
289290
'deviceId' => $this->params->deviceId(),
291+
'qosPolicyId' => $this->params->qosPolicy(),
290292
],
291293
];
292294
}

src/Networking/v2/Models/Port.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ class Port extends OperatorResource implements Creatable, Updateable, Deletable,
117117
* @var bool
118118
*/
119119
public $portSecurityEnabled;
120+
/**
121+
* The ID of the QoS policy associated with the port.
122+
*
123+
* @var bool
124+
*/
125+
public $qosPolicyId;
120126

121127
protected $aliases = [
122128
'port_security_enabled' => 'portSecurityEnabled',
@@ -131,6 +137,7 @@ class Port extends OperatorResource implements Creatable, Updateable, Deletable,
131137
'device_id' => 'deviceId',
132138
'fixed_ips' => 'fixedIps',
133139
'allowed_address_pairs' => 'allowedAddressPairs',
140+
'qos_policy_id' => 'qosPolicyId',
134141
];
135142

136143
protected $resourceKey = 'port';

src/Networking/v2/Params.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,15 @@ public function deviceOwner(): array
402402
'description' => 'The UUID of the entity that uses this port. For example, a DHCP agent.',
403403
];
404404
}
405-
405+
public function qosPolicy(): array
406+
{
407+
return [
408+
'type' => self::STRING_TYPE,
409+
'location' => self::JSON,
410+
'sentAs' => 'qos_policy_id',
411+
'description' => 'The UUID of the entity that uses this port. For example, a DHCP agent.',
412+
];
413+
}
406414
public function deviceId(): array
407415
{
408416
return [

0 commit comments

Comments
 (0)