Skip to content

Commit

Permalink
fix: support cost centre in mve order
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaportPhilipBrowne committed Jun 21, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 94b7528 commit 5df40a5
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mve.go
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@ type BuyMVERequest struct {
Vnics []MVENetworkInterface
DiversityZone string
PromoCode string
CostCentre string

WaitForProvision bool // Wait until the MVE provisions before returning
WaitForTime time.Duration // How long to wait for the MVE to provision if WaitForProvision is true (default is 5 minutes)
@@ -95,6 +96,7 @@ func (svc *MVEServiceOp) BuyMVE(ctx context.Context, req *BuyMVERequest) (*BuyMV
Name: req.Name,
Term: req.Term,
PromoCode: req.PromoCode,
CostCentre: req.CostCentre,
ProductType: strings.ToUpper(PRODUCT_MVE),
DiversityZone: req.DiversityZone,
}
2 changes: 2 additions & 0 deletions mve_types.go
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ type MVEOrderConfig struct {
ProductType string `json:"productType"`
DiversityZone string `json:"diversityZone"`
PromoCode string `json:"promoCode,omitempty"`
CostCentre string `json:"costCentre,omitempty"`
NetworkInterfaces []MVENetworkInterface `json:"vnics"`
VendorConfig VendorConfig `json:"vendorConfig"`
}
@@ -152,6 +153,7 @@ type MVE struct {
ContractEndDate *Time `json:"contractEndDate"`
ContractTermMonths int `json:"contractTermMonths"`
AttributeTags map[string]string `json:"attributeTags"`
CostCentre string `json:"costCentre"`
Virtual bool `json:"virtual"`
BuyoutPort bool `json:"buyoutPort"`
Locked bool `json:"locked"`

0 comments on commit 5df40a5

Please sign in to comment.