Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump to ocm-api-model 0.0.387 #982

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export PATH := $(LOCAL_BIN_PATH):$(PATH)
export CGO_ENABLED=0

# Details of the model to use:
model_version:=v0.0.385
model_version:=v0.0.387
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
33 changes: 29 additions & 4 deletions clustersmgmt/v1/aws_node_pool_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type AWSNodePoolBuilder struct {
ec2MetadataHttpTokens Ec2MetadataHttpTokens
instanceProfile string
instanceType string
rootVolume *AWSVolumeBuilder
subnetOutposts map[string]string
tags map[string]string
}
Expand Down Expand Up @@ -107,13 +108,26 @@ func (b *AWSNodePoolBuilder) InstanceType(value string) *AWSNodePoolBuilder {
return b
}

// RootVolume sets the value of the 'root_volume' attribute to the given value.
//
// Holds settings for an AWS storage volume.
func (b *AWSNodePoolBuilder) RootVolume(value *AWSVolumeBuilder) *AWSNodePoolBuilder {
b.rootVolume = value
if value != nil {
b.bitmap_ |= 256
} else {
b.bitmap_ &^= 256
}
return b
}

// SubnetOutposts sets the value of the 'subnet_outposts' attribute to the given value.
func (b *AWSNodePoolBuilder) SubnetOutposts(value map[string]string) *AWSNodePoolBuilder {
b.subnetOutposts = value
if value != nil {
b.bitmap_ |= 256
b.bitmap_ |= 512
} else {
b.bitmap_ &^= 256
b.bitmap_ &^= 512
}
return b
}
Expand All @@ -122,9 +136,9 @@ func (b *AWSNodePoolBuilder) SubnetOutposts(value map[string]string) *AWSNodePoo
func (b *AWSNodePoolBuilder) Tags(value map[string]string) *AWSNodePoolBuilder {
b.tags = value
if value != nil {
b.bitmap_ |= 512
b.bitmap_ |= 1024
} else {
b.bitmap_ &^= 512
b.bitmap_ &^= 1024
}
return b
}
Expand Down Expand Up @@ -154,6 +168,11 @@ func (b *AWSNodePoolBuilder) Copy(object *AWSNodePool) *AWSNodePoolBuilder {
b.ec2MetadataHttpTokens = object.ec2MetadataHttpTokens
b.instanceProfile = object.instanceProfile
b.instanceType = object.instanceType
if object.rootVolume != nil {
b.rootVolume = NewAWSVolume().Copy(object.rootVolume)
} else {
b.rootVolume = nil
}
if len(object.subnetOutposts) > 0 {
b.subnetOutposts = map[string]string{}
for k, v := range object.subnetOutposts {
Expand Down Expand Up @@ -192,6 +211,12 @@ func (b *AWSNodePoolBuilder) Build() (object *AWSNodePool, err error) {
object.ec2MetadataHttpTokens = b.ec2MetadataHttpTokens
object.instanceProfile = b.instanceProfile
object.instanceType = b.instanceType
if b.rootVolume != nil {
object.rootVolume, err = b.rootVolume.Build()
if err != nil {
return
}
}
if b.subnetOutposts != nil {
object.subnetOutposts = make(map[string]string)
for k, v := range b.subnetOutposts {
Expand Down
32 changes: 28 additions & 4 deletions clustersmgmt/v1/aws_node_pool_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type AWSNodePool struct {
ec2MetadataHttpTokens Ec2MetadataHttpTokens
instanceProfile string
instanceType string
rootVolume *AWSVolume
subnetOutposts map[string]string
tags map[string]string
}
Expand Down Expand Up @@ -219,12 +220,35 @@ func (o *AWSNodePool) GetInstanceType() (value string, ok bool) {
return
}

// RootVolume returns the value of the 'root_volume' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// AWS Volume specification to be used to set custom worker disk size
func (o *AWSNodePool) RootVolume() *AWSVolume {
if o != nil && o.bitmap_&256 != 0 {
return o.rootVolume
}
return nil
}

// GetRootVolume returns the value of the 'root_volume' attribute and
// a flag indicating if the attribute has a value.
//
// AWS Volume specification to be used to set custom worker disk size
func (o *AWSNodePool) GetRootVolume() (value *AWSVolume, ok bool) {
ok = o != nil && o.bitmap_&256 != 0
if ok {
value = o.rootVolume
}
return
}

// SubnetOutposts returns the value of the 'subnet_outposts' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Associates nodepool subnets with AWS Outposts.
func (o *AWSNodePool) SubnetOutposts() map[string]string {
if o != nil && o.bitmap_&256 != 0 {
if o != nil && o.bitmap_&512 != 0 {
return o.subnetOutposts
}
return nil
Expand All @@ -235,7 +259,7 @@ func (o *AWSNodePool) SubnetOutposts() map[string]string {
//
// Associates nodepool subnets with AWS Outposts.
func (o *AWSNodePool) GetSubnetOutposts() (value map[string]string, ok bool) {
ok = o != nil && o.bitmap_&256 != 0
ok = o != nil && o.bitmap_&512 != 0
if ok {
value = o.subnetOutposts
}
Expand All @@ -254,7 +278,7 @@ func (o *AWSNodePool) GetSubnetOutposts() (value map[string]string, ok bool) {
// - Tag values may be between 0 and 256 characters in length
// - Tags may only contain letters, numbers, spaces, and the following characters: [_ . : / = + - @]
func (o *AWSNodePool) Tags() map[string]string {
if o != nil && o.bitmap_&512 != 0 {
if o != nil && o.bitmap_&1024 != 0 {
return o.tags
}
return nil
Expand All @@ -272,7 +296,7 @@ func (o *AWSNodePool) Tags() map[string]string {
// - Tag values may be between 0 and 256 characters in length
// - Tags may only contain letters, numbers, spaces, and the following characters: [_ . : / = + - @]
func (o *AWSNodePool) GetTags() (value map[string]string, ok bool) {
ok = o != nil && o.bitmap_&512 != 0
ok = o != nil && o.bitmap_&1024 != 0
if ok {
value = o.tags
}
Expand Down
21 changes: 17 additions & 4 deletions clustersmgmt/v1/aws_node_pool_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,16 @@ func writeAWSNodePool(object *AWSNodePool, stream *jsoniter.Stream) {
stream.WriteString(object.instanceType)
count++
}
present_ = object.bitmap_&256 != 0 && object.subnetOutposts != nil
present_ = object.bitmap_&256 != 0 && object.rootVolume != nil
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("root_volume")
writeAWSVolume(object.rootVolume, stream)
count++
}
present_ = object.bitmap_&512 != 0 && object.subnetOutposts != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -160,7 +169,7 @@ func writeAWSNodePool(object *AWSNodePool, stream *jsoniter.Stream) {
}
count++
}
present_ = object.bitmap_&512 != 0 && object.tags != nil
present_ = object.bitmap_&1024 != 0 && object.tags != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -252,6 +261,10 @@ func readAWSNodePool(iterator *jsoniter.Iterator) *AWSNodePool {
value := iterator.ReadString()
object.instanceType = value
object.bitmap_ |= 128
case "root_volume":
value := readAWSVolume(iterator)
object.rootVolume = value
object.bitmap_ |= 256
case "subnet_outposts":
value := map[string]string{}
for {
Expand All @@ -263,7 +276,7 @@ func readAWSNodePool(iterator *jsoniter.Iterator) *AWSNodePool {
value[key] = item
}
object.subnetOutposts = value
object.bitmap_ |= 256
object.bitmap_ |= 512
case "tags":
value := map[string]string{}
for {
Expand All @@ -275,7 +288,7 @@ func readAWSNodePool(iterator *jsoniter.Iterator) *AWSNodePool {
value[key] = item
}
object.tags = value
object.bitmap_ |= 512
object.bitmap_ |= 1024
default:
iterator.ReadAny()
}
Expand Down
Loading
Loading