Skip to content

Commit 36f8344

Browse files
authored
Merge pull request #877 from davidleerh/OCM-3221
OCM-3221 | Add Platform to network_verification_type
2 parents c69a7a9 + 32ed651 commit 36f8344

26 files changed

+5128
-4278
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
This document describes the relevant changes between releases of the OCM API
44
SDK.
55

6+
## 0.1.387
7+
- Update model version v0.0.340
8+
- Add get `Platform` to `network_verification_type` resource
9+
610
## 0.1.386
711
- Update model version to v0.0.339
812
- Add `MachineTypes` to `GCPInquiriesClient` endpoints

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export PATH := $(LOCAL_BIN_PATH):$(PATH)
2727
export CGO_ENABLED=0
2828

2929
# Details of the model to use:
30-
model_version:=v0.0.339
30+
model_version:=v0.0.340
3131
model_url:=https://github.com/openshift-online/ocm-api-model.git
3232

3333
# Details of the metamodel to use:

addonsmgmt/v1/addon_builder.go

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type AddonBuilder struct {
3838
name string
3939
namespaces []*AddonNamespaceBuilder
4040
operatorName string
41-
parameters []*AddonParameterBuilder
41+
parameters *AddonParametersBuilder
4242
requirements []*AddonRequirementBuilder
4343
resourceCost float64
4444
resourceName string
@@ -212,11 +212,16 @@ func (b *AddonBuilder) OperatorName(value string) *AddonBuilder {
212212
return b
213213
}
214214

215-
// Parameters sets the value of the 'parameters' attribute to the given values.
216-
func (b *AddonBuilder) Parameters(values ...*AddonParameterBuilder) *AddonBuilder {
217-
b.parameters = make([]*AddonParameterBuilder, len(values))
218-
copy(b.parameters, values)
219-
b.bitmap_ |= 524288
215+
// Parameters sets the value of the 'parameters' attribute to the given value.
216+
//
217+
// Representation of AddonParameters
218+
func (b *AddonBuilder) Parameters(value *AddonParametersBuilder) *AddonBuilder {
219+
b.parameters = value
220+
if value != nil {
221+
b.bitmap_ |= 524288
222+
} else {
223+
b.bitmap_ &^= 524288
224+
}
220225
return b
221226
}
222227

@@ -327,10 +332,7 @@ func (b *AddonBuilder) Copy(object *Addon) *AddonBuilder {
327332
}
328333
b.operatorName = object.operatorName
329334
if object.parameters != nil {
330-
b.parameters = make([]*AddonParameterBuilder, len(object.parameters))
331-
for i, v := range object.parameters {
332-
b.parameters[i] = NewAddonParameter().Copy(v)
333-
}
335+
b.parameters = NewAddonParameters().Copy(object.parameters)
334336
} else {
335337
b.parameters = nil
336338
}
@@ -415,12 +417,9 @@ func (b *AddonBuilder) Build() (object *Addon, err error) {
415417
}
416418
object.operatorName = b.operatorName
417419
if b.parameters != nil {
418-
object.parameters = make([]*AddonParameter, len(b.parameters))
419-
for i, v := range b.parameters {
420-
object.parameters[i], err = v.Build()
421-
if err != nil {
422-
return
423-
}
420+
object.parameters, err = b.parameters.Build()
421+
if err != nil {
422+
return
424423
}
425424
}
426425
if b.requirements != nil {

addonsmgmt/v1/addon_installation_builder.go

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ type AddonInstallationBuilder struct {
3636
creationTimestamp time.Time
3737
csvName string
3838
deletedTimestamp time.Time
39+
desiredVersion string
3940
operatorVersion string
4041
parameters *AddonInstallationParametersBuilder
4142
state AddonInstallationState
@@ -134,10 +135,17 @@ func (b *AddonInstallationBuilder) DeletedTimestamp(value time.Time) *AddonInsta
134135
return b
135136
}
136137

138+
// DesiredVersion sets the value of the 'desired_version' attribute to the given value.
139+
func (b *AddonInstallationBuilder) DesiredVersion(value string) *AddonInstallationBuilder {
140+
b.desiredVersion = value
141+
b.bitmap_ |= 512
142+
return b
143+
}
144+
137145
// OperatorVersion sets the value of the 'operator_version' attribute to the given value.
138146
func (b *AddonInstallationBuilder) OperatorVersion(value string) *AddonInstallationBuilder {
139147
b.operatorVersion = value
140-
b.bitmap_ |= 512
148+
b.bitmap_ |= 1024
141149
return b
142150
}
143151

@@ -147,9 +155,9 @@ func (b *AddonInstallationBuilder) OperatorVersion(value string) *AddonInstallat
147155
func (b *AddonInstallationBuilder) Parameters(value *AddonInstallationParametersBuilder) *AddonInstallationBuilder {
148156
b.parameters = value
149157
if value != nil {
150-
b.bitmap_ |= 1024
158+
b.bitmap_ |= 2048
151159
} else {
152-
b.bitmap_ &^= 1024
160+
b.bitmap_ &^= 2048
153161
}
154162
return b
155163
}
@@ -159,14 +167,14 @@ func (b *AddonInstallationBuilder) Parameters(value *AddonInstallationParameters
159167
// representation of addon installation state
160168
func (b *AddonInstallationBuilder) State(value AddonInstallationState) *AddonInstallationBuilder {
161169
b.state = value
162-
b.bitmap_ |= 2048
170+
b.bitmap_ |= 4096
163171
return b
164172
}
165173

166174
// StateDescription sets the value of the 'state_description' attribute to the given value.
167175
func (b *AddonInstallationBuilder) StateDescription(value string) *AddonInstallationBuilder {
168176
b.stateDescription = value
169-
b.bitmap_ |= 4096
177+
b.bitmap_ |= 8192
170178
return b
171179
}
172180

@@ -176,17 +184,17 @@ func (b *AddonInstallationBuilder) StateDescription(value string) *AddonInstalla
176184
func (b *AddonInstallationBuilder) Subscription(value *ObjectReferenceBuilder) *AddonInstallationBuilder {
177185
b.subscription = value
178186
if value != nil {
179-
b.bitmap_ |= 8192
187+
b.bitmap_ |= 16384
180188
} else {
181-
b.bitmap_ &^= 8192
189+
b.bitmap_ &^= 16384
182190
}
183191
return b
184192
}
185193

186194
// UpdatedTimestamp sets the value of the 'updated_timestamp' attribute to the given value.
187195
func (b *AddonInstallationBuilder) UpdatedTimestamp(value time.Time) *AddonInstallationBuilder {
188196
b.updatedTimestamp = value
189-
b.bitmap_ |= 16384
197+
b.bitmap_ |= 32768
190198
return b
191199
}
192200

@@ -216,6 +224,7 @@ func (b *AddonInstallationBuilder) Copy(object *AddonInstallation) *AddonInstall
216224
b.creationTimestamp = object.creationTimestamp
217225
b.csvName = object.csvName
218226
b.deletedTimestamp = object.deletedTimestamp
227+
b.desiredVersion = object.desiredVersion
219228
b.operatorVersion = object.operatorVersion
220229
if object.parameters != nil {
221230
b.parameters = NewAddonInstallationParameters().Copy(object.parameters)
@@ -260,6 +269,7 @@ func (b *AddonInstallationBuilder) Build() (object *AddonInstallation, err error
260269
object.creationTimestamp = b.creationTimestamp
261270
object.csvName = b.csvName
262271
object.deletedTimestamp = b.deletedTimestamp
272+
object.desiredVersion = b.desiredVersion
263273
object.operatorVersion = b.operatorVersion
264274
if b.parameters != nil {
265275
object.parameters, err = b.parameters.Build()

addonsmgmt/v1/addon_installation_type.go

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ type AddonInstallation struct {
4848
creationTimestamp time.Time
4949
csvName string
5050
deletedTimestamp time.Time
51+
desiredVersion string
5152
operatorVersion string
5253
parameters *AddonInstallationParameters
5354
state AddonInstallationState
@@ -251,12 +252,35 @@ func (o *AddonInstallation) GetDeletedTimestamp() (value time.Time, ok bool) {
251252
return
252253
}
253254

255+
// DesiredVersion returns the value of the 'desired_version' attribute, or
256+
// the zero value of the type if the attribute doesn't have a value.
257+
//
258+
// Version of the next scheduled upgrade
259+
func (o *AddonInstallation) DesiredVersion() string {
260+
if o != nil && o.bitmap_&512 != 0 {
261+
return o.desiredVersion
262+
}
263+
return ""
264+
}
265+
266+
// GetDesiredVersion returns the value of the 'desired_version' attribute and
267+
// a flag indicating if the attribute has a value.
268+
//
269+
// Version of the next scheduled upgrade
270+
func (o *AddonInstallation) GetDesiredVersion() (value string, ok bool) {
271+
ok = o != nil && o.bitmap_&512 != 0
272+
if ok {
273+
value = o.desiredVersion
274+
}
275+
return
276+
}
277+
254278
// OperatorVersion returns the value of the 'operator_version' attribute, or
255279
// the zero value of the type if the attribute doesn't have a value.
256280
//
257281
// Version of the operator installed by the add-on.
258282
func (o *AddonInstallation) OperatorVersion() string {
259-
if o != nil && o.bitmap_&512 != 0 {
283+
if o != nil && o.bitmap_&1024 != 0 {
260284
return o.operatorVersion
261285
}
262286
return ""
@@ -267,7 +291,7 @@ func (o *AddonInstallation) OperatorVersion() string {
267291
//
268292
// Version of the operator installed by the add-on.
269293
func (o *AddonInstallation) GetOperatorVersion() (value string, ok bool) {
270-
ok = o != nil && o.bitmap_&512 != 0
294+
ok = o != nil && o.bitmap_&1024 != 0
271295
if ok {
272296
value = o.operatorVersion
273297
}
@@ -279,7 +303,7 @@ func (o *AddonInstallation) GetOperatorVersion() (value string, ok bool) {
279303
//
280304
// Parameters in the installation
281305
func (o *AddonInstallation) Parameters() *AddonInstallationParameters {
282-
if o != nil && o.bitmap_&1024 != 0 {
306+
if o != nil && o.bitmap_&2048 != 0 {
283307
return o.parameters
284308
}
285309
return nil
@@ -290,7 +314,7 @@ func (o *AddonInstallation) Parameters() *AddonInstallationParameters {
290314
//
291315
// Parameters in the installation
292316
func (o *AddonInstallation) GetParameters() (value *AddonInstallationParameters, ok bool) {
293-
ok = o != nil && o.bitmap_&1024 != 0
317+
ok = o != nil && o.bitmap_&2048 != 0
294318
if ok {
295319
value = o.parameters
296320
}
@@ -302,7 +326,7 @@ func (o *AddonInstallation) GetParameters() (value *AddonInstallationParameters,
302326
//
303327
// Addon Installation State
304328
func (o *AddonInstallation) State() AddonInstallationState {
305-
if o != nil && o.bitmap_&2048 != 0 {
329+
if o != nil && o.bitmap_&4096 != 0 {
306330
return o.state
307331
}
308332
return AddonInstallationState("")
@@ -313,7 +337,7 @@ func (o *AddonInstallation) State() AddonInstallationState {
313337
//
314338
// Addon Installation State
315339
func (o *AddonInstallation) GetState() (value AddonInstallationState, ok bool) {
316-
ok = o != nil && o.bitmap_&2048 != 0
340+
ok = o != nil && o.bitmap_&4096 != 0
317341
if ok {
318342
value = o.state
319343
}
@@ -325,7 +349,7 @@ func (o *AddonInstallation) GetState() (value AddonInstallationState, ok bool) {
325349
//
326350
// Reason for the current State.
327351
func (o *AddonInstallation) StateDescription() string {
328-
if o != nil && o.bitmap_&4096 != 0 {
352+
if o != nil && o.bitmap_&8192 != 0 {
329353
return o.stateDescription
330354
}
331355
return ""
@@ -336,7 +360,7 @@ func (o *AddonInstallation) StateDescription() string {
336360
//
337361
// Reason for the current State.
338362
func (o *AddonInstallation) GetStateDescription() (value string, ok bool) {
339-
ok = o != nil && o.bitmap_&4096 != 0
363+
ok = o != nil && o.bitmap_&8192 != 0
340364
if ok {
341365
value = o.stateDescription
342366
}
@@ -348,7 +372,7 @@ func (o *AddonInstallation) GetStateDescription() (value string, ok bool) {
348372
//
349373
// Subscription for the addon installation
350374
func (o *AddonInstallation) Subscription() *ObjectReference {
351-
if o != nil && o.bitmap_&8192 != 0 {
375+
if o != nil && o.bitmap_&16384 != 0 {
352376
return o.subscription
353377
}
354378
return nil
@@ -359,7 +383,7 @@ func (o *AddonInstallation) Subscription() *ObjectReference {
359383
//
360384
// Subscription for the addon installation
361385
func (o *AddonInstallation) GetSubscription() (value *ObjectReference, ok bool) {
362-
ok = o != nil && o.bitmap_&8192 != 0
386+
ok = o != nil && o.bitmap_&16384 != 0
363387
if ok {
364388
value = o.subscription
365389
}
@@ -371,7 +395,7 @@ func (o *AddonInstallation) GetSubscription() (value *ObjectReference, ok bool)
371395
//
372396
// Date and time when the add-on installation information was last updated.
373397
func (o *AddonInstallation) UpdatedTimestamp() time.Time {
374-
if o != nil && o.bitmap_&16384 != 0 {
398+
if o != nil && o.bitmap_&32768 != 0 {
375399
return o.updatedTimestamp
376400
}
377401
return time.Time{}
@@ -382,7 +406,7 @@ func (o *AddonInstallation) UpdatedTimestamp() time.Time {
382406
//
383407
// Date and time when the add-on installation information was last updated.
384408
func (o *AddonInstallation) GetUpdatedTimestamp() (value time.Time, ok bool) {
385-
ok = o != nil && o.bitmap_&16384 != 0
409+
ok = o != nil && o.bitmap_&32768 != 0
386410
if ok {
387411
value = o.updatedTimestamp
388412
}

0 commit comments

Comments
 (0)