From 2b864a6dba8a1b1b6427558f12174efd14af8c94 Mon Sep 17 00:00:00 2001 From: powervs-ibm Date: Thu, 4 Apr 2024 06:02:10 +0000 Subject: [PATCH] Generated Swagger client from service-broker commit f627067b7cfb1a503a8fe46e15715957137676f5 --- power/models/p_vm_instance_update_response.go | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/power/models/p_vm_instance_update_response.go b/power/models/p_vm_instance_update_response.go index 1c8e9a76..07ccf955 100644 --- a/power/models/p_vm_instance_update_response.go +++ b/power/models/p_vm_instance_update_response.go @@ -41,6 +41,12 @@ type PVMInstanceUpdateResponse struct { // URL to check for status of the operation (for now, just the URL for the GET on the server, which has status information from powervc) StatusURL string `json:"statusUrl,omitempty"` + + // Indicates if all volumes attached to the server must reside in the same storage pool; If set to false then volumes from any storage type and pool can be attached to the PVMInstance; Impacts PVMInstance snapshot, capture, and clone, for capture and clone - only data volumes that are of the same storage type and in the same storage pool of the PVMInstance's boot volume can be included; for snapshot - all data volumes to be included in the snapshot must reside in the same storage type and pool. Once set to false, cannot be set back to true unless all volumes attached reside in the same storage type and pool. + StoragePoolAffinity *bool `json:"storagePoolAffinity,omitempty"` + + // The pvm instance virtual CPU information + VirtualCores *VirtualCores `json:"virtualCores,omitempty"` } // Validate validates this p VM instance update response @@ -55,6 +61,10 @@ func (m *PVMInstanceUpdateResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVirtualCores(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -123,6 +133,25 @@ func (m *PVMInstanceUpdateResponse) validateProcType(formats strfmt.Registry) er return nil } +func (m *PVMInstanceUpdateResponse) validateVirtualCores(formats strfmt.Registry) error { + if swag.IsZero(m.VirtualCores) { // not required + return nil + } + + if m.VirtualCores != nil { + if err := m.VirtualCores.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("virtualCores") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualCores") + } + return err + } + } + + return nil +} + // ContextValidate validate this p VM instance update response based on the context it is used func (m *PVMInstanceUpdateResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -131,6 +160,10 @@ func (m *PVMInstanceUpdateResponse) ContextValidate(ctx context.Context, formats res = append(res, err) } + if err := m.contextValidateVirtualCores(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -155,6 +188,27 @@ func (m *PVMInstanceUpdateResponse) contextValidatePinPolicy(ctx context.Context return nil } +func (m *PVMInstanceUpdateResponse) contextValidateVirtualCores(ctx context.Context, formats strfmt.Registry) error { + + if m.VirtualCores != nil { + + if swag.IsZero(m.VirtualCores) { // not required + return nil + } + + if err := m.VirtualCores.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("virtualCores") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualCores") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *PVMInstanceUpdateResponse) MarshalBinary() ([]byte, error) { if m == nil {