Skip to content

Commit a89b8dd

Browse files
authored
Merge pull request #1010 from gdbranco/feat/ocm-12240
OCM-12240 | feat: include hcp shared vpc support
2 parents 8e51cd2 + 92b75e9 commit a89b8dd

15 files changed

+13958
-13433
lines changed

Diff for: CHANGES.md

+4
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.448
7+
- Update model version v0.0.401
8+
- Include support for HCP shared vpc fields in `Cluster` and `DNS` models.
9+
610
## 0.1.447
711
- Update model version v0.0.400
812
- Update ocm-sdk-go examples for Addons

Diff for: Makefile

+1-1
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.400
30+
model_version:=v0.0.401
3131
model_url:=https://github.com/openshift-online/ocm-api-model.git
3232

3333
# Details of the metamodel to use:

Diff for: clustersmgmt/v1/aws_builder.go

+29-9
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ type AWSBuilder struct {
3636
billingAccountID string
3737
ec2MetadataHttpTokens Ec2MetadataHttpTokens
3838
etcdEncryption *AwsEtcdEncryptionBuilder
39+
hcpInternalCommunicationHostedZoneId string
3940
privateHostedZoneID string
4041
privateHostedZoneRoleARN string
4142
privateLinkConfiguration *PrivateLinkClusterConfigurationBuilder
4243
secretAccessKey string
4344
subnetIDs []string
4445
tags map[string]string
46+
vpcEndpointRoleArn string
4547
privateLink bool
4648
}
4749

@@ -163,24 +165,31 @@ func (b *AWSBuilder) EtcdEncryption(value *AwsEtcdEncryptionBuilder) *AWSBuilder
163165
return b
164166
}
165167

168+
// HcpInternalCommunicationHostedZoneId sets the value of the 'hcp_internal_communication_hosted_zone_id' attribute to the given value.
169+
func (b *AWSBuilder) HcpInternalCommunicationHostedZoneId(value string) *AWSBuilder {
170+
b.hcpInternalCommunicationHostedZoneId = value
171+
b.bitmap_ |= 4096
172+
return b
173+
}
174+
166175
// PrivateHostedZoneID sets the value of the 'private_hosted_zone_ID' attribute to the given value.
167176
func (b *AWSBuilder) PrivateHostedZoneID(value string) *AWSBuilder {
168177
b.privateHostedZoneID = value
169-
b.bitmap_ |= 4096
178+
b.bitmap_ |= 8192
170179
return b
171180
}
172181

173182
// PrivateHostedZoneRoleARN sets the value of the 'private_hosted_zone_role_ARN' attribute to the given value.
174183
func (b *AWSBuilder) PrivateHostedZoneRoleARN(value string) *AWSBuilder {
175184
b.privateHostedZoneRoleARN = value
176-
b.bitmap_ |= 8192
185+
b.bitmap_ |= 16384
177186
return b
178187
}
179188

180189
// PrivateLink sets the value of the 'private_link' attribute to the given value.
181190
func (b *AWSBuilder) PrivateLink(value bool) *AWSBuilder {
182191
b.privateLink = value
183-
b.bitmap_ |= 16384
192+
b.bitmap_ |= 32768
184193
return b
185194
}
186195

@@ -190,39 +199,46 @@ func (b *AWSBuilder) PrivateLink(value bool) *AWSBuilder {
190199
func (b *AWSBuilder) PrivateLinkConfiguration(value *PrivateLinkClusterConfigurationBuilder) *AWSBuilder {
191200
b.privateLinkConfiguration = value
192201
if value != nil {
193-
b.bitmap_ |= 32768
202+
b.bitmap_ |= 65536
194203
} else {
195-
b.bitmap_ &^= 32768
204+
b.bitmap_ &^= 65536
196205
}
197206
return b
198207
}
199208

200209
// SecretAccessKey sets the value of the 'secret_access_key' attribute to the given value.
201210
func (b *AWSBuilder) SecretAccessKey(value string) *AWSBuilder {
202211
b.secretAccessKey = value
203-
b.bitmap_ |= 65536
212+
b.bitmap_ |= 131072
204213
return b
205214
}
206215

207216
// SubnetIDs sets the value of the 'subnet_IDs' attribute to the given values.
208217
func (b *AWSBuilder) SubnetIDs(values ...string) *AWSBuilder {
209218
b.subnetIDs = make([]string, len(values))
210219
copy(b.subnetIDs, values)
211-
b.bitmap_ |= 131072
220+
b.bitmap_ |= 262144
212221
return b
213222
}
214223

215224
// Tags sets the value of the 'tags' attribute to the given value.
216225
func (b *AWSBuilder) Tags(value map[string]string) *AWSBuilder {
217226
b.tags = value
218227
if value != nil {
219-
b.bitmap_ |= 262144
228+
b.bitmap_ |= 524288
220229
} else {
221-
b.bitmap_ &^= 262144
230+
b.bitmap_ &^= 524288
222231
}
223232
return b
224233
}
225234

235+
// VpcEndpointRoleArn sets the value of the 'vpc_endpoint_role_arn' attribute to the given value.
236+
func (b *AWSBuilder) VpcEndpointRoleArn(value string) *AWSBuilder {
237+
b.vpcEndpointRoleArn = value
238+
b.bitmap_ |= 1048576
239+
return b
240+
}
241+
226242
// Copy copies the attributes of the given object into this builder, discarding any previous values.
227243
func (b *AWSBuilder) Copy(object *AWS) *AWSBuilder {
228244
if object == nil {
@@ -273,6 +289,7 @@ func (b *AWSBuilder) Copy(object *AWS) *AWSBuilder {
273289
} else {
274290
b.etcdEncryption = nil
275291
}
292+
b.hcpInternalCommunicationHostedZoneId = object.hcpInternalCommunicationHostedZoneId
276293
b.privateHostedZoneID = object.privateHostedZoneID
277294
b.privateHostedZoneRoleARN = object.privateHostedZoneRoleARN
278295
b.privateLink = object.privateLink
@@ -296,6 +313,7 @@ func (b *AWSBuilder) Copy(object *AWS) *AWSBuilder {
296313
} else {
297314
b.tags = nil
298315
}
316+
b.vpcEndpointRoleArn = object.vpcEndpointRoleArn
299317
return b
300318
}
301319

@@ -342,6 +360,7 @@ func (b *AWSBuilder) Build() (object *AWS, err error) {
342360
return
343361
}
344362
}
363+
object.hcpInternalCommunicationHostedZoneId = b.hcpInternalCommunicationHostedZoneId
345364
object.privateHostedZoneID = b.privateHostedZoneID
346365
object.privateHostedZoneRoleARN = b.privateHostedZoneRoleARN
347366
object.privateLink = b.privateLink
@@ -362,5 +381,6 @@ func (b *AWSBuilder) Build() (object *AWS, err error) {
362381
object.tags[k] = v
363382
}
364383
}
384+
object.vpcEndpointRoleArn = b.vpcEndpointRoleArn
365385
return
366386
}

Diff for: clustersmgmt/v1/aws_type.go

+62-14
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ type AWS struct {
3636
billingAccountID string
3737
ec2MetadataHttpTokens Ec2MetadataHttpTokens
3838
etcdEncryption *AwsEtcdEncryption
39+
hcpInternalCommunicationHostedZoneId string
3940
privateHostedZoneID string
4041
privateHostedZoneRoleARN string
4142
privateLinkConfiguration *PrivateLinkClusterConfiguration
4243
secretAccessKey string
4344
subnetIDs []string
4445
tags map[string]string
46+
vpcEndpointRoleArn string
4547
privateLink bool
4648
}
4749

@@ -326,12 +328,35 @@ func (o *AWS) GetEtcdEncryption() (value *AwsEtcdEncryption, ok bool) {
326328
return
327329
}
328330

331+
// HcpInternalCommunicationHostedZoneId returns the value of the 'hcp_internal_communication_hosted_zone_id' attribute, or
332+
// the zero value of the type if the attribute doesn't have a value.
333+
//
334+
// ID of local private hosted zone for hypershift internal communication.
335+
func (o *AWS) HcpInternalCommunicationHostedZoneId() string {
336+
if o != nil && o.bitmap_&4096 != 0 {
337+
return o.hcpInternalCommunicationHostedZoneId
338+
}
339+
return ""
340+
}
341+
342+
// GetHcpInternalCommunicationHostedZoneId returns the value of the 'hcp_internal_communication_hosted_zone_id' attribute and
343+
// a flag indicating if the attribute has a value.
344+
//
345+
// ID of local private hosted zone for hypershift internal communication.
346+
func (o *AWS) GetHcpInternalCommunicationHostedZoneId() (value string, ok bool) {
347+
ok = o != nil && o.bitmap_&4096 != 0
348+
if ok {
349+
value = o.hcpInternalCommunicationHostedZoneId
350+
}
351+
return
352+
}
353+
329354
// PrivateHostedZoneID returns the value of the 'private_hosted_zone_ID' attribute, or
330355
// the zero value of the type if the attribute doesn't have a value.
331356
//
332357
// ID of private hosted zone.
333358
func (o *AWS) PrivateHostedZoneID() string {
334-
if o != nil && o.bitmap_&4096 != 0 {
359+
if o != nil && o.bitmap_&8192 != 0 {
335360
return o.privateHostedZoneID
336361
}
337362
return ""
@@ -342,7 +367,7 @@ func (o *AWS) PrivateHostedZoneID() string {
342367
//
343368
// ID of private hosted zone.
344369
func (o *AWS) GetPrivateHostedZoneID() (value string, ok bool) {
345-
ok = o != nil && o.bitmap_&4096 != 0
370+
ok = o != nil && o.bitmap_&8192 != 0
346371
if ok {
347372
value = o.privateHostedZoneID
348373
}
@@ -354,7 +379,7 @@ func (o *AWS) GetPrivateHostedZoneID() (value string, ok bool) {
354379
//
355380
// Role ARN for private hosted zone.
356381
func (o *AWS) PrivateHostedZoneRoleARN() string {
357-
if o != nil && o.bitmap_&8192 != 0 {
382+
if o != nil && o.bitmap_&16384 != 0 {
358383
return o.privateHostedZoneRoleARN
359384
}
360385
return ""
@@ -365,7 +390,7 @@ func (o *AWS) PrivateHostedZoneRoleARN() string {
365390
//
366391
// Role ARN for private hosted zone.
367392
func (o *AWS) GetPrivateHostedZoneRoleARN() (value string, ok bool) {
368-
ok = o != nil && o.bitmap_&8192 != 0
393+
ok = o != nil && o.bitmap_&16384 != 0
369394
if ok {
370395
value = o.privateHostedZoneRoleARN
371396
}
@@ -377,7 +402,7 @@ func (o *AWS) GetPrivateHostedZoneRoleARN() (value string, ok bool) {
377402
//
378403
// Sets cluster to be inaccessible externally.
379404
func (o *AWS) PrivateLink() bool {
380-
if o != nil && o.bitmap_&16384 != 0 {
405+
if o != nil && o.bitmap_&32768 != 0 {
381406
return o.privateLink
382407
}
383408
return false
@@ -388,7 +413,7 @@ func (o *AWS) PrivateLink() bool {
388413
//
389414
// Sets cluster to be inaccessible externally.
390415
func (o *AWS) GetPrivateLink() (value bool, ok bool) {
391-
ok = o != nil && o.bitmap_&16384 != 0
416+
ok = o != nil && o.bitmap_&32768 != 0
392417
if ok {
393418
value = o.privateLink
394419
}
@@ -400,7 +425,7 @@ func (o *AWS) GetPrivateLink() (value bool, ok bool) {
400425
//
401426
// Manages additional configuration for Private Links.
402427
func (o *AWS) PrivateLinkConfiguration() *PrivateLinkClusterConfiguration {
403-
if o != nil && o.bitmap_&32768 != 0 {
428+
if o != nil && o.bitmap_&65536 != 0 {
404429
return o.privateLinkConfiguration
405430
}
406431
return nil
@@ -411,7 +436,7 @@ func (o *AWS) PrivateLinkConfiguration() *PrivateLinkClusterConfiguration {
411436
//
412437
// Manages additional configuration for Private Links.
413438
func (o *AWS) GetPrivateLinkConfiguration() (value *PrivateLinkClusterConfiguration, ok bool) {
414-
ok = o != nil && o.bitmap_&32768 != 0
439+
ok = o != nil && o.bitmap_&65536 != 0
415440
if ok {
416441
value = o.privateLinkConfiguration
417442
}
@@ -423,7 +448,7 @@ func (o *AWS) GetPrivateLinkConfiguration() (value *PrivateLinkClusterConfigurat
423448
//
424449
// AWS secret access key.
425450
func (o *AWS) SecretAccessKey() string {
426-
if o != nil && o.bitmap_&65536 != 0 {
451+
if o != nil && o.bitmap_&131072 != 0 {
427452
return o.secretAccessKey
428453
}
429454
return ""
@@ -434,7 +459,7 @@ func (o *AWS) SecretAccessKey() string {
434459
//
435460
// AWS secret access key.
436461
func (o *AWS) GetSecretAccessKey() (value string, ok bool) {
437-
ok = o != nil && o.bitmap_&65536 != 0
462+
ok = o != nil && o.bitmap_&131072 != 0
438463
if ok {
439464
value = o.secretAccessKey
440465
}
@@ -446,7 +471,7 @@ func (o *AWS) GetSecretAccessKey() (value string, ok bool) {
446471
//
447472
// The subnet ids to be used when installing the cluster.
448473
func (o *AWS) SubnetIDs() []string {
449-
if o != nil && o.bitmap_&131072 != 0 {
474+
if o != nil && o.bitmap_&262144 != 0 {
450475
return o.subnetIDs
451476
}
452477
return nil
@@ -457,7 +482,7 @@ func (o *AWS) SubnetIDs() []string {
457482
//
458483
// The subnet ids to be used when installing the cluster.
459484
func (o *AWS) GetSubnetIDs() (value []string, ok bool) {
460-
ok = o != nil && o.bitmap_&131072 != 0
485+
ok = o != nil && o.bitmap_&262144 != 0
461486
if ok {
462487
value = o.subnetIDs
463488
}
@@ -469,7 +494,7 @@ func (o *AWS) GetSubnetIDs() (value []string, ok bool) {
469494
//
470495
// Optional keys and values that the installer will add as tags to all AWS resources it creates
471496
func (o *AWS) Tags() map[string]string {
472-
if o != nil && o.bitmap_&262144 != 0 {
497+
if o != nil && o.bitmap_&524288 != 0 {
473498
return o.tags
474499
}
475500
return nil
@@ -480,13 +505,36 @@ func (o *AWS) Tags() map[string]string {
480505
//
481506
// Optional keys and values that the installer will add as tags to all AWS resources it creates
482507
func (o *AWS) GetTags() (value map[string]string, ok bool) {
483-
ok = o != nil && o.bitmap_&262144 != 0
508+
ok = o != nil && o.bitmap_&524288 != 0
484509
if ok {
485510
value = o.tags
486511
}
487512
return
488513
}
489514

515+
// VpcEndpointRoleArn returns the value of the 'vpc_endpoint_role_arn' attribute, or
516+
// the zero value of the type if the attribute doesn't have a value.
517+
//
518+
// Role ARN for VPC Endpoint Service cross account role.
519+
func (o *AWS) VpcEndpointRoleArn() string {
520+
if o != nil && o.bitmap_&1048576 != 0 {
521+
return o.vpcEndpointRoleArn
522+
}
523+
return ""
524+
}
525+
526+
// GetVpcEndpointRoleArn returns the value of the 'vpc_endpoint_role_arn' attribute and
527+
// a flag indicating if the attribute has a value.
528+
//
529+
// Role ARN for VPC Endpoint Service cross account role.
530+
func (o *AWS) GetVpcEndpointRoleArn() (value string, ok bool) {
531+
ok = o != nil && o.bitmap_&1048576 != 0
532+
if ok {
533+
value = o.vpcEndpointRoleArn
534+
}
535+
return
536+
}
537+
490538
// AWSListKind is the name of the type used to represent list of objects of
491539
// type 'AWS'.
492540
const AWSListKind = "AWSList"

0 commit comments

Comments
 (0)