@@ -290,6 +290,32 @@ type AllocationPool struct {
290290	End  string  `json:"end"` 
291291}
292292
293+ // QoSPolicyParam specifies an OpenStack QoS Policy to use. It requires the neutron qos extension to be enabled. 
294+ // It may be specified by either ID or filter, but not both. 
295+ // +kubebuilder:validation:MaxProperties:=1 
296+ // +kubebuilder:validation:MinProperties:=1 
297+ type  QoSPolicyParam  struct  {
298+ 	// ID is the ID of the QoS policy to use. If ID is provided, filter cannot be provided. Must be in UUID format. 
299+ 	// +kubebuilder:validation:Format:=uuid 
300+ 	// +optional 
301+ 	ID  optional.String  `json:"id,omitempty"` 
302+ 
303+ 	// Filter specifies a filter to select an OpenStack QoS policy. If provided, cannot be empty. 
304+ 	Filter  * QoSPolicyFilter  `json:"filter,omitempty"` 
305+ }
306+ 
307+ // QoSPolicyFilter specifies a query to select an OpenStack router. At least one property must be set. 
308+ // +kubebuilder:validation:MinProperties:=1 
309+ type  QoSPolicyFilter  struct  {
310+ 	Name         string  `json:"name,omitempty"` 
311+ 	Description  string  `json:"description,omitempty"` 
312+ 	ProjectID    string  `json:"projectID,omitempty"` 
313+ 	Shared       * bool   `json:"shared,omitempty"` 
314+ 	IsDefault    * bool   `json:"isDefault,omitempty"` 
315+ 
316+ 	FilterByNeutronTags  `json:",inline"` 
317+ }
318+ 
293319type  PortOpts  struct  {
294320	// Network is a query for an openstack network that the port will be created or discovered on. 
295321	// This will fail if the query returns more than one network. 
@@ -326,6 +352,11 @@ type PortOpts struct {
326352	// +optional 
327353	Trunk  * bool  `json:"trunk,omitempty"` 
328354
355+ 	// QoSPolicy is a query for an openstack QoS policy that the port will use. 
356+ 	// This will fail if the query returns more than one qos policy. 
357+ 	// +optional 
358+ 	QoSPolicy  * QoSPolicyParam  `json:"qosPolicy,omitempty"` 
359+ 
329360	ResolvedPortSpecFields  `json:",inline"` 
330361}
331362
@@ -422,6 +453,10 @@ type ResolvedPortSpec struct {
422453	// +listType=atomic 
423454	SecurityGroups  []string  `json:"securityGroups,omitempty"` 
424455
456+ 	// QoSPolicyID is the ID of the qos policy the port will use. 
457+ 	// +optional 
458+ 	QoSPolicyID  * string  `json:"qosPolicyID"` 
459+ 
425460	ResolvedPortSpecFields  `json:",inline"` 
426461}
427462
0 commit comments