Skip to content

Commit

Permalink
Merge branch 'main' into SI-121-AWS-EG-AZ-Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sharadkesarwani committed Dec 11, 2024
2 parents b377360 + 8fd51e8 commit 9511d93
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 4 deletions.
8 changes: 8 additions & 0 deletions service/ocean/providers/azure_np/nodegroup_np.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type VirtualNodeGroup struct {
AutoScale *AutoScale `json:"autoScale,omitempty"`
Taints []*Taint `json:"taints,omitempty"`
VmSizes *VmSizes `json:"vmSizes,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty"`

// Read-only fields.
CreatedAt *time.Time `json:"createdAt,omitempty"`
Expand Down Expand Up @@ -323,4 +324,11 @@ func (o *VirtualNodeGroup) SetVmSizes(v *VmSizes) *VirtualNodeGroup {
return o
}

func (o *VirtualNodeGroup) SetScheduling(v *Scheduling) *VirtualNodeGroup {
if o.Scheduling = v; o.Scheduling == nil {
o.nullFields = append(o.nullFields, "Scheduling")
}
return o
}

//endregion
84 changes: 81 additions & 3 deletions service/stateful/providers/azure/statefulNode.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,23 @@ type Compute struct {
}

type VMSizes struct {
OnDemandSizes []string `json:"odSizes,omitempty"`
SpotSizes []string `json:"spotSizes,omitempty"`
PreferredSpotSizes []string `json:"preferredSpotSizes,omitempty"`
OnDemandSizes []string `json:"odSizes,omitempty"`
SpotSizes []string `json:"spotSizes,omitempty"`
PreferredSpotSizes []string `json:"preferredSpotSizes,omitempty"`
ExcludedVmSizes []string `json:"excludedVmSizes,omitempty"`
SpotSizeAttributes *SpotSizeAttributes `json:"spotSizeAttributes,omitempty"`

forceSendFields []string
nullFields []string
}

type SpotSizeAttributes struct {
MaxCpu *int `json:"maxCpu,omitempty"`
MaxMemory *int `json:"maxMemory,omitempty"`
MaxStorage *int `json:"maxStorage,omitempty"`
MinCpu *int `json:"minCpu,omitempty"`
MinMemory *int `json:"minMemory,omitempty"`
MinStorage *int `json:"minStorage,omitempty"`

forceSendFields []string
nullFields []string
Expand Down Expand Up @@ -1342,8 +1356,72 @@ func (o *VMSizes) SetPreferredSpotSizes(v []string) *VMSizes {
return o
}

func (o *VMSizes) SetExcludedVmSizes(v []string) *VMSizes {
if o.ExcludedVmSizes = v; o.ExcludedVmSizes == nil {
o.nullFields = append(o.nullFields, "ExcludedVmSizes")
}
return o
}

func (o *VMSizes) SetSpotSizeAttributes(v *SpotSizeAttributes) *VMSizes {
if o.SpotSizeAttributes = v; o.SpotSizeAttributes == nil {
o.nullFields = append(o.nullFields, "SpotSizeAttributes")
}
return o
}

// endregion

// region SpotSizeAttributes

func (o SpotSizeAttributes) MarshalJSON() ([]byte, error) {
type noMethod SpotSizeAttributes
raw := noMethod(o)
return jsonutil.MarshalJSON(raw, o.forceSendFields, o.nullFields)
}

func (o *SpotSizeAttributes) SetMaxCpu(v *int) *SpotSizeAttributes {
if o.MaxCpu = v; o.MaxCpu == nil {
o.nullFields = append(o.nullFields, "MaxCpu")
}
return o
}

func (o *SpotSizeAttributes) SetMaxMemory(v *int) *SpotSizeAttributes {
if o.MaxMemory = v; o.MaxMemory == nil {
o.nullFields = append(o.nullFields, "MaxMemory")
}
return o
}

func (o *SpotSizeAttributes) SetMaxStorage(v *int) *SpotSizeAttributes {
if o.MaxStorage = v; o.MaxStorage == nil {
o.nullFields = append(o.nullFields, "MaxStorage")
}
return o
}

func (o *SpotSizeAttributes) SetMinCpu(v *int) *SpotSizeAttributes {
if o.MinCpu = v; o.MinCpu == nil {
o.nullFields = append(o.nullFields, "MinCpu")
}
return o
}

func (o *SpotSizeAttributes) SetMinMemory(v *int) *SpotSizeAttributes {
if o.MinMemory = v; o.MinMemory == nil {
o.nullFields = append(o.nullFields, "MinMemory")
}
return o
}

func (o *SpotSizeAttributes) SetMinStorage(v *int) *SpotSizeAttributes {
if o.MinStorage = v; o.MinStorage == nil {
o.nullFields = append(o.nullFields, "MinStorage")
}
return o
}

// region LaunchSpecification

func (o LaunchSpecification) MarshalJSON() ([]byte, error) {
Expand Down
2 changes: 1 addition & 1 deletion spotinst/version.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package spotinst

// SDKVersion is the current version of the SDK.
const SDKVersion = "1.375.0"
const SDKVersion = "1.377.0"

// SDKName is the name of the SDK.
const SDKName = "spotinst-sdk-go"

0 comments on commit 9511d93

Please sign in to comment.