generated from crossplane/upjet-provider-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
zz_machine_types.go
executable file
·347 lines (240 loc) · 13.6 KB
/
zz_machine_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
/*
Copyright 2023 Upbound Inc. - ANKASOFT
*/
// Code generated by upjet. DO NOT EDIT.
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
v1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)
type BootConfigObservation struct {
// A valid cloud config data in json-escaped yaml syntax.
Content *string `json:"content,omitempty" tf:"content,omitempty"`
}
type BootConfigParameters struct {
// A valid cloud config data in json-escaped yaml syntax.
// +kubebuilder:validation:Optional
Content *string `json:"content,omitempty" tf:"content,omitempty"`
}
type ConstraintsObservation struct {
// An expression of the form "[!]tag-key[:[tag-value]]", used to indicate a constraint match on keys and values of tags.
Expression *string `json:"expression,omitempty" tf:"expression,omitempty"`
// Indicates whether this constraint should be strictly enforced or not.
Mandatory *bool `json:"mandatory,omitempty" tf:"mandatory,omitempty"`
}
type ConstraintsParameters struct {
// An expression of the form "[!]tag-key[:[tag-value]]", used to indicate a constraint match on keys and values of tags.
// +kubebuilder:validation:Required
Expression *string `json:"expression" tf:"expression,omitempty"`
// Indicates whether this constraint should be strictly enforced or not.
// +kubebuilder:validation:Required
Mandatory *bool `json:"mandatory" tf:"mandatory,omitempty"`
}
type DisksListObservation struct {
BlockDeviceID *string `json:"blockDeviceId,omitempty" tf:"block_device_id,omitempty"`
Description *string `json:"description,omitempty" tf:"description,omitempty"`
Name *string `json:"name,omitempty" tf:"name,omitempty"`
}
type DisksListParameters struct {
}
type DisksObservation struct {
// The id of the existing block device.
BlockDeviceID *string `json:"blockDeviceId,omitempty" tf:"block_device_id,omitempty"`
// A human-friendly description.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// A human-friendly block-device name used as an identifier in APIs that support this option.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
}
type DisksParameters struct {
// The id of the existing block device.
// +kubebuilder:validation:Required
BlockDeviceID *string `json:"blockDeviceId" tf:"block_device_id,omitempty"`
// A human-friendly description.
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// A human-friendly block-device name used as an identifier in APIs that support this option.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
}
type ImageDiskConstraintsObservation struct {
// An expression of the form "[!]tag-key[:[tag-value]]", used to indicate a constraint match on keys and values of tags.
Expression *string `json:"expression,omitempty" tf:"expression,omitempty"`
// Indicates whether this constraint should be strictly enforced or not.
Mandatory *bool `json:"mandatory,omitempty" tf:"mandatory,omitempty"`
}
type ImageDiskConstraintsParameters struct {
// An expression of the form "[!]tag-key[:[tag-value]]", used to indicate a constraint match on keys and values of tags.
// +kubebuilder:validation:Required
Expression *string `json:"expression" tf:"expression,omitempty"`
// Indicates whether this constraint should be strictly enforced or not.
// +kubebuilder:validation:Required
Mandatory *bool `json:"mandatory" tf:"mandatory,omitempty"`
}
type LinksObservation struct {
Href *string `json:"href,omitempty" tf:"href,omitempty"`
Hrefs []*string `json:"hrefs,omitempty" tf:"hrefs,omitempty"`
Rel *string `json:"rel,omitempty" tf:"rel,omitempty"`
}
type LinksParameters struct {
}
type MachineObservation struct {
Address *string `json:"address,omitempty" tf:"address,omitempty"`
// Machine boot config that will be passed to the instance that can be used to perform common automated configuration tasks and even run scripts after the instance starts.
BootConfig []BootConfigObservation `json:"bootConfig,omitempty" tf:"boot_config,omitempty"`
// Constraints that are used to drive placement policies for entities such as image, network, storage, etc. Constraint expressions are matched against tags on existing placement targets.
Constraints []ConstraintsObservation `json:"constraints,omitempty" tf:"constraints,omitempty"`
CreatedAt *string `json:"createdAt,omitempty" tf:"created_at,omitempty"`
// Additional custom properties that may be used to extend the machine.
CustomProperties map[string]*string `json:"customProperties,omitempty" tf:"custom_properties,omitempty"`
// The id of the deployment that is associated with this resource.
DeploymentID *string `json:"deploymentId,omitempty" tf:"deployment_id,omitempty"`
// Describes machine within the scope of your organization and is not propagated to the cloud.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// Specification for attaching/detaching disks to a machine.
Disks []DisksObservation `json:"disks,omitempty" tf:"disks,omitempty"`
// List of all disks attached to a machine including boot disk, and additional block devices attached using the disks attribute.
DisksList []DisksListObservation `json:"disksList,omitempty" tf:"disks_list,omitempty"`
ExternalID *string `json:"externalId,omitempty" tf:"external_id,omitempty"`
ExternalRegionID *string `json:"externalRegionId,omitempty" tf:"external_region_id,omitempty"`
ExternalZoneID *string `json:"externalZoneId,omitempty" tf:"external_zone_id,omitempty"`
Flavor *string `json:"flavor,omitempty" tf:"flavor,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// Type of image used for this machine.
Image *string `json:"image,omitempty" tf:"image,omitempty"`
// Constraints that are used to drive placement policies for entities such as image, network, storage, etc. Constraint expressions are matched against tags on existing placement targets.
ImageDiskConstraints []ImageDiskConstraintsObservation `json:"imageDiskConstraints,omitempty" tf:"image_disk_constraints,omitempty"`
ImageRef *string `json:"imageRef,omitempty" tf:"image_ref,omitempty"`
Links []LinksObservation `json:"links,omitempty" tf:"links,omitempty"`
Name *string `json:"name,omitempty" tf:"name,omitempty"`
Nics []NicsObservation `json:"nics,omitempty" tf:"nics,omitempty"`
OrganizationID *string `json:"organizationId,omitempty" tf:"organization_id,omitempty"`
Owner *string `json:"owner,omitempty" tf:"owner,omitempty"`
PowerState *string `json:"powerState,omitempty" tf:"power_state,omitempty"`
ProjectID *string `json:"projectId,omitempty" tf:"project_id,omitempty"`
Tags []TagsObservation `json:"tags,omitempty" tf:"tags,omitempty"`
UpdatedAt *string `json:"updatedAt,omitempty" tf:"updated_at,omitempty"`
}
type MachineParameters struct {
// Machine boot config that will be passed to the instance that can be used to perform common automated configuration tasks and even run scripts after the instance starts.
// +kubebuilder:validation:Optional
BootConfig []BootConfigParameters `json:"bootConfig,omitempty" tf:"boot_config,omitempty"`
// Constraints that are used to drive placement policies for entities such as image, network, storage, etc. Constraint expressions are matched against tags on existing placement targets.
// +kubebuilder:validation:Optional
Constraints []ConstraintsParameters `json:"constraints,omitempty" tf:"constraints,omitempty"`
// Additional custom properties that may be used to extend the machine.
// +kubebuilder:validation:Optional
CustomProperties map[string]*string `json:"customProperties,omitempty" tf:"custom_properties,omitempty"`
// The id of the deployment that is associated with this resource.
// +kubebuilder:validation:Optional
DeploymentID *string `json:"deploymentId,omitempty" tf:"deployment_id,omitempty"`
// Describes machine within the scope of your organization and is not propagated to the cloud.
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// Specification for attaching/detaching disks to a machine.
// +kubebuilder:validation:Optional
Disks []DisksParameters `json:"disks,omitempty" tf:"disks,omitempty"`
// +kubebuilder:validation:Optional
Flavor *string `json:"flavor,omitempty" tf:"flavor,omitempty"`
// Type of image used for this machine.
// +kubebuilder:validation:Optional
Image *string `json:"image,omitempty" tf:"image,omitempty"`
// Constraints that are used to drive placement policies for entities such as image, network, storage, etc. Constraint expressions are matched against tags on existing placement targets.
// +kubebuilder:validation:Optional
ImageDiskConstraints []ImageDiskConstraintsParameters `json:"imageDiskConstraints,omitempty" tf:"image_disk_constraints,omitempty"`
// +kubebuilder:validation:Optional
ImageRef *string `json:"imageRef,omitempty" tf:"image_ref,omitempty"`
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// +kubebuilder:validation:Optional
Nics []NicsParameters `json:"nics,omitempty" tf:"nics,omitempty"`
// +crossplane:generate:reference:type=github.com/ankasoftco/provider-vra/apis/project/v1alpha1.Project
// +kubebuilder:validation:Optional
ProjectID *string `json:"projectId,omitempty" tf:"project_id,omitempty"`
// Reference to a Project in project to populate projectId.
// +kubebuilder:validation:Optional
ProjectIDRef *v1.Reference `json:"projectIdRef,omitempty" tf:"-"`
// Selector for a Project in project to populate projectId.
// +kubebuilder:validation:Optional
ProjectIDSelector *v1.Selector `json:"projectIdSelector,omitempty" tf:"-"`
// +kubebuilder:validation:Optional
Tags []TagsParameters `json:"tags,omitempty" tf:"tags,omitempty"`
}
type NicsObservation struct {
Addresses []*string `json:"addresses,omitempty" tf:"addresses,omitempty"`
CustomProperties map[string]*string `json:"customProperties,omitempty" tf:"custom_properties,omitempty"`
Description *string `json:"description,omitempty" tf:"description,omitempty"`
DeviceIndex *float64 `json:"deviceIndex,omitempty" tf:"device_index,omitempty"`
Name *string `json:"name,omitempty" tf:"name,omitempty"`
NetworkID *string `json:"networkId,omitempty" tf:"network_id,omitempty"`
SecurityGroupIds []*string `json:"securityGroupIds,omitempty" tf:"security_group_ids,omitempty"`
}
type NicsParameters struct {
// +kubebuilder:validation:Optional
Addresses []*string `json:"addresses,omitempty" tf:"addresses,omitempty"`
// +kubebuilder:validation:Optional
CustomProperties map[string]*string `json:"customProperties,omitempty" tf:"custom_properties,omitempty"`
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// +kubebuilder:validation:Optional
DeviceIndex *float64 `json:"deviceIndex,omitempty" tf:"device_index,omitempty"`
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// +kubebuilder:validation:Required
NetworkID *string `json:"networkId" tf:"network_id,omitempty"`
// +kubebuilder:validation:Optional
SecurityGroupIds []*string `json:"securityGroupIds,omitempty" tf:"security_group_ids,omitempty"`
}
type TagsObservation struct {
Key *string `json:"key,omitempty" tf:"key,omitempty"`
Value *string `json:"value,omitempty" tf:"value,omitempty"`
}
type TagsParameters struct {
// +kubebuilder:validation:Required
Key *string `json:"key" tf:"key,omitempty"`
// +kubebuilder:validation:Required
Value *string `json:"value" tf:"value,omitempty"`
}
// MachineSpec defines the desired state of Machine
type MachineSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider MachineParameters `json:"forProvider"`
}
// MachineStatus defines the observed state of Machine.
type MachineStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider MachineObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// Machine is the Schema for the Machines API. <no value>
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,vra}
type Machine struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.flavor)",message="flavor is a required parameter"
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.name)",message="name is a required parameter"
Spec MachineSpec `json:"spec"`
Status MachineStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// MachineList contains a list of Machines
type MachineList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Machine `json:"items"`
}
// Repository type metadata.
var (
Machine_Kind = "Machine"
Machine_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Machine_Kind}.String()
Machine_KindAPIVersion = Machine_Kind + "." + CRDGroupVersion.String()
Machine_GroupVersionKind = CRDGroupVersion.WithKind(Machine_Kind)
)
func init() {
SchemeBuilder.Register(&Machine{}, &MachineList{})
}