Skip to content
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
35 changes: 35 additions & 0 deletions api/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,32 @@ type AllocationPool struct {
End string `json:"end"`
}

// QoSPolicyParam specifies an OpenStack QoS Policy to use. It requires the neutron qos extension to be enabled.
// It may be specified by either ID or filter, but not both.
// +kubebuilder:validation:MaxProperties:=1
// +kubebuilder:validation:MinProperties:=1
type QoSPolicyParam struct {
// ID is the ID of the QoS policy to use. If ID is provided, filter cannot be provided. Must be in UUID format.
// +kubebuilder:validation:Format:=uuid
// +optional
ID optional.String `json:"id,omitempty"`

// Filter specifies a filter to select an OpenStack QoS policy. If provided, cannot be empty.
Filter *QoSPolicyFilter `json:"filter,omitempty"`
}

// QoSPolicyFilter specifies a query to select an OpenStack QoS Policy. At least one property must be set.
// +kubebuilder:validation:MinProperties:=1
type QoSPolicyFilter struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
ProjectID string `json:"projectID,omitempty"`
Shared *bool `json:"shared,omitempty"`
IsDefault *bool `json:"isDefault,omitempty"`

FilterByNeutronTags `json:",inline"`
}

type PortOpts struct {
// Network is a query for an openstack network that the port will be created or discovered on.
// This will fail if the query returns more than one network.
Expand Down Expand Up @@ -326,6 +352,11 @@ type PortOpts struct {
// +optional
Trunk *bool `json:"trunk,omitempty"`

// QoSPolicy is a query for an openstack QoS policy that the port will use.
// This will fail if the query returns more than one qos policy.
// +optional
QoSPolicy *QoSPolicyParam `json:"qosPolicy,omitempty"`

ResolvedPortSpecFields `json:",inline"`
}

Expand Down Expand Up @@ -422,6 +453,10 @@ type ResolvedPortSpec struct {
// +listType=atomic
SecurityGroups []string `json:"securityGroups,omitempty"`

// QoSPolicyID is the ID of the qos policy the port will use.
// +optional
QoSPolicyID *string `json:"qosPolicyID,omitempty"`

ResolvedPortSpecFields `json:",inline"`
}

Expand Down
61 changes: 61 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions api_violations.report
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,StatusCause
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Time,Time
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentEncoding
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentType
API rule violation: names_match,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,PortOpts,QoSPolicy
API rule violation: names_match,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,ResolvedFixedIP,SubnetID
API rule violation: names_match,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,ResolvedPortSpec,QoSPolicyID
API rule violation: names_match,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,Router,IPs
API rule violation: names_match,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,SubnetFilter,IPv6AddressMode
API rule violation: names_match,sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1,SubnetFilter,IPv6RAMode
Expand Down
168 changes: 167 additions & 1 deletion cmd/models-schema/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading