diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ac45e990..05dc7b561 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,9 @@ - `git`: [v0.11.1](services/git/CHANGELOG.md#v0111) - **Dependencies:** Bump STACKIT SDK core module from `v0.23.0` to `v0.24.0` - `iaas`: + - [v1.9.0](services/iaas/CHANGELOG.md#v190) + - **Feature:** Add `Cascade` field to `ApiDeleteVolumeRequest` model + - **Feature:** Add `ConfigDrive` field to `CreateServerPayload` and `Server` model - [v1.8.2](services/iaas/CHANGELOG.md#v182) - **Dependencies:** Bump SDK resourcemanager module from `v0.21.0` to `v0.21.1` - [v1.8.1](services/iaas/CHANGELOG.md#v181) diff --git a/services/iaas/CHANGELOG.md b/services/iaas/CHANGELOG.md index cbe333f2d..ad9872844 100644 --- a/services/iaas/CHANGELOG.md +++ b/services/iaas/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.9.0 +- **Feature:** Add `Cascade` field to `ApiDeleteVolumeRequest` model +- **Feature:** Add `ConfigDrive` field to `CreateServerPayload` and `Server` model + ## v1.8.2 - **Dependencies:** Bump SDK resourcemanager module from `v0.21.0` to `v0.21.1` diff --git a/services/iaas/VERSION b/services/iaas/VERSION index 57f52717b..295e37c0e 100644 --- a/services/iaas/VERSION +++ b/services/iaas/VERSION @@ -1 +1 @@ -v1.8.2 +v1.9.0 diff --git a/services/iaas/api_default.go b/services/iaas/api_default.go index 78e08d160..1890a3a61 100644 --- a/services/iaas/api_default.go +++ b/services/iaas/api_default.go @@ -3485,6 +3485,9 @@ type ApiDeleteSnapshotRequest interface { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteVolumeRequest interface { + // Cascade action. + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + Cascade(cascade bool) ApiDeleteVolumeRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } @@ -13414,6 +13417,14 @@ type DeleteVolumeRequest struct { projectId string region string volumeId string + cascade *bool +} + +// Cascade action. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r DeleteVolumeRequest) Cascade(cascade bool) ApiDeleteVolumeRequest { + r.cascade = &cascade + return r } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -13454,6 +13465,9 @@ func (r DeleteVolumeRequest) Execute() error { return fmt.Errorf("volumeId must have less than 36 elements") } + if r.cascade != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cascade", r.cascade, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/services/iaas/model_create_server_payload.go b/services/iaas/model_create_server_payload.go index 1c3c0ad52..4c3c490fb 100644 --- a/services/iaas/model_create_server_payload.go +++ b/services/iaas/model_create_server_payload.go @@ -127,6 +127,33 @@ func setCreateServerPayloadGetBootVolumeAttributeType(arg *CreateServerPayloadGe *arg = &val } +/* + types and functions for configDrive +*/ + +// isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateServerPayloadgetConfigDriveAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateServerPayloadgetConfigDriveArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateServerPayloadgetConfigDriveRetType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateServerPayloadgetConfigDriveAttributeTypeOk(arg CreateServerPayloadgetConfigDriveAttributeType) (ret CreateServerPayloadgetConfigDriveRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCreateServerPayloadgetConfigDriveAttributeType(arg *CreateServerPayloadgetConfigDriveAttributeType, val CreateServerPayloadgetConfigDriveRetType) { + *arg = &val +} + /* types and functions for createdAt */ @@ -676,6 +703,8 @@ type CreateServerPayload struct { // Object that represents an availability zone. AvailabilityZone CreateServerPayloadGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"` BootVolume CreateServerPayloadGetBootVolumeAttributeType `json:"bootVolume,omitempty"` + // When true the server is created with a config drive. + ConfigDrive CreateServerPayloadgetConfigDriveAttributeType `json:"configDrive,omitempty"` // Date-time when resource was created. CreatedAt CreateServerPayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"` // An error message. @@ -741,6 +770,8 @@ func NewCreateServerPayload(machineType CreateServerPayloadGetMachineTypeArgType // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateServerPayloadWithDefaults() *CreateServerPayload { this := CreateServerPayload{} + var configDrive bool = false + this.ConfigDrive = &configDrive return &this } @@ -852,6 +883,33 @@ func (o *CreateServerPayload) SetBootVolume(v CreateServerPayloadGetBootVolumeRe setCreateServerPayloadGetBootVolumeAttributeType(&o.BootVolume, v) } +// GetConfigDrive returns the ConfigDrive field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateServerPayload) GetConfigDrive() (res CreateServerPayloadgetConfigDriveRetType) { + res, _ = o.GetConfigDriveOk() + return +} + +// GetConfigDriveOk returns a tuple with the ConfigDrive field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateServerPayload) GetConfigDriveOk() (ret CreateServerPayloadgetConfigDriveRetType, ok bool) { + return getCreateServerPayloadgetConfigDriveAttributeTypeOk(o.ConfigDrive) +} + +// HasConfigDrive returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateServerPayload) HasConfigDrive() bool { + _, ok := o.GetConfigDriveOk() + return ok +} + +// SetConfigDrive gets a reference to the given bool and assigns it to the ConfigDrive field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateServerPayload) SetConfigDrive(v CreateServerPayloadgetConfigDriveRetType) { + setCreateServerPayloadgetConfigDriveAttributeType(&o.ConfigDrive, v) +} + // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateServerPayload) GetCreatedAt() (res CreateServerPayloadGetCreatedAtRetType) { @@ -1386,6 +1444,9 @@ func (o CreateServerPayload) ToMap() (map[string]interface{}, error) { if val, ok := getCreateServerPayloadGetBootVolumeAttributeTypeOk(o.BootVolume); ok { toSerialize["BootVolume"] = val } + if val, ok := getCreateServerPayloadgetConfigDriveAttributeTypeOk(o.ConfigDrive); ok { + toSerialize["ConfigDrive"] = val + } if val, ok := getCreateServerPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { toSerialize["CreatedAt"] = val } diff --git a/services/iaas/model_server.go b/services/iaas/model_server.go index 72b60b624..e09fd92cf 100644 --- a/services/iaas/model_server.go +++ b/services/iaas/model_server.go @@ -127,6 +127,33 @@ func setServerGetBootVolumeAttributeType(arg *ServerGetBootVolumeAttributeType, *arg = &val } +/* + types and functions for configDrive +*/ + +// isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ServergetConfigDriveAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ServergetConfigDriveArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ServergetConfigDriveRetType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getServergetConfigDriveAttributeTypeOk(arg ServergetConfigDriveAttributeType) (ret ServergetConfigDriveRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setServergetConfigDriveAttributeType(arg *ServergetConfigDriveAttributeType, val ServergetConfigDriveRetType) { + *arg = &val +} + /* types and functions for createdAt */ @@ -676,6 +703,8 @@ type Server struct { // Object that represents an availability zone. AvailabilityZone ServerGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"` BootVolume ServerGetBootVolumeAttributeType `json:"bootVolume,omitempty"` + // When true the server is created with a config drive. + ConfigDrive ServergetConfigDriveAttributeType `json:"configDrive,omitempty"` // Date-time when resource was created. CreatedAt ServerGetCreatedAtAttributeType `json:"createdAt,omitempty"` // An error message. @@ -739,6 +768,8 @@ func NewServer(machineType ServerGetMachineTypeArgType, name ServerGetNameArgTyp // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewServerWithDefaults() *Server { this := Server{} + var configDrive bool = false + this.ConfigDrive = &configDrive return &this } @@ -850,6 +881,33 @@ func (o *Server) SetBootVolume(v ServerGetBootVolumeRetType) { setServerGetBootVolumeAttributeType(&o.BootVolume, v) } +// GetConfigDrive returns the ConfigDrive field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Server) GetConfigDrive() (res ServergetConfigDriveRetType) { + res, _ = o.GetConfigDriveOk() + return +} + +// GetConfigDriveOk returns a tuple with the ConfigDrive field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Server) GetConfigDriveOk() (ret ServergetConfigDriveRetType, ok bool) { + return getServergetConfigDriveAttributeTypeOk(o.ConfigDrive) +} + +// HasConfigDrive returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Server) HasConfigDrive() bool { + _, ok := o.GetConfigDriveOk() + return ok +} + +// SetConfigDrive gets a reference to the given bool and assigns it to the ConfigDrive field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Server) SetConfigDrive(v ServergetConfigDriveRetType) { + setServergetConfigDriveAttributeType(&o.ConfigDrive, v) +} + // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Server) GetCreatedAt() (res ServerGetCreatedAtRetType) { @@ -1391,6 +1449,9 @@ func (o Server) ToMap() (map[string]interface{}, error) { if val, ok := getServerGetBootVolumeAttributeTypeOk(o.BootVolume); ok { toSerialize["BootVolume"] = val } + if val, ok := getServergetConfigDriveAttributeTypeOk(o.ConfigDrive); ok { + toSerialize["ConfigDrive"] = val + } if val, ok := getServerGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { toSerialize["CreatedAt"] = val } diff --git a/services/iaas/oas_commit b/services/iaas/oas_commit index c0e556958..32bbf4fbf 100644 --- a/services/iaas/oas_commit +++ b/services/iaas/oas_commit @@ -1 +1 @@ -779c34469d663919ed700f2c69487eb5cccf70f3 +7df21609559f3652a7fee05149a6c1b729428532 diff --git a/services/iaas/v1api/api_default.go b/services/iaas/v1api/api_default.go index f861d7182..d3c74a5d7 100644 --- a/services/iaas/v1api/api_default.go +++ b/services/iaas/v1api/api_default.go @@ -9757,6 +9757,13 @@ type ApiDeleteVolumeRequest struct { ApiService DefaultAPI projectId string volumeId string + cascade *bool +} + +// Cascade action. +func (r ApiDeleteVolumeRequest) Cascade(cascade bool) ApiDeleteVolumeRequest { + r.cascade = &cascade + return r } func (r ApiDeleteVolumeRequest) Execute() error { @@ -9818,6 +9825,13 @@ func (a *DefaultAPIService) DeleteVolumeExecute(r ApiDeleteVolumeRequest) error return reportError("volumeId must have less than 36 elements") } + if r.cascade != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cascade", r.cascade, "form", "") + } else { + var defaultValue bool = false + parameterAddToHeaderOrQuery(localVarQueryParams, "cascade", defaultValue, "form", "") + r.cascade = &defaultValue + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/services/iaas/v1api/model_create_server_payload.go b/services/iaas/v1api/model_create_server_payload.go index 1fa5f49a5..8b4768afb 100644 --- a/services/iaas/v1api/model_create_server_payload.go +++ b/services/iaas/v1api/model_create_server_payload.go @@ -28,6 +28,8 @@ type CreateServerPayload struct { // This is the availability zone requested during server creation. If none is provided during the creation request and an existing volume will be used as boot volume it will be set to the same availability zone as the volume. For requests with no volumes involved it will be set to the metro availability zone. AvailabilityZone *string `json:"availabilityZone,omitempty"` BootVolume *BootVolume `json:"bootVolume,omitempty"` + // When true the server is created with a config drive. + ConfigDrive *bool `json:"configDrive,omitempty"` // Date-time when resource was created. CreatedAt *time.Time `json:"createdAt,omitempty"` // An error message. @@ -77,6 +79,8 @@ type _CreateServerPayload CreateServerPayload // will change when the set of required properties is changed func NewCreateServerPayload(machineType string, name string) *CreateServerPayload { this := CreateServerPayload{} + var configDrive bool = false + this.ConfigDrive = &configDrive this.MachineType = machineType this.Name = name return &this @@ -87,6 +91,8 @@ func NewCreateServerPayload(machineType string, name string) *CreateServerPayloa // but it doesn't guarantee that properties required by API are set func NewCreateServerPayloadWithDefaults() *CreateServerPayload { this := CreateServerPayload{} + var configDrive bool = false + this.ConfigDrive = &configDrive return &this } @@ -218,6 +224,38 @@ func (o *CreateServerPayload) SetBootVolume(v BootVolume) { o.BootVolume = &v } +// GetConfigDrive returns the ConfigDrive field value if set, zero value otherwise. +func (o *CreateServerPayload) GetConfigDrive() bool { + if o == nil || IsNil(o.ConfigDrive) { + var ret bool + return ret + } + return *o.ConfigDrive +} + +// GetConfigDriveOk returns a tuple with the ConfigDrive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetConfigDriveOk() (*bool, bool) { + if o == nil || IsNil(o.ConfigDrive) { + return nil, false + } + return o.ConfigDrive, true +} + +// HasConfigDrive returns a boolean if a field has been set. +func (o *CreateServerPayload) HasConfigDrive() bool { + if o != nil && !IsNil(o.ConfigDrive) { + return true + } + + return false +} + +// SetConfigDrive gets a reference to the given bool and assigns it to the ConfigDrive field. +func (o *CreateServerPayload) SetConfigDrive(v bool) { + o.ConfigDrive = &v +} + // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *CreateServerPayload) GetCreatedAt() time.Time { if o == nil || IsNil(o.CreatedAt) { @@ -864,6 +902,9 @@ func (o CreateServerPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.BootVolume) { toSerialize["bootVolume"] = o.BootVolume } + if !IsNil(o.ConfigDrive) { + toSerialize["configDrive"] = o.ConfigDrive + } if !IsNil(o.CreatedAt) { toSerialize["createdAt"] = o.CreatedAt } @@ -968,6 +1009,7 @@ func (o *CreateServerPayload) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "agent") delete(additionalProperties, "availabilityZone") delete(additionalProperties, "bootVolume") + delete(additionalProperties, "configDrive") delete(additionalProperties, "createdAt") delete(additionalProperties, "errorMessage") delete(additionalProperties, "id") diff --git a/services/iaas/v1api/model_server.go b/services/iaas/v1api/model_server.go index d7483effc..b4affe75b 100644 --- a/services/iaas/v1api/model_server.go +++ b/services/iaas/v1api/model_server.go @@ -28,6 +28,8 @@ type Server struct { // This is the availability zone requested during server creation. If none is provided during the creation request and an existing volume will be used as boot volume it will be set to the same availability zone as the volume. For requests with no volumes involved it will be set to the metro availability zone. AvailabilityZone *string `json:"availabilityZone,omitempty"` BootVolume *BootVolume `json:"bootVolume,omitempty"` + // When true the server is created with a config drive. + ConfigDrive *bool `json:"configDrive,omitempty"` // Date-time when resource was created. CreatedAt *time.Time `json:"createdAt,omitempty"` // An error message. @@ -77,6 +79,8 @@ type _Server Server // will change when the set of required properties is changed func NewServer(machineType string, name string) *Server { this := Server{} + var configDrive bool = false + this.ConfigDrive = &configDrive this.MachineType = machineType this.Name = name return &this @@ -87,6 +91,8 @@ func NewServer(machineType string, name string) *Server { // but it doesn't guarantee that properties required by API are set func NewServerWithDefaults() *Server { this := Server{} + var configDrive bool = false + this.ConfigDrive = &configDrive return &this } @@ -218,6 +224,38 @@ func (o *Server) SetBootVolume(v BootVolume) { o.BootVolume = &v } +// GetConfigDrive returns the ConfigDrive field value if set, zero value otherwise. +func (o *Server) GetConfigDrive() bool { + if o == nil || IsNil(o.ConfigDrive) { + var ret bool + return ret + } + return *o.ConfigDrive +} + +// GetConfigDriveOk returns a tuple with the ConfigDrive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetConfigDriveOk() (*bool, bool) { + if o == nil || IsNil(o.ConfigDrive) { + return nil, false + } + return o.ConfigDrive, true +} + +// HasConfigDrive returns a boolean if a field has been set. +func (o *Server) HasConfigDrive() bool { + if o != nil && !IsNil(o.ConfigDrive) { + return true + } + + return false +} + +// SetConfigDrive gets a reference to the given bool and assigns it to the ConfigDrive field. +func (o *Server) SetConfigDrive(v bool) { + o.ConfigDrive = &v +} + // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *Server) GetCreatedAt() time.Time { if o == nil || IsNil(o.CreatedAt) { @@ -864,6 +902,9 @@ func (o Server) ToMap() (map[string]interface{}, error) { if !IsNil(o.BootVolume) { toSerialize["bootVolume"] = o.BootVolume } + if !IsNil(o.ConfigDrive) { + toSerialize["configDrive"] = o.ConfigDrive + } if !IsNil(o.CreatedAt) { toSerialize["createdAt"] = o.CreatedAt } @@ -968,6 +1009,7 @@ func (o *Server) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "agent") delete(additionalProperties, "availabilityZone") delete(additionalProperties, "bootVolume") + delete(additionalProperties, "configDrive") delete(additionalProperties, "createdAt") delete(additionalProperties, "errorMessage") delete(additionalProperties, "id") diff --git a/services/iaas/v2api/api_default.go b/services/iaas/v2api/api_default.go index dc4f1ae78..64c76c824 100644 --- a/services/iaas/v2api/api_default.go +++ b/services/iaas/v2api/api_default.go @@ -11225,6 +11225,13 @@ type ApiDeleteVolumeRequest struct { projectId string region string volumeId string + cascade *bool +} + +// Cascade action. +func (r ApiDeleteVolumeRequest) Cascade(cascade bool) ApiDeleteVolumeRequest { + r.cascade = &cascade + return r } func (r ApiDeleteVolumeRequest) Execute() error { @@ -11286,6 +11293,13 @@ func (a *DefaultAPIService) DeleteVolumeExecute(r ApiDeleteVolumeRequest) error return reportError("volumeId must have less than 36 elements") } + if r.cascade != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cascade", r.cascade, "form", "") + } else { + var defaultValue bool = false + parameterAddToHeaderOrQuery(localVarQueryParams, "cascade", defaultValue, "form", "") + r.cascade = &defaultValue + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/services/iaas/v2api/model_create_server_payload.go b/services/iaas/v2api/model_create_server_payload.go index e0c5ddecd..1d3dc90c1 100644 --- a/services/iaas/v2api/model_create_server_payload.go +++ b/services/iaas/v2api/model_create_server_payload.go @@ -28,6 +28,8 @@ type CreateServerPayload struct { // This is the availability zone requested during server creation. If none is provided during the creation request and an existing volume will be used as boot volume it will be set to the same availability zone as the volume. For requests with no volumes involved it will be set to the metro availability zone. AvailabilityZone *string `json:"availabilityZone,omitempty"` BootVolume *BootVolume `json:"bootVolume,omitempty"` + // When true the server is created with a config drive. + ConfigDrive *bool `json:"configDrive,omitempty"` // Date-time when resource was created. CreatedAt *time.Time `json:"createdAt,omitempty"` // An error message. @@ -77,6 +79,8 @@ type _CreateServerPayload CreateServerPayload // will change when the set of required properties is changed func NewCreateServerPayload(machineType string, name string, networking CreateServerPayloadAllOfNetworking) *CreateServerPayload { this := CreateServerPayload{} + var configDrive bool = false + this.ConfigDrive = &configDrive this.MachineType = machineType this.Name = name this.Networking = networking @@ -88,6 +92,8 @@ func NewCreateServerPayload(machineType string, name string, networking CreateSe // but it doesn't guarantee that properties required by API are set func NewCreateServerPayloadWithDefaults() *CreateServerPayload { this := CreateServerPayload{} + var configDrive bool = false + this.ConfigDrive = &configDrive return &this } @@ -219,6 +225,38 @@ func (o *CreateServerPayload) SetBootVolume(v BootVolume) { o.BootVolume = &v } +// GetConfigDrive returns the ConfigDrive field value if set, zero value otherwise. +func (o *CreateServerPayload) GetConfigDrive() bool { + if o == nil || IsNil(o.ConfigDrive) { + var ret bool + return ret + } + return *o.ConfigDrive +} + +// GetConfigDriveOk returns a tuple with the ConfigDrive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetConfigDriveOk() (*bool, bool) { + if o == nil || IsNil(o.ConfigDrive) { + return nil, false + } + return o.ConfigDrive, true +} + +// HasConfigDrive returns a boolean if a field has been set. +func (o *CreateServerPayload) HasConfigDrive() bool { + if o != nil && !IsNil(o.ConfigDrive) { + return true + } + + return false +} + +// SetConfigDrive gets a reference to the given bool and assigns it to the ConfigDrive field. +func (o *CreateServerPayload) SetConfigDrive(v bool) { + o.ConfigDrive = &v +} + // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *CreateServerPayload) GetCreatedAt() time.Time { if o == nil || IsNil(o.CreatedAt) { @@ -857,6 +895,9 @@ func (o CreateServerPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.BootVolume) { toSerialize["bootVolume"] = o.BootVolume } + if !IsNil(o.ConfigDrive) { + toSerialize["configDrive"] = o.ConfigDrive + } if !IsNil(o.CreatedAt) { toSerialize["createdAt"] = o.CreatedAt } @@ -960,6 +1001,7 @@ func (o *CreateServerPayload) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "agent") delete(additionalProperties, "availabilityZone") delete(additionalProperties, "bootVolume") + delete(additionalProperties, "configDrive") delete(additionalProperties, "createdAt") delete(additionalProperties, "errorMessage") delete(additionalProperties, "id") diff --git a/services/iaas/v2api/model_server.go b/services/iaas/v2api/model_server.go index 4a51c7e2d..e42020960 100644 --- a/services/iaas/v2api/model_server.go +++ b/services/iaas/v2api/model_server.go @@ -28,6 +28,8 @@ type Server struct { // This is the availability zone requested during server creation. If none is provided during the creation request and an existing volume will be used as boot volume it will be set to the same availability zone as the volume. For requests with no volumes involved it will be set to the metro availability zone. AvailabilityZone *string `json:"availabilityZone,omitempty"` BootVolume *BootVolume `json:"bootVolume,omitempty"` + // When true the server is created with a config drive. + ConfigDrive *bool `json:"configDrive,omitempty"` // Date-time when resource was created. CreatedAt *time.Time `json:"createdAt,omitempty"` // An error message. @@ -77,6 +79,8 @@ type _Server Server // will change when the set of required properties is changed func NewServer(machineType string, name string) *Server { this := Server{} + var configDrive bool = false + this.ConfigDrive = &configDrive this.MachineType = machineType this.Name = name return &this @@ -87,6 +91,8 @@ func NewServer(machineType string, name string) *Server { // but it doesn't guarantee that properties required by API are set func NewServerWithDefaults() *Server { this := Server{} + var configDrive bool = false + this.ConfigDrive = &configDrive return &this } @@ -218,6 +224,38 @@ func (o *Server) SetBootVolume(v BootVolume) { o.BootVolume = &v } +// GetConfigDrive returns the ConfigDrive field value if set, zero value otherwise. +func (o *Server) GetConfigDrive() bool { + if o == nil || IsNil(o.ConfigDrive) { + var ret bool + return ret + } + return *o.ConfigDrive +} + +// GetConfigDriveOk returns a tuple with the ConfigDrive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetConfigDriveOk() (*bool, bool) { + if o == nil || IsNil(o.ConfigDrive) { + return nil, false + } + return o.ConfigDrive, true +} + +// HasConfigDrive returns a boolean if a field has been set. +func (o *Server) HasConfigDrive() bool { + if o != nil && !IsNil(o.ConfigDrive) { + return true + } + + return false +} + +// SetConfigDrive gets a reference to the given bool and assigns it to the ConfigDrive field. +func (o *Server) SetConfigDrive(v bool) { + o.ConfigDrive = &v +} + // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *Server) GetCreatedAt() time.Time { if o == nil || IsNil(o.CreatedAt) { @@ -864,6 +902,9 @@ func (o Server) ToMap() (map[string]interface{}, error) { if !IsNil(o.BootVolume) { toSerialize["bootVolume"] = o.BootVolume } + if !IsNil(o.ConfigDrive) { + toSerialize["configDrive"] = o.ConfigDrive + } if !IsNil(o.CreatedAt) { toSerialize["createdAt"] = o.CreatedAt } @@ -968,6 +1009,7 @@ func (o *Server) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "agent") delete(additionalProperties, "availabilityZone") delete(additionalProperties, "bootVolume") + delete(additionalProperties, "configDrive") delete(additionalProperties, "createdAt") delete(additionalProperties, "errorMessage") delete(additionalProperties, "id") diff --git a/services/iaas/v2beta1api/api_default.go b/services/iaas/v2beta1api/api_default.go index bd56cbb07..df81b0b75 100644 --- a/services/iaas/v2beta1api/api_default.go +++ b/services/iaas/v2beta1api/api_default.go @@ -10420,6 +10420,13 @@ type ApiDeleteVolumeRequest struct { projectId string region string volumeId string + cascade *bool +} + +// Cascade action. +func (r ApiDeleteVolumeRequest) Cascade(cascade bool) ApiDeleteVolumeRequest { + r.cascade = &cascade + return r } func (r ApiDeleteVolumeRequest) Execute() error { @@ -10481,6 +10488,13 @@ func (a *DefaultAPIService) DeleteVolumeExecute(r ApiDeleteVolumeRequest) error return reportError("volumeId must have less than 36 elements") } + if r.cascade != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cascade", r.cascade, "form", "") + } else { + var defaultValue bool = false + parameterAddToHeaderOrQuery(localVarQueryParams, "cascade", defaultValue, "form", "") + r.cascade = &defaultValue + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/services/iaas/v2beta1api/model_create_server_payload.go b/services/iaas/v2beta1api/model_create_server_payload.go index 808282b90..465c5259c 100644 --- a/services/iaas/v2beta1api/model_create_server_payload.go +++ b/services/iaas/v2beta1api/model_create_server_payload.go @@ -28,6 +28,8 @@ type CreateServerPayload struct { // This is the availability zone requested during server creation. If none is provided during the creation request and an existing volume will be used as boot volume it will be set to the same availability zone as the volume. For requests with no volumes involved it will be set to the metro availability zone. AvailabilityZone *string `json:"availabilityZone,omitempty"` BootVolume *BootVolume `json:"bootVolume,omitempty"` + // When true the server is created with a config drive. + ConfigDrive *bool `json:"configDrive,omitempty"` // Date-time when resource was created. CreatedAt *time.Time `json:"createdAt,omitempty"` // An error message. @@ -77,6 +79,8 @@ type _CreateServerPayload CreateServerPayload // will change when the set of required properties is changed func NewCreateServerPayload(machineType string, name string, networking CreateServerPayloadAllOfNetworking) *CreateServerPayload { this := CreateServerPayload{} + var configDrive bool = false + this.ConfigDrive = &configDrive this.MachineType = machineType this.Name = name this.Networking = networking @@ -88,6 +92,8 @@ func NewCreateServerPayload(machineType string, name string, networking CreateSe // but it doesn't guarantee that properties required by API are set func NewCreateServerPayloadWithDefaults() *CreateServerPayload { this := CreateServerPayload{} + var configDrive bool = false + this.ConfigDrive = &configDrive return &this } @@ -219,6 +225,38 @@ func (o *CreateServerPayload) SetBootVolume(v BootVolume) { o.BootVolume = &v } +// GetConfigDrive returns the ConfigDrive field value if set, zero value otherwise. +func (o *CreateServerPayload) GetConfigDrive() bool { + if o == nil || IsNil(o.ConfigDrive) { + var ret bool + return ret + } + return *o.ConfigDrive +} + +// GetConfigDriveOk returns a tuple with the ConfigDrive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetConfigDriveOk() (*bool, bool) { + if o == nil || IsNil(o.ConfigDrive) { + return nil, false + } + return o.ConfigDrive, true +} + +// HasConfigDrive returns a boolean if a field has been set. +func (o *CreateServerPayload) HasConfigDrive() bool { + if o != nil && !IsNil(o.ConfigDrive) { + return true + } + + return false +} + +// SetConfigDrive gets a reference to the given bool and assigns it to the ConfigDrive field. +func (o *CreateServerPayload) SetConfigDrive(v bool) { + o.ConfigDrive = &v +} + // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *CreateServerPayload) GetCreatedAt() time.Time { if o == nil || IsNil(o.CreatedAt) { @@ -857,6 +895,9 @@ func (o CreateServerPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.BootVolume) { toSerialize["bootVolume"] = o.BootVolume } + if !IsNil(o.ConfigDrive) { + toSerialize["configDrive"] = o.ConfigDrive + } if !IsNil(o.CreatedAt) { toSerialize["createdAt"] = o.CreatedAt } @@ -960,6 +1001,7 @@ func (o *CreateServerPayload) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "agent") delete(additionalProperties, "availabilityZone") delete(additionalProperties, "bootVolume") + delete(additionalProperties, "configDrive") delete(additionalProperties, "createdAt") delete(additionalProperties, "errorMessage") delete(additionalProperties, "id") diff --git a/services/iaas/v2beta1api/model_server.go b/services/iaas/v2beta1api/model_server.go index 41a78c7c6..daed84c49 100644 --- a/services/iaas/v2beta1api/model_server.go +++ b/services/iaas/v2beta1api/model_server.go @@ -28,6 +28,8 @@ type Server struct { // This is the availability zone requested during server creation. If none is provided during the creation request and an existing volume will be used as boot volume it will be set to the same availability zone as the volume. For requests with no volumes involved it will be set to the metro availability zone. AvailabilityZone *string `json:"availabilityZone,omitempty"` BootVolume *BootVolume `json:"bootVolume,omitempty"` + // When true the server is created with a config drive. + ConfigDrive *bool `json:"configDrive,omitempty"` // Date-time when resource was created. CreatedAt *time.Time `json:"createdAt,omitempty"` // An error message. @@ -77,6 +79,8 @@ type _Server Server // will change when the set of required properties is changed func NewServer(machineType string, name string) *Server { this := Server{} + var configDrive bool = false + this.ConfigDrive = &configDrive this.MachineType = machineType this.Name = name return &this @@ -87,6 +91,8 @@ func NewServer(machineType string, name string) *Server { // but it doesn't guarantee that properties required by API are set func NewServerWithDefaults() *Server { this := Server{} + var configDrive bool = false + this.ConfigDrive = &configDrive return &this } @@ -218,6 +224,38 @@ func (o *Server) SetBootVolume(v BootVolume) { o.BootVolume = &v } +// GetConfigDrive returns the ConfigDrive field value if set, zero value otherwise. +func (o *Server) GetConfigDrive() bool { + if o == nil || IsNil(o.ConfigDrive) { + var ret bool + return ret + } + return *o.ConfigDrive +} + +// GetConfigDriveOk returns a tuple with the ConfigDrive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetConfigDriveOk() (*bool, bool) { + if o == nil || IsNil(o.ConfigDrive) { + return nil, false + } + return o.ConfigDrive, true +} + +// HasConfigDrive returns a boolean if a field has been set. +func (o *Server) HasConfigDrive() bool { + if o != nil && !IsNil(o.ConfigDrive) { + return true + } + + return false +} + +// SetConfigDrive gets a reference to the given bool and assigns it to the ConfigDrive field. +func (o *Server) SetConfigDrive(v bool) { + o.ConfigDrive = &v +} + // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *Server) GetCreatedAt() time.Time { if o == nil || IsNil(o.CreatedAt) { @@ -864,6 +902,9 @@ func (o Server) ToMap() (map[string]interface{}, error) { if !IsNil(o.BootVolume) { toSerialize["bootVolume"] = o.BootVolume } + if !IsNil(o.ConfigDrive) { + toSerialize["configDrive"] = o.ConfigDrive + } if !IsNil(o.CreatedAt) { toSerialize["createdAt"] = o.CreatedAt } @@ -968,6 +1009,7 @@ func (o *Server) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "agent") delete(additionalProperties, "availabilityZone") delete(additionalProperties, "bootVolume") + delete(additionalProperties, "configDrive") delete(additionalProperties, "createdAt") delete(additionalProperties, "errorMessage") delete(additionalProperties, "id")