From 58b635bcdd102df0dfff2d890692647a1e3cd765 Mon Sep 17 00:00:00 2001 From: Elior Erez Date: Wed, 30 Aug 2023 13:03:50 +0300 Subject: [PATCH] MGMT-15100: Remove unused feature-support-levels API endpoint --- .../models/feature_support_level.go | 341 ------------------ .../models/feature_support_levels.go | 73 ---- client/installer/installer_client.go | 28 -- ..._list_feature_support_levels_parameters.go | 128 ------- ...2_list_feature_support_levels_responses.go | 303 ---------------- .../models/feature_support_level.go | 341 ------------------ .../models/feature_support_levels.go | 73 ---- internal/bminventory/inventory_v2_handlers.go | 6 - .../featuresupport/support_levels_list.go | 296 --------------- mocks/mock_assisted_service.go | 14 - models/feature_support_level.go | 341 ------------------ models/feature_support_levels.go | 73 ---- pkg/auth/auth_assisted_service_mock_test.go | 4 - pkg/auth/rhsso_authz_handler_test.go | 10 - restapi/configure_assisted_install.go | 8 - restapi/embedded_spec.go | 221 ------------ restapi/operations/assisted_install_api.go | 12 - .../v2_list_feature_support_levels.go | 69 ---- ..._list_feature_support_levels_parameters.go | 46 --- ...2_list_feature_support_levels_responses.go | 197 ---------- ..._list_feature_support_levels_urlbuilder.go | 87 ----- subsystem/feature_support_levels_test.go | 12 - swagger.yaml | 81 ----- .../client/installer/installer_client.go | 28 -- ..._list_feature_support_levels_parameters.go | 128 ------- ...2_list_feature_support_levels_responses.go | 303 ---------------- .../models/feature_support_level.go | 341 ------------------ .../models/feature_support_levels.go | 73 ---- 28 files changed, 3637 deletions(-) delete mode 100644 api/vendor/github.com/openshift/assisted-service/models/feature_support_level.go delete mode 100644 api/vendor/github.com/openshift/assisted-service/models/feature_support_levels.go delete mode 100644 client/installer/v2_list_feature_support_levels_parameters.go delete mode 100644 client/installer/v2_list_feature_support_levels_responses.go delete mode 100644 client/vendor/github.com/openshift/assisted-service/models/feature_support_level.go delete mode 100644 client/vendor/github.com/openshift/assisted-service/models/feature_support_levels.go delete mode 100644 internal/featuresupport/support_levels_list.go delete mode 100644 models/feature_support_level.go delete mode 100644 models/feature_support_levels.go delete mode 100644 restapi/operations/installer/v2_list_feature_support_levels.go delete mode 100644 restapi/operations/installer/v2_list_feature_support_levels_parameters.go delete mode 100644 restapi/operations/installer/v2_list_feature_support_levels_responses.go delete mode 100644 restapi/operations/installer/v2_list_feature_support_levels_urlbuilder.go delete mode 100644 vendor/github.com/openshift/assisted-service/client/installer/v2_list_feature_support_levels_parameters.go delete mode 100644 vendor/github.com/openshift/assisted-service/client/installer/v2_list_feature_support_levels_responses.go delete mode 100644 vendor/github.com/openshift/assisted-service/models/feature_support_level.go delete mode 100644 vendor/github.com/openshift/assisted-service/models/feature_support_levels.go diff --git a/api/vendor/github.com/openshift/assisted-service/models/feature_support_level.go b/api/vendor/github.com/openshift/assisted-service/models/feature_support_level.go deleted file mode 100644 index 42c5539e51..0000000000 --- a/api/vendor/github.com/openshift/assisted-service/models/feature_support_level.go +++ /dev/null @@ -1,341 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FeatureSupportLevel (DEPRECATED) List of features attached to openshift version -// -// swagger:model feature-support-level -type FeatureSupportLevel struct { - - // features - Features []*FeatureSupportLevelFeaturesItems0 `json:"features"` - - // Version of the OpenShift cluster. - OpenshiftVersion string `json:"openshift_version,omitempty"` -} - -// Validate validates this feature support level -func (m *FeatureSupportLevel) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFeatures(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FeatureSupportLevel) validateFeatures(formats strfmt.Registry) error { - if swag.IsZero(m.Features) { // not required - return nil - } - - for i := 0; i < len(m.Features); i++ { - if swag.IsZero(m.Features[i]) { // not required - continue - } - - if m.Features[i] != nil { - if err := m.Features[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("features" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("features" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this feature support level based on the context it is used -func (m *FeatureSupportLevel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFeatures(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FeatureSupportLevel) contextValidateFeatures(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Features); i++ { - - if m.Features[i] != nil { - if err := m.Features[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("features" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("features" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FeatureSupportLevel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FeatureSupportLevel) UnmarshalBinary(b []byte) error { - var res FeatureSupportLevel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// FeatureSupportLevelFeaturesItems0 feature support level features items0 -// -// swagger:model FeatureSupportLevelFeaturesItems0 -type FeatureSupportLevelFeaturesItems0 struct { - - // (DEPRECATED) The ID of the feature - // Required: true - // Enum: [ADDITIONAL_NTP_SOURCE REQUESTED_HOSTNAME PROXY SNO DAY2_HOSTS VIP_AUTO_ALLOC DISK_SELECTION OVN_NETWORK_TYPE SDN_NETWORK_TYPE PLATFORM_SELECTION SCHEDULABLE_MASTERS AUTO_ASSIGN_ROLE CUSTOM_MANIFEST DISK_ENCRYPTION CLUSTER_MANAGED_NETWORKING_WITH_VMS ARM64_ARCHITECTURE ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING PPC64LE_ARCHITECTURE S390X_ARCHITECTURE SINGLE_NODE_EXPANSION LVM DUAL_STACK_NETWORKING MULTIARCH_RELEASE_IMAGE NUTANIX_INTEGRATION DUAL_STACK_VIPS USER_MANAGED_NETWORKING_WITH_MULTI_NODE] - FeatureID *string `json:"feature_id"` - - // support level - // Required: true - SupportLevel *SupportLevel `json:"support_level"` -} - -// Validate validates this feature support level features items0 -func (m *FeatureSupportLevelFeaturesItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFeatureID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSupportLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ADDITIONAL_NTP_SOURCE","REQUESTED_HOSTNAME","PROXY","SNO","DAY2_HOSTS","VIP_AUTO_ALLOC","DISK_SELECTION","OVN_NETWORK_TYPE","SDN_NETWORK_TYPE","PLATFORM_SELECTION","SCHEDULABLE_MASTERS","AUTO_ASSIGN_ROLE","CUSTOM_MANIFEST","DISK_ENCRYPTION","CLUSTER_MANAGED_NETWORKING_WITH_VMS","ARM64_ARCHITECTURE","ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING","PPC64LE_ARCHITECTURE","S390X_ARCHITECTURE","SINGLE_NODE_EXPANSION","LVM","DUAL_STACK_NETWORKING","MULTIARCH_RELEASE_IMAGE","NUTANIX_INTEGRATION","DUAL_STACK_VIPS","USER_MANAGED_NETWORKING_WITH_MULTI_NODE"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum = append(featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum, v) - } -} - -const ( - - // FeatureSupportLevelFeaturesItems0FeatureIDADDITIONALNTPSOURCE captures enum value "ADDITIONAL_NTP_SOURCE" - FeatureSupportLevelFeaturesItems0FeatureIDADDITIONALNTPSOURCE string = "ADDITIONAL_NTP_SOURCE" - - // FeatureSupportLevelFeaturesItems0FeatureIDREQUESTEDHOSTNAME captures enum value "REQUESTED_HOSTNAME" - FeatureSupportLevelFeaturesItems0FeatureIDREQUESTEDHOSTNAME string = "REQUESTED_HOSTNAME" - - // FeatureSupportLevelFeaturesItems0FeatureIDPROXY captures enum value "PROXY" - FeatureSupportLevelFeaturesItems0FeatureIDPROXY string = "PROXY" - - // FeatureSupportLevelFeaturesItems0FeatureIDSNO captures enum value "SNO" - FeatureSupportLevelFeaturesItems0FeatureIDSNO string = "SNO" - - // FeatureSupportLevelFeaturesItems0FeatureIDDAY2HOSTS captures enum value "DAY2_HOSTS" - FeatureSupportLevelFeaturesItems0FeatureIDDAY2HOSTS string = "DAY2_HOSTS" - - // FeatureSupportLevelFeaturesItems0FeatureIDVIPAUTOALLOC captures enum value "VIP_AUTO_ALLOC" - FeatureSupportLevelFeaturesItems0FeatureIDVIPAUTOALLOC string = "VIP_AUTO_ALLOC" - - // FeatureSupportLevelFeaturesItems0FeatureIDDISKSELECTION captures enum value "DISK_SELECTION" - FeatureSupportLevelFeaturesItems0FeatureIDDISKSELECTION string = "DISK_SELECTION" - - // FeatureSupportLevelFeaturesItems0FeatureIDOVNNETWORKTYPE captures enum value "OVN_NETWORK_TYPE" - FeatureSupportLevelFeaturesItems0FeatureIDOVNNETWORKTYPE string = "OVN_NETWORK_TYPE" - - // FeatureSupportLevelFeaturesItems0FeatureIDSDNNETWORKTYPE captures enum value "SDN_NETWORK_TYPE" - FeatureSupportLevelFeaturesItems0FeatureIDSDNNETWORKTYPE string = "SDN_NETWORK_TYPE" - - // FeatureSupportLevelFeaturesItems0FeatureIDPLATFORMSELECTION captures enum value "PLATFORM_SELECTION" - FeatureSupportLevelFeaturesItems0FeatureIDPLATFORMSELECTION string = "PLATFORM_SELECTION" - - // FeatureSupportLevelFeaturesItems0FeatureIDSCHEDULABLEMASTERS captures enum value "SCHEDULABLE_MASTERS" - FeatureSupportLevelFeaturesItems0FeatureIDSCHEDULABLEMASTERS string = "SCHEDULABLE_MASTERS" - - // FeatureSupportLevelFeaturesItems0FeatureIDAUTOASSIGNROLE captures enum value "AUTO_ASSIGN_ROLE" - FeatureSupportLevelFeaturesItems0FeatureIDAUTOASSIGNROLE string = "AUTO_ASSIGN_ROLE" - - // FeatureSupportLevelFeaturesItems0FeatureIDCUSTOMMANIFEST captures enum value "CUSTOM_MANIFEST" - FeatureSupportLevelFeaturesItems0FeatureIDCUSTOMMANIFEST string = "CUSTOM_MANIFEST" - - // FeatureSupportLevelFeaturesItems0FeatureIDDISKENCRYPTION captures enum value "DISK_ENCRYPTION" - FeatureSupportLevelFeaturesItems0FeatureIDDISKENCRYPTION string = "DISK_ENCRYPTION" - - // FeatureSupportLevelFeaturesItems0FeatureIDCLUSTERMANAGEDNETWORKINGWITHVMS captures enum value "CLUSTER_MANAGED_NETWORKING_WITH_VMS" - FeatureSupportLevelFeaturesItems0FeatureIDCLUSTERMANAGEDNETWORKINGWITHVMS string = "CLUSTER_MANAGED_NETWORKING_WITH_VMS" - - // FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTURE captures enum value "ARM64_ARCHITECTURE" - FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTURE string = "ARM64_ARCHITECTURE" - - // FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTUREWITHCLUSTERMANAGEDNETWORKING captures enum value "ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING" - FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTUREWITHCLUSTERMANAGEDNETWORKING string = "ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING" - - // FeatureSupportLevelFeaturesItems0FeatureIDPPC64LEARCHITECTURE captures enum value "PPC64LE_ARCHITECTURE" - FeatureSupportLevelFeaturesItems0FeatureIDPPC64LEARCHITECTURE string = "PPC64LE_ARCHITECTURE" - - // FeatureSupportLevelFeaturesItems0FeatureIDS390XARCHITECTURE captures enum value "S390X_ARCHITECTURE" - FeatureSupportLevelFeaturesItems0FeatureIDS390XARCHITECTURE string = "S390X_ARCHITECTURE" - - // FeatureSupportLevelFeaturesItems0FeatureIDSINGLENODEEXPANSION captures enum value "SINGLE_NODE_EXPANSION" - FeatureSupportLevelFeaturesItems0FeatureIDSINGLENODEEXPANSION string = "SINGLE_NODE_EXPANSION" - - // FeatureSupportLevelFeaturesItems0FeatureIDLVM captures enum value "LVM" - FeatureSupportLevelFeaturesItems0FeatureIDLVM string = "LVM" - - // FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKNETWORKING captures enum value "DUAL_STACK_NETWORKING" - FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKNETWORKING string = "DUAL_STACK_NETWORKING" - - // FeatureSupportLevelFeaturesItems0FeatureIDMULTIARCHRELEASEIMAGE captures enum value "MULTIARCH_RELEASE_IMAGE" - FeatureSupportLevelFeaturesItems0FeatureIDMULTIARCHRELEASEIMAGE string = "MULTIARCH_RELEASE_IMAGE" - - // FeatureSupportLevelFeaturesItems0FeatureIDNUTANIXINTEGRATION captures enum value "NUTANIX_INTEGRATION" - FeatureSupportLevelFeaturesItems0FeatureIDNUTANIXINTEGRATION string = "NUTANIX_INTEGRATION" - - // FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKVIPS captures enum value "DUAL_STACK_VIPS" - FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKVIPS string = "DUAL_STACK_VIPS" - - // FeatureSupportLevelFeaturesItems0FeatureIDUSERMANAGEDNETWORKINGWITHMULTINODE captures enum value "USER_MANAGED_NETWORKING_WITH_MULTI_NODE" - FeatureSupportLevelFeaturesItems0FeatureIDUSERMANAGEDNETWORKINGWITHMULTINODE string = "USER_MANAGED_NETWORKING_WITH_MULTI_NODE" -) - -// prop value enum -func (m *FeatureSupportLevelFeaturesItems0) validateFeatureIDEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FeatureSupportLevelFeaturesItems0) validateFeatureID(formats strfmt.Registry) error { - - if err := validate.Required("feature_id", "body", m.FeatureID); err != nil { - return err - } - - // value enum - if err := m.validateFeatureIDEnum("feature_id", "body", *m.FeatureID); err != nil { - return err - } - - return nil -} - -func (m *FeatureSupportLevelFeaturesItems0) validateSupportLevel(formats strfmt.Registry) error { - - if err := validate.Required("support_level", "body", m.SupportLevel); err != nil { - return err - } - - if err := validate.Required("support_level", "body", m.SupportLevel); err != nil { - return err - } - - if m.SupportLevel != nil { - if err := m.SupportLevel.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("support_level") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("support_level") - } - return err - } - } - - return nil -} - -// ContextValidate validate this feature support level features items0 based on the context it is used -func (m *FeatureSupportLevelFeaturesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSupportLevel(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FeatureSupportLevelFeaturesItems0) contextValidateSupportLevel(ctx context.Context, formats strfmt.Registry) error { - - if m.SupportLevel != nil { - if err := m.SupportLevel.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("support_level") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("support_level") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FeatureSupportLevelFeaturesItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FeatureSupportLevelFeaturesItems0) UnmarshalBinary(b []byte) error { - var res FeatureSupportLevelFeaturesItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/vendor/github.com/openshift/assisted-service/models/feature_support_levels.go b/api/vendor/github.com/openshift/assisted-service/models/feature_support_levels.go deleted file mode 100644 index 20b8bdc630..0000000000 --- a/api/vendor/github.com/openshift/assisted-service/models/feature_support_levels.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FeatureSupportLevels (DEPRECATED) List of objects that containing a list of feature-support level and attached to openshift-version -// -// swagger:model feature-support-levels -type FeatureSupportLevels []*FeatureSupportLevel - -// Validate validates this feature support levels -func (m FeatureSupportLevels) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this feature support levels based on the context it is used -func (m FeatureSupportLevels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/installer/installer_client.go b/client/installer/installer_client.go index 6548fadc0a..f5ffdb1f45 100644 --- a/client/installer/installer_client.go +++ b/client/installer/installer_client.go @@ -154,9 +154,6 @@ type API interface { /* V2ListClusters Retrieves the list of OpenShift clusters.*/ V2ListClusters(ctx context.Context, params *V2ListClustersParams) (*V2ListClustersOK, error) - /* - V2ListFeatureSupportLevels (DEPRECATED) Retrieves the support levels for features for each OpenShift version.*/ - V2ListFeatureSupportLevels(ctx context.Context, params *V2ListFeatureSupportLevelsParams) (*V2ListFeatureSupportLevelsOK, error) /* V2ListHosts Retrieves the list of OpenShift hosts that belong the infra-env.*/ V2ListHosts(ctx context.Context, params *V2ListHostsParams) (*V2ListHostsOK, error) @@ -1358,31 +1355,6 @@ func (a *Client) V2ListClusters(ctx context.Context, params *V2ListClustersParam } -/* -V2ListFeatureSupportLevels (DEPRECATED) Retrieves the support levels for features for each OpenShift version. -*/ -func (a *Client) V2ListFeatureSupportLevels(ctx context.Context, params *V2ListFeatureSupportLevelsParams) (*V2ListFeatureSupportLevelsOK, error) { - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "v2ListFeatureSupportLevels", - Method: "GET", - PathPattern: "/v2/feature-support-levels", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &V2ListFeatureSupportLevelsReader{formats: a.formats}, - AuthInfo: a.authInfo, - Context: ctx, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*V2ListFeatureSupportLevelsOK), nil - -} - /* V2ListHosts Retrieves the list of OpenShift hosts that belong the infra-env. */ diff --git a/client/installer/v2_list_feature_support_levels_parameters.go b/client/installer/v2_list_feature_support_levels_parameters.go deleted file mode 100644 index 3227fbcfde..0000000000 --- a/client/installer/v2_list_feature_support_levels_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package installer - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewV2ListFeatureSupportLevelsParams creates a new V2ListFeatureSupportLevelsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewV2ListFeatureSupportLevelsParams() *V2ListFeatureSupportLevelsParams { - return &V2ListFeatureSupportLevelsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewV2ListFeatureSupportLevelsParamsWithTimeout creates a new V2ListFeatureSupportLevelsParams object -// with the ability to set a timeout on a request. -func NewV2ListFeatureSupportLevelsParamsWithTimeout(timeout time.Duration) *V2ListFeatureSupportLevelsParams { - return &V2ListFeatureSupportLevelsParams{ - timeout: timeout, - } -} - -// NewV2ListFeatureSupportLevelsParamsWithContext creates a new V2ListFeatureSupportLevelsParams object -// with the ability to set a context for a request. -func NewV2ListFeatureSupportLevelsParamsWithContext(ctx context.Context) *V2ListFeatureSupportLevelsParams { - return &V2ListFeatureSupportLevelsParams{ - Context: ctx, - } -} - -// NewV2ListFeatureSupportLevelsParamsWithHTTPClient creates a new V2ListFeatureSupportLevelsParams object -// with the ability to set a custom HTTPClient for a request. -func NewV2ListFeatureSupportLevelsParamsWithHTTPClient(client *http.Client) *V2ListFeatureSupportLevelsParams { - return &V2ListFeatureSupportLevelsParams{ - HTTPClient: client, - } -} - -/* -V2ListFeatureSupportLevelsParams contains all the parameters to send to the API endpoint - - for the v2 list feature support levels operation. - - Typically these are written to a http.Request. -*/ -type V2ListFeatureSupportLevelsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the v2 list feature support levels params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *V2ListFeatureSupportLevelsParams) WithDefaults() *V2ListFeatureSupportLevelsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the v2 list feature support levels params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *V2ListFeatureSupportLevelsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the v2 list feature support levels params -func (o *V2ListFeatureSupportLevelsParams) WithTimeout(timeout time.Duration) *V2ListFeatureSupportLevelsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the v2 list feature support levels params -func (o *V2ListFeatureSupportLevelsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the v2 list feature support levels params -func (o *V2ListFeatureSupportLevelsParams) WithContext(ctx context.Context) *V2ListFeatureSupportLevelsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the v2 list feature support levels params -func (o *V2ListFeatureSupportLevelsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the v2 list feature support levels params -func (o *V2ListFeatureSupportLevelsParams) WithHTTPClient(client *http.Client) *V2ListFeatureSupportLevelsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the v2 list feature support levels params -func (o *V2ListFeatureSupportLevelsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *V2ListFeatureSupportLevelsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/client/installer/v2_list_feature_support_levels_responses.go b/client/installer/v2_list_feature_support_levels_responses.go deleted file mode 100644 index 664a3fee82..0000000000 --- a/client/installer/v2_list_feature_support_levels_responses.go +++ /dev/null @@ -1,303 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package installer - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/openshift/assisted-service/models" -) - -// V2ListFeatureSupportLevelsReader is a Reader for the V2ListFeatureSupportLevels structure. -type V2ListFeatureSupportLevelsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *V2ListFeatureSupportLevelsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewV2ListFeatureSupportLevelsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 401: - result := NewV2ListFeatureSupportLevelsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewV2ListFeatureSupportLevelsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 503: - result := NewV2ListFeatureSupportLevelsServiceUnavailable() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewV2ListFeatureSupportLevelsOK creates a V2ListFeatureSupportLevelsOK with default headers values -func NewV2ListFeatureSupportLevelsOK() *V2ListFeatureSupportLevelsOK { - return &V2ListFeatureSupportLevelsOK{} -} - -/* -V2ListFeatureSupportLevelsOK describes a response with status code 200, with default header values. - -Success. -*/ -type V2ListFeatureSupportLevelsOK struct { - Payload models.FeatureSupportLevels -} - -// IsSuccess returns true when this v2 list feature support levels o k response has a 2xx status code -func (o *V2ListFeatureSupportLevelsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this v2 list feature support levels o k response has a 3xx status code -func (o *V2ListFeatureSupportLevelsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v2 list feature support levels o k response has a 4xx status code -func (o *V2ListFeatureSupportLevelsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this v2 list feature support levels o k response has a 5xx status code -func (o *V2ListFeatureSupportLevelsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this v2 list feature support levels o k response a status code equal to that given -func (o *V2ListFeatureSupportLevelsOK) IsCode(code int) bool { - return code == 200 -} - -func (o *V2ListFeatureSupportLevelsOK) Error() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsOK %+v", 200, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsOK) String() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsOK %+v", 200, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsOK) GetPayload() models.FeatureSupportLevels { - return o.Payload -} - -func (o *V2ListFeatureSupportLevelsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV2ListFeatureSupportLevelsUnauthorized creates a V2ListFeatureSupportLevelsUnauthorized with default headers values -func NewV2ListFeatureSupportLevelsUnauthorized() *V2ListFeatureSupportLevelsUnauthorized { - return &V2ListFeatureSupportLevelsUnauthorized{} -} - -/* -V2ListFeatureSupportLevelsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized. -*/ -type V2ListFeatureSupportLevelsUnauthorized struct { - Payload *models.InfraError -} - -// IsSuccess returns true when this v2 list feature support levels unauthorized response has a 2xx status code -func (o *V2ListFeatureSupportLevelsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v2 list feature support levels unauthorized response has a 3xx status code -func (o *V2ListFeatureSupportLevelsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v2 list feature support levels unauthorized response has a 4xx status code -func (o *V2ListFeatureSupportLevelsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this v2 list feature support levels unauthorized response has a 5xx status code -func (o *V2ListFeatureSupportLevelsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this v2 list feature support levels unauthorized response a status code equal to that given -func (o *V2ListFeatureSupportLevelsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -func (o *V2ListFeatureSupportLevelsUnauthorized) Error() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsUnauthorized %+v", 401, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsUnauthorized) String() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsUnauthorized %+v", 401, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsUnauthorized) GetPayload() *models.InfraError { - return o.Payload -} - -func (o *V2ListFeatureSupportLevelsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.InfraError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV2ListFeatureSupportLevelsForbidden creates a V2ListFeatureSupportLevelsForbidden with default headers values -func NewV2ListFeatureSupportLevelsForbidden() *V2ListFeatureSupportLevelsForbidden { - return &V2ListFeatureSupportLevelsForbidden{} -} - -/* -V2ListFeatureSupportLevelsForbidden describes a response with status code 403, with default header values. - -Forbidden. -*/ -type V2ListFeatureSupportLevelsForbidden struct { - Payload *models.InfraError -} - -// IsSuccess returns true when this v2 list feature support levels forbidden response has a 2xx status code -func (o *V2ListFeatureSupportLevelsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v2 list feature support levels forbidden response has a 3xx status code -func (o *V2ListFeatureSupportLevelsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v2 list feature support levels forbidden response has a 4xx status code -func (o *V2ListFeatureSupportLevelsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this v2 list feature support levels forbidden response has a 5xx status code -func (o *V2ListFeatureSupportLevelsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this v2 list feature support levels forbidden response a status code equal to that given -func (o *V2ListFeatureSupportLevelsForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *V2ListFeatureSupportLevelsForbidden) Error() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsForbidden %+v", 403, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsForbidden) String() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsForbidden %+v", 403, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsForbidden) GetPayload() *models.InfraError { - return o.Payload -} - -func (o *V2ListFeatureSupportLevelsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.InfraError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV2ListFeatureSupportLevelsServiceUnavailable creates a V2ListFeatureSupportLevelsServiceUnavailable with default headers values -func NewV2ListFeatureSupportLevelsServiceUnavailable() *V2ListFeatureSupportLevelsServiceUnavailable { - return &V2ListFeatureSupportLevelsServiceUnavailable{} -} - -/* -V2ListFeatureSupportLevelsServiceUnavailable describes a response with status code 503, with default header values. - -Unavailable. -*/ -type V2ListFeatureSupportLevelsServiceUnavailable struct { - Payload *models.Error -} - -// IsSuccess returns true when this v2 list feature support levels service unavailable response has a 2xx status code -func (o *V2ListFeatureSupportLevelsServiceUnavailable) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v2 list feature support levels service unavailable response has a 3xx status code -func (o *V2ListFeatureSupportLevelsServiceUnavailable) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v2 list feature support levels service unavailable response has a 4xx status code -func (o *V2ListFeatureSupportLevelsServiceUnavailable) IsClientError() bool { - return false -} - -// IsServerError returns true when this v2 list feature support levels service unavailable response has a 5xx status code -func (o *V2ListFeatureSupportLevelsServiceUnavailable) IsServerError() bool { - return true -} - -// IsCode returns true when this v2 list feature support levels service unavailable response a status code equal to that given -func (o *V2ListFeatureSupportLevelsServiceUnavailable) IsCode(code int) bool { - return code == 503 -} - -func (o *V2ListFeatureSupportLevelsServiceUnavailable) Error() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsServiceUnavailable %+v", 503, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsServiceUnavailable) String() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsServiceUnavailable %+v", 503, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsServiceUnavailable) GetPayload() *models.Error { - return o.Payload -} - -func (o *V2ListFeatureSupportLevelsServiceUnavailable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/client/vendor/github.com/openshift/assisted-service/models/feature_support_level.go b/client/vendor/github.com/openshift/assisted-service/models/feature_support_level.go deleted file mode 100644 index 42c5539e51..0000000000 --- a/client/vendor/github.com/openshift/assisted-service/models/feature_support_level.go +++ /dev/null @@ -1,341 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FeatureSupportLevel (DEPRECATED) List of features attached to openshift version -// -// swagger:model feature-support-level -type FeatureSupportLevel struct { - - // features - Features []*FeatureSupportLevelFeaturesItems0 `json:"features"` - - // Version of the OpenShift cluster. - OpenshiftVersion string `json:"openshift_version,omitempty"` -} - -// Validate validates this feature support level -func (m *FeatureSupportLevel) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFeatures(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FeatureSupportLevel) validateFeatures(formats strfmt.Registry) error { - if swag.IsZero(m.Features) { // not required - return nil - } - - for i := 0; i < len(m.Features); i++ { - if swag.IsZero(m.Features[i]) { // not required - continue - } - - if m.Features[i] != nil { - if err := m.Features[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("features" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("features" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this feature support level based on the context it is used -func (m *FeatureSupportLevel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFeatures(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FeatureSupportLevel) contextValidateFeatures(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Features); i++ { - - if m.Features[i] != nil { - if err := m.Features[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("features" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("features" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FeatureSupportLevel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FeatureSupportLevel) UnmarshalBinary(b []byte) error { - var res FeatureSupportLevel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// FeatureSupportLevelFeaturesItems0 feature support level features items0 -// -// swagger:model FeatureSupportLevelFeaturesItems0 -type FeatureSupportLevelFeaturesItems0 struct { - - // (DEPRECATED) The ID of the feature - // Required: true - // Enum: [ADDITIONAL_NTP_SOURCE REQUESTED_HOSTNAME PROXY SNO DAY2_HOSTS VIP_AUTO_ALLOC DISK_SELECTION OVN_NETWORK_TYPE SDN_NETWORK_TYPE PLATFORM_SELECTION SCHEDULABLE_MASTERS AUTO_ASSIGN_ROLE CUSTOM_MANIFEST DISK_ENCRYPTION CLUSTER_MANAGED_NETWORKING_WITH_VMS ARM64_ARCHITECTURE ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING PPC64LE_ARCHITECTURE S390X_ARCHITECTURE SINGLE_NODE_EXPANSION LVM DUAL_STACK_NETWORKING MULTIARCH_RELEASE_IMAGE NUTANIX_INTEGRATION DUAL_STACK_VIPS USER_MANAGED_NETWORKING_WITH_MULTI_NODE] - FeatureID *string `json:"feature_id"` - - // support level - // Required: true - SupportLevel *SupportLevel `json:"support_level"` -} - -// Validate validates this feature support level features items0 -func (m *FeatureSupportLevelFeaturesItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFeatureID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSupportLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ADDITIONAL_NTP_SOURCE","REQUESTED_HOSTNAME","PROXY","SNO","DAY2_HOSTS","VIP_AUTO_ALLOC","DISK_SELECTION","OVN_NETWORK_TYPE","SDN_NETWORK_TYPE","PLATFORM_SELECTION","SCHEDULABLE_MASTERS","AUTO_ASSIGN_ROLE","CUSTOM_MANIFEST","DISK_ENCRYPTION","CLUSTER_MANAGED_NETWORKING_WITH_VMS","ARM64_ARCHITECTURE","ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING","PPC64LE_ARCHITECTURE","S390X_ARCHITECTURE","SINGLE_NODE_EXPANSION","LVM","DUAL_STACK_NETWORKING","MULTIARCH_RELEASE_IMAGE","NUTANIX_INTEGRATION","DUAL_STACK_VIPS","USER_MANAGED_NETWORKING_WITH_MULTI_NODE"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum = append(featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum, v) - } -} - -const ( - - // FeatureSupportLevelFeaturesItems0FeatureIDADDITIONALNTPSOURCE captures enum value "ADDITIONAL_NTP_SOURCE" - FeatureSupportLevelFeaturesItems0FeatureIDADDITIONALNTPSOURCE string = "ADDITIONAL_NTP_SOURCE" - - // FeatureSupportLevelFeaturesItems0FeatureIDREQUESTEDHOSTNAME captures enum value "REQUESTED_HOSTNAME" - FeatureSupportLevelFeaturesItems0FeatureIDREQUESTEDHOSTNAME string = "REQUESTED_HOSTNAME" - - // FeatureSupportLevelFeaturesItems0FeatureIDPROXY captures enum value "PROXY" - FeatureSupportLevelFeaturesItems0FeatureIDPROXY string = "PROXY" - - // FeatureSupportLevelFeaturesItems0FeatureIDSNO captures enum value "SNO" - FeatureSupportLevelFeaturesItems0FeatureIDSNO string = "SNO" - - // FeatureSupportLevelFeaturesItems0FeatureIDDAY2HOSTS captures enum value "DAY2_HOSTS" - FeatureSupportLevelFeaturesItems0FeatureIDDAY2HOSTS string = "DAY2_HOSTS" - - // FeatureSupportLevelFeaturesItems0FeatureIDVIPAUTOALLOC captures enum value "VIP_AUTO_ALLOC" - FeatureSupportLevelFeaturesItems0FeatureIDVIPAUTOALLOC string = "VIP_AUTO_ALLOC" - - // FeatureSupportLevelFeaturesItems0FeatureIDDISKSELECTION captures enum value "DISK_SELECTION" - FeatureSupportLevelFeaturesItems0FeatureIDDISKSELECTION string = "DISK_SELECTION" - - // FeatureSupportLevelFeaturesItems0FeatureIDOVNNETWORKTYPE captures enum value "OVN_NETWORK_TYPE" - FeatureSupportLevelFeaturesItems0FeatureIDOVNNETWORKTYPE string = "OVN_NETWORK_TYPE" - - // FeatureSupportLevelFeaturesItems0FeatureIDSDNNETWORKTYPE captures enum value "SDN_NETWORK_TYPE" - FeatureSupportLevelFeaturesItems0FeatureIDSDNNETWORKTYPE string = "SDN_NETWORK_TYPE" - - // FeatureSupportLevelFeaturesItems0FeatureIDPLATFORMSELECTION captures enum value "PLATFORM_SELECTION" - FeatureSupportLevelFeaturesItems0FeatureIDPLATFORMSELECTION string = "PLATFORM_SELECTION" - - // FeatureSupportLevelFeaturesItems0FeatureIDSCHEDULABLEMASTERS captures enum value "SCHEDULABLE_MASTERS" - FeatureSupportLevelFeaturesItems0FeatureIDSCHEDULABLEMASTERS string = "SCHEDULABLE_MASTERS" - - // FeatureSupportLevelFeaturesItems0FeatureIDAUTOASSIGNROLE captures enum value "AUTO_ASSIGN_ROLE" - FeatureSupportLevelFeaturesItems0FeatureIDAUTOASSIGNROLE string = "AUTO_ASSIGN_ROLE" - - // FeatureSupportLevelFeaturesItems0FeatureIDCUSTOMMANIFEST captures enum value "CUSTOM_MANIFEST" - FeatureSupportLevelFeaturesItems0FeatureIDCUSTOMMANIFEST string = "CUSTOM_MANIFEST" - - // FeatureSupportLevelFeaturesItems0FeatureIDDISKENCRYPTION captures enum value "DISK_ENCRYPTION" - FeatureSupportLevelFeaturesItems0FeatureIDDISKENCRYPTION string = "DISK_ENCRYPTION" - - // FeatureSupportLevelFeaturesItems0FeatureIDCLUSTERMANAGEDNETWORKINGWITHVMS captures enum value "CLUSTER_MANAGED_NETWORKING_WITH_VMS" - FeatureSupportLevelFeaturesItems0FeatureIDCLUSTERMANAGEDNETWORKINGWITHVMS string = "CLUSTER_MANAGED_NETWORKING_WITH_VMS" - - // FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTURE captures enum value "ARM64_ARCHITECTURE" - FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTURE string = "ARM64_ARCHITECTURE" - - // FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTUREWITHCLUSTERMANAGEDNETWORKING captures enum value "ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING" - FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTUREWITHCLUSTERMANAGEDNETWORKING string = "ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING" - - // FeatureSupportLevelFeaturesItems0FeatureIDPPC64LEARCHITECTURE captures enum value "PPC64LE_ARCHITECTURE" - FeatureSupportLevelFeaturesItems0FeatureIDPPC64LEARCHITECTURE string = "PPC64LE_ARCHITECTURE" - - // FeatureSupportLevelFeaturesItems0FeatureIDS390XARCHITECTURE captures enum value "S390X_ARCHITECTURE" - FeatureSupportLevelFeaturesItems0FeatureIDS390XARCHITECTURE string = "S390X_ARCHITECTURE" - - // FeatureSupportLevelFeaturesItems0FeatureIDSINGLENODEEXPANSION captures enum value "SINGLE_NODE_EXPANSION" - FeatureSupportLevelFeaturesItems0FeatureIDSINGLENODEEXPANSION string = "SINGLE_NODE_EXPANSION" - - // FeatureSupportLevelFeaturesItems0FeatureIDLVM captures enum value "LVM" - FeatureSupportLevelFeaturesItems0FeatureIDLVM string = "LVM" - - // FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKNETWORKING captures enum value "DUAL_STACK_NETWORKING" - FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKNETWORKING string = "DUAL_STACK_NETWORKING" - - // FeatureSupportLevelFeaturesItems0FeatureIDMULTIARCHRELEASEIMAGE captures enum value "MULTIARCH_RELEASE_IMAGE" - FeatureSupportLevelFeaturesItems0FeatureIDMULTIARCHRELEASEIMAGE string = "MULTIARCH_RELEASE_IMAGE" - - // FeatureSupportLevelFeaturesItems0FeatureIDNUTANIXINTEGRATION captures enum value "NUTANIX_INTEGRATION" - FeatureSupportLevelFeaturesItems0FeatureIDNUTANIXINTEGRATION string = "NUTANIX_INTEGRATION" - - // FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKVIPS captures enum value "DUAL_STACK_VIPS" - FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKVIPS string = "DUAL_STACK_VIPS" - - // FeatureSupportLevelFeaturesItems0FeatureIDUSERMANAGEDNETWORKINGWITHMULTINODE captures enum value "USER_MANAGED_NETWORKING_WITH_MULTI_NODE" - FeatureSupportLevelFeaturesItems0FeatureIDUSERMANAGEDNETWORKINGWITHMULTINODE string = "USER_MANAGED_NETWORKING_WITH_MULTI_NODE" -) - -// prop value enum -func (m *FeatureSupportLevelFeaturesItems0) validateFeatureIDEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FeatureSupportLevelFeaturesItems0) validateFeatureID(formats strfmt.Registry) error { - - if err := validate.Required("feature_id", "body", m.FeatureID); err != nil { - return err - } - - // value enum - if err := m.validateFeatureIDEnum("feature_id", "body", *m.FeatureID); err != nil { - return err - } - - return nil -} - -func (m *FeatureSupportLevelFeaturesItems0) validateSupportLevel(formats strfmt.Registry) error { - - if err := validate.Required("support_level", "body", m.SupportLevel); err != nil { - return err - } - - if err := validate.Required("support_level", "body", m.SupportLevel); err != nil { - return err - } - - if m.SupportLevel != nil { - if err := m.SupportLevel.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("support_level") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("support_level") - } - return err - } - } - - return nil -} - -// ContextValidate validate this feature support level features items0 based on the context it is used -func (m *FeatureSupportLevelFeaturesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSupportLevel(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FeatureSupportLevelFeaturesItems0) contextValidateSupportLevel(ctx context.Context, formats strfmt.Registry) error { - - if m.SupportLevel != nil { - if err := m.SupportLevel.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("support_level") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("support_level") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FeatureSupportLevelFeaturesItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FeatureSupportLevelFeaturesItems0) UnmarshalBinary(b []byte) error { - var res FeatureSupportLevelFeaturesItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/client/vendor/github.com/openshift/assisted-service/models/feature_support_levels.go b/client/vendor/github.com/openshift/assisted-service/models/feature_support_levels.go deleted file mode 100644 index 20b8bdc630..0000000000 --- a/client/vendor/github.com/openshift/assisted-service/models/feature_support_levels.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FeatureSupportLevels (DEPRECATED) List of objects that containing a list of feature-support level and attached to openshift-version -// -// swagger:model feature-support-levels -type FeatureSupportLevels []*FeatureSupportLevel - -// Validate validates this feature support levels -func (m FeatureSupportLevels) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this feature support levels based on the context it is used -func (m FeatureSupportLevels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/internal/bminventory/inventory_v2_handlers.go b/internal/bminventory/inventory_v2_handlers.go index 48fe0d6f53..d9c8ef99d0 100644 --- a/internal/bminventory/inventory_v2_handlers.go +++ b/internal/bminventory/inventory_v2_handlers.go @@ -18,7 +18,6 @@ import ( "github.com/openshift/assisted-service/internal/common" eventgen "github.com/openshift/assisted-service/internal/common/events" "github.com/openshift/assisted-service/internal/constants" - "github.com/openshift/assisted-service/internal/featuresupport" "github.com/openshift/assisted-service/internal/gencrypto" "github.com/openshift/assisted-service/internal/host/hostutil" "github.com/openshift/assisted-service/internal/imageservice" @@ -557,11 +556,6 @@ func (b *bareMetalInventory) V2GetCredentials(ctx context.Context, params instal return installer.NewV2GetCredentialsOK().WithPayload(cluster) } -func (b *bareMetalInventory) V2ListFeatureSupportLevels(ctx context.Context, params installer.V2ListFeatureSupportLevelsParams) middleware.Responder { - payload := featuresupport.SupportLevelsList - return installer.NewV2ListFeatureSupportLevelsOK().WithPayload(payload) -} - func (b *bareMetalInventory) V2ImportCluster(ctx context.Context, params installer.V2ImportClusterParams) middleware.Responder { id := strfmt.UUID(uuid.New().String()) cluster, err := b.V2ImportClusterInternal(ctx, nil, &id, params) diff --git a/internal/featuresupport/support_levels_list.go b/internal/featuresupport/support_levels_list.go deleted file mode 100644 index b967fc4c33..0000000000 --- a/internal/featuresupport/support_levels_list.go +++ /dev/null @@ -1,296 +0,0 @@ -package featuresupport - -import ( - "github.com/go-openapi/swag" - "github.com/openshift/assisted-service/models" -) - -func getFeatureSupportLevelPtr(supportLevel models.SupportLevel) *models.SupportLevel { - return &supportLevel -} - -var SupportLevelsList = models.FeatureSupportLevels{ - &models.FeatureSupportLevel{ - OpenshiftVersion: "4.9", - Features: []*models.FeatureSupportLevelFeaturesItems0{ - // Supported - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDSNO), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKNETWORKING), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - // Dev-Preview features - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDVIPAUTOALLOC), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelDevPreview), - }, - // Unsupported features - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTURE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTUREWITHCLUSTERMANAGEDNETWORKING), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDPPC64LEARCHITECTURE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDS390XARCHITECTURE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDSINGLENODEEXPANSION), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDLVM), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDMULTIARCHRELEASEIMAGE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDNUTANIXINTEGRATION), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKVIPS), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - }, - }, - &models.FeatureSupportLevel{ - OpenshiftVersion: "4.10", - Features: []*models.FeatureSupportLevelFeaturesItems0{ - // Supported - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDSNO), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTURE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKNETWORKING), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - // Dev-Preview features - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDVIPAUTOALLOC), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelDevPreview), - }, - // Unsupported features - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTUREWITHCLUSTERMANAGEDNETWORKING), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDSINGLENODEEXPANSION), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDLVM), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDMULTIARCHRELEASEIMAGE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDNUTANIXINTEGRATION), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKVIPS), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDPPC64LEARCHITECTURE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDS390XARCHITECTURE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - }, - }, - &models.FeatureSupportLevel{ - OpenshiftVersion: "4.11", - Features: []*models.FeatureSupportLevelFeaturesItems0{ - // Supported - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDSNO), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTURE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTUREWITHCLUSTERMANAGEDNETWORKING), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDSINGLENODEEXPANSION), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKNETWORKING), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - // Tech-Preview features - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDMULTIARCHRELEASEIMAGE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelTechPreview), - }, - // Dev-Preview features - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDVIPAUTOALLOC), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelDevPreview), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDLVM), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelDevPreview), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDNUTANIXINTEGRATION), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelDevPreview), - }, - // Unsupported features - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKVIPS), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDPPC64LEARCHITECTURE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDS390XARCHITECTURE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - }, - }, - &models.FeatureSupportLevel{ - OpenshiftVersion: "4.12", - Features: []*models.FeatureSupportLevelFeaturesItems0{ - // Supported - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDSNO), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTURE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTUREWITHCLUSTERMANAGEDNETWORKING), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDSINGLENODEEXPANSION), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDLVM), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKNETWORKING), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDNUTANIXINTEGRATION), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKVIPS), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - // Tech-Preview features - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDMULTIARCHRELEASEIMAGE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelTechPreview), - }, - // Dev-Preview features - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDVIPAUTOALLOC), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelDevPreview), - }, - // Unsupported features - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDPPC64LEARCHITECTURE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDS390XARCHITECTURE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelUnsupported), - }, - }, - }, - &models.FeatureSupportLevel{ - OpenshiftVersion: "4.13", - Features: []*models.FeatureSupportLevelFeaturesItems0{ - // Supported - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDSNO), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTURE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTUREWITHCLUSTERMANAGEDNETWORKING), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDSINGLENODEEXPANSION), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDLVM), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKNETWORKING), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDNUTANIXINTEGRATION), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKVIPS), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDPPC64LEARCHITECTURE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDS390XARCHITECTURE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelSupported), - }, - // Tech-Preview features - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDMULTIARCHRELEASEIMAGE), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelTechPreview), - }, - // Dev-Preview features - { - FeatureID: swag.String(models.FeatureSupportLevelFeaturesItems0FeatureIDVIPAUTOALLOC), - SupportLevel: getFeatureSupportLevelPtr(models.SupportLevelDevPreview), - }, - // Unsupported features - }, - }, -} diff --git a/mocks/mock_assisted_service.go b/mocks/mock_assisted_service.go index 746f1bff8b..01257c8a74 100644 --- a/mocks/mock_assisted_service.go +++ b/mocks/mock_assisted_service.go @@ -624,20 +624,6 @@ func (mr *MockInstallerAPIMockRecorder) V2ListClusters(arg0, arg1 interface{}) * return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "V2ListClusters", reflect.TypeOf((*MockInstallerAPI)(nil).V2ListClusters), arg0, arg1) } -// V2ListFeatureSupportLevels mocks base method. -func (m *MockInstallerAPI) V2ListFeatureSupportLevels(arg0 context.Context, arg1 installer.V2ListFeatureSupportLevelsParams) middleware.Responder { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "V2ListFeatureSupportLevels", arg0, arg1) - ret0, _ := ret[0].(middleware.Responder) - return ret0 -} - -// V2ListFeatureSupportLevels indicates an expected call of V2ListFeatureSupportLevels. -func (mr *MockInstallerAPIMockRecorder) V2ListFeatureSupportLevels(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "V2ListFeatureSupportLevels", reflect.TypeOf((*MockInstallerAPI)(nil).V2ListFeatureSupportLevels), arg0, arg1) -} - // V2ListHosts mocks base method. func (m *MockInstallerAPI) V2ListHosts(arg0 context.Context, arg1 installer.V2ListHostsParams) middleware.Responder { m.ctrl.T.Helper() diff --git a/models/feature_support_level.go b/models/feature_support_level.go deleted file mode 100644 index 42c5539e51..0000000000 --- a/models/feature_support_level.go +++ /dev/null @@ -1,341 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FeatureSupportLevel (DEPRECATED) List of features attached to openshift version -// -// swagger:model feature-support-level -type FeatureSupportLevel struct { - - // features - Features []*FeatureSupportLevelFeaturesItems0 `json:"features"` - - // Version of the OpenShift cluster. - OpenshiftVersion string `json:"openshift_version,omitempty"` -} - -// Validate validates this feature support level -func (m *FeatureSupportLevel) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFeatures(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FeatureSupportLevel) validateFeatures(formats strfmt.Registry) error { - if swag.IsZero(m.Features) { // not required - return nil - } - - for i := 0; i < len(m.Features); i++ { - if swag.IsZero(m.Features[i]) { // not required - continue - } - - if m.Features[i] != nil { - if err := m.Features[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("features" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("features" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this feature support level based on the context it is used -func (m *FeatureSupportLevel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFeatures(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FeatureSupportLevel) contextValidateFeatures(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Features); i++ { - - if m.Features[i] != nil { - if err := m.Features[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("features" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("features" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FeatureSupportLevel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FeatureSupportLevel) UnmarshalBinary(b []byte) error { - var res FeatureSupportLevel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// FeatureSupportLevelFeaturesItems0 feature support level features items0 -// -// swagger:model FeatureSupportLevelFeaturesItems0 -type FeatureSupportLevelFeaturesItems0 struct { - - // (DEPRECATED) The ID of the feature - // Required: true - // Enum: [ADDITIONAL_NTP_SOURCE REQUESTED_HOSTNAME PROXY SNO DAY2_HOSTS VIP_AUTO_ALLOC DISK_SELECTION OVN_NETWORK_TYPE SDN_NETWORK_TYPE PLATFORM_SELECTION SCHEDULABLE_MASTERS AUTO_ASSIGN_ROLE CUSTOM_MANIFEST DISK_ENCRYPTION CLUSTER_MANAGED_NETWORKING_WITH_VMS ARM64_ARCHITECTURE ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING PPC64LE_ARCHITECTURE S390X_ARCHITECTURE SINGLE_NODE_EXPANSION LVM DUAL_STACK_NETWORKING MULTIARCH_RELEASE_IMAGE NUTANIX_INTEGRATION DUAL_STACK_VIPS USER_MANAGED_NETWORKING_WITH_MULTI_NODE] - FeatureID *string `json:"feature_id"` - - // support level - // Required: true - SupportLevel *SupportLevel `json:"support_level"` -} - -// Validate validates this feature support level features items0 -func (m *FeatureSupportLevelFeaturesItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFeatureID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSupportLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ADDITIONAL_NTP_SOURCE","REQUESTED_HOSTNAME","PROXY","SNO","DAY2_HOSTS","VIP_AUTO_ALLOC","DISK_SELECTION","OVN_NETWORK_TYPE","SDN_NETWORK_TYPE","PLATFORM_SELECTION","SCHEDULABLE_MASTERS","AUTO_ASSIGN_ROLE","CUSTOM_MANIFEST","DISK_ENCRYPTION","CLUSTER_MANAGED_NETWORKING_WITH_VMS","ARM64_ARCHITECTURE","ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING","PPC64LE_ARCHITECTURE","S390X_ARCHITECTURE","SINGLE_NODE_EXPANSION","LVM","DUAL_STACK_NETWORKING","MULTIARCH_RELEASE_IMAGE","NUTANIX_INTEGRATION","DUAL_STACK_VIPS","USER_MANAGED_NETWORKING_WITH_MULTI_NODE"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum = append(featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum, v) - } -} - -const ( - - // FeatureSupportLevelFeaturesItems0FeatureIDADDITIONALNTPSOURCE captures enum value "ADDITIONAL_NTP_SOURCE" - FeatureSupportLevelFeaturesItems0FeatureIDADDITIONALNTPSOURCE string = "ADDITIONAL_NTP_SOURCE" - - // FeatureSupportLevelFeaturesItems0FeatureIDREQUESTEDHOSTNAME captures enum value "REQUESTED_HOSTNAME" - FeatureSupportLevelFeaturesItems0FeatureIDREQUESTEDHOSTNAME string = "REQUESTED_HOSTNAME" - - // FeatureSupportLevelFeaturesItems0FeatureIDPROXY captures enum value "PROXY" - FeatureSupportLevelFeaturesItems0FeatureIDPROXY string = "PROXY" - - // FeatureSupportLevelFeaturesItems0FeatureIDSNO captures enum value "SNO" - FeatureSupportLevelFeaturesItems0FeatureIDSNO string = "SNO" - - // FeatureSupportLevelFeaturesItems0FeatureIDDAY2HOSTS captures enum value "DAY2_HOSTS" - FeatureSupportLevelFeaturesItems0FeatureIDDAY2HOSTS string = "DAY2_HOSTS" - - // FeatureSupportLevelFeaturesItems0FeatureIDVIPAUTOALLOC captures enum value "VIP_AUTO_ALLOC" - FeatureSupportLevelFeaturesItems0FeatureIDVIPAUTOALLOC string = "VIP_AUTO_ALLOC" - - // FeatureSupportLevelFeaturesItems0FeatureIDDISKSELECTION captures enum value "DISK_SELECTION" - FeatureSupportLevelFeaturesItems0FeatureIDDISKSELECTION string = "DISK_SELECTION" - - // FeatureSupportLevelFeaturesItems0FeatureIDOVNNETWORKTYPE captures enum value "OVN_NETWORK_TYPE" - FeatureSupportLevelFeaturesItems0FeatureIDOVNNETWORKTYPE string = "OVN_NETWORK_TYPE" - - // FeatureSupportLevelFeaturesItems0FeatureIDSDNNETWORKTYPE captures enum value "SDN_NETWORK_TYPE" - FeatureSupportLevelFeaturesItems0FeatureIDSDNNETWORKTYPE string = "SDN_NETWORK_TYPE" - - // FeatureSupportLevelFeaturesItems0FeatureIDPLATFORMSELECTION captures enum value "PLATFORM_SELECTION" - FeatureSupportLevelFeaturesItems0FeatureIDPLATFORMSELECTION string = "PLATFORM_SELECTION" - - // FeatureSupportLevelFeaturesItems0FeatureIDSCHEDULABLEMASTERS captures enum value "SCHEDULABLE_MASTERS" - FeatureSupportLevelFeaturesItems0FeatureIDSCHEDULABLEMASTERS string = "SCHEDULABLE_MASTERS" - - // FeatureSupportLevelFeaturesItems0FeatureIDAUTOASSIGNROLE captures enum value "AUTO_ASSIGN_ROLE" - FeatureSupportLevelFeaturesItems0FeatureIDAUTOASSIGNROLE string = "AUTO_ASSIGN_ROLE" - - // FeatureSupportLevelFeaturesItems0FeatureIDCUSTOMMANIFEST captures enum value "CUSTOM_MANIFEST" - FeatureSupportLevelFeaturesItems0FeatureIDCUSTOMMANIFEST string = "CUSTOM_MANIFEST" - - // FeatureSupportLevelFeaturesItems0FeatureIDDISKENCRYPTION captures enum value "DISK_ENCRYPTION" - FeatureSupportLevelFeaturesItems0FeatureIDDISKENCRYPTION string = "DISK_ENCRYPTION" - - // FeatureSupportLevelFeaturesItems0FeatureIDCLUSTERMANAGEDNETWORKINGWITHVMS captures enum value "CLUSTER_MANAGED_NETWORKING_WITH_VMS" - FeatureSupportLevelFeaturesItems0FeatureIDCLUSTERMANAGEDNETWORKINGWITHVMS string = "CLUSTER_MANAGED_NETWORKING_WITH_VMS" - - // FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTURE captures enum value "ARM64_ARCHITECTURE" - FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTURE string = "ARM64_ARCHITECTURE" - - // FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTUREWITHCLUSTERMANAGEDNETWORKING captures enum value "ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING" - FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTUREWITHCLUSTERMANAGEDNETWORKING string = "ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING" - - // FeatureSupportLevelFeaturesItems0FeatureIDPPC64LEARCHITECTURE captures enum value "PPC64LE_ARCHITECTURE" - FeatureSupportLevelFeaturesItems0FeatureIDPPC64LEARCHITECTURE string = "PPC64LE_ARCHITECTURE" - - // FeatureSupportLevelFeaturesItems0FeatureIDS390XARCHITECTURE captures enum value "S390X_ARCHITECTURE" - FeatureSupportLevelFeaturesItems0FeatureIDS390XARCHITECTURE string = "S390X_ARCHITECTURE" - - // FeatureSupportLevelFeaturesItems0FeatureIDSINGLENODEEXPANSION captures enum value "SINGLE_NODE_EXPANSION" - FeatureSupportLevelFeaturesItems0FeatureIDSINGLENODEEXPANSION string = "SINGLE_NODE_EXPANSION" - - // FeatureSupportLevelFeaturesItems0FeatureIDLVM captures enum value "LVM" - FeatureSupportLevelFeaturesItems0FeatureIDLVM string = "LVM" - - // FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKNETWORKING captures enum value "DUAL_STACK_NETWORKING" - FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKNETWORKING string = "DUAL_STACK_NETWORKING" - - // FeatureSupportLevelFeaturesItems0FeatureIDMULTIARCHRELEASEIMAGE captures enum value "MULTIARCH_RELEASE_IMAGE" - FeatureSupportLevelFeaturesItems0FeatureIDMULTIARCHRELEASEIMAGE string = "MULTIARCH_RELEASE_IMAGE" - - // FeatureSupportLevelFeaturesItems0FeatureIDNUTANIXINTEGRATION captures enum value "NUTANIX_INTEGRATION" - FeatureSupportLevelFeaturesItems0FeatureIDNUTANIXINTEGRATION string = "NUTANIX_INTEGRATION" - - // FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKVIPS captures enum value "DUAL_STACK_VIPS" - FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKVIPS string = "DUAL_STACK_VIPS" - - // FeatureSupportLevelFeaturesItems0FeatureIDUSERMANAGEDNETWORKINGWITHMULTINODE captures enum value "USER_MANAGED_NETWORKING_WITH_MULTI_NODE" - FeatureSupportLevelFeaturesItems0FeatureIDUSERMANAGEDNETWORKINGWITHMULTINODE string = "USER_MANAGED_NETWORKING_WITH_MULTI_NODE" -) - -// prop value enum -func (m *FeatureSupportLevelFeaturesItems0) validateFeatureIDEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FeatureSupportLevelFeaturesItems0) validateFeatureID(formats strfmt.Registry) error { - - if err := validate.Required("feature_id", "body", m.FeatureID); err != nil { - return err - } - - // value enum - if err := m.validateFeatureIDEnum("feature_id", "body", *m.FeatureID); err != nil { - return err - } - - return nil -} - -func (m *FeatureSupportLevelFeaturesItems0) validateSupportLevel(formats strfmt.Registry) error { - - if err := validate.Required("support_level", "body", m.SupportLevel); err != nil { - return err - } - - if err := validate.Required("support_level", "body", m.SupportLevel); err != nil { - return err - } - - if m.SupportLevel != nil { - if err := m.SupportLevel.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("support_level") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("support_level") - } - return err - } - } - - return nil -} - -// ContextValidate validate this feature support level features items0 based on the context it is used -func (m *FeatureSupportLevelFeaturesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSupportLevel(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FeatureSupportLevelFeaturesItems0) contextValidateSupportLevel(ctx context.Context, formats strfmt.Registry) error { - - if m.SupportLevel != nil { - if err := m.SupportLevel.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("support_level") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("support_level") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FeatureSupportLevelFeaturesItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FeatureSupportLevelFeaturesItems0) UnmarshalBinary(b []byte) error { - var res FeatureSupportLevelFeaturesItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/models/feature_support_levels.go b/models/feature_support_levels.go deleted file mode 100644 index 20b8bdc630..0000000000 --- a/models/feature_support_levels.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FeatureSupportLevels (DEPRECATED) List of objects that containing a list of feature-support level and attached to openshift-version -// -// swagger:model feature-support-levels -type FeatureSupportLevels []*FeatureSupportLevel - -// Validate validates this feature support levels -func (m FeatureSupportLevels) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this feature support levels based on the context it is used -func (m FeatureSupportLevels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/auth/auth_assisted_service_mock_test.go b/pkg/auth/auth_assisted_service_mock_test.go index 79703033fb..ff8be825a9 100644 --- a/pkg/auth/auth_assisted_service_mock_test.go +++ b/pkg/auth/auth_assisted_service_mock_test.go @@ -246,10 +246,6 @@ func (f fakeInventory) V2GetCredentials(ctx context.Context, params installer.V2 return installer.NewV2GetCredentialsOK() } -func (f fakeInventory) V2ListFeatureSupportLevels(ctx context.Context, params installer.V2ListFeatureSupportLevelsParams) middleware.Responder { - return installer.NewV2ListFeatureSupportLevelsOK() -} - func (f fakeInventory) GetSupportedFeatures(ctx context.Context, params installer.GetSupportedFeaturesParams) middleware.Responder { return installer.NewGetSupportedFeaturesOK() } diff --git a/pkg/auth/rhsso_authz_handler_test.go b/pkg/auth/rhsso_authz_handler_test.go index c76e8124d7..f69914ae39 100644 --- a/pkg/auth/rhsso_authz_handler_test.go +++ b/pkg/auth/rhsso_authz_handler_test.go @@ -999,11 +999,6 @@ var _ = Describe("authz", func() { apiCall: updateDiscoveryIgnition, expectUnauthorizedCode: http.StatusForbidden, }, - { - name: "List support features", - allowedRoles: []ocm.RoleType{ocm.AdminRole, ocm.UserRole, ocm.ReadOnlyAdminRole}, - apiCall: v2ListFeatureSupportLevels, - }, { name: "List support features", allowedRoles: []ocm.RoleType{ocm.AdminRole, ocm.UserRole, ocm.ReadOnlyAdminRole}, @@ -1496,11 +1491,6 @@ func updateDiscoveryIgnition(ctx context.Context, cli *client.AssistedInstall) e return err } -func v2ListFeatureSupportLevels(ctx context.Context, cli *client.AssistedInstall) error { - _, err := cli.Installer.V2ListFeatureSupportLevels(ctx, &installer.V2ListFeatureSupportLevelsParams{}) - return err -} - func GetSupportedFeatures(ctx context.Context, cli *client.AssistedInstall) error { featureParams := &installer.GetSupportedFeaturesParams{OpenshiftVersion: common.TestDefaultConfig.OpenShiftVersion} _, err := cli.Installer.GetSupportedFeatures(ctx, featureParams) diff --git a/restapi/configure_assisted_install.go b/restapi/configure_assisted_install.go index 2c47db6013..23e5a57e24 100644 --- a/restapi/configure_assisted_install.go +++ b/restapi/configure_assisted_install.go @@ -175,9 +175,6 @@ type InstallerAPI interface { /* V2ListClusters Retrieves the list of OpenShift clusters. */ V2ListClusters(ctx context.Context, params installer.V2ListClustersParams) middleware.Responder - /* V2ListFeatureSupportLevels (DEPRECATED) Retrieves the support levels for features for each OpenShift version. */ - V2ListFeatureSupportLevels(ctx context.Context, params installer.V2ListFeatureSupportLevelsParams) middleware.Responder - /* V2ListHosts Retrieves the list of OpenShift hosts that belong the infra-env. */ V2ListHosts(ctx context.Context, params installer.V2ListHostsParams) middleware.Responder @@ -685,11 +682,6 @@ func HandlerAPI(c Config) (http.Handler, *operations.AssistedInstallAPI, error) ctx = storeAuth(ctx, principal) return c.EventsAPI.V2ListEvents(ctx, params) }) - api.InstallerV2ListFeatureSupportLevelsHandler = installer.V2ListFeatureSupportLevelsHandlerFunc(func(params installer.V2ListFeatureSupportLevelsParams, principal interface{}) middleware.Responder { - ctx := params.HTTPRequest.Context() - ctx = storeAuth(ctx, principal) - return c.InstallerAPI.V2ListFeatureSupportLevels(ctx, params) - }) api.InstallerV2ListHostsHandler = installer.V2ListHostsHandlerFunc(func(params installer.V2ListHostsParams, principal interface{}) middleware.Responder { ctx := params.HTTPRequest.Context() ctx = storeAuth(ctx, principal) diff --git a/restapi/embedded_spec.go b/restapi/embedded_spec.go index ad4f400aba..5b5e93910d 100644 --- a/restapi/embedded_spec.go +++ b/restapi/embedded_spec.go @@ -3140,51 +3140,6 @@ func init() { } } }, - "/v2/feature-support-levels": { - "get": { - "security": [ - { - "userAuth": [ - "admin", - "read-only-admin", - "user" - ] - } - ], - "description": "(DEPRECATED) Retrieves the support levels for features for each OpenShift version.", - "tags": [ - "installer" - ], - "operationId": "v2ListFeatureSupportLevels", - "deprecated": true, - "responses": { - "200": { - "description": "Success.", - "schema": { - "$ref": "#/definitions/feature-support-levels" - } - }, - "401": { - "description": "Unauthorized.", - "schema": { - "$ref": "#/definitions/infra_error" - } - }, - "403": { - "description": "Forbidden.", - "schema": { - "$ref": "#/definitions/infra_error" - } - }, - "503": { - "description": "Unavailable.", - "schema": { - "$ref": "#/definitions/error" - } - } - } - } - }, "/v2/infra-env/{infra_env_id}/hosts/{host_id}/downloads/ignition": { "get": { "security": [ @@ -7506,63 +7461,6 @@ func init() { "$ref": "#/definitions/event" } }, - "feature-support-level": { - "description": "(DEPRECATED) List of features attached to openshift version", - "type": "object", - "properties": { - "features": { - "type": "array", - "items": { - "type": "object", - "required": [ - "feature_id", - "support_level" - ], - "properties": { - "feature_id": { - "description": "(DEPRECATED) The ID of the feature", - "type": "string", - "enum": [ - "ADDITIONAL_NTP_SOURCE", - "REQUESTED_HOSTNAME", - "PROXY", - "SNO", - "DAY2_HOSTS", - "VIP_AUTO_ALLOC", - "DISK_SELECTION", - "OVN_NETWORK_TYPE", - "SDN_NETWORK_TYPE", - "PLATFORM_SELECTION", - "SCHEDULABLE_MASTERS", - "AUTO_ASSIGN_ROLE", - "CUSTOM_MANIFEST", - "DISK_ENCRYPTION", - "CLUSTER_MANAGED_NETWORKING_WITH_VMS", - "ARM64_ARCHITECTURE", - "ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING", - "PPC64LE_ARCHITECTURE", - "S390X_ARCHITECTURE", - "SINGLE_NODE_EXPANSION", - "LVM", - "DUAL_STACK_NETWORKING", - "MULTIARCH_RELEASE_IMAGE", - "NUTANIX_INTEGRATION", - "DUAL_STACK_VIPS", - "USER_MANAGED_NETWORKING_WITH_MULTI_NODE" - ] - }, - "support_level": { - "$ref": "#/definitions/support-level" - } - } - } - }, - "openshift_version": { - "description": "Version of the OpenShift cluster.", - "type": "string" - } - } - }, "feature-support-level-id": { "type": "string", "enum": [ @@ -7589,13 +7487,6 @@ func init() { "PLATFORM_MANAGED_NETWORKING" ] }, - "feature-support-levels": { - "description": "(DEPRECATED) List of objects that containing a list of feature-support level and attached to openshift-version", - "type": "array", - "items": { - "$ref": "#/definitions/feature-support-level" - } - }, "free-addresses-list": { "type": "array", "items": { @@ -13504,51 +13395,6 @@ func init() { } } }, - "/v2/feature-support-levels": { - "get": { - "security": [ - { - "userAuth": [ - "admin", - "read-only-admin", - "user" - ] - } - ], - "description": "(DEPRECATED) Retrieves the support levels for features for each OpenShift version.", - "tags": [ - "installer" - ], - "operationId": "v2ListFeatureSupportLevels", - "deprecated": true, - "responses": { - "200": { - "description": "Success.", - "schema": { - "$ref": "#/definitions/feature-support-levels" - } - }, - "401": { - "description": "Unauthorized.", - "schema": { - "$ref": "#/definitions/infra_error" - } - }, - "403": { - "description": "Forbidden.", - "schema": { - "$ref": "#/definitions/infra_error" - } - }, - "503": { - "description": "Unavailable.", - "schema": { - "$ref": "#/definitions/error" - } - } - } - } - }, "/v2/infra-env/{infra_env_id}/hosts/{host_id}/downloads/ignition": { "get": { "security": [ @@ -16266,50 +16112,6 @@ func init() { }, "x-go-name": "DomainResolutionResponseDomain" }, - "FeatureSupportLevelFeaturesItems0": { - "type": "object", - "required": [ - "feature_id", - "support_level" - ], - "properties": { - "feature_id": { - "description": "(DEPRECATED) The ID of the feature", - "type": "string", - "enum": [ - "ADDITIONAL_NTP_SOURCE", - "REQUESTED_HOSTNAME", - "PROXY", - "SNO", - "DAY2_HOSTS", - "VIP_AUTO_ALLOC", - "DISK_SELECTION", - "OVN_NETWORK_TYPE", - "SDN_NETWORK_TYPE", - "PLATFORM_SELECTION", - "SCHEDULABLE_MASTERS", - "AUTO_ASSIGN_ROLE", - "CUSTOM_MANIFEST", - "DISK_ENCRYPTION", - "CLUSTER_MANAGED_NETWORKING_WITH_VMS", - "ARM64_ARCHITECTURE", - "ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING", - "PPC64LE_ARCHITECTURE", - "S390X_ARCHITECTURE", - "SINGLE_NODE_EXPANSION", - "LVM", - "DUAL_STACK_NETWORKING", - "MULTIARCH_RELEASE_IMAGE", - "NUTANIX_INTEGRATION", - "DUAL_STACK_VIPS", - "USER_MANAGED_NETWORKING_WITH_MULTI_NODE" - ] - }, - "support_level": { - "$ref": "#/definitions/support-level" - } - } - }, "HostRegistrationResponseAO1NextStepRunnerCommand": { "description": "Command for starting the next step runner", "type": "object", @@ -18002,22 +17804,6 @@ func init() { "$ref": "#/definitions/event" } }, - "feature-support-level": { - "description": "(DEPRECATED) List of features attached to openshift version", - "type": "object", - "properties": { - "features": { - "type": "array", - "items": { - "$ref": "#/definitions/FeatureSupportLevelFeaturesItems0" - } - }, - "openshift_version": { - "description": "Version of the OpenShift cluster.", - "type": "string" - } - } - }, "feature-support-level-id": { "type": "string", "enum": [ @@ -18044,13 +17830,6 @@ func init() { "PLATFORM_MANAGED_NETWORKING" ] }, - "feature-support-levels": { - "description": "(DEPRECATED) List of objects that containing a list of feature-support level and attached to openshift-version", - "type": "array", - "items": { - "$ref": "#/definitions/feature-support-level" - } - }, "free-addresses-list": { "type": "array", "items": { diff --git a/restapi/operations/assisted_install_api.go b/restapi/operations/assisted_install_api.go index a7e2fa8ae9..4d9455c5f0 100644 --- a/restapi/operations/assisted_install_api.go +++ b/restapi/operations/assisted_install_api.go @@ -219,9 +219,6 @@ func NewAssistedInstallAPI(spec *loads.Document) *AssistedInstallAPI { EventsV2ListEventsHandler: events.V2ListEventsHandlerFunc(func(params events.V2ListEventsParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation events.V2ListEvents has not yet been implemented") }), - InstallerV2ListFeatureSupportLevelsHandler: installer.V2ListFeatureSupportLevelsHandlerFunc(func(params installer.V2ListFeatureSupportLevelsParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation installer.V2ListFeatureSupportLevels has not yet been implemented") - }), InstallerV2ListHostsHandler: installer.V2ListHostsHandlerFunc(func(params installer.V2ListHostsParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation installer.V2ListHosts has not yet been implemented") }), @@ -476,8 +473,6 @@ type AssistedInstallAPI struct { VersionsV2ListComponentVersionsHandler versions.V2ListComponentVersionsHandler // EventsV2ListEventsHandler sets the operation handler for the v2 list events operation EventsV2ListEventsHandler events.V2ListEventsHandler - // InstallerV2ListFeatureSupportLevelsHandler sets the operation handler for the v2 list feature support levels operation - InstallerV2ListFeatureSupportLevelsHandler installer.V2ListFeatureSupportLevelsHandler // InstallerV2ListHostsHandler sets the operation handler for the v2 list hosts operation InstallerV2ListHostsHandler installer.V2ListHostsHandler // VersionsV2ListSupportedOpenshiftVersionsHandler sets the operation handler for the v2 list supported openshift versions operation @@ -781,9 +776,6 @@ func (o *AssistedInstallAPI) Validate() error { if o.EventsV2ListEventsHandler == nil { unregistered = append(unregistered, "events.V2ListEventsHandler") } - if o.InstallerV2ListFeatureSupportLevelsHandler == nil { - unregistered = append(unregistered, "installer.V2ListFeatureSupportLevelsHandler") - } if o.InstallerV2ListHostsHandler == nil { unregistered = append(unregistered, "installer.V2ListHostsHandler") } @@ -1182,10 +1174,6 @@ func (o *AssistedInstallAPI) initHandlerCache() { if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/v2/feature-support-levels"] = installer.NewV2ListFeatureSupportLevels(o.context, o.InstallerV2ListFeatureSupportLevelsHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } o.handlers["GET"]["/v2/infra-envs/{infra_env_id}/hosts"] = installer.NewV2ListHosts(o.context, o.InstallerV2ListHostsHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) diff --git a/restapi/operations/installer/v2_list_feature_support_levels.go b/restapi/operations/installer/v2_list_feature_support_levels.go deleted file mode 100644 index f480a539c5..0000000000 --- a/restapi/operations/installer/v2_list_feature_support_levels.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package installer - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// V2ListFeatureSupportLevelsHandlerFunc turns a function with the right signature into a v2 list feature support levels handler -type V2ListFeatureSupportLevelsHandlerFunc func(V2ListFeatureSupportLevelsParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn V2ListFeatureSupportLevelsHandlerFunc) Handle(params V2ListFeatureSupportLevelsParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// V2ListFeatureSupportLevelsHandler interface for that can handle valid v2 list feature support levels params -type V2ListFeatureSupportLevelsHandler interface { - Handle(V2ListFeatureSupportLevelsParams, interface{}) middleware.Responder -} - -// NewV2ListFeatureSupportLevels creates a new http.Handler for the v2 list feature support levels operation -func NewV2ListFeatureSupportLevels(ctx *middleware.Context, handler V2ListFeatureSupportLevelsHandler) *V2ListFeatureSupportLevels { - return &V2ListFeatureSupportLevels{Context: ctx, Handler: handler} -} - -/* - V2ListFeatureSupportLevels swagger:route GET /v2/feature-support-levels installer v2ListFeatureSupportLevels - -(DEPRECATED) Retrieves the support levels for features for each OpenShift version. -*/ -type V2ListFeatureSupportLevels struct { - Context *middleware.Context - Handler V2ListFeatureSupportLevelsHandler -} - -func (o *V2ListFeatureSupportLevels) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - *r = *rCtx - } - var Params = NewV2ListFeatureSupportLevelsParams() - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - *r = *aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc.(interface{}) // this is really a interface{}, I promise - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/restapi/operations/installer/v2_list_feature_support_levels_parameters.go b/restapi/operations/installer/v2_list_feature_support_levels_parameters.go deleted file mode 100644 index c260dc29ac..0000000000 --- a/restapi/operations/installer/v2_list_feature_support_levels_parameters.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package installer - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" -) - -// NewV2ListFeatureSupportLevelsParams creates a new V2ListFeatureSupportLevelsParams object -// -// There are no default values defined in the spec. -func NewV2ListFeatureSupportLevelsParams() V2ListFeatureSupportLevelsParams { - - return V2ListFeatureSupportLevelsParams{} -} - -// V2ListFeatureSupportLevelsParams contains all the bound params for the v2 list feature support levels operation -// typically these are obtained from a http.Request -// -// swagger:parameters v2ListFeatureSupportLevels -type V2ListFeatureSupportLevelsParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewV2ListFeatureSupportLevelsParams() beforehand. -func (o *V2ListFeatureSupportLevelsParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/restapi/operations/installer/v2_list_feature_support_levels_responses.go b/restapi/operations/installer/v2_list_feature_support_levels_responses.go deleted file mode 100644 index a0a4e12310..0000000000 --- a/restapi/operations/installer/v2_list_feature_support_levels_responses.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package installer - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "github.com/openshift/assisted-service/models" -) - -// V2ListFeatureSupportLevelsOKCode is the HTTP code returned for type V2ListFeatureSupportLevelsOK -const V2ListFeatureSupportLevelsOKCode int = 200 - -/* -V2ListFeatureSupportLevelsOK Success. - -swagger:response v2ListFeatureSupportLevelsOK -*/ -type V2ListFeatureSupportLevelsOK struct { - - /* - In: Body - */ - Payload models.FeatureSupportLevels `json:"body,omitempty"` -} - -// NewV2ListFeatureSupportLevelsOK creates V2ListFeatureSupportLevelsOK with default headers values -func NewV2ListFeatureSupportLevelsOK() *V2ListFeatureSupportLevelsOK { - - return &V2ListFeatureSupportLevelsOK{} -} - -// WithPayload adds the payload to the v2 list feature support levels o k response -func (o *V2ListFeatureSupportLevelsOK) WithPayload(payload models.FeatureSupportLevels) *V2ListFeatureSupportLevelsOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the v2 list feature support levels o k response -func (o *V2ListFeatureSupportLevelsOK) SetPayload(payload models.FeatureSupportLevels) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *V2ListFeatureSupportLevelsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - payload := o.Payload - if payload == nil { - // return empty array - payload = models.FeatureSupportLevels{} - } - - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } -} - -// V2ListFeatureSupportLevelsUnauthorizedCode is the HTTP code returned for type V2ListFeatureSupportLevelsUnauthorized -const V2ListFeatureSupportLevelsUnauthorizedCode int = 401 - -/* -V2ListFeatureSupportLevelsUnauthorized Unauthorized. - -swagger:response v2ListFeatureSupportLevelsUnauthorized -*/ -type V2ListFeatureSupportLevelsUnauthorized struct { - - /* - In: Body - */ - Payload *models.InfraError `json:"body,omitempty"` -} - -// NewV2ListFeatureSupportLevelsUnauthorized creates V2ListFeatureSupportLevelsUnauthorized with default headers values -func NewV2ListFeatureSupportLevelsUnauthorized() *V2ListFeatureSupportLevelsUnauthorized { - - return &V2ListFeatureSupportLevelsUnauthorized{} -} - -// WithPayload adds the payload to the v2 list feature support levels unauthorized response -func (o *V2ListFeatureSupportLevelsUnauthorized) WithPayload(payload *models.InfraError) *V2ListFeatureSupportLevelsUnauthorized { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the v2 list feature support levels unauthorized response -func (o *V2ListFeatureSupportLevelsUnauthorized) SetPayload(payload *models.InfraError) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *V2ListFeatureSupportLevelsUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(401) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// V2ListFeatureSupportLevelsForbiddenCode is the HTTP code returned for type V2ListFeatureSupportLevelsForbidden -const V2ListFeatureSupportLevelsForbiddenCode int = 403 - -/* -V2ListFeatureSupportLevelsForbidden Forbidden. - -swagger:response v2ListFeatureSupportLevelsForbidden -*/ -type V2ListFeatureSupportLevelsForbidden struct { - - /* - In: Body - */ - Payload *models.InfraError `json:"body,omitempty"` -} - -// NewV2ListFeatureSupportLevelsForbidden creates V2ListFeatureSupportLevelsForbidden with default headers values -func NewV2ListFeatureSupportLevelsForbidden() *V2ListFeatureSupportLevelsForbidden { - - return &V2ListFeatureSupportLevelsForbidden{} -} - -// WithPayload adds the payload to the v2 list feature support levels forbidden response -func (o *V2ListFeatureSupportLevelsForbidden) WithPayload(payload *models.InfraError) *V2ListFeatureSupportLevelsForbidden { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the v2 list feature support levels forbidden response -func (o *V2ListFeatureSupportLevelsForbidden) SetPayload(payload *models.InfraError) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *V2ListFeatureSupportLevelsForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(403) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// V2ListFeatureSupportLevelsServiceUnavailableCode is the HTTP code returned for type V2ListFeatureSupportLevelsServiceUnavailable -const V2ListFeatureSupportLevelsServiceUnavailableCode int = 503 - -/* -V2ListFeatureSupportLevelsServiceUnavailable Unavailable. - -swagger:response v2ListFeatureSupportLevelsServiceUnavailable -*/ -type V2ListFeatureSupportLevelsServiceUnavailable struct { - - /* - In: Body - */ - Payload *models.Error `json:"body,omitempty"` -} - -// NewV2ListFeatureSupportLevelsServiceUnavailable creates V2ListFeatureSupportLevelsServiceUnavailable with default headers values -func NewV2ListFeatureSupportLevelsServiceUnavailable() *V2ListFeatureSupportLevelsServiceUnavailable { - - return &V2ListFeatureSupportLevelsServiceUnavailable{} -} - -// WithPayload adds the payload to the v2 list feature support levels service unavailable response -func (o *V2ListFeatureSupportLevelsServiceUnavailable) WithPayload(payload *models.Error) *V2ListFeatureSupportLevelsServiceUnavailable { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the v2 list feature support levels service unavailable response -func (o *V2ListFeatureSupportLevelsServiceUnavailable) SetPayload(payload *models.Error) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *V2ListFeatureSupportLevelsServiceUnavailable) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(503) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} diff --git a/restapi/operations/installer/v2_list_feature_support_levels_urlbuilder.go b/restapi/operations/installer/v2_list_feature_support_levels_urlbuilder.go deleted file mode 100644 index ac77dedf59..0000000000 --- a/restapi/operations/installer/v2_list_feature_support_levels_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package installer - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// V2ListFeatureSupportLevelsURL generates an URL for the v2 list feature support levels operation -type V2ListFeatureSupportLevelsURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *V2ListFeatureSupportLevelsURL) WithBasePath(bp string) *V2ListFeatureSupportLevelsURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *V2ListFeatureSupportLevelsURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *V2ListFeatureSupportLevelsURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/v2/feature-support-levels" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/api/assisted-install" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *V2ListFeatureSupportLevelsURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *V2ListFeatureSupportLevelsURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *V2ListFeatureSupportLevelsURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on V2ListFeatureSupportLevelsURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on V2ListFeatureSupportLevelsURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *V2ListFeatureSupportLevelsURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/subsystem/feature_support_levels_test.go b/subsystem/feature_support_levels_test.go index 63aef508dc..867db13e25 100644 --- a/subsystem/feature_support_levels_test.go +++ b/subsystem/feature_support_levels_test.go @@ -14,18 +14,6 @@ import ( "github.com/openshift/assisted-service/models" ) -var _ = Describe("V2ListFeatureSupportLevels API", func() { - It("Should return the feature list", func() { - response, err := userBMClient.Installer.V2ListFeatureSupportLevels(context.Background(), installer.NewV2ListFeatureSupportLevelsParams()) - Expect(err).ShouldNot(HaveOccurred()) - Expect(response.Payload).To(BeEquivalentTo(featuresupport.SupportLevelsList)) - }) - It("Should respond with an error for unauth user", func() { - _, err := unallowedUserBMClient.Installer.V2ListFeatureSupportLevels(context.Background(), installer.NewV2ListFeatureSupportLevelsParams()) - Expect(err).Should(HaveOccurred()) - }) -}) - var _ = Describe("Feature support levels API", func() { var ctx context.Context BeforeEach(func() { diff --git a/swagger.yaml b/swagger.yaml index 1c148c9ffc..a2a10c8233 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -3659,33 +3659,6 @@ paths: schema: $ref: '#/definitions/error' - /v2/feature-support-levels: - get: - tags: - - installer - security: - - userAuth: [admin, read-only-admin, user] - operationId: v2ListFeatureSupportLevels - description: (DEPRECATED) Retrieves the support levels for features for each OpenShift version. - deprecated: true - responses: - "200": - description: Success. - schema: - $ref: '#/definitions/feature-support-levels' - "401": - description: Unauthorized. - schema: - $ref: '#/definitions/infra_error' - "403": - description: Forbidden. - schema: - $ref: '#/definitions/infra_error' - "503": - description: Unavailable. - schema: - $ref: '#/definitions/error' - /v2/clusters/import: post: tags: @@ -3998,60 +3971,6 @@ definitions: additionalProperties: $ref: '#/definitions/openshift-version' - feature-support-levels: - type: array - description: (DEPRECATED) List of objects that containing a list of feature-support level and attached to openshift-version - items: - $ref: '#/definitions/feature-support-level' - - feature-support-level: - type: object - description: (DEPRECATED) List of features attached to openshift version - properties: - openshift_version: - type: string - description: Version of the OpenShift cluster. - features: - type: array - items: - type: object - required: - - feature_id - - support_level - properties: - feature_id: - type: string - description: (DEPRECATED) The ID of the feature - enum: - - 'ADDITIONAL_NTP_SOURCE' - - 'REQUESTED_HOSTNAME' - - 'PROXY' - - 'SNO' - - 'DAY2_HOSTS' - - 'VIP_AUTO_ALLOC' - - 'DISK_SELECTION' - - 'OVN_NETWORK_TYPE' - - 'SDN_NETWORK_TYPE' - - 'PLATFORM_SELECTION' - - 'SCHEDULABLE_MASTERS' - - 'AUTO_ASSIGN_ROLE' - - 'CUSTOM_MANIFEST' - - 'DISK_ENCRYPTION' - - 'CLUSTER_MANAGED_NETWORKING_WITH_VMS' - - 'ARM64_ARCHITECTURE' - - 'ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING' - - 'PPC64LE_ARCHITECTURE' - - 'S390X_ARCHITECTURE' - - 'SINGLE_NODE_EXPANSION' - - 'LVM' - - 'DUAL_STACK_NETWORKING' - - 'MULTIARCH_RELEASE_IMAGE' - - 'NUTANIX_INTEGRATION' - - 'DUAL_STACK_VIPS' - - 'USER_MANAGED_NETWORKING_WITH_MULTI_NODE' - support_level: - $ref: '#/definitions/support-level' - support-levels: type: object description: Map of feature ID or CPU architecture alongside their support level diff --git a/vendor/github.com/openshift/assisted-service/client/installer/installer_client.go b/vendor/github.com/openshift/assisted-service/client/installer/installer_client.go index 6548fadc0a..f5ffdb1f45 100644 --- a/vendor/github.com/openshift/assisted-service/client/installer/installer_client.go +++ b/vendor/github.com/openshift/assisted-service/client/installer/installer_client.go @@ -154,9 +154,6 @@ type API interface { /* V2ListClusters Retrieves the list of OpenShift clusters.*/ V2ListClusters(ctx context.Context, params *V2ListClustersParams) (*V2ListClustersOK, error) - /* - V2ListFeatureSupportLevels (DEPRECATED) Retrieves the support levels for features for each OpenShift version.*/ - V2ListFeatureSupportLevels(ctx context.Context, params *V2ListFeatureSupportLevelsParams) (*V2ListFeatureSupportLevelsOK, error) /* V2ListHosts Retrieves the list of OpenShift hosts that belong the infra-env.*/ V2ListHosts(ctx context.Context, params *V2ListHostsParams) (*V2ListHostsOK, error) @@ -1358,31 +1355,6 @@ func (a *Client) V2ListClusters(ctx context.Context, params *V2ListClustersParam } -/* -V2ListFeatureSupportLevels (DEPRECATED) Retrieves the support levels for features for each OpenShift version. -*/ -func (a *Client) V2ListFeatureSupportLevels(ctx context.Context, params *V2ListFeatureSupportLevelsParams) (*V2ListFeatureSupportLevelsOK, error) { - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "v2ListFeatureSupportLevels", - Method: "GET", - PathPattern: "/v2/feature-support-levels", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &V2ListFeatureSupportLevelsReader{formats: a.formats}, - AuthInfo: a.authInfo, - Context: ctx, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - return result.(*V2ListFeatureSupportLevelsOK), nil - -} - /* V2ListHosts Retrieves the list of OpenShift hosts that belong the infra-env. */ diff --git a/vendor/github.com/openshift/assisted-service/client/installer/v2_list_feature_support_levels_parameters.go b/vendor/github.com/openshift/assisted-service/client/installer/v2_list_feature_support_levels_parameters.go deleted file mode 100644 index 3227fbcfde..0000000000 --- a/vendor/github.com/openshift/assisted-service/client/installer/v2_list_feature_support_levels_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package installer - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewV2ListFeatureSupportLevelsParams creates a new V2ListFeatureSupportLevelsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewV2ListFeatureSupportLevelsParams() *V2ListFeatureSupportLevelsParams { - return &V2ListFeatureSupportLevelsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewV2ListFeatureSupportLevelsParamsWithTimeout creates a new V2ListFeatureSupportLevelsParams object -// with the ability to set a timeout on a request. -func NewV2ListFeatureSupportLevelsParamsWithTimeout(timeout time.Duration) *V2ListFeatureSupportLevelsParams { - return &V2ListFeatureSupportLevelsParams{ - timeout: timeout, - } -} - -// NewV2ListFeatureSupportLevelsParamsWithContext creates a new V2ListFeatureSupportLevelsParams object -// with the ability to set a context for a request. -func NewV2ListFeatureSupportLevelsParamsWithContext(ctx context.Context) *V2ListFeatureSupportLevelsParams { - return &V2ListFeatureSupportLevelsParams{ - Context: ctx, - } -} - -// NewV2ListFeatureSupportLevelsParamsWithHTTPClient creates a new V2ListFeatureSupportLevelsParams object -// with the ability to set a custom HTTPClient for a request. -func NewV2ListFeatureSupportLevelsParamsWithHTTPClient(client *http.Client) *V2ListFeatureSupportLevelsParams { - return &V2ListFeatureSupportLevelsParams{ - HTTPClient: client, - } -} - -/* -V2ListFeatureSupportLevelsParams contains all the parameters to send to the API endpoint - - for the v2 list feature support levels operation. - - Typically these are written to a http.Request. -*/ -type V2ListFeatureSupportLevelsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the v2 list feature support levels params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *V2ListFeatureSupportLevelsParams) WithDefaults() *V2ListFeatureSupportLevelsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the v2 list feature support levels params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *V2ListFeatureSupportLevelsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the v2 list feature support levels params -func (o *V2ListFeatureSupportLevelsParams) WithTimeout(timeout time.Duration) *V2ListFeatureSupportLevelsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the v2 list feature support levels params -func (o *V2ListFeatureSupportLevelsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the v2 list feature support levels params -func (o *V2ListFeatureSupportLevelsParams) WithContext(ctx context.Context) *V2ListFeatureSupportLevelsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the v2 list feature support levels params -func (o *V2ListFeatureSupportLevelsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the v2 list feature support levels params -func (o *V2ListFeatureSupportLevelsParams) WithHTTPClient(client *http.Client) *V2ListFeatureSupportLevelsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the v2 list feature support levels params -func (o *V2ListFeatureSupportLevelsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *V2ListFeatureSupportLevelsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/openshift/assisted-service/client/installer/v2_list_feature_support_levels_responses.go b/vendor/github.com/openshift/assisted-service/client/installer/v2_list_feature_support_levels_responses.go deleted file mode 100644 index 664a3fee82..0000000000 --- a/vendor/github.com/openshift/assisted-service/client/installer/v2_list_feature_support_levels_responses.go +++ /dev/null @@ -1,303 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package installer - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/openshift/assisted-service/models" -) - -// V2ListFeatureSupportLevelsReader is a Reader for the V2ListFeatureSupportLevels structure. -type V2ListFeatureSupportLevelsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *V2ListFeatureSupportLevelsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewV2ListFeatureSupportLevelsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 401: - result := NewV2ListFeatureSupportLevelsUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewV2ListFeatureSupportLevelsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 503: - result := NewV2ListFeatureSupportLevelsServiceUnavailable() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewV2ListFeatureSupportLevelsOK creates a V2ListFeatureSupportLevelsOK with default headers values -func NewV2ListFeatureSupportLevelsOK() *V2ListFeatureSupportLevelsOK { - return &V2ListFeatureSupportLevelsOK{} -} - -/* -V2ListFeatureSupportLevelsOK describes a response with status code 200, with default header values. - -Success. -*/ -type V2ListFeatureSupportLevelsOK struct { - Payload models.FeatureSupportLevels -} - -// IsSuccess returns true when this v2 list feature support levels o k response has a 2xx status code -func (o *V2ListFeatureSupportLevelsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this v2 list feature support levels o k response has a 3xx status code -func (o *V2ListFeatureSupportLevelsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v2 list feature support levels o k response has a 4xx status code -func (o *V2ListFeatureSupportLevelsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this v2 list feature support levels o k response has a 5xx status code -func (o *V2ListFeatureSupportLevelsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this v2 list feature support levels o k response a status code equal to that given -func (o *V2ListFeatureSupportLevelsOK) IsCode(code int) bool { - return code == 200 -} - -func (o *V2ListFeatureSupportLevelsOK) Error() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsOK %+v", 200, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsOK) String() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsOK %+v", 200, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsOK) GetPayload() models.FeatureSupportLevels { - return o.Payload -} - -func (o *V2ListFeatureSupportLevelsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV2ListFeatureSupportLevelsUnauthorized creates a V2ListFeatureSupportLevelsUnauthorized with default headers values -func NewV2ListFeatureSupportLevelsUnauthorized() *V2ListFeatureSupportLevelsUnauthorized { - return &V2ListFeatureSupportLevelsUnauthorized{} -} - -/* -V2ListFeatureSupportLevelsUnauthorized describes a response with status code 401, with default header values. - -Unauthorized. -*/ -type V2ListFeatureSupportLevelsUnauthorized struct { - Payload *models.InfraError -} - -// IsSuccess returns true when this v2 list feature support levels unauthorized response has a 2xx status code -func (o *V2ListFeatureSupportLevelsUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v2 list feature support levels unauthorized response has a 3xx status code -func (o *V2ListFeatureSupportLevelsUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v2 list feature support levels unauthorized response has a 4xx status code -func (o *V2ListFeatureSupportLevelsUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this v2 list feature support levels unauthorized response has a 5xx status code -func (o *V2ListFeatureSupportLevelsUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this v2 list feature support levels unauthorized response a status code equal to that given -func (o *V2ListFeatureSupportLevelsUnauthorized) IsCode(code int) bool { - return code == 401 -} - -func (o *V2ListFeatureSupportLevelsUnauthorized) Error() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsUnauthorized %+v", 401, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsUnauthorized) String() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsUnauthorized %+v", 401, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsUnauthorized) GetPayload() *models.InfraError { - return o.Payload -} - -func (o *V2ListFeatureSupportLevelsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.InfraError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV2ListFeatureSupportLevelsForbidden creates a V2ListFeatureSupportLevelsForbidden with default headers values -func NewV2ListFeatureSupportLevelsForbidden() *V2ListFeatureSupportLevelsForbidden { - return &V2ListFeatureSupportLevelsForbidden{} -} - -/* -V2ListFeatureSupportLevelsForbidden describes a response with status code 403, with default header values. - -Forbidden. -*/ -type V2ListFeatureSupportLevelsForbidden struct { - Payload *models.InfraError -} - -// IsSuccess returns true when this v2 list feature support levels forbidden response has a 2xx status code -func (o *V2ListFeatureSupportLevelsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v2 list feature support levels forbidden response has a 3xx status code -func (o *V2ListFeatureSupportLevelsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v2 list feature support levels forbidden response has a 4xx status code -func (o *V2ListFeatureSupportLevelsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this v2 list feature support levels forbidden response has a 5xx status code -func (o *V2ListFeatureSupportLevelsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this v2 list feature support levels forbidden response a status code equal to that given -func (o *V2ListFeatureSupportLevelsForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *V2ListFeatureSupportLevelsForbidden) Error() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsForbidden %+v", 403, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsForbidden) String() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsForbidden %+v", 403, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsForbidden) GetPayload() *models.InfraError { - return o.Payload -} - -func (o *V2ListFeatureSupportLevelsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.InfraError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV2ListFeatureSupportLevelsServiceUnavailable creates a V2ListFeatureSupportLevelsServiceUnavailable with default headers values -func NewV2ListFeatureSupportLevelsServiceUnavailable() *V2ListFeatureSupportLevelsServiceUnavailable { - return &V2ListFeatureSupportLevelsServiceUnavailable{} -} - -/* -V2ListFeatureSupportLevelsServiceUnavailable describes a response with status code 503, with default header values. - -Unavailable. -*/ -type V2ListFeatureSupportLevelsServiceUnavailable struct { - Payload *models.Error -} - -// IsSuccess returns true when this v2 list feature support levels service unavailable response has a 2xx status code -func (o *V2ListFeatureSupportLevelsServiceUnavailable) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v2 list feature support levels service unavailable response has a 3xx status code -func (o *V2ListFeatureSupportLevelsServiceUnavailable) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v2 list feature support levels service unavailable response has a 4xx status code -func (o *V2ListFeatureSupportLevelsServiceUnavailable) IsClientError() bool { - return false -} - -// IsServerError returns true when this v2 list feature support levels service unavailable response has a 5xx status code -func (o *V2ListFeatureSupportLevelsServiceUnavailable) IsServerError() bool { - return true -} - -// IsCode returns true when this v2 list feature support levels service unavailable response a status code equal to that given -func (o *V2ListFeatureSupportLevelsServiceUnavailable) IsCode(code int) bool { - return code == 503 -} - -func (o *V2ListFeatureSupportLevelsServiceUnavailable) Error() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsServiceUnavailable %+v", 503, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsServiceUnavailable) String() string { - return fmt.Sprintf("[GET /v2/feature-support-levels][%d] v2ListFeatureSupportLevelsServiceUnavailable %+v", 503, o.Payload) -} - -func (o *V2ListFeatureSupportLevelsServiceUnavailable) GetPayload() *models.Error { - return o.Payload -} - -func (o *V2ListFeatureSupportLevelsServiceUnavailable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/openshift/assisted-service/models/feature_support_level.go b/vendor/github.com/openshift/assisted-service/models/feature_support_level.go deleted file mode 100644 index 42c5539e51..0000000000 --- a/vendor/github.com/openshift/assisted-service/models/feature_support_level.go +++ /dev/null @@ -1,341 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FeatureSupportLevel (DEPRECATED) List of features attached to openshift version -// -// swagger:model feature-support-level -type FeatureSupportLevel struct { - - // features - Features []*FeatureSupportLevelFeaturesItems0 `json:"features"` - - // Version of the OpenShift cluster. - OpenshiftVersion string `json:"openshift_version,omitempty"` -} - -// Validate validates this feature support level -func (m *FeatureSupportLevel) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFeatures(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FeatureSupportLevel) validateFeatures(formats strfmt.Registry) error { - if swag.IsZero(m.Features) { // not required - return nil - } - - for i := 0; i < len(m.Features); i++ { - if swag.IsZero(m.Features[i]) { // not required - continue - } - - if m.Features[i] != nil { - if err := m.Features[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("features" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("features" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this feature support level based on the context it is used -func (m *FeatureSupportLevel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFeatures(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FeatureSupportLevel) contextValidateFeatures(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Features); i++ { - - if m.Features[i] != nil { - if err := m.Features[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("features" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("features" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FeatureSupportLevel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FeatureSupportLevel) UnmarshalBinary(b []byte) error { - var res FeatureSupportLevel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// FeatureSupportLevelFeaturesItems0 feature support level features items0 -// -// swagger:model FeatureSupportLevelFeaturesItems0 -type FeatureSupportLevelFeaturesItems0 struct { - - // (DEPRECATED) The ID of the feature - // Required: true - // Enum: [ADDITIONAL_NTP_SOURCE REQUESTED_HOSTNAME PROXY SNO DAY2_HOSTS VIP_AUTO_ALLOC DISK_SELECTION OVN_NETWORK_TYPE SDN_NETWORK_TYPE PLATFORM_SELECTION SCHEDULABLE_MASTERS AUTO_ASSIGN_ROLE CUSTOM_MANIFEST DISK_ENCRYPTION CLUSTER_MANAGED_NETWORKING_WITH_VMS ARM64_ARCHITECTURE ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING PPC64LE_ARCHITECTURE S390X_ARCHITECTURE SINGLE_NODE_EXPANSION LVM DUAL_STACK_NETWORKING MULTIARCH_RELEASE_IMAGE NUTANIX_INTEGRATION DUAL_STACK_VIPS USER_MANAGED_NETWORKING_WITH_MULTI_NODE] - FeatureID *string `json:"feature_id"` - - // support level - // Required: true - SupportLevel *SupportLevel `json:"support_level"` -} - -// Validate validates this feature support level features items0 -func (m *FeatureSupportLevelFeaturesItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFeatureID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSupportLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ADDITIONAL_NTP_SOURCE","REQUESTED_HOSTNAME","PROXY","SNO","DAY2_HOSTS","VIP_AUTO_ALLOC","DISK_SELECTION","OVN_NETWORK_TYPE","SDN_NETWORK_TYPE","PLATFORM_SELECTION","SCHEDULABLE_MASTERS","AUTO_ASSIGN_ROLE","CUSTOM_MANIFEST","DISK_ENCRYPTION","CLUSTER_MANAGED_NETWORKING_WITH_VMS","ARM64_ARCHITECTURE","ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING","PPC64LE_ARCHITECTURE","S390X_ARCHITECTURE","SINGLE_NODE_EXPANSION","LVM","DUAL_STACK_NETWORKING","MULTIARCH_RELEASE_IMAGE","NUTANIX_INTEGRATION","DUAL_STACK_VIPS","USER_MANAGED_NETWORKING_WITH_MULTI_NODE"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum = append(featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum, v) - } -} - -const ( - - // FeatureSupportLevelFeaturesItems0FeatureIDADDITIONALNTPSOURCE captures enum value "ADDITIONAL_NTP_SOURCE" - FeatureSupportLevelFeaturesItems0FeatureIDADDITIONALNTPSOURCE string = "ADDITIONAL_NTP_SOURCE" - - // FeatureSupportLevelFeaturesItems0FeatureIDREQUESTEDHOSTNAME captures enum value "REQUESTED_HOSTNAME" - FeatureSupportLevelFeaturesItems0FeatureIDREQUESTEDHOSTNAME string = "REQUESTED_HOSTNAME" - - // FeatureSupportLevelFeaturesItems0FeatureIDPROXY captures enum value "PROXY" - FeatureSupportLevelFeaturesItems0FeatureIDPROXY string = "PROXY" - - // FeatureSupportLevelFeaturesItems0FeatureIDSNO captures enum value "SNO" - FeatureSupportLevelFeaturesItems0FeatureIDSNO string = "SNO" - - // FeatureSupportLevelFeaturesItems0FeatureIDDAY2HOSTS captures enum value "DAY2_HOSTS" - FeatureSupportLevelFeaturesItems0FeatureIDDAY2HOSTS string = "DAY2_HOSTS" - - // FeatureSupportLevelFeaturesItems0FeatureIDVIPAUTOALLOC captures enum value "VIP_AUTO_ALLOC" - FeatureSupportLevelFeaturesItems0FeatureIDVIPAUTOALLOC string = "VIP_AUTO_ALLOC" - - // FeatureSupportLevelFeaturesItems0FeatureIDDISKSELECTION captures enum value "DISK_SELECTION" - FeatureSupportLevelFeaturesItems0FeatureIDDISKSELECTION string = "DISK_SELECTION" - - // FeatureSupportLevelFeaturesItems0FeatureIDOVNNETWORKTYPE captures enum value "OVN_NETWORK_TYPE" - FeatureSupportLevelFeaturesItems0FeatureIDOVNNETWORKTYPE string = "OVN_NETWORK_TYPE" - - // FeatureSupportLevelFeaturesItems0FeatureIDSDNNETWORKTYPE captures enum value "SDN_NETWORK_TYPE" - FeatureSupportLevelFeaturesItems0FeatureIDSDNNETWORKTYPE string = "SDN_NETWORK_TYPE" - - // FeatureSupportLevelFeaturesItems0FeatureIDPLATFORMSELECTION captures enum value "PLATFORM_SELECTION" - FeatureSupportLevelFeaturesItems0FeatureIDPLATFORMSELECTION string = "PLATFORM_SELECTION" - - // FeatureSupportLevelFeaturesItems0FeatureIDSCHEDULABLEMASTERS captures enum value "SCHEDULABLE_MASTERS" - FeatureSupportLevelFeaturesItems0FeatureIDSCHEDULABLEMASTERS string = "SCHEDULABLE_MASTERS" - - // FeatureSupportLevelFeaturesItems0FeatureIDAUTOASSIGNROLE captures enum value "AUTO_ASSIGN_ROLE" - FeatureSupportLevelFeaturesItems0FeatureIDAUTOASSIGNROLE string = "AUTO_ASSIGN_ROLE" - - // FeatureSupportLevelFeaturesItems0FeatureIDCUSTOMMANIFEST captures enum value "CUSTOM_MANIFEST" - FeatureSupportLevelFeaturesItems0FeatureIDCUSTOMMANIFEST string = "CUSTOM_MANIFEST" - - // FeatureSupportLevelFeaturesItems0FeatureIDDISKENCRYPTION captures enum value "DISK_ENCRYPTION" - FeatureSupportLevelFeaturesItems0FeatureIDDISKENCRYPTION string = "DISK_ENCRYPTION" - - // FeatureSupportLevelFeaturesItems0FeatureIDCLUSTERMANAGEDNETWORKINGWITHVMS captures enum value "CLUSTER_MANAGED_NETWORKING_WITH_VMS" - FeatureSupportLevelFeaturesItems0FeatureIDCLUSTERMANAGEDNETWORKINGWITHVMS string = "CLUSTER_MANAGED_NETWORKING_WITH_VMS" - - // FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTURE captures enum value "ARM64_ARCHITECTURE" - FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTURE string = "ARM64_ARCHITECTURE" - - // FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTUREWITHCLUSTERMANAGEDNETWORKING captures enum value "ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING" - FeatureSupportLevelFeaturesItems0FeatureIDARM64ARCHITECTUREWITHCLUSTERMANAGEDNETWORKING string = "ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING" - - // FeatureSupportLevelFeaturesItems0FeatureIDPPC64LEARCHITECTURE captures enum value "PPC64LE_ARCHITECTURE" - FeatureSupportLevelFeaturesItems0FeatureIDPPC64LEARCHITECTURE string = "PPC64LE_ARCHITECTURE" - - // FeatureSupportLevelFeaturesItems0FeatureIDS390XARCHITECTURE captures enum value "S390X_ARCHITECTURE" - FeatureSupportLevelFeaturesItems0FeatureIDS390XARCHITECTURE string = "S390X_ARCHITECTURE" - - // FeatureSupportLevelFeaturesItems0FeatureIDSINGLENODEEXPANSION captures enum value "SINGLE_NODE_EXPANSION" - FeatureSupportLevelFeaturesItems0FeatureIDSINGLENODEEXPANSION string = "SINGLE_NODE_EXPANSION" - - // FeatureSupportLevelFeaturesItems0FeatureIDLVM captures enum value "LVM" - FeatureSupportLevelFeaturesItems0FeatureIDLVM string = "LVM" - - // FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKNETWORKING captures enum value "DUAL_STACK_NETWORKING" - FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKNETWORKING string = "DUAL_STACK_NETWORKING" - - // FeatureSupportLevelFeaturesItems0FeatureIDMULTIARCHRELEASEIMAGE captures enum value "MULTIARCH_RELEASE_IMAGE" - FeatureSupportLevelFeaturesItems0FeatureIDMULTIARCHRELEASEIMAGE string = "MULTIARCH_RELEASE_IMAGE" - - // FeatureSupportLevelFeaturesItems0FeatureIDNUTANIXINTEGRATION captures enum value "NUTANIX_INTEGRATION" - FeatureSupportLevelFeaturesItems0FeatureIDNUTANIXINTEGRATION string = "NUTANIX_INTEGRATION" - - // FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKVIPS captures enum value "DUAL_STACK_VIPS" - FeatureSupportLevelFeaturesItems0FeatureIDDUALSTACKVIPS string = "DUAL_STACK_VIPS" - - // FeatureSupportLevelFeaturesItems0FeatureIDUSERMANAGEDNETWORKINGWITHMULTINODE captures enum value "USER_MANAGED_NETWORKING_WITH_MULTI_NODE" - FeatureSupportLevelFeaturesItems0FeatureIDUSERMANAGEDNETWORKINGWITHMULTINODE string = "USER_MANAGED_NETWORKING_WITH_MULTI_NODE" -) - -// prop value enum -func (m *FeatureSupportLevelFeaturesItems0) validateFeatureIDEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, featureSupportLevelFeaturesItems0TypeFeatureIDPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FeatureSupportLevelFeaturesItems0) validateFeatureID(formats strfmt.Registry) error { - - if err := validate.Required("feature_id", "body", m.FeatureID); err != nil { - return err - } - - // value enum - if err := m.validateFeatureIDEnum("feature_id", "body", *m.FeatureID); err != nil { - return err - } - - return nil -} - -func (m *FeatureSupportLevelFeaturesItems0) validateSupportLevel(formats strfmt.Registry) error { - - if err := validate.Required("support_level", "body", m.SupportLevel); err != nil { - return err - } - - if err := validate.Required("support_level", "body", m.SupportLevel); err != nil { - return err - } - - if m.SupportLevel != nil { - if err := m.SupportLevel.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("support_level") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("support_level") - } - return err - } - } - - return nil -} - -// ContextValidate validate this feature support level features items0 based on the context it is used -func (m *FeatureSupportLevelFeaturesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSupportLevel(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FeatureSupportLevelFeaturesItems0) contextValidateSupportLevel(ctx context.Context, formats strfmt.Registry) error { - - if m.SupportLevel != nil { - if err := m.SupportLevel.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("support_level") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("support_level") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FeatureSupportLevelFeaturesItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FeatureSupportLevelFeaturesItems0) UnmarshalBinary(b []byte) error { - var res FeatureSupportLevelFeaturesItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/vendor/github.com/openshift/assisted-service/models/feature_support_levels.go b/vendor/github.com/openshift/assisted-service/models/feature_support_levels.go deleted file mode 100644 index 20b8bdc630..0000000000 --- a/vendor/github.com/openshift/assisted-service/models/feature_support_levels.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FeatureSupportLevels (DEPRECATED) List of objects that containing a list of feature-support level and attached to openshift-version -// -// swagger:model feature-support-levels -type FeatureSupportLevels []*FeatureSupportLevel - -// Validate validates this feature support levels -func (m FeatureSupportLevels) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this feature support levels based on the context it is used -func (m FeatureSupportLevels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -}