Skip to content

Commit

Permalink
Add Platform to network_verification_type
Browse files Browse the repository at this point in the history
  • Loading branch information
davidleerh committed Dec 1, 2023
1 parent c69a7a9 commit e624b7e
Show file tree
Hide file tree
Showing 25 changed files with 5,124 additions and 4,278 deletions.
2 changes: 1 addition & 1 deletion Makefile
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.339
model_version:=v0.0.340
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
31 changes: 15 additions & 16 deletions addonsmgmt/v1/addon_builder.go
Expand Up @@ -38,7 +38,7 @@ type AddonBuilder struct {
name string
namespaces []*AddonNamespaceBuilder
operatorName string
parameters []*AddonParameterBuilder
parameters *AddonParametersBuilder
requirements []*AddonRequirementBuilder
resourceCost float64
resourceName string
Expand Down Expand Up @@ -212,11 +212,16 @@ func (b *AddonBuilder) OperatorName(value string) *AddonBuilder {
return b
}

// Parameters sets the value of the 'parameters' attribute to the given values.
func (b *AddonBuilder) Parameters(values ...*AddonParameterBuilder) *AddonBuilder {
b.parameters = make([]*AddonParameterBuilder, len(values))
copy(b.parameters, values)
b.bitmap_ |= 524288
// Parameters sets the value of the 'parameters' attribute to the given value.
//
// Representation of AddonParameters
func (b *AddonBuilder) Parameters(value *AddonParametersBuilder) *AddonBuilder {
b.parameters = value
if value != nil {
b.bitmap_ |= 524288
} else {
b.bitmap_ &^= 524288
}
return b
}

Expand Down Expand Up @@ -327,10 +332,7 @@ func (b *AddonBuilder) Copy(object *Addon) *AddonBuilder {
}
b.operatorName = object.operatorName
if object.parameters != nil {
b.parameters = make([]*AddonParameterBuilder, len(object.parameters))
for i, v := range object.parameters {
b.parameters[i] = NewAddonParameter().Copy(v)
}
b.parameters = NewAddonParameters().Copy(object.parameters)
} else {
b.parameters = nil
}
Expand Down Expand Up @@ -415,12 +417,9 @@ func (b *AddonBuilder) Build() (object *Addon, err error) {
}
object.operatorName = b.operatorName
if b.parameters != nil {
object.parameters = make([]*AddonParameter, len(b.parameters))
for i, v := range b.parameters {
object.parameters[i], err = v.Build()
if err != nil {
return
}
object.parameters, err = b.parameters.Build()
if err != nil {
return
}
}
if b.requirements != nil {
Expand Down
26 changes: 18 additions & 8 deletions addonsmgmt/v1/addon_installation_builder.go
Expand Up @@ -36,6 +36,7 @@ type AddonInstallationBuilder struct {
creationTimestamp time.Time
csvName string
deletedTimestamp time.Time
desiredVersion string
operatorVersion string
parameters *AddonInstallationParametersBuilder
state AddonInstallationState
Expand Down Expand Up @@ -134,10 +135,17 @@ func (b *AddonInstallationBuilder) DeletedTimestamp(value time.Time) *AddonInsta
return b
}

// DesiredVersion sets the value of the 'desired_version' attribute to the given value.
func (b *AddonInstallationBuilder) DesiredVersion(value string) *AddonInstallationBuilder {
b.desiredVersion = value
b.bitmap_ |= 512
return b
}

// OperatorVersion sets the value of the 'operator_version' attribute to the given value.
func (b *AddonInstallationBuilder) OperatorVersion(value string) *AddonInstallationBuilder {
b.operatorVersion = value
b.bitmap_ |= 512
b.bitmap_ |= 1024
return b
}

Expand All @@ -147,9 +155,9 @@ func (b *AddonInstallationBuilder) OperatorVersion(value string) *AddonInstallat
func (b *AddonInstallationBuilder) Parameters(value *AddonInstallationParametersBuilder) *AddonInstallationBuilder {
b.parameters = value
if value != nil {
b.bitmap_ |= 1024
b.bitmap_ |= 2048
} else {
b.bitmap_ &^= 1024
b.bitmap_ &^= 2048
}
return b
}
Expand All @@ -159,14 +167,14 @@ func (b *AddonInstallationBuilder) Parameters(value *AddonInstallationParameters
// representation of addon installation state
func (b *AddonInstallationBuilder) State(value AddonInstallationState) *AddonInstallationBuilder {
b.state = value
b.bitmap_ |= 2048
b.bitmap_ |= 4096
return b
}

// StateDescription sets the value of the 'state_description' attribute to the given value.
func (b *AddonInstallationBuilder) StateDescription(value string) *AddonInstallationBuilder {
b.stateDescription = value
b.bitmap_ |= 4096
b.bitmap_ |= 8192
return b
}

Expand All @@ -176,17 +184,17 @@ func (b *AddonInstallationBuilder) StateDescription(value string) *AddonInstalla
func (b *AddonInstallationBuilder) Subscription(value *ObjectReferenceBuilder) *AddonInstallationBuilder {
b.subscription = value
if value != nil {
b.bitmap_ |= 8192
b.bitmap_ |= 16384
} else {
b.bitmap_ &^= 8192
b.bitmap_ &^= 16384
}
return b
}

// UpdatedTimestamp sets the value of the 'updated_timestamp' attribute to the given value.
func (b *AddonInstallationBuilder) UpdatedTimestamp(value time.Time) *AddonInstallationBuilder {
b.updatedTimestamp = value
b.bitmap_ |= 16384
b.bitmap_ |= 32768
return b
}

Expand Down Expand Up @@ -216,6 +224,7 @@ func (b *AddonInstallationBuilder) Copy(object *AddonInstallation) *AddonInstall
b.creationTimestamp = object.creationTimestamp
b.csvName = object.csvName
b.deletedTimestamp = object.deletedTimestamp
b.desiredVersion = object.desiredVersion
b.operatorVersion = object.operatorVersion
if object.parameters != nil {
b.parameters = NewAddonInstallationParameters().Copy(object.parameters)
Expand Down Expand Up @@ -260,6 +269,7 @@ func (b *AddonInstallationBuilder) Build() (object *AddonInstallation, err error
object.creationTimestamp = b.creationTimestamp
object.csvName = b.csvName
object.deletedTimestamp = b.deletedTimestamp
object.desiredVersion = b.desiredVersion
object.operatorVersion = b.operatorVersion
if b.parameters != nil {
object.parameters, err = b.parameters.Build()
Expand Down
48 changes: 36 additions & 12 deletions addonsmgmt/v1/addon_installation_type.go
Expand Up @@ -48,6 +48,7 @@ type AddonInstallation struct {
creationTimestamp time.Time
csvName string
deletedTimestamp time.Time
desiredVersion string
operatorVersion string
parameters *AddonInstallationParameters
state AddonInstallationState
Expand Down Expand Up @@ -251,12 +252,35 @@ func (o *AddonInstallation) GetDeletedTimestamp() (value time.Time, ok bool) {
return
}

// DesiredVersion returns the value of the 'desired_version' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Version of the next scheduled upgrade
func (o *AddonInstallation) DesiredVersion() string {
if o != nil && o.bitmap_&512 != 0 {
return o.desiredVersion
}
return ""
}

// GetDesiredVersion returns the value of the 'desired_version' attribute and
// a flag indicating if the attribute has a value.
//
// Version of the next scheduled upgrade
func (o *AddonInstallation) GetDesiredVersion() (value string, ok bool) {
ok = o != nil && o.bitmap_&512 != 0
if ok {
value = o.desiredVersion
}
return
}

// OperatorVersion returns the value of the 'operator_version' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Version of the operator installed by the add-on.
func (o *AddonInstallation) OperatorVersion() string {
if o != nil && o.bitmap_&512 != 0 {
if o != nil && o.bitmap_&1024 != 0 {
return o.operatorVersion
}
return ""
Expand All @@ -267,7 +291,7 @@ func (o *AddonInstallation) OperatorVersion() string {
//
// Version of the operator installed by the add-on.
func (o *AddonInstallation) GetOperatorVersion() (value string, ok bool) {
ok = o != nil && o.bitmap_&512 != 0
ok = o != nil && o.bitmap_&1024 != 0
if ok {
value = o.operatorVersion
}
Expand All @@ -279,7 +303,7 @@ func (o *AddonInstallation) GetOperatorVersion() (value string, ok bool) {
//
// Parameters in the installation
func (o *AddonInstallation) Parameters() *AddonInstallationParameters {
if o != nil && o.bitmap_&1024 != 0 {
if o != nil && o.bitmap_&2048 != 0 {
return o.parameters
}
return nil
Expand All @@ -290,7 +314,7 @@ func (o *AddonInstallation) Parameters() *AddonInstallationParameters {
//
// Parameters in the installation
func (o *AddonInstallation) GetParameters() (value *AddonInstallationParameters, ok bool) {
ok = o != nil && o.bitmap_&1024 != 0
ok = o != nil && o.bitmap_&2048 != 0
if ok {
value = o.parameters
}
Expand All @@ -302,7 +326,7 @@ func (o *AddonInstallation) GetParameters() (value *AddonInstallationParameters,
//
// Addon Installation State
func (o *AddonInstallation) State() AddonInstallationState {
if o != nil && o.bitmap_&2048 != 0 {
if o != nil && o.bitmap_&4096 != 0 {
return o.state
}
return AddonInstallationState("")
Expand All @@ -313,7 +337,7 @@ func (o *AddonInstallation) State() AddonInstallationState {
//
// Addon Installation State
func (o *AddonInstallation) GetState() (value AddonInstallationState, ok bool) {
ok = o != nil && o.bitmap_&2048 != 0
ok = o != nil && o.bitmap_&4096 != 0
if ok {
value = o.state
}
Expand All @@ -325,7 +349,7 @@ func (o *AddonInstallation) GetState() (value AddonInstallationState, ok bool) {
//
// Reason for the current State.
func (o *AddonInstallation) StateDescription() string {
if o != nil && o.bitmap_&4096 != 0 {
if o != nil && o.bitmap_&8192 != 0 {
return o.stateDescription
}
return ""
Expand All @@ -336,7 +360,7 @@ func (o *AddonInstallation) StateDescription() string {
//
// Reason for the current State.
func (o *AddonInstallation) GetStateDescription() (value string, ok bool) {
ok = o != nil && o.bitmap_&4096 != 0
ok = o != nil && o.bitmap_&8192 != 0
if ok {
value = o.stateDescription
}
Expand All @@ -348,7 +372,7 @@ func (o *AddonInstallation) GetStateDescription() (value string, ok bool) {
//
// Subscription for the addon installation
func (o *AddonInstallation) Subscription() *ObjectReference {
if o != nil && o.bitmap_&8192 != 0 {
if o != nil && o.bitmap_&16384 != 0 {
return o.subscription
}
return nil
Expand All @@ -359,7 +383,7 @@ func (o *AddonInstallation) Subscription() *ObjectReference {
//
// Subscription for the addon installation
func (o *AddonInstallation) GetSubscription() (value *ObjectReference, ok bool) {
ok = o != nil && o.bitmap_&8192 != 0
ok = o != nil && o.bitmap_&16384 != 0
if ok {
value = o.subscription
}
Expand All @@ -371,7 +395,7 @@ func (o *AddonInstallation) GetSubscription() (value *ObjectReference, ok bool)
//
// Date and time when the add-on installation information was last updated.
func (o *AddonInstallation) UpdatedTimestamp() time.Time {
if o != nil && o.bitmap_&16384 != 0 {
if o != nil && o.bitmap_&32768 != 0 {
return o.updatedTimestamp
}
return time.Time{}
Expand All @@ -382,7 +406,7 @@ func (o *AddonInstallation) UpdatedTimestamp() time.Time {
//
// Date and time when the add-on installation information was last updated.
func (o *AddonInstallation) GetUpdatedTimestamp() (value time.Time, ok bool) {
ok = o != nil && o.bitmap_&16384 != 0
ok = o != nil && o.bitmap_&32768 != 0
if ok {
value = o.updatedTimestamp
}
Expand Down

0 comments on commit e624b7e

Please sign in to comment.