v1.14.13
This commit is contained in:
24
CHANGELOG.md
24
CHANGELOG.md
@@ -1,4 +1,4 @@
|
|||||||
## Version 1.14.12
|
## Version 1.14.13
|
||||||
|
|
||||||
Методы `Audits` в cloudapi/compute, cloudbroker/compute, cloudapi/account, cloudbroker/account, cloudapi/vins, cloudbroker/vins, cloudapi/rg и cloudbroker/rg стали deprecated и в следующих версиях будут удалены, вместо них необходимо использовать метод `List` в cloudapi/audit и cloudbroker/audit с соответствующими фильтрами
|
Методы `Audits` в cloudapi/compute, cloudbroker/compute, cloudapi/account, cloudbroker/account, cloudapi/vins, cloudbroker/vins, cloudapi/rg и cloudbroker/rg стали deprecated и в следующих версиях будут удалены, вместо них необходимо использовать метод `List` в cloudapi/audit и cloudbroker/audit с соответствующими фильтрами
|
||||||
Методы `AccessGrant`, `AccessGrantToPool`, `AccessRevoke`, `AccessRevokeToPool` в cloudbroker/sep стали deprecated и в следующих версиях будут удалены
|
Методы `AccessGrant`, `AccessGrantToPool`, `AccessRevoke`, `AccessRevokeToPool` в cloudbroker/sep стали deprecated и в следующих версиях будут удалены
|
||||||
@@ -7,9 +7,25 @@
|
|||||||
|
|
||||||
Все методы группы `.SDN()` находятся в альфа-версии.
|
Все методы группы `.SDN()` находятся в альфа-версии.
|
||||||
|
|
||||||
### Исправлено
|
|
||||||
|
|
||||||
#### sep
|
|
||||||
|
### Добавлено
|
||||||
|
|
||||||
|
#### sdn logicalports
|
||||||
| Идентификатор задачи | Описание |
|
| Идентификатор задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-949 | Тип возвращаемого значения в методе `AddConsumerNodes` с `uint64` на `[]uint64` в cloudbroker/sep |
|
| BGOS-967 | Вычисляемое поле `ExcludeFirewall` в структуру ответа `LogicalPort` в sdn/logicalports |
|
||||||
|
|
||||||
|
|
||||||
|
### Изменено
|
||||||
|
|
||||||
|
#### sdn logicalports
|
||||||
|
| Идентификатор задачи | Описание |
|
||||||
|
| --- | --- |
|
||||||
|
| BGOS-967 | Тип опционального поля `LogicalPortAddresses` в структуре запроса `CreateRequest` с `[]LogicalPortAddress` на `[]LogicalPortAddressRequest` в sdn/logicalports |
|
||||||
|
| BGOS-967 | Тип обязательного поля `IP` в структуре запроса `LogicalPortAddressRequest` с `string` на `interface{}` в sdn/logicalports |
|
||||||
|
| BGOS-967 | Тип поля `IsDiscovered` c опционального на обязательное в структурах запросов `UpdateAddress` и `AddAddress` в sdn/logicalports |
|
||||||
|
| BGOS-967 | Тип обязательного поля `IsDiscovered` в структуре запроса `UpdateAddress` и `AddAddress` с `bool` на `interface{}` в sdn/logicalports |
|
||||||
|
| BGOS-967 | Тип опционального поля `Labels` в структуре запроса `CreateRequest` с `CreateLabels` на `*CreateLabels` в sdn/logicalports |
|
||||||
|
| BGOS-967 | Тип опционального поля `Labels` в структуре запроса `UpdateRequest` с `UpdateLabels` на `*UpdateLabels` в sdn/logicalports |
|
||||||
|
|
||||||
|
|||||||
@@ -350,6 +350,10 @@ func isBoolTypeValidator(fe validator.FieldLevel) bool {
|
|||||||
return fe.Field().CanConvert(reflect.TypeOf(true))
|
return fe.Field().CanConvert(reflect.TypeOf(true))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func isStringTypeValidator(fe validator.FieldLevel) bool {
|
||||||
|
return fe.Field().Kind() == reflect.String
|
||||||
|
}
|
||||||
|
|
||||||
func urlValidartor(fl validator.FieldLevel) bool {
|
func urlValidartor(fl validator.FieldLevel) bool {
|
||||||
fieldValues := fl.Field().String()
|
fieldValues := fl.Field().String()
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ func errorMessage(fe validator.FieldError) string {
|
|||||||
return fmt.Sprintf("%s %s: unexpected E-Mail format", prefix, fe.Field())
|
return fmt.Sprintf("%s %s: unexpected E-Mail format", prefix, fe.Field())
|
||||||
case "isBool":
|
case "isBool":
|
||||||
return fmt.Sprintf("%s %s: must be bool type", prefix, fe.Field())
|
return fmt.Sprintf("%s %s: must be bool type", prefix, fe.Field())
|
||||||
|
case "isString":
|
||||||
|
return fmt.Sprintf("%s %s: must be string type", prefix, fe.Field())
|
||||||
|
|
||||||
case "accessType":
|
case "accessType":
|
||||||
return fmt.Sprintf("%s %s must be one of the following: %s",
|
return fmt.Sprintf("%s %s must be one of the following: %s",
|
||||||
|
|||||||
@@ -231,6 +231,11 @@ func registerAllValidators(validate *validator.Validate) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = validate.RegisterValidation("isString", isStringTypeValidator)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
err = validate.RegisterValidation("url", urlValidartor)
|
err = validate.RegisterValidation("url", urlValidartor)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -55,34 +55,35 @@ type CreateRequest struct {
|
|||||||
|
|
||||||
// Logical port addresses
|
// Logical port addresses
|
||||||
// Required: false
|
// Required: false
|
||||||
LogicalPortAddresses []LogicalPortAddress `url:"logical_port_addresses,omitempty" json:"logical_port_addresses,omitempty" validate:"dive"`
|
LogicalPortAddresses []LogicalPortAddressRequest `url:"logical_port_addresses,omitempty" json:"logical_port_addresses,omitempty" validate:"dive"`
|
||||||
|
|
||||||
// Labels
|
// Labels
|
||||||
// Required: false
|
// Required: false
|
||||||
Labels CreateLabels `url:"labels,omitempty" json:"labels,omitempty"`
|
Labels *CreateLabels `url:"labels,omitempty" json:"labels"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// LogicalPortAddressRequest struct representing logical port address
|
// LogicalPortAddressRequest struct representing logical port address
|
||||||
type LogicalPortAddressRequest struct {
|
type LogicalPortAddressRequest struct {
|
||||||
// IP address
|
// IP address. IPv4 or IPv6 address of the logical port
|
||||||
|
// If nil (allowed only when IsPrimary is true), the system will automatically generate a valid address
|
||||||
// Required: true
|
// Required: true
|
||||||
IP string `url:"ip" json:"ip" validate:"required"`
|
IP interface{} `url:"ip" json:"ip" validate:"omitempty,isString"`
|
||||||
|
|
||||||
// IP type
|
// IP type
|
||||||
// Required: true
|
// Required: true
|
||||||
IPType string `url:"ip_type" json:"ip_type" validate:"required,oneof=IPv4 IPv6"`
|
IPType string `url:"ip_type" json:"ip_type" validate:"required,oneof=IPv4 IPv6"`
|
||||||
|
|
||||||
// Is primary. True or False
|
// Is primary
|
||||||
// Required: true
|
// Required: true
|
||||||
IsPrimary interface{} `url:"is_primary" json:"is_primary" validate:"required,isBool"`
|
IsPrimary interface{} `url:"is_primary" json:"is_primary" validate:"required,isBool"`
|
||||||
|
|
||||||
|
// Is discovered
|
||||||
|
// Required: true
|
||||||
|
IsDiscovered interface{} `url:"is_discovered" json:"is_discovered" validate:"required,isBool"`
|
||||||
|
|
||||||
// MAC address
|
// MAC address
|
||||||
// Required: false
|
// Required: false
|
||||||
MAC string `url:"mac,omitempty" json:"mac,omitempty"`
|
MAC string `url:"mac,omitempty" json:"mac,omitempty"`
|
||||||
|
|
||||||
// Is discovered. True or False
|
|
||||||
// Required: false
|
|
||||||
IsDiscovered interface{} `url:"is_discovered,omitempty" json:"is_discovered,omitempty" validate:"omitempty,isBool"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create creates a logical port
|
// Create creates a logical port
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ type LogicalPort struct {
|
|||||||
// Enabled
|
// Enabled
|
||||||
Enabled bool `json:"enabled"`
|
Enabled bool `json:"enabled"`
|
||||||
|
|
||||||
|
// Exclude firewall information
|
||||||
|
ExcludeFirewall ExcludeFirewall `json:"exclude_firewall"`
|
||||||
|
|
||||||
// External network ID
|
// External network ID
|
||||||
ExternalNetworkID string `json:"external_network_id"`
|
ExternalNetworkID string `json:"external_network_id"`
|
||||||
|
|
||||||
@@ -162,6 +165,18 @@ type MigrationStatus struct {
|
|||||||
VersionID uint64 `json:"version_id"`
|
VersionID uint64 `json:"version_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ExcludeFirewall information
|
||||||
|
type ExcludeFirewall struct {
|
||||||
|
// Exclusion reason
|
||||||
|
ExclusionReason string `json:"exclusion_reason"`
|
||||||
|
|
||||||
|
// Whether logical port addresses are excluded from firewall
|
||||||
|
LogicalPortAddressesExcluded bool `json:"logical_port_addresses_excluded"`
|
||||||
|
|
||||||
|
// Whether logical port is excluded from firewall
|
||||||
|
LogicalPortExcluded bool `json:"logical_port_excluded"`
|
||||||
|
}
|
||||||
|
|
||||||
// Labels information
|
// Labels information
|
||||||
type Labels struct {
|
type Labels struct {
|
||||||
// VM ID
|
// VM ID
|
||||||
|
|||||||
@@ -67,11 +67,15 @@ type UpdateRequest struct {
|
|||||||
|
|
||||||
// Labels
|
// Labels
|
||||||
// Required: false
|
// Required: false
|
||||||
Labels UpdateLabels `url:"labels,omitempty" json:"labels,omitempty"`
|
Labels *UpdateLabels `url:"labels,omitempty" json:"labels"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateAddress struct representing update address
|
// UpdateAddress struct representing update address
|
||||||
type UpdateAddress struct {
|
type UpdateAddress struct {
|
||||||
|
// ID of the address
|
||||||
|
// Required: true
|
||||||
|
ID string `url:"id" json:"id" validate:"required"`
|
||||||
|
|
||||||
// IP address
|
// IP address
|
||||||
// Required: true
|
// Required: true
|
||||||
IP string `url:"ip" json:"ip" validate:"required"`
|
IP string `url:"ip" json:"ip" validate:"required"`
|
||||||
@@ -81,8 +85,8 @@ type UpdateAddress struct {
|
|||||||
IPType string `url:"ip_type" json:"ip_type" validate:"required,oneof=IPv4 IPv6"`
|
IPType string `url:"ip_type" json:"ip_type" validate:"required,oneof=IPv4 IPv6"`
|
||||||
|
|
||||||
// Is discovered. True or False
|
// Is discovered. True or False
|
||||||
// Required: false
|
// Required: true
|
||||||
IsDiscovered interface{} `url:"is_discovered,omitempty" json:"is_discovered,omitempty" validate:"omitempty,isBool"`
|
IsDiscovered interface{} `url:"is_discovered" json:"is_discovered" validate:"required,isBool"`
|
||||||
|
|
||||||
// Is primary. True or False
|
// Is primary. True or False
|
||||||
// Required: true
|
// Required: true
|
||||||
@@ -103,11 +107,11 @@ type AddAddress struct {
|
|||||||
// Required: true
|
// Required: true
|
||||||
IPType string `url:"ip_type" json:"ip_type" validate:"required,oneof=IPv4 IPv6"`
|
IPType string `url:"ip_type" json:"ip_type" validate:"required,oneof=IPv4 IPv6"`
|
||||||
|
|
||||||
// Is discovered. True or False
|
// Is discovered
|
||||||
// Required: false
|
// Required: true
|
||||||
IsDiscovered interface{} `url:"is_discovered,omitempty" json:"is_discovered,omitempty" validate:"omitempty,isBool"`
|
IsDiscovered interface{} `url:"is_discovered" json:"is_discovered" validate:"required,isBool"`
|
||||||
|
|
||||||
// Is primary. True or False
|
// Is primary
|
||||||
// Required: true
|
// Required: true
|
||||||
IsPrimary interface{} `url:"is_primary" json:"is_primary" validate:"required,isBool"`
|
IsPrimary interface{} `url:"is_primary" json:"is_primary" validate:"required,isBool"`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user