Skip to content

Add qos_network_id option to ports create/update #422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Networking/v2/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ public function postSinglePort(): array
'deviceOwner' => $this->params->deviceOwner(),
'deviceId' => $this->params->deviceId(),
'portSecurityEnabled' => $this->params->portSecurityEnabled(),
'qosPolicyId' => $this->params->qosPolicy(),
],
];
}
Expand Down Expand Up @@ -287,6 +288,7 @@ public function putPort(): array
'allowedAddressPairs' => $this->params->allowedAddrPairs(),
'deviceOwner' => $this->params->deviceOwner(),
'deviceId' => $this->params->deviceId(),
'qosPolicyId' => $this->params->qosPolicy(),
],
];
}
Expand Down
7 changes: 7 additions & 0 deletions src/Networking/v2/Models/Port.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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';
Expand Down
10 changes: 9 additions & 1 deletion src/Networking/v2/Params.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => 'QoS policy associated with the port.',
];
}
public function deviceId(): array
{
return [
Expand Down
Loading