diff --git a/go.mod b/go.mod index 5c9c020b3..95c6bc9d8 100644 --- a/go.mod +++ b/go.mod @@ -197,9 +197,9 @@ replace ( github.com/metal3-io/baremetal-operator/apis => github.com/openshift/baremetal-operator/apis v0.0.0-20220217140404-6b1ecb71984f github.com/metal3-io/baremetal-operator/pkg/hardwareutils => github.com/openshift/baremetal-operator/pkg/hardwareutils v0.0.0-20220217140404-6b1ecb71984f github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.12 - github.com/openshift/assisted-service/api => github.com/openshift/assisted-service/api v0.0.0-20241213170211-a5016f125538 - github.com/openshift/assisted-service/client => github.com/openshift/assisted-service/client v0.0.0-20241213170211-a5016f125538 - github.com/openshift/assisted-service/models => github.com/openshift/assisted-service/models v0.0.0-20241213170211-a5016f125538 + github.com/openshift/assisted-service/api => github.com/openshift/assisted-service/api v0.0.0-20250121194432-6bdc1336f21b + github.com/openshift/assisted-service/client => github.com/openshift/assisted-service/client v0.0.0-20250121194432-6bdc1336f21b + github.com/openshift/assisted-service/models => github.com/openshift/assisted-service/models v0.0.0-20250121194432-6bdc1336f21b sigs.k8s.io/cluster-api-provider-aws => github.com/openshift/cluster-api-provider-aws v0.2.1-0.20201022175424-d30c7a274820 sigs.k8s.io/cluster-api-provider-azure => github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20201016155852-4090a6970205 ) diff --git a/go.sum b/go.sum index 01a4ba965..e36b4c679 100644 --- a/go.sum +++ b/go.sum @@ -620,12 +620,12 @@ github.com/openshift/api v0.0.0-20240521212423-414cf30d37be h1:v2sJPAU2bY9quEg9G github.com/openshift/api v0.0.0-20240521212423-414cf30d37be/go.mod h1:CxgbWAlvu2iQB0UmKTtRu1YfepRg1/vJ64n2DlIEVz4= github.com/openshift/assisted-service v1.0.10-0.20241213170211-a5016f125538 h1:/SkX5GwRyPaj6cIkU/KIOBGXkaJdANQQPGKzSu9jxls= github.com/openshift/assisted-service v1.0.10-0.20241213170211-a5016f125538/go.mod h1:0Ygx4AsKw93mKw5lwzVGI9fxS70obgvyAuQ2EUu4uLQ= -github.com/openshift/assisted-service/api v0.0.0-20241213170211-a5016f125538 h1:Sxw4JHF7NrRlw/FECcGdOzmSwO+FRcdlaKCz/XPrXIE= -github.com/openshift/assisted-service/api v0.0.0-20241213170211-a5016f125538/go.mod h1:tvE25aC7I07Uz2jUt7gH2E8+a1Rw4W7qtW6/EFb8l64= -github.com/openshift/assisted-service/client v0.0.0-20241213170211-a5016f125538 h1:NPQBK49+y8whcMjlVveIFqA74jSW+DL1Do0fsvuMbbk= -github.com/openshift/assisted-service/client v0.0.0-20241213170211-a5016f125538/go.mod h1:y+GNZgra/iQDYlacSjgscim8ldrSOMtV3jQaSKC3APc= -github.com/openshift/assisted-service/models v0.0.0-20241213170211-a5016f125538 h1:YOjfAf4JJk7dM7/dJ4RvGwPu2tkiNAh1dG3pebvfGXg= -github.com/openshift/assisted-service/models v0.0.0-20241213170211-a5016f125538/go.mod h1:bx9NsPeBkhn7az/qFHo3hW8wFqFj4BmT3g1R7wR9gcw= +github.com/openshift/assisted-service/api v0.0.0-20250121194432-6bdc1336f21b h1:rBnzGYXurwiNU5CWfkS/H889KfqEtOMtbKB9QqnR0nM= +github.com/openshift/assisted-service/api v0.0.0-20250121194432-6bdc1336f21b/go.mod h1:tvE25aC7I07Uz2jUt7gH2E8+a1Rw4W7qtW6/EFb8l64= +github.com/openshift/assisted-service/client v0.0.0-20250121194432-6bdc1336f21b h1:MZGCt4TDClV9+y9GcmZFF5q2Nj9R8hx8ZOkdFgQwZbA= +github.com/openshift/assisted-service/client v0.0.0-20250121194432-6bdc1336f21b/go.mod h1:y+GNZgra/iQDYlacSjgscim8ldrSOMtV3jQaSKC3APc= +github.com/openshift/assisted-service/models v0.0.0-20250121194432-6bdc1336f21b h1:Esst489U8zAunqPsIObczV8ax4CSF5j2vRDVjrrx/hM= +github.com/openshift/assisted-service/models v0.0.0-20250121194432-6bdc1336f21b/go.mod h1:bx9NsPeBkhn7az/qFHo3hW8wFqFj4BmT3g1R7wR9gcw= github.com/openshift/baremetal-runtimecfg v0.0.0-20220211165258-fe92b9507bec h1:1nC/js8H8s+MBzgu20YDSuVw6IF9Ct5HOR1JLxv572Q= github.com/openshift/baremetal-runtimecfg v0.0.0-20220211165258-fe92b9507bec/go.mod h1:fIhPgDwf2Vm1tIiZ0cFidPw3dS26AKGSRoiIJnlz84o= github.com/openshift/custom-resource-status v1.1.3-0.20220503160415-f2fdb4999d87 h1:cHyxR+Y8rAMT6m1jQCaYGRwikqahI0OjjUDhFNf3ySQ= diff --git a/src/commands/actions/install_cmd.go b/src/commands/actions/install_cmd.go index 58bfd7d77..775524ebf 100644 --- a/src/commands/actions/install_cmd.go +++ b/src/commands/actions/install_cmd.go @@ -170,6 +170,10 @@ func (a *install) getFullInstallerCommand() string { installerCmdArgs = append(installerCmdArgs, "--service-ips", strings.Join(a.installParams.ServiceIps, ",")) } + if len(a.installParams.CoreosImage) > 0 { + installerCmdArgs = append(installerCmdArgs, "--coreos-image", a.installParams.CoreosImage) + } + return fmt.Sprintf("%s %s %s", shellescape.QuoteCommand(podmanCmd), swag.StringValue(a.installParams.InstallerImage), shellescape.QuoteCommand(installerCmdArgs)) } diff --git a/src/commands/actions/install_cmd_test.go b/src/commands/actions/install_cmd_test.go index 2297b7dc2..6b6482973 100644 --- a/src/commands/actions/install_cmd_test.go +++ b/src/commands/actions/install_cmd_test.go @@ -421,4 +421,9 @@ var _ = Describe("installer test", func() { }) + It("Args adds the CoreosImage from the install command request when set", func() { + installCommandRequest.CoreosImage = "example.com/openshift/coreos:tag" + args := getInstall(installCommandRequest, filesystem, false).Args() + Expect(strings.Join(args, " ")).To(ContainSubstring("--coreos-image example.com/openshift/coreos:tag")) + }) }) diff --git a/src/inventory/disks.go b/src/inventory/disks.go index de8b950b8..a0b20e5bb 100644 --- a/src/inventory/disks.go +++ b/src/inventory/disks.go @@ -360,15 +360,6 @@ func (d *disks) checkEligibility(disk *ghw.Disk) (notEligibleReasons []string, i // Check disk partitions for type, name, and mount points: for _, partition := range disk.Partitions { - if partition.Type == "iso9660" { - notEligibleReasons = append( - notEligibleReasons, - "Disk appears to be an ISO installation media (has partition with "+ - "type iso9660)", - ) - isInstallationMedia = true - } - if strings.HasSuffix(partition.MountPoint, "iso") { notEligibleReasons = append( notEligibleReasons, diff --git a/src/inventory/disks_test.go b/src/inventory/disks_test.go index 0dbfa580d..694e3290d 100644 --- a/src/inventory/disks_test.go +++ b/src/inventory/disks_test.go @@ -550,7 +550,7 @@ var _ = Describe("Disks test", func() { }) It("filters ISO disks / marks them as installation media", func() { - blockInfo, expectedDisks := prepareDisksTest(dependencies, 3) + blockInfo, expectedDisks := prepareDisksTest(dependencies, 2) blockInfo.Disks[0].Partitions = []*ghw.Partition{ { @@ -569,27 +569,9 @@ var _ = Describe("Disks test", func() { } expectedDisks[0].IsInstallationMedia = true - blockInfo.Disks[1].Partitions = []*ghw.Partition{ - { - Disk: nil, - Name: "partition2", - Label: "partition2-label", - MountPoint: "/some/mount/point", - SizeBytes: 5555, - Type: "iso9660", - IsReadOnly: false, - }, - } - - expectedDisks[1].InstallationEligibility.Eligible = false - expectedDisks[1].InstallationEligibility.NotEligibleReasons = []string{ - "Disk appears to be an ISO installation media (has partition with type iso9660)", - } - expectedDisks[1].IsInstallationMedia = true - // Make sure regular disks don't get marked as installation media - expectedDisks[2].InstallationEligibility.Eligible = true - expectedDisks[2].IsInstallationMedia = false + expectedDisks[1].InstallationEligibility.Eligible = true + expectedDisks[1].IsInstallationMedia = false mockFetchDisks(dependencies, nil, blockInfo.Disks...) ret := GetDisks(&config.SubprocessConfig{}, dependencies) diff --git a/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/agentclusterinstall_types.go b/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/agentclusterinstall_types.go index d22067e03..44feb20d4 100644 --- a/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/agentclusterinstall_types.go +++ b/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/agentclusterinstall_types.go @@ -209,6 +209,10 @@ type AgentClusterInstallSpec struct { // Set per cluster mirror registry // +optional MirrorRegistryRef *MirrorRegistryConfigMapReference `json:"mirrorRegistryRef,omitempty"` + + // LoadBalancer defines the load balancer used by the cluster for ingress traffic. + // +optional + LoadBalancer *LoadBalancer `json:"loadBalancer,omitempty"` } // IgnitionEndpoint stores the data to of the custom ignition endpoint. @@ -506,6 +510,33 @@ type ManifestsConfigMapReference struct { Name string `json:"name"` } +// LoadBalancer defines the load balancer used by the cluster. +// +union +type LoadBalancer struct { + // Type defines the type of load balancer used by the cluster, which can be managed by the user or by the + // cluster. The default value is ClusterManaged. + // +default="ClusterManaged" + // +kubebuilder:default:="ClusterManaged" + // +kubebuilder:validation:Enum:="ClusterManaged";"UserManaged" + // +optional + // +unionDiscriminator + Type LoadBalancerType `json:"type,omitempty"` +} + +// LoadBalancerType defines the type of load balancer used by the cluster. +type LoadBalancerType string + +const ( + // LoadBalancerTypeClusterManaged is a load balancer with virtual IP addresses managed internally by the + // cluster. + LoadBalancerTypeClusterManaged LoadBalancerType = "ClusterManaged" + + // LoadBalancerTypeUserManaged is a load balancer managed outside of the cluster by the customer. When this is + // used no virtual IP addresses should be specified. Note that this is only allowed for the bare metal and + // vSphere platforms. + LoadBalancerTypeUserManaged LoadBalancerType = "UserManaged" +) + func init() { SchemeBuilder.Register(&AgentClusterInstall{}, &AgentClusterInstallList{}) } diff --git a/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/zz_generated.deepcopy.go index cb7798170..87f61de03 100644 --- a/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/zz_generated.deepcopy.go @@ -157,6 +157,11 @@ func (in *AgentClusterInstallSpec) DeepCopyInto(out *AgentClusterInstallSpec) { *out = new(MirrorRegistryConfigMapReference) **out = **in } + if in.LoadBalancer != nil { + in, out := &in.LoadBalancer, &out.LoadBalancer + *out = new(LoadBalancer) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentClusterInstallSpec. @@ -364,6 +369,21 @@ func (in *IgnitionEndpoint) DeepCopy() *IgnitionEndpoint { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoadBalancer) DeepCopyInto(out *LoadBalancer) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancer. +func (in *LoadBalancer) DeepCopy() *LoadBalancer { + if in == nil { + return nil + } + out := new(LoadBalancer) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineNetworkEntry) DeepCopyInto(out *MachineNetworkEntry) { *out = *in diff --git a/vendor/github.com/openshift/assisted-service/client/operators/operators_client.go b/vendor/github.com/openshift/assisted-service/client/operators/operators_client.go index bdf725015..2386b4ff6 100644 --- a/vendor/github.com/openshift/assisted-service/client/operators/operators_client.go +++ b/vendor/github.com/openshift/assisted-service/client/operators/operators_client.go @@ -17,6 +17,16 @@ import ( // API is the interface of the operators client type API interface { + /* + V2GetBundle gets operator properties for a bundle + + Retrieves an array of operator properties for the specified bundle.*/ + V2GetBundle(ctx context.Context, params *V2GetBundleParams) (*V2GetBundleOK, error) + /* + V2ListBundles gets list of avaliable bundles + + Retrieves a list of avaliable bundles.*/ + V2ListBundles(ctx context.Context, params *V2ListBundlesParams) (*V2ListBundlesOK, error) /* V2ListOfClusterOperators Lists operators to be monitored for a cluster.*/ V2ListOfClusterOperators(ctx context.Context, params *V2ListOfClusterOperatorsParams) (*V2ListOfClusterOperatorsOK, error) @@ -49,6 +59,60 @@ type Client struct { authInfo runtime.ClientAuthInfoWriter } +/* +V2GetBundle gets operator properties for a bundle + +Retrieves an array of operator properties for the specified bundle. +*/ +func (a *Client) V2GetBundle(ctx context.Context, params *V2GetBundleParams) (*V2GetBundleOK, error) { + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V2GetBundle", + Method: "GET", + PathPattern: "/v2/operators/bundles/{bundle_name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V2GetBundleReader{formats: a.formats}, + AuthInfo: a.authInfo, + Context: ctx, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + return result.(*V2GetBundleOK), nil + +} + +/* +V2ListBundles gets list of avaliable bundles + +Retrieves a list of avaliable bundles. +*/ +func (a *Client) V2ListBundles(ctx context.Context, params *V2ListBundlesParams) (*V2ListBundlesOK, error) { + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V2ListBundles", + Method: "GET", + PathPattern: "/v2/operators/bundles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V2ListBundlesReader{formats: a.formats}, + AuthInfo: a.authInfo, + Context: ctx, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + return result.(*V2ListBundlesOK), nil + +} + /* V2ListOfClusterOperators Lists operators to be monitored for a cluster. */ diff --git a/vendor/github.com/openshift/assisted-service/client/operators/v2_get_bundle_parameters.go b/vendor/github.com/openshift/assisted-service/client/operators/v2_get_bundle_parameters.go new file mode 100644 index 000000000..e67860517 --- /dev/null +++ b/vendor/github.com/openshift/assisted-service/client/operators/v2_get_bundle_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operators + +// 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" +) + +// NewV2GetBundleParams creates a new V2GetBundleParams 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 NewV2GetBundleParams() *V2GetBundleParams { + return &V2GetBundleParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV2GetBundleParamsWithTimeout creates a new V2GetBundleParams object +// with the ability to set a timeout on a request. +func NewV2GetBundleParamsWithTimeout(timeout time.Duration) *V2GetBundleParams { + return &V2GetBundleParams{ + timeout: timeout, + } +} + +// NewV2GetBundleParamsWithContext creates a new V2GetBundleParams object +// with the ability to set a context for a request. +func NewV2GetBundleParamsWithContext(ctx context.Context) *V2GetBundleParams { + return &V2GetBundleParams{ + Context: ctx, + } +} + +// NewV2GetBundleParamsWithHTTPClient creates a new V2GetBundleParams object +// with the ability to set a custom HTTPClient for a request. +func NewV2GetBundleParamsWithHTTPClient(client *http.Client) *V2GetBundleParams { + return &V2GetBundleParams{ + HTTPClient: client, + } +} + +/* +V2GetBundleParams contains all the parameters to send to the API endpoint + + for the v2 get bundle operation. + + Typically these are written to a http.Request. +*/ +type V2GetBundleParams struct { + + /* BundleName. + + The name of the bundle. + */ + BundleName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v2 get bundle params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V2GetBundleParams) WithDefaults() *V2GetBundleParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v2 get bundle params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V2GetBundleParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v2 get bundle params +func (o *V2GetBundleParams) WithTimeout(timeout time.Duration) *V2GetBundleParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v2 get bundle params +func (o *V2GetBundleParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v2 get bundle params +func (o *V2GetBundleParams) WithContext(ctx context.Context) *V2GetBundleParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v2 get bundle params +func (o *V2GetBundleParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v2 get bundle params +func (o *V2GetBundleParams) WithHTTPClient(client *http.Client) *V2GetBundleParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v2 get bundle params +func (o *V2GetBundleParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBundleName adds the bundleName to the v2 get bundle params +func (o *V2GetBundleParams) WithBundleName(bundleName string) *V2GetBundleParams { + o.SetBundleName(bundleName) + return o +} + +// SetBundleName adds the bundleName to the v2 get bundle params +func (o *V2GetBundleParams) SetBundleName(bundleName string) { + o.BundleName = bundleName +} + +// WriteToRequest writes these params to a swagger request +func (o *V2GetBundleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param bundle_name + if err := r.SetPathParam("bundle_name", o.BundleName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/openshift/assisted-service/client/operators/v2_get_bundle_responses.go b/vendor/github.com/openshift/assisted-service/client/operators/v2_get_bundle_responses.go new file mode 100644 index 000000000..4de656c1f --- /dev/null +++ b/vendor/github.com/openshift/assisted-service/client/operators/v2_get_bundle_responses.go @@ -0,0 +1,236 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operators + +// 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" +) + +// V2GetBundleReader is a Reader for the V2GetBundle structure. +type V2GetBundleReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V2GetBundleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV2GetBundleOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 404: + result := NewV2GetBundleNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV2GetBundleInternalServerError() + 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()) + } +} + +// NewV2GetBundleOK creates a V2GetBundleOK with default headers values +func NewV2GetBundleOK() *V2GetBundleOK { + return &V2GetBundleOK{} +} + +/* +V2GetBundleOK describes a response with status code 200, with default header values. + +Success +*/ +type V2GetBundleOK struct { + Payload *models.Bundle +} + +// IsSuccess returns true when this v2 get bundle o k response has a 2xx status code +func (o *V2GetBundleOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v2 get bundle o k response has a 3xx status code +func (o *V2GetBundleOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v2 get bundle o k response has a 4xx status code +func (o *V2GetBundleOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v2 get bundle o k response has a 5xx status code +func (o *V2GetBundleOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v2 get bundle o k response a status code equal to that given +func (o *V2GetBundleOK) IsCode(code int) bool { + return code == 200 +} + +func (o *V2GetBundleOK) Error() string { + return fmt.Sprintf("[GET /v2/operators/bundles/{bundle_name}][%d] v2GetBundleOK %+v", 200, o.Payload) +} + +func (o *V2GetBundleOK) String() string { + return fmt.Sprintf("[GET /v2/operators/bundles/{bundle_name}][%d] v2GetBundleOK %+v", 200, o.Payload) +} + +func (o *V2GetBundleOK) GetPayload() *models.Bundle { + return o.Payload +} + +func (o *V2GetBundleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Bundle) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV2GetBundleNotFound creates a V2GetBundleNotFound with default headers values +func NewV2GetBundleNotFound() *V2GetBundleNotFound { + return &V2GetBundleNotFound{} +} + +/* +V2GetBundleNotFound describes a response with status code 404, with default header values. + +Bundle not found +*/ +type V2GetBundleNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v2 get bundle not found response has a 2xx status code +func (o *V2GetBundleNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v2 get bundle not found response has a 3xx status code +func (o *V2GetBundleNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v2 get bundle not found response has a 4xx status code +func (o *V2GetBundleNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v2 get bundle not found response has a 5xx status code +func (o *V2GetBundleNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v2 get bundle not found response a status code equal to that given +func (o *V2GetBundleNotFound) IsCode(code int) bool { + return code == 404 +} + +func (o *V2GetBundleNotFound) Error() string { + return fmt.Sprintf("[GET /v2/operators/bundles/{bundle_name}][%d] v2GetBundleNotFound %+v", 404, o.Payload) +} + +func (o *V2GetBundleNotFound) String() string { + return fmt.Sprintf("[GET /v2/operators/bundles/{bundle_name}][%d] v2GetBundleNotFound %+v", 404, o.Payload) +} + +func (o *V2GetBundleNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V2GetBundleNotFound) 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 +} + +// NewV2GetBundleInternalServerError creates a V2GetBundleInternalServerError with default headers values +func NewV2GetBundleInternalServerError() *V2GetBundleInternalServerError { + return &V2GetBundleInternalServerError{} +} + +/* +V2GetBundleInternalServerError describes a response with status code 500, with default header values. + +Internal server error +*/ +type V2GetBundleInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v2 get bundle internal server error response has a 2xx status code +func (o *V2GetBundleInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v2 get bundle internal server error response has a 3xx status code +func (o *V2GetBundleInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v2 get bundle internal server error response has a 4xx status code +func (o *V2GetBundleInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v2 get bundle internal server error response has a 5xx status code +func (o *V2GetBundleInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v2 get bundle internal server error response a status code equal to that given +func (o *V2GetBundleInternalServerError) IsCode(code int) bool { + return code == 500 +} + +func (o *V2GetBundleInternalServerError) Error() string { + return fmt.Sprintf("[GET /v2/operators/bundles/{bundle_name}][%d] v2GetBundleInternalServerError %+v", 500, o.Payload) +} + +func (o *V2GetBundleInternalServerError) String() string { + return fmt.Sprintf("[GET /v2/operators/bundles/{bundle_name}][%d] v2GetBundleInternalServerError %+v", 500, o.Payload) +} + +func (o *V2GetBundleInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V2GetBundleInternalServerError) 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/client/operators/v2_list_bundles_parameters.go b/vendor/github.com/openshift/assisted-service/client/operators/v2_list_bundles_parameters.go new file mode 100644 index 000000000..9436da5fd --- /dev/null +++ b/vendor/github.com/openshift/assisted-service/client/operators/v2_list_bundles_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operators + +// 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" +) + +// NewV2ListBundlesParams creates a new V2ListBundlesParams 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 NewV2ListBundlesParams() *V2ListBundlesParams { + return &V2ListBundlesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV2ListBundlesParamsWithTimeout creates a new V2ListBundlesParams object +// with the ability to set a timeout on a request. +func NewV2ListBundlesParamsWithTimeout(timeout time.Duration) *V2ListBundlesParams { + return &V2ListBundlesParams{ + timeout: timeout, + } +} + +// NewV2ListBundlesParamsWithContext creates a new V2ListBundlesParams object +// with the ability to set a context for a request. +func NewV2ListBundlesParamsWithContext(ctx context.Context) *V2ListBundlesParams { + return &V2ListBundlesParams{ + Context: ctx, + } +} + +// NewV2ListBundlesParamsWithHTTPClient creates a new V2ListBundlesParams object +// with the ability to set a custom HTTPClient for a request. +func NewV2ListBundlesParamsWithHTTPClient(client *http.Client) *V2ListBundlesParams { + return &V2ListBundlesParams{ + HTTPClient: client, + } +} + +/* +V2ListBundlesParams contains all the parameters to send to the API endpoint + + for the v2 list bundles operation. + + Typically these are written to a http.Request. +*/ +type V2ListBundlesParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v2 list bundles params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V2ListBundlesParams) WithDefaults() *V2ListBundlesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v2 list bundles params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V2ListBundlesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v2 list bundles params +func (o *V2ListBundlesParams) WithTimeout(timeout time.Duration) *V2ListBundlesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v2 list bundles params +func (o *V2ListBundlesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v2 list bundles params +func (o *V2ListBundlesParams) WithContext(ctx context.Context) *V2ListBundlesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v2 list bundles params +func (o *V2ListBundlesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v2 list bundles params +func (o *V2ListBundlesParams) WithHTTPClient(client *http.Client) *V2ListBundlesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v2 list bundles params +func (o *V2ListBundlesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V2ListBundlesParams) 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/operators/v2_list_bundles_responses.go b/vendor/github.com/openshift/assisted-service/client/operators/v2_list_bundles_responses.go new file mode 100644 index 000000000..7422fa0f4 --- /dev/null +++ b/vendor/github.com/openshift/assisted-service/client/operators/v2_list_bundles_responses.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operators + +// 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" +) + +// V2ListBundlesReader is a Reader for the V2ListBundles structure. +type V2ListBundlesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V2ListBundlesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV2ListBundlesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 500: + result := NewV2ListBundlesInternalServerError() + 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()) + } +} + +// NewV2ListBundlesOK creates a V2ListBundlesOK with default headers values +func NewV2ListBundlesOK() *V2ListBundlesOK { + return &V2ListBundlesOK{} +} + +/* +V2ListBundlesOK describes a response with status code 200, with default header values. + +Success +*/ +type V2ListBundlesOK struct { + Payload []string +} + +// IsSuccess returns true when this v2 list bundles o k response has a 2xx status code +func (o *V2ListBundlesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v2 list bundles o k response has a 3xx status code +func (o *V2ListBundlesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v2 list bundles o k response has a 4xx status code +func (o *V2ListBundlesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v2 list bundles o k response has a 5xx status code +func (o *V2ListBundlesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v2 list bundles o k response a status code equal to that given +func (o *V2ListBundlesOK) IsCode(code int) bool { + return code == 200 +} + +func (o *V2ListBundlesOK) Error() string { + return fmt.Sprintf("[GET /v2/operators/bundles][%d] v2ListBundlesOK %+v", 200, o.Payload) +} + +func (o *V2ListBundlesOK) String() string { + return fmt.Sprintf("[GET /v2/operators/bundles][%d] v2ListBundlesOK %+v", 200, o.Payload) +} + +func (o *V2ListBundlesOK) GetPayload() []string { + return o.Payload +} + +func (o *V2ListBundlesOK) 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 +} + +// NewV2ListBundlesInternalServerError creates a V2ListBundlesInternalServerError with default headers values +func NewV2ListBundlesInternalServerError() *V2ListBundlesInternalServerError { + return &V2ListBundlesInternalServerError{} +} + +/* +V2ListBundlesInternalServerError describes a response with status code 500, with default header values. + +Internal server error +*/ +type V2ListBundlesInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v2 list bundles internal server error response has a 2xx status code +func (o *V2ListBundlesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v2 list bundles internal server error response has a 3xx status code +func (o *V2ListBundlesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v2 list bundles internal server error response has a 4xx status code +func (o *V2ListBundlesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v2 list bundles internal server error response has a 5xx status code +func (o *V2ListBundlesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v2 list bundles internal server error response a status code equal to that given +func (o *V2ListBundlesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +func (o *V2ListBundlesInternalServerError) Error() string { + return fmt.Sprintf("[GET /v2/operators/bundles][%d] v2ListBundlesInternalServerError %+v", 500, o.Payload) +} + +func (o *V2ListBundlesInternalServerError) String() string { + return fmt.Sprintf("[GET /v2/operators/bundles][%d] v2ListBundlesInternalServerError %+v", 500, o.Payload) +} + +func (o *V2ListBundlesInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V2ListBundlesInternalServerError) 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/bundle.go b/vendor/github.com/openshift/assisted-service/models/bundle.go new file mode 100644 index 000000000..ca52accc4 --- /dev/null +++ b/vendor/github.com/openshift/assisted-service/models/bundle.go @@ -0,0 +1,53 @@ +// 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" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Bundle bundle +// +// swagger:model bundle +type Bundle struct { + + // The name of the bundle. + Name string `json:"name,omitempty"` + + // List of operators associated with the bundle. + Operators []string `json:"operators"` +} + +// Validate validates this bundle +func (m *Bundle) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this bundle based on context it is used +func (m *Bundle) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Bundle) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Bundle) UnmarshalBinary(b []byte) error { + var res Bundle + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/openshift/assisted-service/models/cluster.go b/vendor/github.com/openshift/assisted-service/models/cluster.go index dac19159b..b8f7b4276 100644 --- a/vendor/github.com/openshift/assisted-service/models/cluster.go +++ b/vendor/github.com/openshift/assisted-service/models/cluster.go @@ -174,6 +174,9 @@ type Cluster struct { // last installation preparation LastInstallationPreparation LastInstallationPreparation `json:"last-installation-preparation,omitempty" gorm:"embedded;embeddedPrefix:last_installation_preparation_"` + // load balancer + LoadBalancer *LoadBalancer `json:"load_balancer,omitempty" gorm:"embedded;embeddedPrefix:load_balancer_"` + // The progress of log collection or empty if logs are not applicable LogsInfo LogsState `json:"logs_info,omitempty" gorm:"type:varchar(2048)"` @@ -375,6 +378,10 @@ func (m *Cluster) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLoadBalancer(formats); err != nil { + res = append(res, err) + } + if err := m.validateLogsInfo(formats); err != nil { res = append(res, err) } @@ -951,6 +958,25 @@ func (m *Cluster) validateLastInstallationPreparation(formats strfmt.Registry) e return nil } +func (m *Cluster) validateLoadBalancer(formats strfmt.Registry) error { + if swag.IsZero(m.LoadBalancer) { // not required + return nil + } + + if m.LoadBalancer != nil { + if err := m.LoadBalancer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("load_balancer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("load_balancer") + } + return err + } + } + + return nil +} + func (m *Cluster) validateLogsInfo(formats strfmt.Registry) error { if swag.IsZero(m.LogsInfo) { // not required return nil @@ -1305,6 +1331,10 @@ func (m *Cluster) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } + if err := m.contextValidateLoadBalancer(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateLogsInfo(ctx, formats); err != nil { res = append(res, err) } @@ -1497,6 +1527,22 @@ func (m *Cluster) contextValidateLastInstallationPreparation(ctx context.Context return nil } +func (m *Cluster) contextValidateLoadBalancer(ctx context.Context, formats strfmt.Registry) error { + + if m.LoadBalancer != nil { + if err := m.LoadBalancer.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("load_balancer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("load_balancer") + } + return err + } + } + + return nil +} + func (m *Cluster) contextValidateLogsInfo(ctx context.Context, formats strfmt.Registry) error { if err := m.LogsInfo.ContextValidate(ctx, formats); err != nil { diff --git a/vendor/github.com/openshift/assisted-service/models/cluster_create_params.go b/vendor/github.com/openshift/assisted-service/models/cluster_create_params.go index 6adafe4b3..e29d60626 100644 --- a/vendor/github.com/openshift/assisted-service/models/cluster_create_params.go +++ b/vendor/github.com/openshift/assisted-service/models/cluster_create_params.go @@ -78,6 +78,9 @@ type ClusterCreateParams struct { // The virtual IPs used for cluster ingress traffic. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks. IngressVips []*IngressVip `json:"ingress_vips"` + // load balancer + LoadBalancer *LoadBalancer `json:"load_balancer,omitempty" gorm:"embedded;embeddedPrefix:load_balancer_"` + // Machine networks that are associated with this cluster. MachineNetworks []*MachineNetwork `json:"machine_networks"` @@ -178,6 +181,10 @@ func (m *ClusterCreateParams) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLoadBalancer(formats); err != nil { + res = append(res, err) + } + if err := m.validateMachineNetworks(formats); err != nil { res = append(res, err) } @@ -508,6 +515,25 @@ func (m *ClusterCreateParams) validateIngressVips(formats strfmt.Registry) error return nil } +func (m *ClusterCreateParams) validateLoadBalancer(formats strfmt.Registry) error { + if swag.IsZero(m.LoadBalancer) { // not required + return nil + } + + if m.LoadBalancer != nil { + if err := m.LoadBalancer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("load_balancer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("load_balancer") + } + return err + } + } + + return nil +} + func (m *ClusterCreateParams) validateMachineNetworks(formats strfmt.Registry) error { if swag.IsZero(m.MachineNetworks) { // not required return nil @@ -718,6 +744,10 @@ func (m *ClusterCreateParams) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } + if err := m.contextValidateLoadBalancer(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateMachineNetworks(ctx, formats); err != nil { res = append(res, err) } @@ -832,6 +862,22 @@ func (m *ClusterCreateParams) contextValidateIngressVips(ctx context.Context, fo return nil } +func (m *ClusterCreateParams) contextValidateLoadBalancer(ctx context.Context, formats strfmt.Registry) error { + + if m.LoadBalancer != nil { + if err := m.LoadBalancer.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("load_balancer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("load_balancer") + } + return err + } + } + + return nil +} + func (m *ClusterCreateParams) contextValidateMachineNetworks(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.MachineNetworks); i++ { diff --git a/vendor/github.com/openshift/assisted-service/models/cluster_validation_id.go b/vendor/github.com/openshift/assisted-service/models/cluster_validation_id.go index 6d66947ed..008ff560f 100644 --- a/vendor/github.com/openshift/assisted-service/models/cluster_validation_id.go +++ b/vendor/github.com/openshift/assisted-service/models/cluster_validation_id.go @@ -99,6 +99,9 @@ const ( // ClusterValidationIDMtvRequirementsSatisfied captures enum value "mtv-requirements-satisfied" ClusterValidationIDMtvRequirementsSatisfied ClusterValidationID = "mtv-requirements-satisfied" + // ClusterValidationIDOscRequirementsSatisfied captures enum value "osc-requirements-satisfied" + ClusterValidationIDOscRequirementsSatisfied ClusterValidationID = "osc-requirements-satisfied" + // ClusterValidationIDNetworkTypeValid captures enum value "network-type-valid" ClusterValidationIDNetworkTypeValid ClusterValidationID = "network-type-valid" @@ -132,7 +135,7 @@ var clusterValidationIdEnum []interface{} func init() { var res []ClusterValidationID - if err := json.Unmarshal([]byte(`["machine-cidr-defined","cluster-cidr-defined","service-cidr-defined","no-cidrs-overlapping","networks-same-address-families","network-prefix-valid","machine-cidr-equals-to-calculated-cidr","api-vips-defined","api-vips-valid","ingress-vips-defined","ingress-vips-valid","all-hosts-are-ready-to-install","sufficient-masters-count","dns-domain-defined","pull-secret-set","ntp-server-configured","lso-requirements-satisfied","ocs-requirements-satisfied","odf-requirements-satisfied","cnv-requirements-satisfied","lvm-requirements-satisfied","mce-requirements-satisfied","mtv-requirements-satisfied","network-type-valid","platform-requirements-satisfied","node-feature-discovery-requirements-satisfied","nvidia-gpu-requirements-satisfied","pipelines-requirements-satisfied","servicemesh-requirements-satisfied","serverless-requirements-satisfied","openshift-ai-requirements-satisfied","authorino-requirements-satisfied"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["machine-cidr-defined","cluster-cidr-defined","service-cidr-defined","no-cidrs-overlapping","networks-same-address-families","network-prefix-valid","machine-cidr-equals-to-calculated-cidr","api-vips-defined","api-vips-valid","ingress-vips-defined","ingress-vips-valid","all-hosts-are-ready-to-install","sufficient-masters-count","dns-domain-defined","pull-secret-set","ntp-server-configured","lso-requirements-satisfied","ocs-requirements-satisfied","odf-requirements-satisfied","cnv-requirements-satisfied","lvm-requirements-satisfied","mce-requirements-satisfied","mtv-requirements-satisfied","osc-requirements-satisfied","network-type-valid","platform-requirements-satisfied","node-feature-discovery-requirements-satisfied","nvidia-gpu-requirements-satisfied","pipelines-requirements-satisfied","servicemesh-requirements-satisfied","serverless-requirements-satisfied","openshift-ai-requirements-satisfied","authorino-requirements-satisfied"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/vendor/github.com/openshift/assisted-service/models/feature_support_level_id.go b/vendor/github.com/openshift/assisted-service/models/feature_support_level_id.go index 9e14e6411..cdc4e3239 100644 --- a/vendor/github.com/openshift/assisted-service/models/feature_support_level_id.go +++ b/vendor/github.com/openshift/assisted-service/models/feature_support_level_id.go @@ -60,6 +60,9 @@ const ( // FeatureSupportLevelIDMTV captures enum value "MTV" FeatureSupportLevelIDMTV FeatureSupportLevelID = "MTV" + // FeatureSupportLevelIDOSC captures enum value "OSC" + FeatureSupportLevelIDOSC FeatureSupportLevelID = "OSC" + // FeatureSupportLevelIDNUTANIXINTEGRATION captures enum value "NUTANIX_INTEGRATION" FeatureSupportLevelIDNUTANIXINTEGRATION FeatureSupportLevelID = "NUTANIX_INTEGRATION" @@ -131,6 +134,9 @@ const ( // FeatureSupportLevelIDAUTHORINO captures enum value "AUTHORINO" FeatureSupportLevelIDAUTHORINO FeatureSupportLevelID = "AUTHORINO" + + // FeatureSupportLevelIDUSERMANAGEDLOADBALANCER captures enum value "USER_MANAGED_LOAD_BALANCER" + FeatureSupportLevelIDUSERMANAGEDLOADBALANCER FeatureSupportLevelID = "USER_MANAGED_LOAD_BALANCER" ) // for schema @@ -138,7 +144,7 @@ var featureSupportLevelIdEnum []interface{} func init() { var res []FeatureSupportLevelID - if err := json.Unmarshal([]byte(`["SNO","VIP_AUTO_ALLOC","CUSTOM_MANIFEST","SINGLE_NODE_EXPANSION","LVM","ODF","LSO","CNV","MCE","MTV","NUTANIX_INTEGRATION","BAREMETAL_PLATFORM","NONE_PLATFORM","VSPHERE_INTEGRATION","DUAL_STACK_VIPS","CLUSTER_MANAGED_NETWORKING","USER_MANAGED_NETWORKING","MINIMAL_ISO","FULL_ISO","EXTERNAL_PLATFORM_OCI","DUAL_STACK","PLATFORM_MANAGED_NETWORKING","SKIP_MCO_REBOOT","EXTERNAL_PLATFORM","OVN_NETWORK_TYPE","SDN_NETWORK_TYPE","NODE_FEATURE_DISCOVERY","NVIDIA_GPU","PIPELINES","SERVICEMESH","SERVERLESS","OPENSHIFT_AI","NON_STANDARD_HA_CONTROL_PLANE","AUTHORINO"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["SNO","VIP_AUTO_ALLOC","CUSTOM_MANIFEST","SINGLE_NODE_EXPANSION","LVM","ODF","LSO","CNV","MCE","MTV","OSC","NUTANIX_INTEGRATION","BAREMETAL_PLATFORM","NONE_PLATFORM","VSPHERE_INTEGRATION","DUAL_STACK_VIPS","CLUSTER_MANAGED_NETWORKING","USER_MANAGED_NETWORKING","MINIMAL_ISO","FULL_ISO","EXTERNAL_PLATFORM_OCI","DUAL_STACK","PLATFORM_MANAGED_NETWORKING","SKIP_MCO_REBOOT","EXTERNAL_PLATFORM","OVN_NETWORK_TYPE","SDN_NETWORK_TYPE","NODE_FEATURE_DISCOVERY","NVIDIA_GPU","PIPELINES","SERVICEMESH","SERVERLESS","OPENSHIFT_AI","NON_STANDARD_HA_CONTROL_PLANE","AUTHORINO","USER_MANAGED_LOAD_BALANCER"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/vendor/github.com/openshift/assisted-service/models/host_validation_id.go b/vendor/github.com/openshift/assisted-service/models/host_validation_id.go index 0ecb37276..c99e2319d 100644 --- a/vendor/github.com/openshift/assisted-service/models/host_validation_id.go +++ b/vendor/github.com/openshift/assisted-service/models/host_validation_id.go @@ -102,6 +102,9 @@ const ( // HostValidationIDMtvRequirementsSatisfied captures enum value "mtv-requirements-satisfied" HostValidationIDMtvRequirementsSatisfied HostValidationID = "mtv-requirements-satisfied" + // HostValidationIDOscRequirementsSatisfied captures enum value "osc-requirements-satisfied" + HostValidationIDOscRequirementsSatisfied HostValidationID = "osc-requirements-satisfied" + // HostValidationIDSufficientInstallationDiskSpeed captures enum value "sufficient-installation-disk-speed" HostValidationIDSufficientInstallationDiskSpeed HostValidationID = "sufficient-installation-disk-speed" @@ -189,7 +192,7 @@ var hostValidationIdEnum []interface{} func init() { var res []HostValidationID - if err := json.Unmarshal([]byte(`["connected","media-connected","has-inventory","has-min-cpu-cores","has-min-valid-disks","has-min-memory","machine-cidr-defined","has-cpu-cores-for-role","has-memory-for-role","hostname-unique","hostname-valid","belongs-to-machine-cidr","ignition-downloadable","belongs-to-majority-group","valid-platform-network-settings","ntp-synced","time-synced-between-host-and-service","container-images-available","lso-requirements-satisfied","ocs-requirements-satisfied","odf-requirements-satisfied","lvm-requirements-satisfied","mce-requirements-satisfied","mtv-requirements-satisfied","sufficient-installation-disk-speed","cnv-requirements-satisfied","sufficient-network-latency-requirement-for-role","sufficient-packet-loss-requirement-for-role","has-default-route","api-domain-name-resolved-correctly","api-int-domain-name-resolved-correctly","apps-domain-name-resolved-correctly","release-domain-name-resolved-correctly","compatible-with-cluster-platform","dns-wildcard-not-configured","disk-encryption-requirements-satisfied","non-overlapping-subnets","vsphere-disk-uuid-enabled","compatible-agent","no-skip-installation-disk","no-skip-missing-disk","no-ip-collisions-in-network","no-iscsi-nic-belongs-to-machine-cidr","node-feature-discovery-requirements-satisfied","nvidia-gpu-requirements-satisfied","pipelines-requirements-satisfied","servicemesh-requirements-satisfied","serverless-requirements-satisfied","openshift-ai-requirements-satisfied","authorino-requirements-satisfied","mtu-valid"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["connected","media-connected","has-inventory","has-min-cpu-cores","has-min-valid-disks","has-min-memory","machine-cidr-defined","has-cpu-cores-for-role","has-memory-for-role","hostname-unique","hostname-valid","belongs-to-machine-cidr","ignition-downloadable","belongs-to-majority-group","valid-platform-network-settings","ntp-synced","time-synced-between-host-and-service","container-images-available","lso-requirements-satisfied","ocs-requirements-satisfied","odf-requirements-satisfied","lvm-requirements-satisfied","mce-requirements-satisfied","mtv-requirements-satisfied","osc-requirements-satisfied","sufficient-installation-disk-speed","cnv-requirements-satisfied","sufficient-network-latency-requirement-for-role","sufficient-packet-loss-requirement-for-role","has-default-route","api-domain-name-resolved-correctly","api-int-domain-name-resolved-correctly","apps-domain-name-resolved-correctly","release-domain-name-resolved-correctly","compatible-with-cluster-platform","dns-wildcard-not-configured","disk-encryption-requirements-satisfied","non-overlapping-subnets","vsphere-disk-uuid-enabled","compatible-agent","no-skip-installation-disk","no-skip-missing-disk","no-ip-collisions-in-network","no-iscsi-nic-belongs-to-machine-cidr","node-feature-discovery-requirements-satisfied","nvidia-gpu-requirements-satisfied","pipelines-requirements-satisfied","servicemesh-requirements-satisfied","serverless-requirements-satisfied","openshift-ai-requirements-satisfied","authorino-requirements-satisfied","mtu-valid"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/vendor/github.com/openshift/assisted-service/models/install_cmd_request.go b/vendor/github.com/openshift/assisted-service/models/install_cmd_request.go index 4a9b4eae6..4ec6e462f 100644 --- a/vendor/github.com/openshift/assisted-service/models/install_cmd_request.go +++ b/vendor/github.com/openshift/assisted-service/models/install_cmd_request.go @@ -38,6 +38,9 @@ type InstallCmdRequest struct { // Pattern: ^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$ ControllerImage *string `json:"controller_image"` + // CoreOS container image to use if installing to the local device + CoreosImage string `json:"coreos_image,omitempty"` + // List of disks to format DisksToFormat []string `json:"disks_to_format"` diff --git a/vendor/github.com/openshift/assisted-service/models/load_balancer.go b/vendor/github.com/openshift/assisted-service/models/load_balancer.go new file mode 100644 index 000000000..8d4a4fe21 --- /dev/null +++ b/vendor/github.com/openshift/assisted-service/models/load_balancer.go @@ -0,0 +1,114 @@ +// 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" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// LoadBalancer load balancer +// +// swagger:model load_balancer +type LoadBalancer struct { + + // Indicates if the load balancer will be managed by the cluster or by the user. This is optional and The + // default is `cluster-managed`. + // + // `cluster-managed` means that the cluster will start the components that assign the API and ingress VIPs to the + // nodes of the cluster automatically. + // + // `user-managed` means that the user is responsible for configuring an external load balancer and assign the + // API and ingress VIPs to it. Note that this configuration needs to be completed before starting the + // installation of the cluster, as it is needed during the installation process. + // + // Enum: [cluster-managed user-managed] + Type string `json:"type,omitempty" gorm:"not null;check:load_balancer_type in ('cluster-managed', 'user-managed');default:'cluster-managed'"` +} + +// Validate validates this load balancer +func (m *LoadBalancer) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var loadBalancerTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["cluster-managed","user-managed"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + loadBalancerTypeTypePropEnum = append(loadBalancerTypeTypePropEnum, v) + } +} + +const ( + + // LoadBalancerTypeClusterManaged captures enum value "cluster-managed" + LoadBalancerTypeClusterManaged string = "cluster-managed" + + // LoadBalancerTypeUserManaged captures enum value "user-managed" + LoadBalancerTypeUserManaged string = "user-managed" +) + +// prop value enum +func (m *LoadBalancer) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, loadBalancerTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *LoadBalancer) validateType(formats strfmt.Registry) error { + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this load balancer based on context it is used +func (m *LoadBalancer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *LoadBalancer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *LoadBalancer) UnmarshalBinary(b []byte) error { + var res LoadBalancer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/openshift/assisted-service/models/monitored_operator.go b/vendor/github.com/openshift/assisted-service/models/monitored_operator.go index 75a127c92..43c2c5bbc 100644 --- a/vendor/github.com/openshift/assisted-service/models/monitored_operator.go +++ b/vendor/github.com/openshift/assisted-service/models/monitored_operator.go @@ -12,6 +12,7 @@ import ( "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" + "github.com/lib/pq" ) // MonitoredOperator monitored operator @@ -19,6 +20,9 @@ import ( // swagger:model monitored-operator type MonitoredOperator struct { + // List of bundles associated with the operator. Can be empty. + Bundles pq.StringArray `json:"bundles" gorm:"type:text[]"` + // The cluster that this operator is associated with. // Format: uuid ClusterID strfmt.UUID `json:"cluster_id,omitempty" gorm:"primaryKey"` diff --git a/vendor/github.com/openshift/assisted-service/models/v2_cluster_update_params.go b/vendor/github.com/openshift/assisted-service/models/v2_cluster_update_params.go index 6544b46a8..284733618 100644 --- a/vendor/github.com/openshift/assisted-service/models/v2_cluster_update_params.go +++ b/vendor/github.com/openshift/assisted-service/models/v2_cluster_update_params.go @@ -71,6 +71,9 @@ type V2ClusterUpdateParams struct { // The virtual IPs used for cluster ingress traffic. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks. IngressVips []*IngressVip `json:"ingress_vips"` + // load balancer + LoadBalancer *LoadBalancer `json:"load_balancer,omitempty" gorm:"embedded;embeddedPrefix:load_balancer_"` + // A CIDR that all hosts belonging to the cluster should have an interfaces with IP address that belongs to this CIDR. The api_vip belongs to this CIDR. // Pattern: ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$ MachineNetworkCidr *string `json:"machine_network_cidr,omitempty"` @@ -158,6 +161,10 @@ func (m *V2ClusterUpdateParams) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLoadBalancer(formats); err != nil { + res = append(res, err) + } + if err := m.validateMachineNetworkCidr(formats); err != nil { res = append(res, err) } @@ -388,6 +395,25 @@ func (m *V2ClusterUpdateParams) validateIngressVips(formats strfmt.Registry) err return nil } +func (m *V2ClusterUpdateParams) validateLoadBalancer(formats strfmt.Registry) error { + if swag.IsZero(m.LoadBalancer) { // not required + return nil + } + + if m.LoadBalancer != nil { + if err := m.LoadBalancer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("load_balancer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("load_balancer") + } + return err + } + } + + return nil +} + func (m *V2ClusterUpdateParams) validateMachineNetworkCidr(formats strfmt.Registry) error { if swag.IsZero(m.MachineNetworkCidr) { // not required return nil @@ -591,6 +617,10 @@ func (m *V2ClusterUpdateParams) ContextValidate(ctx context.Context, formats str res = append(res, err) } + if err := m.contextValidateLoadBalancer(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateMachineNetworks(ctx, formats); err != nil { res = append(res, err) } @@ -705,6 +735,22 @@ func (m *V2ClusterUpdateParams) contextValidateIngressVips(ctx context.Context, return nil } +func (m *V2ClusterUpdateParams) contextValidateLoadBalancer(ctx context.Context, formats strfmt.Registry) error { + + if m.LoadBalancer != nil { + if err := m.LoadBalancer.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("load_balancer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("load_balancer") + } + return err + } + } + + return nil +} + func (m *V2ClusterUpdateParams) contextValidateMachineNetworks(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.MachineNetworks); i++ { diff --git a/vendor/modules.txt b/vendor/modules.txt index 6517903d7..d76c6e364 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -526,11 +526,11 @@ github.com/openshift/assisted-service/restapi/operations/managed_domains github.com/openshift/assisted-service/restapi/operations/manifests github.com/openshift/assisted-service/restapi/operations/operators github.com/openshift/assisted-service/restapi/operations/versions -# github.com/openshift/assisted-service/api v0.0.0 => github.com/openshift/assisted-service/api v0.0.0-20241213170211-a5016f125538 +# github.com/openshift/assisted-service/api v0.0.0 => github.com/openshift/assisted-service/api v0.0.0-20250121194432-6bdc1336f21b ## explicit; go 1.21 github.com/openshift/assisted-service/api/common github.com/openshift/assisted-service/api/hiveextension/v1beta1 -# github.com/openshift/assisted-service/client v0.0.0 => github.com/openshift/assisted-service/client v0.0.0-20241213170211-a5016f125538 +# github.com/openshift/assisted-service/client v0.0.0 => github.com/openshift/assisted-service/client v0.0.0-20250121194432-6bdc1336f21b ## explicit; go 1.21 github.com/openshift/assisted-service/client github.com/openshift/assisted-service/client/events @@ -539,7 +539,7 @@ github.com/openshift/assisted-service/client/managed_domains github.com/openshift/assisted-service/client/manifests github.com/openshift/assisted-service/client/operators github.com/openshift/assisted-service/client/versions -# github.com/openshift/assisted-service/models v0.0.0 => github.com/openshift/assisted-service/models v0.0.0-20241213170211-a5016f125538 +# github.com/openshift/assisted-service/models v0.0.0 => github.com/openshift/assisted-service/models v0.0.0-20250121194432-6bdc1336f21b ## explicit; go 1.21 github.com/openshift/assisted-service/models # github.com/openshift/baremetal-runtimecfg v0.0.0-20220211165258-fe92b9507bec @@ -1153,8 +1153,8 @@ sigs.k8s.io/yaml/goyaml.v2 # github.com/metal3-io/baremetal-operator/apis => github.com/openshift/baremetal-operator/apis v0.0.0-20220217140404-6b1ecb71984f # github.com/metal3-io/baremetal-operator/pkg/hardwareutils => github.com/openshift/baremetal-operator/pkg/hardwareutils v0.0.0-20220217140404-6b1ecb71984f # github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.12 -# github.com/openshift/assisted-service/api => github.com/openshift/assisted-service/api v0.0.0-20241213170211-a5016f125538 -# github.com/openshift/assisted-service/client => github.com/openshift/assisted-service/client v0.0.0-20241213170211-a5016f125538 -# github.com/openshift/assisted-service/models => github.com/openshift/assisted-service/models v0.0.0-20241213170211-a5016f125538 +# github.com/openshift/assisted-service/api => github.com/openshift/assisted-service/api v0.0.0-20250121194432-6bdc1336f21b +# github.com/openshift/assisted-service/client => github.com/openshift/assisted-service/client v0.0.0-20250121194432-6bdc1336f21b +# github.com/openshift/assisted-service/models => github.com/openshift/assisted-service/models v0.0.0-20250121194432-6bdc1336f21b # sigs.k8s.io/cluster-api-provider-aws => github.com/openshift/cluster-api-provider-aws v0.2.1-0.20201022175424-d30c7a274820 # sigs.k8s.io/cluster-api-provider-azure => github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20201016155852-4090a6970205