From bbd1e08f58cdaff25f0993ec12fb150786cbe0b8 Mon Sep 17 00:00:00 2001 From: Ted Duncan Date: Tue, 11 Mar 2025 10:39:56 -0400 Subject: [PATCH 1/2] Add qos_policy_id to ports --- src/Networking/v2/Api.php | 2 ++ src/Networking/v2/Models/Port.php | 7 +++++++ src/Networking/v2/Params.php | 10 +++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/Networking/v2/Api.php b/src/Networking/v2/Api.php index e9bfc27b..d37f8eb3 100644 --- a/src/Networking/v2/Api.php +++ b/src/Networking/v2/Api.php @@ -237,6 +237,7 @@ public function postSinglePort(): array 'deviceOwner' => $this->params->deviceOwner(), 'deviceId' => $this->params->deviceId(), 'portSecurityEnabled' => $this->params->portSecurityEnabled(), + 'qosPolicyId' => $this->params->qosPolicy(), ], ]; } @@ -287,6 +288,7 @@ public function putPort(): array 'allowedAddressPairs' => $this->params->allowedAddrPairs(), 'deviceOwner' => $this->params->deviceOwner(), 'deviceId' => $this->params->deviceId(), + 'qosPolicyId' => $this->params->qosPolicy(), ], ]; } diff --git a/src/Networking/v2/Models/Port.php b/src/Networking/v2/Models/Port.php index 9c3dd6d5..2cdd542d 100644 --- a/src/Networking/v2/Models/Port.php +++ b/src/Networking/v2/Models/Port.php @@ -117,6 +117,12 @@ class Port extends OperatorResource implements Creatable, Updateable, Deletable, * @var bool */ public $portSecurityEnabled; + /** + * The ID of the QoS policy associated with the port. + * + * @var bool + */ + public $qosPolicyId; protected $aliases = [ 'port_security_enabled' => 'portSecurityEnabled', @@ -131,6 +137,7 @@ class Port extends OperatorResource implements Creatable, Updateable, Deletable, 'device_id' => 'deviceId', 'fixed_ips' => 'fixedIps', 'allowed_address_pairs' => 'allowedAddressPairs', + 'qos_policy_id' => 'qosPolicyId', ]; protected $resourceKey = 'port'; diff --git a/src/Networking/v2/Params.php b/src/Networking/v2/Params.php index 2e68a505..66de0f15 100644 --- a/src/Networking/v2/Params.php +++ b/src/Networking/v2/Params.php @@ -402,7 +402,15 @@ public function deviceOwner(): array 'description' => 'The UUID of the entity that uses this port. For example, a DHCP agent.', ]; } - + public function qosPolicy(): array + { + return [ + 'type' => self::STRING_TYPE, + 'location' => self::JSON, + 'sentAs' => 'qos_policy_id', + 'description' => 'The UUID of the entity that uses this port. For example, a DHCP agent.', + ]; + } public function deviceId(): array { return [ From 7c1b7f6eaa4648566a1b13d669f3d0443e27bba9 Mon Sep 17 00:00:00 2001 From: Ted Duncan Date: Tue, 11 Mar 2025 10:48:29 -0400 Subject: [PATCH 2/2] minor update --- src/Networking/v2/Params.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Networking/v2/Params.php b/src/Networking/v2/Params.php index 66de0f15..03a85ea5 100644 --- a/src/Networking/v2/Params.php +++ b/src/Networking/v2/Params.php @@ -408,7 +408,7 @@ public function qosPolicy(): array 'type' => self::STRING_TYPE, 'location' => self::JSON, 'sentAs' => 'qos_policy_id', - 'description' => 'The UUID of the entity that uses this port. For example, a DHCP agent.', + 'description' => 'QoS policy associated with the port.', ]; } public function deviceId(): array