Skip to content

Commit

Permalink
Merge branch 'main' into SPOTAUT-16530-umsSDKUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
patrapritish1 committed Sep 25, 2023
2 parents 1de51be + 7096568 commit a0081f5
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/service/ocean/providers/azure_np/create/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func main() {
OsDiskType: spotinst.String("Managed"),
OsType: spotinst.String("Windows"),
OsSKU: spotinst.String("Windows2019"),
KubernetesVersion: spotinst.String("1.26"),
},
NodeCountLimits: &azure_np.NodeCountLimits{
MinCount: spotinst.Int(0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func main() {
OsDiskType: spotinst.String("Managed"),
OsType: spotinst.String("Windows"),
OsSKU: spotinst.String("Windows2022"),
KubernetesVersion: spotinst.String("1.26"),
},
NodeCountLimits: &azure_np.NodeCountLimits{
MinCount: spotinst.Int(0),
Expand Down
48 changes: 48 additions & 0 deletions service/ocean/providers/aws/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -2078,6 +2078,7 @@ type ClusterEBS struct {
VolumeSize *int `json:"volumeSize,omitempty"`
Throughput *int `json:"throughput,omitempty"`
DynamicVolumeSize *ClusterDynamicVolumeSize `json:"dynamicVolumeSize,omitempty"`
DynamicIops *ClusterDynamicIops `json:"dynamicIops,omitempty"`

forceSendFields []string
nullFields []string
Expand All @@ -2091,6 +2092,15 @@ type ClusterDynamicVolumeSize struct {
nullFields []string
}

type ClusterDynamicIops struct {
BaseSize *int `json:"baseSize,omitempty"`
SizePerResourceUnit *int `json:"sizePerResourceUnit,omitempty"`
Resource *string `json:"resource,omitempty"`

forceSendFields []string
nullFields []string
}

// region BlockDeviceMapping

func (o ClusterBlockDeviceMappings) MarshalJSON() ([]byte, error) {
Expand Down Expand Up @@ -2186,6 +2196,13 @@ func (o *ClusterEBS) SetThroughput(v *int) *ClusterEBS {
return o
}

func (o *ClusterEBS) SetDynamicIops(v *ClusterDynamicIops) *ClusterEBS {
if o.DynamicIops = v; o.DynamicIops == nil {
o.nullFields = append(o.nullFields, "DynamicIops")
}
return o
}

// endregion

// region DynamicVolumeSize
Expand Down Expand Up @@ -2219,6 +2236,37 @@ func (o *ClusterDynamicVolumeSize) SetSizePerResourceUnit(v *int) *ClusterDynami

// endregion

// region DynamicIops

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

func (o *ClusterDynamicIops) SetBaseSize(v *int) *ClusterDynamicIops {
if o.BaseSize = v; o.BaseSize == nil {
o.nullFields = append(o.nullFields, "BaseSize")
}
return o
}

func (o *ClusterDynamicIops) SetResource(v *string) *ClusterDynamicIops {
if o.Resource = v; o.Resource == nil {
o.nullFields = append(o.nullFields, "Resource")
}
return o
}

func (o *ClusterDynamicIops) SetSizePerResourceUnit(v *int) *ClusterDynamicIops {
if o.SizePerResourceUnit = v; o.SizePerResourceUnit == nil {
o.nullFields = append(o.nullFields, "SizePerResourceUnit")
}
return o
}

// endregion

// region ResourceTagSpecification

func (o ResourceTagSpecification) MarshalJSON() ([]byte, error) {
Expand Down
8 changes: 8 additions & 0 deletions service/ocean/providers/azure_np/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type NodePoolProperties struct {
OsDiskType *string `json:"osDiskType,omitempty"`
OsType *string `json:"osType,omitempty"`
OsSKU *string `json:"osSKU,omitempty"`
KubernetesVersion *string `json:"kubernetesVersion,omitempty"`

forceSendFields []string
nullFields []string
Expand Down Expand Up @@ -63,6 +64,13 @@ func (o *NodePoolProperties) SetOsSKU(v *string) *NodePoolProperties {
return o
}

func (o *NodePoolProperties) SetKubernetesVersion(v *string) *NodePoolProperties {
if o.KubernetesVersion = v; o.KubernetesVersion == nil {
o.nullFields = append(o.nullFields, "KubernetesVersion")
}
return o
}

// endregion

// NodeCountLimits region
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.172.0"
const SDKVersion = "1.174.0"

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

0 comments on commit a0081f5

Please sign in to comment.