Skip to content

Commit 678f148

Browse files
jichenjcpierreprinetti
authored andcommitted
fix spec generatation (openshift#255)
the param with _ will not able to auto generate
1 parent 403ad42 commit 678f148

File tree

3 files changed

+95
-38
lines changed

3 files changed

+95
-38
lines changed

config/crds/openstackproviderconfig_v1alpha1_openstackproviderspec.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ spec:
4343
properties:
4444
description:
4545
type: string
46+
adminStateUp:
47+
type: boolean
4648
id:
4749
type: string
4850
limit:
@@ -52,13 +54,29 @@ spec:
5254
type: string
5355
name:
5456
type: string
57+
notTags:
58+
type: string
59+
notTagsAny:
60+
type: string
61+
projectId:
62+
type: string
5563
shared:
5664
type: boolean
65+
sortDir:
66+
type: string
67+
sortKey:
68+
type: string
5769
status:
5870
type: string
5971
tags:
6072
type: string
73+
tagsAny:
74+
type: string
75+
tenantId:
76+
type: string
6177
type: object
78+
fixedIp:
79+
type: string
6280
subnets:
6381
items:
6482
properties:
@@ -70,6 +88,11 @@ spec:
7088
type: string
7189
id:
7290
type: string
91+
enableDhcp:
92+
type: boolean
93+
ipVersion:
94+
format: int64
95+
type: integer
7396
limit:
7497
format: int64
7598
type: integer
@@ -79,6 +102,26 @@ spec:
79102
type: string
80103
tags:
81104
type: string
105+
networkId:
106+
type: string
107+
notTags:
108+
type: string
109+
notTagsAny:
110+
type: string
111+
projectId:
112+
type: string
113+
sortDir:
114+
type: string
115+
sortKey:
116+
type: string
117+
subnetpoolId:
118+
type: string
119+
tags:
120+
type: string
121+
tagsAny:
122+
type: string
123+
tenantId:
124+
type: string
82125
type: object
83126
uuid:
84127
type: string
@@ -104,8 +147,22 @@ spec:
104147
type: string
105148
name:
106149
type: string
150+
notTags:
151+
type: string
152+
notTagsAny:
153+
type: string
154+
projectId:
155+
type: string
156+
sortDir:
157+
type: string
158+
sortKey:
159+
type: string
107160
tags:
108161
type: string
162+
tagsAny:
163+
type: string
164+
tenantId:
165+
type: string
109166
type: object
110167
name:
111168
type: string

docs/config.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ securityGroups:
9090
- uuid: < your security group ID >
9191
- name: < your security group Name >
9292
- filter:
93-
project_id: < you project ID >
93+
projectId: < you project ID >
9494
tags: < a tag >
9595
- name: < your security group Name >
9696
filter:
@@ -124,19 +124,19 @@ Rather than just using a network, you have the option of specifying a specific s
124124
If you have a complex query that you want to use to lookup a network, then you can do this by using a network filter. The filter will allow you to look up a network by the following network features:
125125
- status
126126
- name
127-
- admin_state_up
128-
- tenant_id
129-
- project_id
127+
- adminStateUp
128+
- tenantId
129+
- projectId
130130
- shared
131131
- id
132132
- marker
133133
- limit
134-
- sort_key
135-
- sort_dir
134+
- sortKey
135+
- sortDir
136136
- tags
137-
- tags-any
138-
- not-tags
139-
- not-tags-any
137+
- tagsAny
138+
- notTags
139+
- notTagsAny
140140

141141
By using filters to look up a network, please note that it is possible to get multiple networks as a result. This should not be a problem, however please test your filters with `openstack network list` to be certian that it returns the networks you want. Please refer to the following usage example:
142142

pkg/apis/openstackproviderconfig/v1alpha1/types.go

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -94,23 +94,23 @@ type SecurityGroupFilter struct {
9494
ID string `json:"id,omitempty"`
9595
Name string `json:"name,omitempty"`
9696
Description string `json:"description,omitempty"`
97-
TenantID string `json:"tenant_id,omitempty"`
98-
ProjectID string `json:"project_id,omitempty"`
97+
TenantID string `json:"tenantId,omitempty"`
98+
ProjectID string `json:"projectId,omitempty"`
9999
Limit int `json:"limit,omitempty"`
100100
Marker string `json:"marker,omitempty"`
101-
SortKey string `json:"sort_key,omitempty"`
102-
SortDir string `json:"sort_dir,omitempty"`
101+
SortKey string `json:"sortKey,omitempty"`
102+
SortDir string `json:"sortDir,omitempty"`
103103
Tags string `json:"tags,omitempty"`
104-
TagsAny string `json:"tags-any,omitempty"`
105-
NotTags string `json:"not-tags,omitempty"`
106-
NotTagsAny string `json:"not-tags-any,omitempty"`
104+
TagsAny string `json:"tagsAny,omitempty"`
105+
NotTags string `json:"notTags,omitempty"`
106+
NotTagsAny string `json:"notTagsAny,omitempty"`
107107
}
108108

109109
type NetworkParam struct {
110110
// The UUID of the network. Required if you omit the port attribute.
111111
UUID string `json:"uuid,omitempty"`
112112
// A fixed IPv4 address for the NIC.
113-
FixedIp string `json:"fixed_ip,omitempty"`
113+
FixedIp string `json:"fixedIp,omitempty"`
114114
// Filters for optional network query
115115
Filter Filter `json:"filter,omitempty"`
116116
// Subnet within a network to use
@@ -121,19 +121,19 @@ type Filter struct {
121121
Status string `json:"status,omitempty"`
122122
Name string `json:"name,omitempty"`
123123
Description string `json:"description,omitempty"`
124-
AdminStateUp *bool `json:"admin_state_up,omitempty"`
125-
TenantID string `json:"tenant_id,omitempty"`
126-
ProjectID string `json:"project_id,omitempty"`
124+
AdminStateUp *bool `json:"adminStateUp,omitempty"`
125+
TenantID string `json:"tenantId,omitempty"`
126+
ProjectID string `json:"projectId,omitempty"`
127127
Shared *bool `json:"shared,omitempty"`
128128
ID string `json:"id,omitempty"`
129129
Marker string `json:"marker,omitempty"`
130130
Limit int `json:"limit,omitempty"`
131-
SortKey string `json:"sort_key,omitempty"`
132-
SortDir string `json:"sort_dir,omitempty"`
131+
SortKey string `json:"sortKey,omitempty"`
132+
SortDir string `json:"sortDir,omitempty"`
133133
Tags string `json:"tags,omitempty"`
134-
TagsAny string `json:"tags-any,omitempty"`
135-
NotTags string `json:"not-tags,omitempty"`
136-
NotTagsAny string `json:"not-tags-any,omitempty"`
134+
TagsAny string `json:"tagsAny,omitempty"`
135+
NotTags string `json:"notTags,omitempty"`
136+
NotTagsAny string `json:"notTagsAny,omitempty"`
137137
}
138138

139139
type SubnetParam struct {
@@ -147,25 +147,25 @@ type SubnetParam struct {
147147
type SubnetFilter struct {
148148
Name string `json:"name,omitempty"`
149149
Description string `json:"description,omitempty"`
150-
EnableDHCP *bool `json:"enable_dhcp,omitempty"`
151-
NetworkID string `json:"network_id,omitempty"`
152-
TenantID string `json:"tenant_id,omitempty"`
153-
ProjectID string `json:"project_id,omitempty"`
154-
IPVersion int `json:"ip_version,omitempty"`
150+
EnableDHCP *bool `json:"enableDhcp,omitempty"`
151+
NetworkID string `json:"networkId,omitempty"`
152+
TenantID string `json:"tenantId,omitempty"`
153+
ProjectID string `json:"projectId,omitempty"`
154+
IPVersion int `json:"ipVersion,omitempty"`
155155
GatewayIP string `json:"gateway_ip,omitempty"`
156156
CIDR string `json:"cidr,omitempty"`
157-
IPv6AddressMode string `json:"ipv6_address_mode,omitempty"`
158-
IPv6RAMode string `json:"ipv6_ra_mode,omitempty"`
157+
IPv6AddressMode string `json:"ipv6AddressMode,omitempty"`
158+
IPv6RAMode string `json:"ipv6RaMode,omitempty"`
159159
ID string `json:"id,omitempty"`
160-
SubnetPoolID string `json:"subnetpool_id,omitempty"`
160+
SubnetPoolID string `json:"subnetpoolId,omitempty"`
161161
Limit int `json:"limit,omitempty"`
162162
Marker string `json:"marker,omitempty"`
163-
SortKey string `json:"sort_key,omitempty"`
164-
SortDir string `json:"sort_dir,omitempty"`
163+
SortKey string `json:"sortKey,omitempty"`
164+
SortDir string `json:"sortDir,omitempty"`
165165
Tags string `json:"tags,omitempty"`
166-
TagsAny string `json:"tags-any,omitempty"`
167-
NotTags string `json:"not-tags,omitempty"`
168-
NotTagsAny string `json:"not-tags-any,omitempty"`
166+
TagsAny string `json:"tagsAny,omitempty"`
167+
NotTags string `json:"notTags,omitempty"`
168+
NotTagsAny string `json:"notTagsAny,omitempty"`
169169
}
170170

171171
type RootVolume struct {

0 commit comments

Comments
 (0)