Skip to content

Commit

Permalink
akss 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
patrapritish1 committed Oct 13, 2023
1 parent 8f88a20 commit 5c0facd
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 1 deletion.
10 changes: 10 additions & 0 deletions examples/service/ocean/providers/azure_np/create/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,16 @@ func main() {
"F",
"E v4",
},
AcceleratedNetworking: spotinst.String("Enabled"),
DiskPerformance: spotinst.String("Premium"),
MinGpu: spotinst.Float64(1),
MaxGpu: spotinst.Float64(2),
MinNICs: spotinst.Int(1),
VmTypes: []string{
"generalPurpose",
"GPU",
},
MinData: spotinst.Int(2),
},
},
},
Expand Down
10 changes: 10 additions & 0 deletions examples/service/ocean/providers/azure_np/nodegroup/create/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ func main() {
"Bs",
"Da v4",
},
AcceleratedNetworking: spotinst.String("Enabled"),
DiskPerformance: spotinst.String("Premium"),
MinGpu: spotinst.Float64(1),
MaxGpu: spotinst.Float64(2),
MinNICs: spotinst.Int(1),
VmTypes: []string{
"generalPurpose",
"GPU",
},
MinData: spotinst.Int(2),
},
},
},
Expand Down
50 changes: 49 additions & 1 deletion service/ocean/providers/azure_np/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@ type Filters struct {
Architectures []string `json:"architectures,omitempty"`
ExcludeSeries []string `json:"excludeSeries,omitempty"`
AcceleratedNetworking *string `json:"acceleratedNetworking,omitempty"`
DiskPerformance *string `json:"diskPerformance,omitempty"`
MinGpu *float64 `json:"minGpu,omitempty"`
MaxGpu *float64 `json:"maxGpu,omitempty"`
MinNICs *int `json:"minNICs,omitempty"`
VmTypes []string `json:"vmTypes,omitempty"`
MinData *int `json:"minData,omitempty"`

forceSendFields []string
nullFields []string
Expand Down Expand Up @@ -396,7 +402,49 @@ func (o *Filters) SetExcludeSeries(v []string) *Filters {

func (o *Filters) SetAcceleratedNetworking(v *string) *Filters {
if o.AcceleratedNetworking = v; o.AcceleratedNetworking == nil {
o.nullFields = append(o.nullFields, "ExcludeSeries")
o.nullFields = append(o.nullFields, "AcceleratedNetworking")
}
return o
}

func (o *Filters) SetDiskPerformance(v *string) *Filters {
if o.DiskPerformance = v; o.DiskPerformance == nil {
o.nullFields = append(o.nullFields, "DiskPerformance")
}
return o
}

func (o *Filters) SetMinGpu(v *float64) *Filters {
if o.MinGpu = v; o.MinGpu == nil {
o.nullFields = append(o.nullFields, "MinGpu")
}
return o
}

func (o *Filters) SetMaxGpu(v *float64) *Filters {
if o.MaxGpu = v; o.MaxGpu == nil {
o.nullFields = append(o.nullFields, "MaxGpu")
}
return o
}

func (o *Filters) SetMinNICs(v *int) *Filters {
if o.MinNICs = v; o.MinNICs == nil {
o.nullFields = append(o.nullFields, "MinNICs")
}
return o
}

func (o *Filters) SetVmTypes(v []string) *Filters {
if o.VmTypes = v; o.VmTypes == nil {
o.nullFields = append(o.nullFields, "VmTypes")
}
return o
}

func (o *Filters) SetMinData(v *int) *Filters {
if o.MinData = v; o.MinData == nil {
o.nullFields = append(o.nullFields, "MinData")
}
return o
}
Expand Down

0 comments on commit 5c0facd

Please sign in to comment.