Skip to content

Commit

Permalink
Merge pull request #749 from gdbranco/chore/release-v0.1.327
Browse files Browse the repository at this point in the history
Release v0.1.327
  • Loading branch information
gdbranco authored Mar 24, 2023
2 parents 9a47e52 + 08f8eb4 commit b872f76
Show file tree
Hide file tree
Showing 8 changed files with 7,229 additions and 7,209 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
This document describes the relevant changes between releases of the OCM API
SDK.

## 0.1.327
- Update model to v0.0.268
- Replace `OidcConfigId` for `OidcConfig` in `STS` resource.

## 0.1.326
- Update model to v0.0.267
- Add `OidcConfigId` to `STS` resource.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
export CGO_ENABLED=0

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

# Details of the metamodel to use:
Expand Down
14,363 changes: 7,182 additions & 7,181 deletions clustersmgmt/v1/openapi.go

Large diffs are not rendered by default.

29 changes: 22 additions & 7 deletions clustersmgmt/v1/sts_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type STSBuilder struct {
oidcEndpointURL string
externalID string
instanceIAMRoles *InstanceIAMRolesBuilder
oidcConfigId string
oidcConfig *OidcConfigBuilder
operatorIAMRoles []*OperatorIAMRoleBuilder
operatorRolePrefix string
permissionBoundary string
Expand Down Expand Up @@ -96,10 +96,16 @@ func (b *STSBuilder) ManagedPolicies(value bool) *STSBuilder {
return b
}

// OidcConfigId sets the value of the 'oidc_config_id' attribute to the given value.
func (b *STSBuilder) OidcConfigId(value string) *STSBuilder {
b.oidcConfigId = value
b.bitmap_ |= 64
// OidcConfig sets the value of the 'oidc_config' attribute to the given value.
//
// Contains the necessary attributes to support oidc configuration hosting under Red Hat or registering a Customer's byo oidc config.
func (b *STSBuilder) OidcConfig(value *OidcConfigBuilder) *STSBuilder {
b.oidcConfig = value
if value != nil {
b.bitmap_ |= 64
} else {
b.bitmap_ &^= 64
}
return b
}

Expand Down Expand Up @@ -155,7 +161,11 @@ func (b *STSBuilder) Copy(object *STS) *STSBuilder {
b.instanceIAMRoles = nil
}
b.managedPolicies = object.managedPolicies
b.oidcConfigId = object.oidcConfigId
if object.oidcConfig != nil {
b.oidcConfig = NewOidcConfig().Copy(object.oidcConfig)
} else {
b.oidcConfig = nil
}
if object.operatorIAMRoles != nil {
b.operatorIAMRoles = make([]*OperatorIAMRoleBuilder, len(object.operatorIAMRoles))
for i, v := range object.operatorIAMRoles {
Expand Down Expand Up @@ -186,7 +196,12 @@ func (b *STSBuilder) Build() (object *STS, err error) {
}
}
object.managedPolicies = b.managedPolicies
object.oidcConfigId = b.oidcConfigId
if b.oidcConfig != nil {
object.oidcConfig, err = b.oidcConfig.Build()
if err != nil {
return
}
}
if b.operatorIAMRoles != nil {
object.operatorIAMRoles = make([]*OperatorIAMRole, len(b.operatorIAMRoles))
for i, v := range b.operatorIAMRoles {
Expand Down
20 changes: 10 additions & 10 deletions clustersmgmt/v1/sts_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type STS struct {
oidcEndpointURL string
externalID string
instanceIAMRoles *InstanceIAMRoles
oidcConfigId string
oidcConfig *OidcConfig
operatorIAMRoles []*OperatorIAMRole
operatorRolePrefix string
permissionBoundary string
Expand Down Expand Up @@ -181,25 +181,25 @@ func (o *STS) GetManagedPolicies() (value bool, ok bool) {
return
}

// OidcConfigId returns the value of the 'oidc_config_id' attribute, or
// OidcConfig returns the value of the 'oidc_config' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Registered Oidc Config ID, if available holds information related to the oidc config
func (o *STS) OidcConfigId() string {
// Registered Oidc Config, if available holds information related to the oidc config
func (o *STS) OidcConfig() *OidcConfig {
if o != nil && o.bitmap_&64 != 0 {
return o.oidcConfigId
return o.oidcConfig
}
return ""
return nil
}

// GetOidcConfigId returns the value of the 'oidc_config_id' attribute and
// GetOidcConfig returns the value of the 'oidc_config' attribute and
// a flag indicating if the attribute has a value.
//
// Registered Oidc Config ID, if available holds information related to the oidc config
func (o *STS) GetOidcConfigId() (value string, ok bool) {
// Registered Oidc Config, if available holds information related to the oidc config
func (o *STS) GetOidcConfig() (value *OidcConfig, ok bool) {
ok = o != nil && o.bitmap_&64 != 0
if ok {
value = o.oidcConfigId
value = o.oidcConfig
}
return
}
Expand Down
12 changes: 6 additions & 6 deletions clustersmgmt/v1/sts_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ func writeSTS(object *STS, stream *jsoniter.Stream) {
stream.WriteBool(object.managedPolicies)
count++
}
present_ = object.bitmap_&64 != 0
present_ = object.bitmap_&64 != 0 && object.oidcConfig != nil
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("oidc_config_id")
stream.WriteString(object.oidcConfigId)
stream.WriteObjectField("oidc_config")
writeOidcConfig(object.oidcConfig, stream)
count++
}
present_ = object.bitmap_&128 != 0 && object.operatorIAMRoles != nil
Expand Down Expand Up @@ -197,9 +197,9 @@ func readSTS(iterator *jsoniter.Iterator) *STS {
value := iterator.ReadBool()
object.managedPolicies = value
object.bitmap_ |= 32
case "oidc_config_id":
value := iterator.ReadString()
object.oidcConfigId = value
case "oidc_config":
value := readOidcConfig(iterator)
object.oidcConfig = value
object.bitmap_ |= 64
case "operator_iam_roles":
value := readOperatorIAMRoleList(iterator)
Expand Down
6 changes: 3 additions & 3 deletions openapi/clusters_mgmt/v1/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -9825,9 +9825,9 @@
"description": "If true, cluster account and operator roles have managed policies attached.",
"type": "boolean"
},
"oidc_config_id": {
"description": "Registered Oidc Config ID, if available holds information related to the oidc config",
"type": "string"
"oidc_config": {
"description": "Registered Oidc Config, if available holds information related to the oidc config",
"$ref": "#/components/schemas/OidcConfig"
},
"operator_iam_roles": {
"description": "List of roles necessary to access the AWS resources of the various operators used during installation",
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ limitations under the License.

package sdk

const Version = "0.1.326"
const Version = "0.1.327"

0 comments on commit b872f76

Please sign in to comment.