Skip to content
Draft
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
6 changes: 4 additions & 2 deletions api/v1alpha1/trunk_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ type TrunkFilter struct {
// +optional
ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"`

// Contrary to what the neutron doc say, we can't filter by status
// https://github.com/gophercloud/gophercloud/issues/3626
// status indicates the trunk state to use as a filter.
// +kubebuilder:validation:MaxLength=64
// +optional
Status string `json:"status,omitempty"`

// adminStateUp is the administrative state of the trunk.
// +optional
Expand Down
7 changes: 7 additions & 0 deletions cmd/models-schema/zz_generated.openapi.go

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

5 changes: 5 additions & 0 deletions config/crd/bases/openstack.k-orc.cloud_trunks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ spec:
maxLength: 253
minLength: 1
type: string
status:
description: status indicates the trunk state to use as a
filter.
maxLength: 64
type: string
tags:
description: |-
tags is a list of tags to filter by. If specified, the resource must
Expand Down
1 change: 1 addition & 0 deletions internal/controllers/trunk/actuator.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func (actuator trunkActuator) ListOSResourcesForImport(ctx context.Context, obj
PortID: ptr.Deref(port.Status.ID, ""),
ProjectID: ptr.Deref(project.Status.ID, ""),
AdminStateUp: filter.AdminStateUp,
Status: filter.Status,
Tags: tags.Join(filter.Tags),
TagsAny: tags.Join(filter.TagsAny),
NotTags: tags.Join(filter.NotTags),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ spec:
filter:
name: trunk-import-external
description: Trunk trunk-import-external from "trunk-import" test
status: ACTIVE
adminStateUp: true
tags:
- trunk-import-tag
9 changes: 9 additions & 0 deletions pkg/clients/applyconfiguration/api/v1alpha1/trunkfilter.go

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

3 changes: 3 additions & 0 deletions pkg/clients/applyconfiguration/internal/internal.go

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

1 change: 1 addition & 0 deletions website/docs/crd-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -4194,6 +4194,7 @@ _Appears in:_
| `description` _[NeutronDescription](#neutrondescription)_ | description of the existing resource | | MaxLength: 255 <br />MinLength: 1 <br />Optional: \{\} <br /> |
| `portRef` _[KubernetesNameRef](#kubernetesnameref)_ | portRef is a reference to the ORC Port which this resource is associated with. | | MaxLength: 253 <br />MinLength: 1 <br />Optional: \{\} <br /> |
| `projectRef` _[KubernetesNameRef](#kubernetesnameref)_ | projectRef is a reference to the ORC Project which this resource is associated with. | | MaxLength: 253 <br />MinLength: 1 <br />Optional: \{\} <br /> |
| `status` _string_ | status indicates the trunk state to use as a filter. | | MaxLength: 64 <br />Optional: \{\} <br /> |
| `adminStateUp` _boolean_ | adminStateUp is the administrative state of the trunk. | | Optional: \{\} <br /> |
| `tags` _[NeutronTag](#neutrontag) array_ | tags is a list of tags to filter by. If specified, the resource must<br />have all of the tags specified to be included in the result. | | MaxItems: 64 <br />MaxLength: 255 <br />MinLength: 1 <br />Optional: \{\} <br /> |
| `tagsAny` _[NeutronTag](#neutrontag) array_ | tagsAny is a list of tags to filter by. If specified, the resource<br />must have at least one of the tags specified to be included in the<br />result. | | MaxItems: 64 <br />MaxLength: 255 <br />MinLength: 1 <br />Optional: \{\} <br /> |
Expand Down
Loading