diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f6f90d..52173c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ -## Version 1.7.4 +## Version 1.7.5 -## Bugfix +### Bugfix -- Remove tag "required" from field Value in AffinityRuleAddRequest, AntiAffinityRuleAddRequest, AffinityRuleRemoveRequest AntiAffinityRuleRemoveRequest in cloudapi/compute and cloudbroker/compute +- Add json tag to a field AccountID in ItemCompute in cloudapi/bservice +- Add boolean field NeedReboot in RecordCompute and ItemCompute in cloudapi/compute +- Change json and url tags for field ShowAll in GetRequest in cloudapi/image +- Change json and url tags for field ByID in ListRequest in cloudapi/k8ci +- Change json and url tags for field AccountID in ListRequest in cloudapi/lb +- Add boolean field Safe in RestartRequest in cloudapi/lb +- Remove omitempty from json and url tags in ExtNetID in CreateInRGRequest in cloudapi/vins and cloudbroker/vins +- Change type of field ExtNetID from uint64 to int64 in CreateInRGRequest in cloudapi/vins and cloudbroker/vins diff --git a/pkg/cloudapi/bservice/models.go b/pkg/cloudapi/bservice/models.go index 75efa33..ab50f75 100644 --- a/pkg/cloudapi/bservice/models.go +++ b/pkg/cloudapi/bservice/models.go @@ -93,7 +93,7 @@ type RecordBasicService struct { // Main information about Compute type ItemCompute struct { // Account ID - AccountID uint64 + AccountID uint64 `json:"accountId"` // Architecture Architecture string `json:"arch"` diff --git a/pkg/cloudapi/compute/models.go b/pkg/cloudapi/compute/models.go index e7000bb..39ea486 100644 --- a/pkg/cloudapi/compute/models.go +++ b/pkg/cloudapi/compute/models.go @@ -380,6 +380,9 @@ type RecordCompute struct { // Name Name string `json:"name"` + // NeedReboot + NeedReboot bool `json:"needReboot"` + // Natable VINS ID NatableVINSID uint64 `json:"natableVinsId"` @@ -857,6 +860,9 @@ type ItemCompute struct { // Name Name string `json:"name"` + // NeedReboot + NeedReboot bool `json:"needReboot"` + // Pinned or not Pinned bool `json:"pinned"` diff --git a/pkg/cloudapi/image/get.go b/pkg/cloudapi/image/get.go index c530ee4..1b86fce 100644 --- a/pkg/cloudapi/image/get.go +++ b/pkg/cloudapi/image/get.go @@ -16,7 +16,7 @@ type GetRequest struct { // If set to False returns only images in status CREATED // Required: false - ShowAll bool `url:"show_all,omitempty" json:"show_all,omitempty"` + ShowAll bool `url:"showAll,omitempty" json:"showAll,omitempty"` } // Get gets image by ID. diff --git a/pkg/cloudapi/k8ci/list.go b/pkg/cloudapi/k8ci/list.go index e437fe8..09013d8 100644 --- a/pkg/cloudapi/k8ci/list.go +++ b/pkg/cloudapi/k8ci/list.go @@ -10,7 +10,7 @@ import ( type ListRequest struct { // Find by ID // Required: false - ByID uint64 `url:"id,omitempty" json:"id,omitempty"` + ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"` // Find by name // Required: false diff --git a/pkg/cloudapi/lb/list.go b/pkg/cloudapi/lb/list.go index b897cf3..9c3daea 100644 --- a/pkg/cloudapi/lb/list.go +++ b/pkg/cloudapi/lb/list.go @@ -18,7 +18,7 @@ type ListRequest struct { // Find by account ID // Required: false - AccountID uint64 `url:"accountID,omitempty" json:"accountID,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Find by resource group ID // Required: false diff --git a/pkg/cloudapi/lb/restart.go b/pkg/cloudapi/lb/restart.go index 67e148e..eb25cb2 100644 --- a/pkg/cloudapi/lb/restart.go +++ b/pkg/cloudapi/lb/restart.go @@ -13,6 +13,11 @@ type RestartRequest struct { // ID of the load balancer instance to restart // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` + + // restart secondary and primary nodes sequentially in HA mode + // Default is true + // Required: false + Safe bool `url:"safe" json:"safe"` } // Restart restarts specified load balancer instance diff --git a/pkg/cloudapi/vins/create_in_rg.go b/pkg/cloudapi/vins/create_in_rg.go index e24f7d4..8d89fa5 100644 --- a/pkg/cloudapi/vins/create_in_rg.go +++ b/pkg/cloudapi/vins/create_in_rg.go @@ -25,7 +25,8 @@ type CreateInRGRequest struct { // External network ID // Required: false - ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"` + // -1 - not connect to extnet, 0 - auto select, 1+ - extnet ID + ExtNetID int64 `url:"extNetId" json:"extNetId"` // External IP, related only for extNetId >= 0 // Required: false diff --git a/pkg/cloudbroker/vins/create_in_rg.go b/pkg/cloudbroker/vins/create_in_rg.go index 7b90b59..90084e3 100644 --- a/pkg/cloudbroker/vins/create_in_rg.go +++ b/pkg/cloudbroker/vins/create_in_rg.go @@ -25,7 +25,8 @@ type CreateInRGRequest struct { // External network ID // Required: false - ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"` + // -1 - not connect to extnet, 0 - auto select, 1+ - extnet ID + ExtNetID int64 `url:"extNetId" json:"extNetId"` // External IP, related only for extNetId >= 0 // Required: false