@@ -16,6 +16,8 @@ limitations under the License.
1616
1717package v1alpha1
1818
19+ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
20+
1921// ShareNetworkResourceSpec contains the desired state of the resource.
2022type ShareNetworkResourceSpec struct {
2123 // name will be the name of the created resource. If not specified, the
@@ -32,20 +34,12 @@ type ShareNetworkResourceSpec struct {
3234 // networkRef is a reference to the ORC Network which this resource is associated with.
3335 // +optional
3436 // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="networkRef is immutable"
35- NetworkRef * KubernetesNameRef `json:"networkRef,omitempty "`
37+ NetworkRef * KubernetesNameRef `json:"networkRef"`
3638
3739 // subnetRef is a reference to the ORC Subnet which this resource is associated with.
3840 // +optional
3941 // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="subnetRef is immutable"
40- SubnetRef * KubernetesNameRef `json:"subnetRef,omitempty"`
41-
42- // TODO(scaffolding): Add more types.
43- // To see what is supported, you can take inspiration from the CreateOpts structure from
44- // github.com/gophercloud/gophercloud/v2/openstack/sharedfilesystems/v2/sharenetworks
45- //
46- // Until you have implemented mutability for the field, you must add a CEL validation
47- // preventing the field being modified:
48- // `// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="<fieldname> is immutable"`
42+ SubnetRef * KubernetesNameRef `json:"subnetRef"`
4943}
5044
5145// ShareNetworkFilter defines an existing resource by its properties
@@ -60,15 +54,11 @@ type ShareNetworkFilter struct {
6054 // +kubebuilder:validation:MaxLength:=255
6155 // +optional
6256 Description * string `json:"description,omitempty"`
63-
64- // TODO(scaffolding): Add more types.
65- // To see what is supported, you can take inspiration from the ListOpts structure from
66- // github.com/gophercloud/gophercloud/v2/openstack/sharedfilesystems/v2/sharenetworks
6757}
6858
6959// ShareNetworkResourceStatus represents the observed state of the resource.
7060type ShareNetworkResourceStatus struct {
71- // name is a Human-readable name for the resource. Might not be unique.
61+ // name is a Human-readable name for the resource.
7262 // +kubebuilder:validation:MaxLength=1024
7363 // +optional
7464 Name string `json:"name,omitempty"`
@@ -78,17 +68,44 @@ type ShareNetworkResourceStatus struct {
7868 // +optional
7969 Description string `json:"description,omitempty"`
8070
81- // networkID is the ID of the Network to which the resource is associated.
71+ // neutronNetID is the Neutron network ID.
72+ // +kubebuilder:validation:MaxLength=1024
73+ // +optional
74+ NeutronNetID string `json:"neutronNetID,omitempty"`
75+
76+ // neutronSubnetID is the Neutron subnet ID.
77+ // +kubebuilder:validation:MaxLength=1024
78+ // +optional
79+ NeutronSubnetID string `json:"neutronSubnetID,omitempty"`
80+
81+ // networkType is the network type (e.g., vlan, vxlan, flat).
82+ // +kubebuilder:validation:MaxLength=1024
83+ // +optional
84+ NetworkType string `json:"networkType,omitempty"`
85+
86+ // segmentationID is the segmentation ID.
87+ // +optional
88+ SegmentationID * int32 `json:"segmentationID,omitempty"`
89+
90+ // cidr is the CIDR of the subnet.
8291 // +kubebuilder:validation:MaxLength=1024
8392 // +optional
84- NetworkID string `json:"networkID ,omitempty"`
93+ CIDR string `json:"cidr ,omitempty"`
8594
86- // subnetID is the ID of the Subnet to which the resource is associated.
95+ // ipVersion is the IP version (4 or 6).
96+ // +optional
97+ IPVersion * int32 `json:"ipVersion,omitempty"`
98+
99+ // projectID is the ID of the project that owns the share network.
87100 // +kubebuilder:validation:MaxLength=1024
88101 // +optional
89- SubnetID string `json:"subnetID,omitempty"`
102+ ProjectID string `json:"projectID,omitempty"`
103+
104+ // createdAt shows the date and time when the resource was created.
105+ // +optional
106+ CreatedAt * metav1.Time `json:"createdAt,omitempty"`
90107
91- // TODO(scaffolding): Add more types .
92- // To see what is supported, you can take inspiration from the ShareNetwork structure from
93- // github.com/gophercloud/gophercloud/v2/openstack/sharedfilesystems/v2/sharenetworks
108+ // updatedAt shows the date and time when the resource was updated .
109+ // +optional
110+ UpdatedAt * metav1. Time `json:"updatedAt,omitempty"`
94111}
0 commit comments