Skip to content

Commit

Permalink
OCM-5976 | feat: Updating to 0.0.355
Browse files Browse the repository at this point in the history
  • Loading branch information
den-rgb committed Feb 16, 2024
1 parent 1118e3f commit 236ffee
Show file tree
Hide file tree
Showing 15 changed files with 17,048 additions and 18,908 deletions.
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.353
model_version:=v0.0.355
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
51 changes: 35 additions & 16 deletions clustersmgmt/v1/aws_node_pool_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
//
// Representation of aws node pool specific parameters.
type AWSNodePoolBuilder struct {
bitmap_ uint32
id string
href string
availabilityZoneTypes map[string]string
instanceProfile string
instanceType string
subnetOutposts map[string]string
tags map[string]string
bitmap_ uint32
id string
href string
additionalSecurityGroupIds []string
availabilityZoneTypes map[string]string
instanceProfile string
instanceType string
subnetOutposts map[string]string
tags map[string]string
}

// NewAWSNodePool creates a new builder of 'AWS_node_pool' objects.
Expand Down Expand Up @@ -63,38 +64,46 @@ func (b *AWSNodePoolBuilder) Empty() bool {
return b == nil || b.bitmap_&^1 == 0
}

// AdditionalSecurityGroupIds sets the value of the 'additional_security_group_ids' attribute to the given values.
func (b *AWSNodePoolBuilder) AdditionalSecurityGroupIds(values ...string) *AWSNodePoolBuilder {
b.additionalSecurityGroupIds = make([]string, len(values))
copy(b.additionalSecurityGroupIds, values)
b.bitmap_ |= 8
return b
}

// AvailabilityZoneTypes sets the value of the 'availability_zone_types' attribute to the given value.
func (b *AWSNodePoolBuilder) AvailabilityZoneTypes(value map[string]string) *AWSNodePoolBuilder {
b.availabilityZoneTypes = value
if value != nil {
b.bitmap_ |= 8
b.bitmap_ |= 16
} else {
b.bitmap_ &^= 8
b.bitmap_ &^= 16
}
return b
}

// InstanceProfile sets the value of the 'instance_profile' attribute to the given value.
func (b *AWSNodePoolBuilder) InstanceProfile(value string) *AWSNodePoolBuilder {
b.instanceProfile = value
b.bitmap_ |= 16
b.bitmap_ |= 32
return b
}

// InstanceType sets the value of the 'instance_type' attribute to the given value.
func (b *AWSNodePoolBuilder) InstanceType(value string) *AWSNodePoolBuilder {
b.instanceType = value
b.bitmap_ |= 32
b.bitmap_ |= 64
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_ |= 64
b.bitmap_ |= 128
} else {
b.bitmap_ &^= 64
b.bitmap_ &^= 128
}
return b
}
Expand All @@ -103,9 +112,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_ |= 128
b.bitmap_ |= 256
} else {
b.bitmap_ &^= 128
b.bitmap_ &^= 256
}
return b
}
Expand All @@ -118,6 +127,12 @@ func (b *AWSNodePoolBuilder) Copy(object *AWSNodePool) *AWSNodePoolBuilder {
b.bitmap_ = object.bitmap_
b.id = object.id
b.href = object.href
if object.additionalSecurityGroupIds != nil {
b.additionalSecurityGroupIds = make([]string, len(object.additionalSecurityGroupIds))
copy(b.additionalSecurityGroupIds, object.additionalSecurityGroupIds)
} else {
b.additionalSecurityGroupIds = nil
}
if len(object.availabilityZoneTypes) > 0 {
b.availabilityZoneTypes = map[string]string{}
for k, v := range object.availabilityZoneTypes {
Expand Down Expand Up @@ -153,6 +168,10 @@ func (b *AWSNodePoolBuilder) Build() (object *AWSNodePool, err error) {
object.id = b.id
object.href = b.href
object.bitmap_ = b.bitmap_
if b.additionalSecurityGroupIds != nil {
object.additionalSecurityGroupIds = make([]string, len(b.additionalSecurityGroupIds))
copy(object.additionalSecurityGroupIds, b.additionalSecurityGroupIds)
}
if b.availabilityZoneTypes != nil {
object.availabilityZoneTypes = make(map[string]string)
for k, v := range b.availabilityZoneTypes {
Expand Down
60 changes: 42 additions & 18 deletions clustersmgmt/v1/aws_node_pool_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ const AWSNodePoolNilKind = "AWSNodePoolNil"
//
// Representation of aws node pool specific parameters.
type AWSNodePool struct {
bitmap_ uint32
id string
href string
availabilityZoneTypes map[string]string
instanceProfile string
instanceType string
subnetOutposts map[string]string
tags map[string]string
bitmap_ uint32
id string
href string
additionalSecurityGroupIds []string
availabilityZoneTypes map[string]string
instanceProfile string
instanceType string
subnetOutposts map[string]string
tags map[string]string
}

// Kind returns the name of the type of the object.
Expand Down Expand Up @@ -102,12 +103,35 @@ func (o *AWSNodePool) Empty() bool {
return o == nil || o.bitmap_&^1 == 0
}

// AdditionalSecurityGroupIds returns the value of the 'additional_security_group_ids' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Additional AWS Security Groups to be added node pool.
func (o *AWSNodePool) AdditionalSecurityGroupIds() []string {
if o != nil && o.bitmap_&8 != 0 {
return o.additionalSecurityGroupIds
}
return nil
}

// GetAdditionalSecurityGroupIds returns the value of the 'additional_security_group_ids' attribute and
// a flag indicating if the attribute has a value.
//
// Additional AWS Security Groups to be added node pool.
func (o *AWSNodePool) GetAdditionalSecurityGroupIds() (value []string, ok bool) {
ok = o != nil && o.bitmap_&8 != 0
if ok {
value = o.additionalSecurityGroupIds
}
return
}

// AvailabilityZoneTypes returns the value of the 'availability_zone_types' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Associates nodepool availability zones with zone types (e.g. wavelength, local).
func (o *AWSNodePool) AvailabilityZoneTypes() map[string]string {
if o != nil && o.bitmap_&8 != 0 {
if o != nil && o.bitmap_&16 != 0 {
return o.availabilityZoneTypes
}
return nil
Expand All @@ -118,7 +142,7 @@ func (o *AWSNodePool) AvailabilityZoneTypes() map[string]string {
//
// Associates nodepool availability zones with zone types (e.g. wavelength, local).
func (o *AWSNodePool) GetAvailabilityZoneTypes() (value map[string]string, ok bool) {
ok = o != nil && o.bitmap_&8 != 0
ok = o != nil && o.bitmap_&16 != 0
if ok {
value = o.availabilityZoneTypes
}
Expand All @@ -130,7 +154,7 @@ func (o *AWSNodePool) GetAvailabilityZoneTypes() (value map[string]string, ok bo
//
// InstanceProfile is the AWS EC2 instance profile, which is a container for an IAM role that the EC2 instance uses.
func (o *AWSNodePool) InstanceProfile() string {
if o != nil && o.bitmap_&16 != 0 {
if o != nil && o.bitmap_&32 != 0 {
return o.instanceProfile
}
return ""
Expand All @@ -141,7 +165,7 @@ func (o *AWSNodePool) InstanceProfile() string {
//
// InstanceProfile is the AWS EC2 instance profile, which is a container for an IAM role that the EC2 instance uses.
func (o *AWSNodePool) GetInstanceProfile() (value string, ok bool) {
ok = o != nil && o.bitmap_&16 != 0
ok = o != nil && o.bitmap_&32 != 0
if ok {
value = o.instanceProfile
}
Expand All @@ -153,7 +177,7 @@ func (o *AWSNodePool) GetInstanceProfile() (value string, ok bool) {
//
// InstanceType is an ec2 instance type for node instances (e.g. m5.large).
func (o *AWSNodePool) InstanceType() string {
if o != nil && o.bitmap_&32 != 0 {
if o != nil && o.bitmap_&64 != 0 {
return o.instanceType
}
return ""
Expand All @@ -164,7 +188,7 @@ func (o *AWSNodePool) InstanceType() string {
//
// InstanceType is an ec2 instance type for node instances (e.g. m5.large).
func (o *AWSNodePool) GetInstanceType() (value string, ok bool) {
ok = o != nil && o.bitmap_&32 != 0
ok = o != nil && o.bitmap_&64 != 0
if ok {
value = o.instanceType
}
Expand All @@ -176,7 +200,7 @@ func (o *AWSNodePool) GetInstanceType() (value string, ok bool) {
//
// Associates nodepool subnets with AWS Outposts.
func (o *AWSNodePool) SubnetOutposts() map[string]string {
if o != nil && o.bitmap_&64 != 0 {
if o != nil && o.bitmap_&128 != 0 {
return o.subnetOutposts
}
return nil
Expand All @@ -187,7 +211,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_&64 != 0
ok = o != nil && o.bitmap_&128 != 0
if ok {
value = o.subnetOutposts
}
Expand All @@ -199,7 +223,7 @@ func (o *AWSNodePool) GetSubnetOutposts() (value map[string]string, ok bool) {
//
// Optional keys and values that the installer will add as tags to all AWS resources it creates.
func (o *AWSNodePool) Tags() map[string]string {
if o != nil && o.bitmap_&128 != 0 {
if o != nil && o.bitmap_&256 != 0 {
return o.tags
}
return nil
Expand All @@ -210,7 +234,7 @@ func (o *AWSNodePool) Tags() map[string]string {
//
// Optional keys and values that the installer will add as tags to all AWS resources it creates.
func (o *AWSNodePool) GetTags() (value map[string]string, ok bool) {
ok = o != nil && o.bitmap_&128 != 0
ok = o != nil && o.bitmap_&256 != 0
if ok {
value = o.tags
}
Expand Down
33 changes: 23 additions & 10 deletions clustersmgmt/v1/aws_node_pool_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,16 @@ func writeAWSNodePool(object *AWSNodePool, stream *jsoniter.Stream) {
count++
}
var present_ bool
present_ = object.bitmap_&8 != 0 && object.availabilityZoneTypes != nil
present_ = object.bitmap_&8 != 0 && object.additionalSecurityGroupIds != nil
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("additional_security_group_ids")
writeStringList(object.additionalSecurityGroupIds, stream)
count++
}
present_ = object.bitmap_&16 != 0 && object.availabilityZoneTypes != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -95,7 +104,7 @@ func writeAWSNodePool(object *AWSNodePool, stream *jsoniter.Stream) {
}
count++
}
present_ = object.bitmap_&16 != 0
present_ = object.bitmap_&32 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -104,7 +113,7 @@ func writeAWSNodePool(object *AWSNodePool, stream *jsoniter.Stream) {
stream.WriteString(object.instanceProfile)
count++
}
present_ = object.bitmap_&32 != 0
present_ = object.bitmap_&64 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -113,7 +122,7 @@ func writeAWSNodePool(object *AWSNodePool, stream *jsoniter.Stream) {
stream.WriteString(object.instanceType)
count++
}
present_ = object.bitmap_&64 != 0 && object.subnetOutposts != nil
present_ = object.bitmap_&128 != 0 && object.subnetOutposts != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -142,7 +151,7 @@ func writeAWSNodePool(object *AWSNodePool, stream *jsoniter.Stream) {
}
count++
}
present_ = object.bitmap_&128 != 0 && object.tags != nil
present_ = object.bitmap_&256 != 0 && object.tags != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -205,6 +214,10 @@ func readAWSNodePool(iterator *jsoniter.Iterator) *AWSNodePool {
case "href":
object.href = iterator.ReadString()
object.bitmap_ |= 4
case "additional_security_group_ids":
value := readStringList(iterator)
object.additionalSecurityGroupIds = value
object.bitmap_ |= 8
case "availability_zone_types":
value := map[string]string{}
for {
Expand All @@ -216,15 +229,15 @@ func readAWSNodePool(iterator *jsoniter.Iterator) *AWSNodePool {
value[key] = item
}
object.availabilityZoneTypes = value
object.bitmap_ |= 8
object.bitmap_ |= 16
case "instance_profile":
value := iterator.ReadString()
object.instanceProfile = value
object.bitmap_ |= 16
object.bitmap_ |= 32
case "instance_type":
value := iterator.ReadString()
object.instanceType = value
object.bitmap_ |= 32
object.bitmap_ |= 64
case "subnet_outposts":
value := map[string]string{}
for {
Expand All @@ -236,7 +249,7 @@ func readAWSNodePool(iterator *jsoniter.Iterator) *AWSNodePool {
value[key] = item
}
object.subnetOutposts = value
object.bitmap_ |= 64
object.bitmap_ |= 128
case "tags":
value := map[string]string{}
for {
Expand All @@ -248,7 +261,7 @@ func readAWSNodePool(iterator *jsoniter.Iterator) *AWSNodePool {
value[key] = item
}
object.tags = value
object.bitmap_ |= 128
object.bitmap_ |= 256
default:
iterator.ReadAny()
}
Expand Down
10 changes: 0 additions & 10 deletions clustersmgmt/v1/cluster_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,16 +333,6 @@ func (c *ClusterClient) NodePools() *NodePoolsClient {
)
}

// Product returns the target 'product' resource.
//
// Reference to the resource that manages the product type of the cluster
func (c *ClusterClient) Product() *ProductClient {
return NewProductClient(
c.transport,
path.Join(c.path, "product"),
)
}

// ProvisionShard returns the target 'provision_shard' resource.
//
// Reference to the resource that manages the cluster's provision shard.
Expand Down
Loading

0 comments on commit 236ffee

Please sign in to comment.