Skip to content

Commit c7c5baf

Browse files
committed
Rename fields to correctly do uppercase acronyms
K8s API conventions require the acronyms in the field names to be uppercase if not being the first word in the name. We aren't following this in several places and this commit fixes these occurrences: * `projectId` becomes `projectID` * `gateway_ip` becomes `gatewayIP` * `ipv6RaMode` becomes `ipv6RAMode` * `networkMtu` becomes `networkMTU` * `hostId` becomes `hostID` * `allowedCidrs` becomes `allowedCIDRs`
1 parent 9fb6072 commit c7c5baf

9 files changed

+115
-86
lines changed

api/v1beta1/openstackcluster_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type OpenStackClusterSpec struct {
5959
// If left empty, the network will have the default MTU defined in Openstack network service.
6060
// To use this field, the Openstack installation requires the net-mtu neutron API extension.
6161
// +optional
62-
NetworkMTU int `json:"networkMtu,omitempty"`
62+
NetworkMTU int `json:"networkMTU,omitempty"`
6363

6464
// ExternalRouterIPs is an array of externalIPs on the respective subnets.
6565
// This is necessary if the router needs a fixed ip in a specific subnet.

api/v1beta1/types.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ type SecurityGroupFilter struct {
7979
ID string `json:"id,omitempty"`
8080
Name string `json:"name,omitempty"`
8181
Description string `json:"description,omitempty"`
82-
ProjectID string `json:"projectId,omitempty"`
82+
ProjectID string `json:"projectID,omitempty"`
8383

8484
FilterByNeutronTags `json:",inline"`
8585
}
8686

8787
type NetworkFilter struct {
8888
Name string `json:"name,omitempty"`
8989
Description string `json:"description,omitempty"`
90-
ProjectID string `json:"projectId,omitempty"`
90+
ProjectID string `json:"projectID,omitempty"`
9191
ID string `json:"id,omitempty"`
9292

9393
FilterByNeutronTags `json:",inline"`
@@ -96,12 +96,12 @@ type NetworkFilter struct {
9696
type SubnetFilter struct {
9797
Name string `json:"name,omitempty"`
9898
Description string `json:"description,omitempty"`
99-
ProjectID string `json:"projectId,omitempty"`
99+
ProjectID string `json:"projectID,omitempty"`
100100
IPVersion int `json:"ipVersion,omitempty"`
101-
GatewayIP string `json:"gateway_ip,omitempty"`
101+
GatewayIP string `json:"gatewayIP,omitempty"`
102102
CIDR string `json:"cidr,omitempty"`
103103
IPv6AddressMode string `json:"ipv6AddressMode,omitempty"`
104-
IPv6RAMode string `json:"ipv6RaMode,omitempty"`
104+
IPv6RAMode string `json:"ipv6RAMode,omitempty"`
105105
ID string `json:"id,omitempty"`
106106

107107
FilterByNeutronTags `json:",inline"`
@@ -111,7 +111,7 @@ type RouterFilter struct {
111111
ID string `json:"id,omitempty"`
112112
Name string `json:"name,omitempty"`
113113
Description string `json:"description,omitempty"`
114-
ProjectID string `json:"projectId,omitempty"`
114+
ProjectID string `json:"projectID,omitempty"`
115115

116116
FilterByNeutronTags `json:",inline"`
117117
}
@@ -190,7 +190,7 @@ type PortOpts struct {
190190

191191
// HostID specifies the ID of the host where the port resides.
192192
// +optional
193-
HostID optional.String `json:"hostId,omitempty"`
193+
HostID optional.String `json:"hostID,omitempty"`
194194

195195
// VNICType specifies the type of vNIC which this port should be
196196
// attached to. This is used to determine which mechanism driver(s) to
@@ -596,7 +596,7 @@ type APIServerLoadBalancer struct {
596596
// AdditionalPorts adds additional tcp ports to the load balancer.
597597
AdditionalPorts []int `json:"additionalPorts,omitempty"`
598598
// AllowedCIDRs restrict access to all API-Server listeners to the given address CIDRs.
599-
AllowedCIDRs []string `json:"allowedCidrs,omitempty"`
599+
AllowedCIDRs []string `json:"allowedCIDRs,omitempty"`
600600
// Octavia Provider Used to create load balancer
601601
Provider string `json:"provider,omitempty"`
602602
}

config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4874,7 +4874,7 @@ spec:
48744874
items:
48754875
type: integer
48764876
type: array
4877-
allowedCidrs:
4877+
allowedCIDRs:
48784878
description: AllowedCIDRs restrict access to all API-Server listeners
48794879
to the given address CIDRs.
48804880
items:
@@ -5094,15 +5094,15 @@ spec:
50945094
type: string
50955095
description:
50965096
type: string
5097-
gateway_ip:
5097+
gatewayIP:
50985098
type: string
50995099
id:
51005100
type: string
51015101
ipVersion:
51025102
type: integer
51035103
ipv6AddressMode:
51045104
type: string
5105-
ipv6RaMode:
5105+
ipv6RAMode:
51065106
type: string
51075107
name:
51085108
type: string
@@ -5132,7 +5132,7 @@ spec:
51325132
type: string
51335133
type: array
51345134
x-kubernetes-list-type: set
5135-
projectId:
5135+
projectID:
51365136
type: string
51375137
tags:
51385138
description: |-
@@ -5165,7 +5165,7 @@ spec:
51655165
type: object
51665166
type: array
51675167
x-kubernetes-list-type: atomic
5168-
hostId:
5168+
hostID:
51695169
description: HostID specifies the ID of the host where
51705170
the port resides.
51715171
type: string
@@ -5216,7 +5216,7 @@ spec:
52165216
type: string
52175217
type: array
52185218
x-kubernetes-list-type: set
5219-
projectId:
5219+
projectID:
52205220
type: string
52215221
tags:
52225222
description: |-
@@ -5307,7 +5307,7 @@ spec:
53075307
type: string
53085308
type: array
53095309
x-kubernetes-list-type: set
5310-
projectId:
5310+
projectID:
53115311
type: string
53125312
tags:
53135313
description: |-
@@ -5447,7 +5447,7 @@ spec:
54475447
type: string
54485448
type: array
54495449
x-kubernetes-list-type: set
5450-
projectId:
5450+
projectID:
54515451
type: string
54525452
tags:
54535453
description: |-
@@ -5617,7 +5617,7 @@ spec:
56175617
type: string
56185618
type: array
56195619
x-kubernetes-list-type: set
5620-
projectId:
5620+
projectID:
56215621
type: string
56225622
tags:
56235623
description: |-
@@ -5664,15 +5664,15 @@ spec:
56645664
type: string
56655665
description:
56665666
type: string
5667-
gateway_ip:
5667+
gatewayIP:
56685668
type: string
56695669
id:
56705670
type: string
56715671
ipVersion:
56725672
type: integer
56735673
ipv6AddressMode:
56745674
type: string
5675-
ipv6RaMode:
5675+
ipv6RAMode:
56765676
type: string
56775677
name:
56785678
type: string
@@ -5702,7 +5702,7 @@ spec:
57025702
type: string
57035703
type: array
57045704
x-kubernetes-list-type: set
5705-
projectId:
5705+
projectID:
57065706
type: string
57075707
tags:
57085708
description: |-
@@ -5930,7 +5930,7 @@ spec:
59305930
type: string
59315931
type: array
59325932
x-kubernetes-list-type: set
5933-
projectId:
5933+
projectID:
59345934
type: string
59355935
tags:
59365936
description: |-
@@ -5960,7 +5960,7 @@ spec:
59605960
type: array
59615961
x-kubernetes-list-type: set
59625962
type: object
5963-
networkMtu:
5963+
networkMTU:
59645964
description: |-
59655965
NetworkMTU sets the maximum transmission unit (MTU) value to address fragmentation for the private network ID.
59665966
This value will be used only if the Cluster actuator creates the network.
@@ -6004,7 +6004,7 @@ spec:
60046004
type: string
60056005
type: array
60066006
x-kubernetes-list-type: set
6007-
projectId:
6007+
projectID:
60086008
type: string
60096009
tags:
60106010
description: |-
@@ -6047,15 +6047,15 @@ spec:
60476047
type: string
60486048
description:
60496049
type: string
6050-
gateway_ip:
6050+
gatewayIP:
60516051
type: string
60526052
id:
60536053
type: string
60546054
ipVersion:
60556055
type: integer
60566056
ipv6AddressMode:
60576057
type: string
6058-
ipv6RaMode:
6058+
ipv6RAMode:
60596059
type: string
60606060
name:
60616061
type: string
@@ -6085,7 +6085,7 @@ spec:
60856085
type: string
60866086
type: array
60876087
x-kubernetes-list-type: set
6088-
projectId:
6088+
projectID:
60896089
type: string
60906090
tags:
60916091
description: |-
@@ -6253,15 +6253,15 @@ spec:
62536253
type: string
62546254
description:
62556255
type: string
6256-
gateway_ip:
6256+
gatewayIP:
62576257
type: string
62586258
id:
62596259
type: string
62606260
ipVersion:
62616261
type: integer
62626262
ipv6AddressMode:
62636263
type: string
6264-
ipv6RaMode:
6264+
ipv6RAMode:
62656265
type: string
62666266
name:
62676267
type: string
@@ -6291,7 +6291,7 @@ spec:
62916291
type: string
62926292
type: array
62936293
x-kubernetes-list-type: set
6294-
projectId:
6294+
projectID:
62956295
type: string
62966296
tags:
62976297
description: |-
@@ -6324,7 +6324,7 @@ spec:
63246324
type: object
63256325
type: array
63266326
x-kubernetes-list-type: atomic
6327-
hostId:
6327+
hostID:
63286328
description: HostID specifies the ID of the host where
63296329
the port resides.
63306330
type: string
@@ -6375,7 +6375,7 @@ spec:
63756375
type: string
63766376
type: array
63776377
x-kubernetes-list-type: set
6378-
projectId:
6378+
projectID:
63796379
type: string
63806380
tags:
63816381
description: |-
@@ -6466,7 +6466,7 @@ spec:
64666466
type: string
64676467
type: array
64686468
x-kubernetes-list-type: set
6469-
projectId:
6469+
projectID:
64706470
type: string
64716471
tags:
64726472
description: |-

0 commit comments

Comments
 (0)