From b3224ccd6d52cd179ccf87e926b501c080223aeb Mon Sep 17 00:00:00 2001 From: Christy Norman Date: Thu, 16 Sep 2021 16:55:44 -0500 Subject: [PATCH 1/2] Add IPI Support for IBM Power Virtual Servers Offering For more background on IPI on Power VS, refer to the enhancement proposal here: https://github.com/openshift/enhancements/pull/736 We have upstream support for Power VS in the API (https://github.com/openshift/enhancements/pull/736) and cluster api provider (https://github.com/openshift/cluster-api-provider-powervs). Other required work is actively ongoing in the community. Also actively worked is support for creating networking and boot images in a way that work with the OCP installer, so our present implemenation requires that these items be pre-created and passed in via the install-config. This is temporary and we will add support for IPI-creation of all required components. Since Power VS is an offering as part of IBM Cloud (but with seperate APIs for provisioning), we are able to re-use some of the ibmcloud provider funtionality. More info in the enhancement proposal on the need to have a completley seperate provider. Signed-off-by: Christy Norman Co-authored-by: Pradipta Banerjee Co-authored-by: Manjunath Kumatagi Co-authored-by: Mike Turek Co-authored-by: wolf Co-authored-by: Karthik K.N. --- OWNERS_ALIASES | 10 + .../install.openshift.io_installconfigs.yaml | 234 ++++++++++++++++++ data/data/powervs/bootstrap/main.tf | 88 +++++++ data/data/powervs/bootstrap/outputs.tf | 3 + data/data/powervs/bootstrap/variables.tf | 16 ++ data/data/powervs/dns/dns.tf | 31 +++ data/data/powervs/dns/variables.tf | 13 + data/data/powervs/iaas/power-iaas.tf | 22 ++ data/data/powervs/iaas/variables.tf | 28 +++ data/data/powervs/loadbalancer/alb.tf | 120 +++++++++ data/data/powervs/loadbalancer/outputs.tf | 7 + data/data/powervs/loadbalancer/sg.tf | 28 +++ data/data/powervs/loadbalancer/variables.tf | 9 + data/data/powervs/main.tf | 108 ++++++++ data/data/powervs/master/main.tf | 39 +++ data/data/powervs/master/outputs.tf | 3 + data/data/powervs/master/variables.tf | 14 ++ data/data/powervs/topology/pi_network.tf | 40 +++ data/data/powervs/variables-powervs.tf | 145 +++++++++++ go.mod | 5 + pkg/asset/cluster/cluster.go | 2 + pkg/asset/cluster/metadata.go | 4 + pkg/asset/cluster/powervs/powervs.go | 21 ++ pkg/asset/cluster/tfvars.go | 50 ++++ pkg/asset/installconfig/basedomain.go | 8 + pkg/asset/installconfig/installconfig.go | 7 +- pkg/asset/installconfig/platform.go | 7 + pkg/asset/installconfig/platformcredscheck.go | 5 + pkg/asset/installconfig/platformpermscheck.go | 5 + .../installconfig/platformprovisioncheck.go | 7 + pkg/asset/installconfig/powervs/metadata.go | 71 ++++++ pkg/asset/installconfig/powervs/platform.go | 29 +++ pkg/asset/installconfig/powervs/regions.go | 140 +++++++++++ pkg/asset/installconfig/powervs/session.go | 130 ++++++++++ pkg/asset/installconfig/powervs/validation.go | 8 + pkg/asset/machines/master.go | 19 ++ pkg/asset/machines/master_test.go | 52 ++++ pkg/asset/machines/powervs/machines.go | 106 ++++++++ pkg/asset/machines/powervs/machinesets.go | 96 +++++++ pkg/asset/machines/worker.go | 31 +++ pkg/asset/machines/worker_test.go | 50 ++++ pkg/asset/manifests/cloudproviderconfig.go | 3 +- pkg/asset/manifests/dns.go | 3 +- pkg/asset/manifests/infrastructure.go | 8 + pkg/asset/quota/quota.go | 3 +- pkg/asset/rhcos/image.go | 11 + pkg/explain/printer_test.go | 3 + pkg/rhcos/powervs_regions.go | 86 +++++++ pkg/terraform/exec/plugins/ibms3presign.go | 15 ++ .../exec/plugins/ibms3presign/provider.go | 15 ++ .../plugins/ibms3presign/resource_presign.go | 154 ++++++++++++ pkg/tfvars/powervs/powervs.go | 89 +++++++ pkg/types/clustermetadata.go | 5 + pkg/types/defaults/installconfig.go | 3 + pkg/types/installconfig.go | 8 + pkg/types/machinepools.go | 6 + pkg/types/powervs/OWNERS | 8 + pkg/types/powervs/defaults/platform.go | 9 + pkg/types/powervs/doc.go | 6 + pkg/types/powervs/machinepools.go | 69 ++++++ pkg/types/powervs/metadata.go | 8 + pkg/types/powervs/platform.go | 80 ++++++ pkg/types/powervs/validation/machinepool.go | 27 ++ pkg/types/powervs/validation/platform.go | 23 ++ pkg/types/validation/installconfig.go | 5 + pkg/types/validation/installconfig_test.go | 6 +- pkg/types/validation/machinepools.go | 5 + 67 files changed, 2462 insertions(+), 7 deletions(-) create mode 100644 data/data/powervs/bootstrap/main.tf create mode 100644 data/data/powervs/bootstrap/outputs.tf create mode 100644 data/data/powervs/bootstrap/variables.tf create mode 100644 data/data/powervs/dns/dns.tf create mode 100644 data/data/powervs/dns/variables.tf create mode 100644 data/data/powervs/iaas/power-iaas.tf create mode 100644 data/data/powervs/iaas/variables.tf create mode 100644 data/data/powervs/loadbalancer/alb.tf create mode 100644 data/data/powervs/loadbalancer/outputs.tf create mode 100644 data/data/powervs/loadbalancer/sg.tf create mode 100644 data/data/powervs/loadbalancer/variables.tf create mode 100644 data/data/powervs/main.tf create mode 100644 data/data/powervs/master/main.tf create mode 100644 data/data/powervs/master/outputs.tf create mode 100644 data/data/powervs/master/variables.tf create mode 100644 data/data/powervs/topology/pi_network.tf create mode 100644 data/data/powervs/variables-powervs.tf create mode 100644 pkg/asset/cluster/powervs/powervs.go create mode 100644 pkg/asset/installconfig/powervs/metadata.go create mode 100644 pkg/asset/installconfig/powervs/platform.go create mode 100644 pkg/asset/installconfig/powervs/regions.go create mode 100644 pkg/asset/installconfig/powervs/session.go create mode 100644 pkg/asset/installconfig/powervs/validation.go create mode 100644 pkg/asset/machines/powervs/machines.go create mode 100644 pkg/asset/machines/powervs/machinesets.go create mode 100644 pkg/rhcos/powervs_regions.go create mode 100644 pkg/terraform/exec/plugins/ibms3presign.go create mode 100644 pkg/terraform/exec/plugins/ibms3presign/provider.go create mode 100644 pkg/terraform/exec/plugins/ibms3presign/resource_presign.go create mode 100644 pkg/tfvars/powervs/powervs.go create mode 100644 pkg/types/powervs/OWNERS create mode 100644 pkg/types/powervs/defaults/platform.go create mode 100644 pkg/types/powervs/doc.go create mode 100644 pkg/types/powervs/machinepools.go create mode 100644 pkg/types/powervs/metadata.go create mode 100644 pkg/types/powervs/platform.go create mode 100644 pkg/types/powervs/validation/machinepool.go create mode 100644 pkg/types/powervs/validation/platform.go diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index e10bb69be3c..fb7309b3e23 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -36,6 +36,16 @@ aliases: - mandre - mdbooth - pierreprinetti + powervs-approvers: + - Prashanth684 + - clnperez + - mkumatag + powervs-reviewers: + - 23TNC + - clnperez + - mjturek + - mkumatag + - Prashanth684 vsphere-approvers: - dav1x - jcpowermac diff --git a/data/data/install.openshift.io_installconfigs.yaml b/data/data/install.openshift.io_installconfigs.yaml index 6d58be6dba1..795a18dec5e 100644 --- a/data/data/install.openshift.io_installconfigs.yaml +++ b/data/data/install.openshift.io_installconfigs.yaml @@ -434,6 +434,58 @@ spec: - high_performance type: string type: object + powervs: + description: PowerVS is the configuration used when installing + on IBM Power VS. + properties: + imageName: + description: ImageName defines the boot image name for the + instance. + type: string + keypairname: + description: KeyPairName is the name of an SSH key pair + stored in the Power VS Service Instance + type: string + memory: + description: Memory defines the memory in GB for the instance. + type: integer + name: + description: Name is the name of the instance + type: string + networkIDs: + description: NetworkIDs defines the network IDs of the instance. + items: + type: string + type: array + procType: + description: ProcType defines the processor sharing model + for the instance. + type: string + processors: + description: 'Processors defines the processing units for + the instance. @TODO:' + serviceinstance: + description: ServiceInstance is Service Instance to install + into. + type: string + sysType: + description: SysType defines the system type for instance. + type: string + volumeIDs: + description: VolumeIDs is the list of volumes attached to + the instance. + items: + type: string + type: array + required: + - imageName + - keypairname + - memory + - name + - networkIDs + - processors + - serviceinstance + type: object vsphere: description: VSphere is the configuration used when installing on vSphere. @@ -859,6 +911,58 @@ spec: - high_performance type: string type: object + powervs: + description: PowerVS is the configuration used when installing + on IBM Power VS. + properties: + imageName: + description: ImageName defines the boot image name for the + instance. + type: string + keypairname: + description: KeyPairName is the name of an SSH key pair stored + in the Power VS Service Instance + type: string + memory: + description: Memory defines the memory in GB for the instance. + type: integer + name: + description: Name is the name of the instance + type: string + networkIDs: + description: NetworkIDs defines the network IDs of the instance. + items: + type: string + type: array + procType: + description: ProcType defines the processor sharing model + for the instance. + type: string + processors: + description: 'Processors defines the processing units for + the instance. @TODO:' + serviceinstance: + description: ServiceInstance is Service Instance to install + into. + type: string + sysType: + description: SysType defines the system type for instance. + type: string + volumeIDs: + description: VolumeIDs is the list of volumes attached to + the instance. + items: + type: string + type: array + required: + - imageName + - keypairname + - memory + - name + - networkIDs + - processors + - serviceinstance + type: object vsphere: description: VSphere is the configuration used when installing on vSphere. @@ -2059,6 +2163,136 @@ spec: - ovirt_cluster_id - ovirt_storage_domain_id type: object + powervs: + description: PowerVS is the configuration used when installing on + Power VS. + properties: + APIKey: + description: APIKey is the API key for the user's IBM Cloud account. + type: string + SSHKeyName: + description: SSHKeyName is the name of an SSH key stored in the + Service Instance. + type: string + bootstrapOSImage: + description: BootstrapOSImage is a pre-created boot image to override + the default OS image for the bootstrap node. + type: string + clusterOSImage: + description: "ClusterOSImage is a pre-created Power VS boot image + that overrides the default image for cluster nodes. \n @TODO: + make this +optional, add omitempty when we have TF support" + type: string + defaultMachinePlatform: + description: DefaultMachinePlatform is the default configuration + used when installing on Power VS for machine pools which do + not define their own platform configuration. + properties: + imageName: + description: ImageName defines the boot image name for the + instance. + type: string + keypairname: + description: KeyPairName is the name of an SSH key pair stored + in the Power VS Service Instance + type: string + memory: + description: Memory defines the memory in GB for the instance. + type: integer + name: + description: Name is the name of the instance + type: string + networkIDs: + description: NetworkIDs defines the network IDs of the instance. + items: + type: string + type: array + procType: + description: ProcType defines the processor sharing model + for the instance. + type: string + processors: + description: 'Processors defines the processing units for + the instance. @TODO:' + serviceinstance: + description: ServiceInstance is Service Instance to install + into. + type: string + sysType: + description: SysType defines the system type for instance. + type: string + volumeIDs: + description: VolumeIDs is the list of volumes attached to + the instance. + items: + type: string + type: array + required: + - imageName + - keypairname + - memory + - name + - networkIDs + - processors + - serviceinstance + type: object + powervsResourceGroup: + description: PowerVSResourceGroup is the resource group for creating + Power VS resources. + type: string + pvsNetworkName: + description: 'PVSNetworkName specifies an existing network within + the Power VS Service Instance. @TODO: make this +optional when + we have TF support' + type: string + region: + description: Region specifies the IBM Cloud region where the cluster + will be created. + type: string + serviceInstance: + description: ServiceInstanceID is the ID of the Power IAAS instance + created from the IBM Cloud Catalog + type: string + subnets: + description: "Subnets specifies existing subnets (by ID) where + cluster resources will be created. Leave unset to have the + installer create subnets in a new VPC on your behalf. @TODO: + Rename VPCSubnetID & make into string \n @TODO: make this +optional + when we have TF support" + items: + type: string + type: array + userID: + description: UserID is the login for the user's IBM Cloud account. + type: string + userTags: + additionalProperties: + type: string + description: UserTags additional keys and values that the installer + will add as tags to all resources that it creates. Resources + created by the cluster itself may not include these tags. + type: object + vpc: + description: "VPC is a VPC inside IBM Cloud. Needed in order to + create VPC Load Balancers. \n @TODO: make this +optional when + we have TF support" + type: string + vpcRegion: + description: Zone in the region used to create VPC resources. + Leave unset to allow installer to randomly select a zone. + type: string + zone: + description: Zone specifies the IBM Cloud colo region where the + cluster will be created. Required for multi-zone regions. + type: string + required: + - clusterOSImage + - powervsResourceGroup + - region + - serviceInstance + - userID + - zone + type: object vsphere: description: VSphere is the configuration used when installing on vSphere. diff --git a/data/data/powervs/bootstrap/main.tf b/data/data/powervs/bootstrap/main.tf new file mode 100644 index 00000000000..72346f55e84 --- /dev/null +++ b/data/data/powervs/bootstrap/main.tf @@ -0,0 +1,88 @@ +# TODO(mjturek): network and image data blocks can be in main module +# as master and bootstrap will be using the same +# network and image. Once we add in master module, make +# the move. +data "ibm_pi_network" "network" { + pi_network_name = var.network_name + pi_cloud_instance_id = var.cloud_instance_id +} + +data "ibm_pi_image" "bootstrap_image" { + pi_image_name = var.image_name + pi_cloud_instance_id = var.cloud_instance_id +} + +data "ignition_config" "bootstrap" { + merge { + source = ibms3presign.bootstrap_ignition.presigned_url + } +} + +data "ibm_resource_group" "cos_group" { + name = var.resource_group +} + +resource "ibm_resource_instance" "cos_instance" { + name = "${var.cluster_id}-cos" + resource_group_id = data.ibm_resource_group.cos_group.id + service = "cloud-object-storage" + plan = "standard" + location = var.cos_instance_location + tags = [var.cluster_id] +} + +# Create an IBM COS Bucket to store ignition +resource "ibm_cos_bucket" "ignition" { + bucket_name = "${var.cluster_id}-bootstrap-ign" + resource_instance_id = ibm_resource_instance.cos_instance.id + region_location = var.cos_bucket_location + storage_class = var.cos_storage_class +} + +resource "ibm_resource_key" "cos_service_cred" { + name = "${var.cluster_id}-cred" + role = "Reader" + resource_instance_id = ibm_resource_instance.cos_instance.id + parameters = { HMAC = true } +} + +resource "ibms3presign" "bootstrap_ignition" { + access_key_id = ibm_resource_key.cos_service_cred.credentials["cos_hmac_keys.access_key_id"] + secret_access_key = ibm_resource_key.cos_service_cred.credentials["cos_hmac_keys.secret_access_key"] + bucket_name = "${var.cluster_id}-bootstrap-ign" + key = "bootstrap.ign" + region_location = ibm_cos_bucket.ignition.region_location + storage_class = ibm_cos_bucket.ignition.storage_class +} + +# Place the bootstrap ignition file in the ignition COS bucket +resource "ibm_cos_bucket_object" "ignition" { + bucket_crn = ibm_cos_bucket.ignition.crn + bucket_location = ibm_cos_bucket.ignition.region_location + content = var.ignition + key = "bootstrap.ign" +} + +# Create the bootstrap instance +resource "ibm_pi_instance" "bootstrap" { + pi_memory = var.memory + pi_processors = var.processors + pi_instance_name = "${var.cluster_id}-bootstrap" + pi_proc_type = var.proc_type + pi_image_id = data.ibm_pi_image.bootstrap_image.id + pi_sys_type = var.sys_type + pi_cloud_instance_id = var.cloud_instance_id + pi_network_ids = [data.ibm_pi_network.network.id] + + pi_user_data = base64encode(data.ignition_config.bootstrap.rendered) + pi_key_pair_name = var.key_id + pi_health_status = "WARNING" +} + +data "ibm_pi_instance_ip" "bootstrap_ip" { + depends_on = [ibm_pi_instance.bootstrap] + + pi_instance_name = ibm_pi_instance.bootstrap.pi_instance_name + pi_network_name = data.ibm_pi_network.network.pi_network_name + pi_cloud_instance_id = var.cloud_instance_id +} diff --git a/data/data/powervs/bootstrap/outputs.tf b/data/data/powervs/bootstrap/outputs.tf new file mode 100644 index 00000000000..72b65f4787c --- /dev/null +++ b/data/data/powervs/bootstrap/outputs.tf @@ -0,0 +1,3 @@ +output "bootstrap_ip" { + value = data.ibm_pi_instance_ip.bootstrap_ip.ip +} diff --git a/data/data/powervs/bootstrap/variables.tf b/data/data/powervs/bootstrap/variables.tf new file mode 100644 index 00000000000..c2f744e7b97 --- /dev/null +++ b/data/data/powervs/bootstrap/variables.tf @@ -0,0 +1,16 @@ +variable "memory" {} +variable "processors" {} +variable "ignition" {} + +variable "cloud_instance_id" {} +variable "resource_group" {} +variable "image_name" {} +variable "network_name" {} +variable "proc_type" {} +variable "sys_type" {} +variable "cluster_id" {} +variable "key_id" {} + +variable "cos_instance_location" {} +variable "cos_bucket_location" {} +variable "cos_storage_class" {} diff --git a/data/data/powervs/dns/dns.tf b/data/data/powervs/dns/dns.tf new file mode 100644 index 00000000000..276515abcfa --- /dev/null +++ b/data/data/powervs/dns/dns.tf @@ -0,0 +1,31 @@ +data "ibm_cis_domain" "base_domain" { + cis_id = var.cis_id + domain = var.base_domain +} + +resource "ibm_cis_dns_record" "kubernetes_api" { + cis_id = var.cis_id + domain_id = data.ibm_cis_domain.base_domain.id + type = "CNAME" + name = "api.${var.cluster_domain}" + content = var.load_balancer_hostname + ttl = 60 +} + +resource "ibm_cis_dns_record" "kubernetes_api_internal" { + cis_id = var.cis_id + domain_id = data.ibm_cis_domain.base_domain.id + type = "CNAME" + name = "api-int.${var.cluster_domain}" + content = var.load_balancer_int_hostname + ttl = 60 +} + +resource "ibm_cis_dns_record" "apps" { + cis_id = var.cis_id + domain_id = data.ibm_cis_domain.base_domain.id + type = "CNAME" + name = "*.apps.${var.cluster_domain}" + content = var.load_balancer_hostname + ttl = 60 +} diff --git a/data/data/powervs/dns/variables.tf b/data/data/powervs/dns/variables.tf new file mode 100644 index 00000000000..c7631cae426 --- /dev/null +++ b/data/data/powervs/dns/variables.tf @@ -0,0 +1,13 @@ +variable "cis_id" {} + +variable "base_domain" {} + +variable "cluster_domain" {} + +variable "load_balancer_hostname" {} + +variable "load_balancer_int_hostname" {} + + + + diff --git a/data/data/powervs/iaas/power-iaas.tf b/data/data/powervs/iaas/power-iaas.tf new file mode 100644 index 00000000000..071535e415b --- /dev/null +++ b/data/data/powervs/iaas/power-iaas.tf @@ -0,0 +1,22 @@ +provider "ibm" { + ibmcloud_api_key = var.powervs_api_key +} + +data "ibm_resource_group" "group" { + name = var.powervs_resource_group +} + +resource "ibm_resource_instance" "resource_instance" { + name = "${var.cluster_id}-power-iaas" + service = "power-iaas" + plan = "power-virtual-server-group" + location = var.powervs_region + tags = concat(var.service_tags, ["${var.cluster_id}-power-iaas", "${var.cluster_id}"]) + resource_group_id = data.ibm_resource_group.group.id + + timeouts { + create = "10m" + update = "10m" + delete = "10m" + } +} diff --git a/data/data/powervs/iaas/variables.tf b/data/data/powervs/iaas/variables.tf new file mode 100644 index 00000000000..c9569ff8808 --- /dev/null +++ b/data/data/powervs/iaas/variables.tf @@ -0,0 +1,28 @@ +variable "powervs_api_key" { + type = string + description = "IBM Cloud API key associated with user's identity" + default = "" +} + +variable "powervs_resource_group" { + type = string + description = "The cloud instance resource group" + default = "" +} + +variable "powervs_region" { + type = string + description = "The IBM Cloud region where you want to create the resources" + default = "" +} + +variable "cluster_id" { + type = string + default = "" +} + +variable "service_tags" { + type = list(string) + description = "A list of tags for our resource instance." + default = [] +} diff --git a/data/data/powervs/loadbalancer/alb.tf b/data/data/powervs/loadbalancer/alb.tf new file mode 100644 index 00000000000..3dfec80e94c --- /dev/null +++ b/data/data/powervs/loadbalancer/alb.tf @@ -0,0 +1,120 @@ +locals { + api_servers = concat([var.bootstrap_ip], var.master_ips) + api_servers_count = length(var.master_ips) + 1 # bootstrap + master + app_servers = var.master_ips + app_servers_count = length(var.master_ips) +} + +data "ibm_resource_group" "resource_group" { + name = var.resource_group +} + +resource "ibm_is_lb" "load_balancer" { + name = "${var.cluster_id}-loadbalancer" + resource_group = data.ibm_resource_group.resource_group.id + subnets = [var.vpc_subnet_id] + security_groups = [ibm_is_security_group.ocp_security_group.id] + tags = [var.cluster_id, "${var.cluster_id}-loadbalancer"] + type = "public" +} + +resource "ibm_is_lb" "load_balancer_int" { + name = "${var.cluster_id}-loadbalancer-int" + resource_group = data.ibm_resource_group.resource_group.id + subnets = [var.vpc_subnet_id] + security_groups = [ibm_is_security_group.ocp_security_group.id] + tags = [var.cluster_id, "${var.cluster_id}-loadbalancer-int"] + type = "private" +} + +# Using explicit depends_on as otherwise there are issues with updating and adding of pool members +# Ref: https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/is_lb_listener + +## TODO move this to internal/private LB +# machine config listener and backend pool +resource "ibm_is_lb_listener" "machine_config_listener" { + lb = ibm_is_lb.load_balancer_int.id + port = 22623 + protocol = "tcp" + default_pool = ibm_is_lb_pool.machine_config_pool.id +} +resource "ibm_is_lb_pool" "machine_config_pool" { + depends_on = [ibm_is_lb.load_balancer_int] + + name = "machine-config-server" + lb = ibm_is_lb.load_balancer_int.id + algorithm = "round_robin" + protocol = "tcp" + health_delay = 60 + health_retries = 5 + health_timeout = 30 + health_type = "tcp" +} +resource "ibm_is_lb_pool_member" "machine_config_member" { + depends_on = [ibm_is_lb_listener.machine_config_listener] + count = local.api_servers_count + + lb = ibm_is_lb.load_balancer_int.id + pool = ibm_is_lb_pool.machine_config_pool.id + port = 22623 + target_address = local.api_servers[count.index] +} + +# api listener and backend pool (internal) +resource "ibm_is_lb_listener" "api_listener_int" { + lb = ibm_is_lb.load_balancer_int.id + port = 6443 + protocol = "tcp" + default_pool = ibm_is_lb_pool.api_pool_int.id +} +resource "ibm_is_lb_pool" "api_pool_int" { + depends_on = [ibm_is_lb.load_balancer_int] + + name = "openshift-api-server" + lb = ibm_is_lb.load_balancer_int.id + algorithm = "round_robin" + protocol = "tcp" + health_delay = 60 + health_retries = 5 + health_timeout = 30 + health_type = "tcp" +} +resource "ibm_is_lb_pool_member" "api_member_int" { + depends_on = [ibm_is_lb_listener.api_listener_int, ibm_is_lb_pool_member.machine_config_member] + count = local.api_servers_count + + lb = ibm_is_lb.load_balancer_int.id + pool = ibm_is_lb_pool.api_pool_int.id + port = 6443 + target_address = local.api_servers[count.index] +} + +# api listener and backend pool (external) +resource "ibm_is_lb_listener" "api_listener" { + lb = ibm_is_lb.load_balancer.id + port = 6443 + protocol = "tcp" + default_pool = ibm_is_lb_pool.api_pool.id +} +resource "ibm_is_lb_pool" "api_pool" { + depends_on = [ibm_is_lb.load_balancer] + + name = "openshift-api-server" + lb = ibm_is_lb.load_balancer.id + algorithm = "round_robin" + protocol = "tcp" + health_delay = 60 + health_retries = 5 + health_timeout = 30 + health_type = "tcp" +} +resource "ibm_is_lb_pool_member" "api_member" { + depends_on = [ibm_is_lb_listener.api_listener, ibm_is_lb_pool_member.machine_config_member] + count = local.api_servers_count + + lb = ibm_is_lb.load_balancer.id + pool = ibm_is_lb_pool.api_pool.id + port = 6443 + target_address = local.api_servers[count.index] +} + diff --git a/data/data/powervs/loadbalancer/outputs.tf b/data/data/powervs/loadbalancer/outputs.tf new file mode 100644 index 00000000000..b4c6c184fb8 --- /dev/null +++ b/data/data/powervs/loadbalancer/outputs.tf @@ -0,0 +1,7 @@ +output "powervs_lb_hostname" { + value = ibm_is_lb.load_balancer.hostname +} + +output "powervs_lb_int_hostname" { + value = ibm_is_lb.load_balancer_int.hostname +} diff --git a/data/data/powervs/loadbalancer/sg.tf b/data/data/powervs/loadbalancer/sg.tf new file mode 100644 index 00000000000..ca32b52ba37 --- /dev/null +++ b/data/data/powervs/loadbalancer/sg.tf @@ -0,0 +1,28 @@ +locals { + tcp_ports = [22623, 6443] +} +data "ibm_is_vpc" "vpc" { + name = var.vpc_name +} + +resource "ibm_is_security_group" "ocp_security_group" { + name = "${var.cluster_id}-ocp-sec-group" + resource_group = data.ibm_resource_group.resource_group.id + vpc = data.ibm_is_vpc.vpc.id + tags = [var.cluster_id] +} + +resource "ibm_is_security_group_rule" "inbound_ports" { + count = length(local.tcp_ports) + group = ibm_is_security_group.ocp_security_group.id + direction = "inbound" + tcp { + port_min = local.tcp_ports[count.index] + port_max = local.tcp_ports[count.index] + } +} + +resource "ibm_is_security_group_rule" "outbound_any" { + group = ibm_is_security_group.ocp_security_group.id + direction = "outbound" +} diff --git a/data/data/powervs/loadbalancer/variables.tf b/data/data/powervs/loadbalancer/variables.tf new file mode 100644 index 00000000000..c64b3344fa4 --- /dev/null +++ b/data/data/powervs/loadbalancer/variables.tf @@ -0,0 +1,9 @@ +variable "cluster_id" {} + +variable "vpc_name" {} +variable "vpc_subnet_id" {} + +variable "bootstrap_ip" {} +variable "master_ips" {} + +variable "resource_group" {} diff --git a/data/data/powervs/main.tf b/data/data/powervs/main.tf new file mode 100644 index 00000000000..435b17d8511 --- /dev/null +++ b/data/data/powervs/main.tf @@ -0,0 +1,108 @@ +provider "ibm" { + alias = "vpc" + ibmcloud_api_key = var.powervs_api_key + region = var.powervs_vpc_region + zone = var.powervs_vpc_zone +} + +provider "ibm" { + alias = "powervs" + ibmcloud_api_key = var.powervs_api_key + region = var.powervs_region + zone = var.powervs_zone +} + +resource "ibm_pi_key" "cluster_key" { + provider = ibm.powervs + pi_key_name = "${var.cluster_id}-key" + pi_ssh_key = var.powervs_ssh_key + pi_cloud_instance_id = var.powervs_cloud_instance_id +} + +module "bootstrap" { + providers = { + ibm = ibm.powervs + } + source = "./bootstrap" + cloud_instance_id = var.powervs_cloud_instance_id + cluster_id = var.cluster_id + resource_group = var.powervs_resource_group + + cos_instance_location = var.powervs_cos_instance_location + cos_bucket_location = var.powervs_cos_bucket_location + cos_storage_class = var.powervs_cos_storage_class + + memory = var.powervs_bootstrap_memory + processors = var.powervs_bootstrap_processors + ignition = var.ignition_bootstrap + sys_type = var.powervs_sys_type + proc_type = var.powervs_proc_type + key_id = ibm_pi_key.cluster_key.key_id + image_name = var.powervs_image_name + network_name = var.powervs_network_name +} + +module "master" { + providers = { + ibm = ibm.powervs + } + source = "./master" + cloud_instance_id = var.powervs_cloud_instance_id + cluster_id = var.cluster_id + resource_group = var.powervs_resource_group + instance_count = var.master_count + + memory = var.powervs_master_memory + processors = var.powervs_master_processors + ignition = var.ignition_master + sys_type = var.powervs_sys_type + proc_type = var.powervs_proc_type + key_id = ibm_pi_key.cluster_key.key_id + image_name = var.powervs_image_name + network_name = var.powervs_network_name +} + +data "ibm_is_subnet" "vpc_subnet" { + provider = ibm.vpc + name = var.powervs_vpc_subnet_name +} + +data "ibm_pi_image" "boot_image" { + provider = ibm.powervs + pi_image_name = var.powervs_image_name + pi_cloud_instance_id = var.powervs_cloud_instance_id +} + +data "ibm_pi_network" "pvs_net" { + provider = ibm.powervs + pi_network_name = var.powervs_network_name + pi_cloud_instance_id = var.powervs_cloud_instance_id +} + +module "loadbalancer" { + providers = { + ibm = ibm.vpc + } + source = "./loadbalancer" + + cluster_id = var.cluster_id + vpc_name = var.powervs_vpc_name + vpc_subnet_id = data.ibm_is_subnet.vpc_subnet.id + bootstrap_ip = module.bootstrap.bootstrap_ip + master_ips = module.master.master_ips + resource_group = var.powervs_resource_group +} + + +module "dns" { + providers = { + ibm = ibm.vpc + } + source = "./dns" + + cis_id = var.powervs_cis_crn + base_domain = var.base_domain + cluster_domain = var.cluster_domain + load_balancer_hostname = module.loadbalancer.powervs_lb_hostname + load_balancer_int_hostname = module.loadbalancer.powervs_lb_int_hostname +} diff --git a/data/data/powervs/master/main.tf b/data/data/powervs/master/main.tf new file mode 100644 index 00000000000..568526cd027 --- /dev/null +++ b/data/data/powervs/master/main.tf @@ -0,0 +1,39 @@ +# TODO(mjturek): network and image data blocks can be in main module +# as master and bootstrap will be using the same +# network and image. Once we add in master module, make +# the move. +data "ibm_pi_network" "network" { + pi_network_name = var.network_name + pi_cloud_instance_id = var.cloud_instance_id +} + +data "ibm_pi_image" "master_image" { + pi_image_name = var.image_name + pi_cloud_instance_id = var.cloud_instance_id +} + +# Create the master instances +resource "ibm_pi_instance" "master" { + count = var.instance_count + pi_memory = var.memory + pi_processors = var.processors + pi_instance_name = "${var.cluster_id}-master-${count.index}" + pi_proc_type = var.proc_type + pi_image_id = data.ibm_pi_image.master_image.id + pi_sys_type = var.sys_type + pi_cloud_instance_id = var.cloud_instance_id + pi_network_ids = [data.ibm_pi_network.network.id] + + pi_user_data = base64encode(var.ignition) + pi_key_pair_name = var.key_id + pi_health_status = "WARNING" +} + +data "ibm_pi_instance_ip" "master_ip" { + count = var.instance_count + depends_on = [ibm_pi_instance.master] + + pi_instance_name = ibm_pi_instance.master[count.index].pi_instance_name + pi_network_name = data.ibm_pi_network.network.pi_network_name + pi_cloud_instance_id = var.cloud_instance_id +} diff --git a/data/data/powervs/master/outputs.tf b/data/data/powervs/master/outputs.tf new file mode 100644 index 00000000000..910e18ebb0b --- /dev/null +++ b/data/data/powervs/master/outputs.tf @@ -0,0 +1,3 @@ +output "master_ips" { + value = data.ibm_pi_instance_ip.master_ip.*.ip +} diff --git a/data/data/powervs/master/variables.tf b/data/data/powervs/master/variables.tf new file mode 100644 index 00000000000..7168d59b459 --- /dev/null +++ b/data/data/powervs/master/variables.tf @@ -0,0 +1,14 @@ +variable "instance_count" {} + +variable "memory" {} +variable "processors" {} +variable "ignition" {} +variable "key_id" {} + +variable "cloud_instance_id" {} +variable "resource_group" {} +variable "image_name" {} +variable "network_name" {} +variable "proc_type" {} +variable "sys_type" {} +variable "cluster_id" {} diff --git a/data/data/powervs/topology/pi_network.tf b/data/data/powervs/topology/pi_network.tf new file mode 100644 index 00000000000..5f5e3a5f7c9 --- /dev/null +++ b/data/data/powervs/topology/pi_network.tf @@ -0,0 +1,40 @@ +## Network +## These are be optional arguments in the install-config (e.g. Platform) +## so that users may specify them. Have them be "hidden" in that the survey doesn't ask for them +## unless the OCP leads disagree. +## And since they're optional, use the count = construct to conditionally create them if the tf +## vars are unset. + +## Note, the following are incomplete placeholders to be tested and reviewed later when the TF +## support for these has been added to the ibmcloud terraform provider (which is now forked into +## https://github.com/openshift/terraform-provider-ibm) + +#resource "ibm_direct_link" "ocp_direct_link" { +# TODO +#} + +#resource "ibm_pi_network" "ocp_network" { +# provider = ibm.powervs +# count = var.powervs_network_name == "" ? 1 : 0 +# pi_network_name = "pvs-net-${var.cluster_id}" +# pi_cloud_instance_id = "powervs_cloud_instance_id" +# pi_network_type = "dhcp" +# pi_cidr = "192.168.0.0/24" +# pi_dns = [<"DNS Servers">] +#} + +#resource "ibm_is_vpc" "ocp_vpc" { +# provider = ibm.vpc +# count = var.powervs_vpc == "" ? 1 : 0 +# name = "vpc_${var.cluster_id}" +# classic_access = false +# resource_group = var.powervs_resource_group +#} + +#resource "ibm_is_subnet" "ocp_vpc_subnet" { +# provider = ibm.vpc +# count = var.powervs_vpc_subnet == "" ? 1 : 0 +# name = "vpc_subnet_${var.cluster_id}" +# vpc = ibm_is_vpc..id +# ipv4_cidr_block = "192.168.0.0/1" +#} diff --git a/data/data/powervs/variables-powervs.tf b/data/data/powervs/variables-powervs.tf new file mode 100644 index 00000000000..d172530f49d --- /dev/null +++ b/data/data/powervs/variables-powervs.tf @@ -0,0 +1,145 @@ +################################################################ +# Configure the IBM Cloud provider +################################################################ +variable "powervs_api_key" { + type = string + description = "IBM Cloud API key associated with user's identity" + default = "" +} + +variable "powervs_vpc_region" { + type = string + description = "The IBM Cloud region where you want to create the resources" + default = "eu-gb" +} + +variable "powervs_vpc_zone" { + type = string + description = "The IBM Cloud zone associated with the VPC region you're using" +} + +variable "powervs_region" { + type = string + description = "The IBM Cloud region where you want to create the resources" + default = "lon" +} + +variable "powervs_zone" { + type = string + description = "The IBM Cloud zone associated with the region you're using" +} + +variable "powervs_resource_group" { + type = string + description = "The cloud instance resource group" +} + +variable "powervs_cloud_instance_id" { + type = string + description = "The cloud instance ID of your account" +} + +################################################################ +# Configure storage +################################################################ +variable "powervs_cos_instance_location" { + type = string + description = "The location of your COS instance" + default = "global" +} + +variable "powervs_cos_bucket_location" { + type = string + description = "The location to create your COS bucket" + default = "us-east" +} + +variable "powervs_cos_storage_class" { + type = string + description = "The plan used for your COS instance" + default = "smart" +} + +################################################################ +# Configure instances +################################################################ +variable "powervs_image_name" { + type = string + description = "Name of the image used by all nodes in the cluster." +} + +variable "powervs_bootstrap_memory" { + type = string + description = "Amount of memory, in GiB, used by the bootstrap node." + default = "32" +} + +variable "powervs_bootstrap_processors" { + type = string + description = "Number of processors used by the bootstrap node." + default = "0.5" +} + +variable "powervs_master_memory" { + type = string + description = "Amount of memory, in GiB, used by each master node." + default = "32" +} + +variable "powervs_master_processors" { + type = string + description = "Number of processors used by each master node." + default = "0.5" +} + +variable "powervs_proc_type" { + type = string + description = "The type of processor mode for all nodes (shared/dedicated)" + default = "shared" +} + +variable "powervs_sys_type" { + type = string + description = "The type of system (s922/e980)" + default = "s922" +} + +variable "powervs_key_name" { + type = string + description = "The name for the SSH key created in the Service Instance" + default = "" +} + +variable "powervs_ssh_key" { + type = string + description = "Public key for keypair used to access cluster. Required when creating 'ibm_pi_instance' resources." + default = "" +} + +################################################################ +# Configure Network Topology +################################################################ +variable "powervs_network_name" { + type = string + description = "Name of the network within the Power VS instance." +} + +variable "powervs_vpc_name" { + type = string + description = "Name of the IBM Cloud Virtual Private Cloud (VPC) to setup the load balancer." +} + +variable "powervs_vpc_subnet_name" { + type = string + description = "Name of the VPC subnet connected via DirectLink to the Power VS private network." +} + +################################################################ +# Configure DNS +################################################################ +## TODO: Pass the CIS CRN from the installer program, refer the IBM Cloud code to see the implementation. +variable "powervs_cis_crn" { + type = string + description = "The CRN of CIS instance to use." +} + diff --git a/go.mod b/go.mod index b1603189d13..99f9a58350c 100644 --- a/go.mod +++ b/go.mod @@ -13,6 +13,7 @@ require ( github.com/Azure/go-ntlmssp v0.0.0-20191115210519-2b2be6cc8ed4 // indirect github.com/ChrisTrenkamp/goxpath v0.0.0-20190607011252-c5096ec8773d // indirect github.com/IBM-Cloud/bluemix-go v0.0.0-20210611051827-cdc80c935c05 + github.com/IBM-Cloud/power-go-client v1.0.72 github.com/IBM-Cloud/terraform-provider-ibm v1.26.2 github.com/IBM/go-sdk-core/v5 v5.4.3 github.com/IBM/networking-go-sdk v0.14.0 @@ -69,6 +70,7 @@ require ( github.com/openshift/cluster-api-provider-kubevirt v0.0.0-20210719100556-9b8bc3666720 github.com/openshift/cluster-api-provider-libvirt v0.2.1-0.20191219173431-2336783d4603 github.com/openshift/cluster-api-provider-ovirt v0.1.1-0.20210817084941-2262c7c6cece + github.com/openshift/cluster-api-provider-powervs v0.0.2-0.20210928133618-8eb5ebcb07a1 github.com/openshift/library-go v0.0.0-20210408164723-7a65fdb398e2 github.com/openshift/machine-api-operator v0.2.1-0.20210505133115-b7ef098180db github.com/openshift/machine-config-operator v0.0.0 @@ -133,6 +135,7 @@ replace ( github.com/metal3-io/baremetal-operator => github.com/openshift/baremetal-operator v0.0.0-20210706141527-5240e42f012a // Use OpenShift fork github.com/metal3-io/baremetal-operator/apis => github.com/openshift/baremetal-operator/apis v0.0.0-20210706141527-5240e42f012a // Use OpenShift fork github.com/metal3-io/cluster-api-provider-baremetal => github.com/openshift/cluster-api-provider-baremetal v0.0.0-20190821174549-a2a477909c1d // Pin OpenShift fork + github.com/openshift/api => github.com/openshift-powervs/api v0.0.0-20210729234416-b883aff9d9db github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20200929181438-91d71ef2122c // Pin client-go github.com/openshift/machine-config-operator => github.com/openshift/machine-config-operator v0.0.1-0.20201009041932-4fe8559913b8 // Pin MCO so it doesn't get downgraded github.com/terraform-providers/terraform-provider-aws => github.com/openshift/terraform-provider-aws v1.60.1-0.20210622193531-7d13cfbb1a8c // Pin to openshift fork with tag v2.67.0-openshift-1 @@ -165,3 +168,5 @@ replace ( google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 google.golang.org/grpc => google.golang.org/grpc v1.29.1 ) + +replace github.com/openshift/machine-api-operator => github.com/openshift-powervs/machine-api-operator v0.2.1-0.20210809115935-a9fd8f5d2767 diff --git a/pkg/asset/cluster/cluster.go b/pkg/asset/cluster/cluster.go index a933d1bb9fe..3a5455b4421 100644 --- a/pkg/asset/cluster/cluster.go +++ b/pkg/asset/cluster/cluster.go @@ -76,6 +76,8 @@ func (c *Cluster) Generate(parents asset.Parents) (err error) { logrus.Infof("Creating infrastructure resources...") switch platform { + // @TODO Power VS : Is there anything we might need to do before the terraform spins up? Maybe we could + // use this to create the service instance, network, etc,. while we wait for the TF implementation work? case typesaws.Name: if err := aws.PreTerraform(context.TODO(), clusterID.InfraID, installConfig); err != nil { return err diff --git a/pkg/asset/cluster/metadata.go b/pkg/asset/cluster/metadata.go index 06c1ee9682f..956179a6909 100644 --- a/pkg/asset/cluster/metadata.go +++ b/pkg/asset/cluster/metadata.go @@ -17,6 +17,7 @@ import ( "github.com/openshift/installer/pkg/asset/cluster/libvirt" "github.com/openshift/installer/pkg/asset/cluster/openstack" "github.com/openshift/installer/pkg/asset/cluster/ovirt" + "github.com/openshift/installer/pkg/asset/cluster/powervs" "github.com/openshift/installer/pkg/asset/cluster/vsphere" "github.com/openshift/installer/pkg/asset/ignition/bootstrap" "github.com/openshift/installer/pkg/asset/installconfig" @@ -31,6 +32,7 @@ import ( nonetypes "github.com/openshift/installer/pkg/types/none" openstacktypes "github.com/openshift/installer/pkg/types/openstack" ovirttypes "github.com/openshift/installer/pkg/types/ovirt" + powervstypes "github.com/openshift/installer/pkg/types/powervs" vspheretypes "github.com/openshift/installer/pkg/types/vsphere" ) @@ -93,6 +95,8 @@ func (m *Metadata) Generate(parents asset.Parents) (err error) { metadata.ClusterPlatformMetadata.VSphere = vsphere.Metadata(installConfig.Config) case kubevirttypes.Name: metadata.ClusterPlatformMetadata.Kubevirt = kubevirt.Metadata(clusterID.InfraID, installConfig.Config) + case powervstypes.Name: + metadata.ClusterPlatformMetadata.PowerVS = powervs.Metadata(installConfig.Config, installConfig.PowerVS) case nonetypes.Name: default: return errors.Errorf("no known platform") diff --git a/pkg/asset/cluster/powervs/powervs.go b/pkg/asset/cluster/powervs/powervs.go new file mode 100644 index 00000000000..9fadf5b601f --- /dev/null +++ b/pkg/asset/cluster/powervs/powervs.go @@ -0,0 +1,21 @@ +// Package powervs extracts Power VS metadata from install configurations. +package powervs + +import ( + "context" + + icpowervs "github.com/openshift/installer/pkg/asset/installconfig/powervs" + "github.com/openshift/installer/pkg/types" + "github.com/openshift/installer/pkg/types/powervs" +) + +// Metadata converts an install configuration to PowerVS metadata. +func Metadata(config *types.InstallConfig, meta *icpowervs.Metadata) *powervs.Metadata { + cisCRN, _ := meta.CISInstanceCRN(context.TODO()) + + return &powervs.Metadata{ + CISInstanceCRN: cisCRN, + Region: config.Platform.PowerVS.Region, + Zone: config.Platform.PowerVS.Zone, + } +} diff --git a/pkg/asset/cluster/tfvars.go b/pkg/asset/cluster/tfvars.go index c5099527eea..857bf7285bc 100644 --- a/pkg/asset/cluster/tfvars.go +++ b/pkg/asset/cluster/tfvars.go @@ -15,6 +15,7 @@ import ( kubevirtutils "github.com/openshift/cluster-api-provider-kubevirt/pkg/utils" libvirtprovider "github.com/openshift/cluster-api-provider-libvirt/pkg/apis/libvirtproviderconfig/v1beta1" ovirtprovider "github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1" + powervsprovider "github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1" vsphereprovider "github.com/openshift/machine-api-operator/pkg/apis/vsphereprovider/v1beta1" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -31,6 +32,7 @@ import ( awsconfig "github.com/openshift/installer/pkg/asset/installconfig/aws" gcpconfig "github.com/openshift/installer/pkg/asset/installconfig/gcp" ovirtconfig "github.com/openshift/installer/pkg/asset/installconfig/ovirt" + powervsconfig "github.com/openshift/installer/pkg/asset/installconfig/powervs" "github.com/openshift/installer/pkg/asset/machines" "github.com/openshift/installer/pkg/asset/manifests" "github.com/openshift/installer/pkg/asset/openshiftinstall" @@ -46,6 +48,7 @@ import ( libvirttfvars "github.com/openshift/installer/pkg/tfvars/libvirt" openstacktfvars "github.com/openshift/installer/pkg/tfvars/openstack" ovirttfvars "github.com/openshift/installer/pkg/tfvars/ovirt" + powervstfvars "github.com/openshift/installer/pkg/tfvars/powervs" vspheretfvars "github.com/openshift/installer/pkg/tfvars/vsphere" "github.com/openshift/installer/pkg/types" "github.com/openshift/installer/pkg/types/aws" @@ -58,6 +61,7 @@ import ( "github.com/openshift/installer/pkg/types/none" "github.com/openshift/installer/pkg/types/openstack" "github.com/openshift/installer/pkg/types/ovirt" + "github.com/openshift/installer/pkg/types/powervs" "github.com/openshift/installer/pkg/types/vsphere" ) @@ -615,6 +619,52 @@ func (t *TerraformVariables) Generate(parents asset.Parents) error { Filename: fmt.Sprintf(TfPlatformVarsFileName, platform), Data: data, }) + case powervs.Name: + // @TODO: Can we just use the install config for all these values? + session, err := powervsconfig.GetSession() + if err != nil { + return err + } + + masters, err := mastersAsset.Machines() + if err != nil { + return err + } + + // Get CISInstanceCRN from InstallConfig metadata + crn, err := installConfig.PowerVS.CISInstanceCRN(ctx) + if err != nil { + return err + } + + masterConfigs := make([]*powervsprovider.PowerVSMachineProviderConfig, len(masters)) + for i, m := range masters { + masterConfigs[i] = m.Spec.ProviderSpec.Value.Object.(*powervsprovider.PowerVSMachineProviderConfig) + } + + data, err = powervstfvars.TFVars( + powervstfvars.TFVarsSources{ + MasterConfigs: masterConfigs, + Region: installConfig.Config.Platform.PowerVS.Region, + Zone: installConfig.Config.Platform.PowerVS.Zone, + VPCZone: installConfig.Config.Platform.PowerVS.VPCZone, + APIKey: session.Session.IAMToken, + SSHKey: installConfig.Config.SSHKey, + PowerVSResourceGroup: installConfig.Config.PowerVS.PowerVSResourceGroup, + NetworkName: installConfig.Config.PowerVS.PVSNetworkName, + CISInstanceCRN: crn, + VPCSubnetName: installConfig.Config.PowerVS.Subnets[0], + VPCName: installConfig.Config.PowerVS.VPC, + }, + ) + if err != nil { + return errors.Wrapf(err, "failed to get %s Terraform variables", platform) + } + t.FileList = append(t.FileList, &asset.File{ + Filename: fmt.Sprintf(TfPlatformVarsFileName, platform), + Data: data, + }) + case vsphere.Name: controlPlanes, err := mastersAsset.Machines() if err != nil { diff --git a/pkg/asset/installconfig/basedomain.go b/pkg/asset/installconfig/basedomain.go index 88a379a2b1f..00caa9e1b23 100644 --- a/pkg/asset/installconfig/basedomain.go +++ b/pkg/asset/installconfig/basedomain.go @@ -14,6 +14,7 @@ import ( "github.com/openshift/installer/pkg/types/azure" "github.com/openshift/installer/pkg/types/gcp" "github.com/openshift/installer/pkg/types/ibmcloud" + "github.com/openshift/installer/pkg/types/powervs" "github.com/openshift/installer/pkg/validate" ) @@ -70,6 +71,13 @@ func (a *baseDomain) Generate(parents asset.Parents) error { } a.BaseDomain = zone.Name return nil + case powervs.Name: + zone, err := ibmcloudconfig.GetDNSZone() + if err != nil { + return err + } + a.BaseDomain = zone.Name + return nil default: //Do nothing } diff --git a/pkg/asset/installconfig/installconfig.go b/pkg/asset/installconfig/installconfig.go index 100862595cc..2e9740bb311 100644 --- a/pkg/asset/installconfig/installconfig.go +++ b/pkg/asset/installconfig/installconfig.go @@ -17,6 +17,7 @@ import ( ickubevirt "github.com/openshift/installer/pkg/asset/installconfig/kubevirt" icopenstack "github.com/openshift/installer/pkg/asset/installconfig/openstack" icovirt "github.com/openshift/installer/pkg/asset/installconfig/ovirt" + icpowervs "github.com/openshift/installer/pkg/asset/installconfig/powervs" icvsphere "github.com/openshift/installer/pkg/asset/installconfig/vsphere" "github.com/openshift/installer/pkg/types" "github.com/openshift/installer/pkg/types/conversion" @@ -35,6 +36,7 @@ type InstallConfig struct { AWS *aws.Metadata `json:"aws,omitempty"` Azure *icazure.Metadata `json:"azure,omitempty"` IBMCloud *icibmcloud.Metadata `json:"ibmcloud,omitempty"` + PowerVS *icpowervs.Metadata `json:"powervs,omitempty"` } var _ asset.WritableAsset = (*InstallConfig)(nil) @@ -95,7 +97,7 @@ func (a *InstallConfig) Generate(parents asset.Parents) error { a.Config.BareMetal = platform.BareMetal a.Config.Ovirt = platform.Ovirt a.Config.Kubevirt = platform.Kubevirt - + a.Config.PowerVS = platform.PowerVS return a.finish("") } @@ -152,6 +154,9 @@ func (a *InstallConfig) finish(filename string) error { if a.Config.IBMCloud != nil { a.IBMCloud = icibmcloud.NewMetadata(a.Config.BaseDomain) } + if a.Config.PowerVS != nil { + a.PowerVS = icpowervs.NewMetadata(a.Config.BaseDomain) + } if err := validation.ValidateInstallConfig(a.Config).ToAggregate(); err != nil { if filename == "" { return errors.Wrap(err, "invalid install config") diff --git a/pkg/asset/installconfig/platform.go b/pkg/asset/installconfig/platform.go index 322bc6bfc3a..1c50d1332bb 100644 --- a/pkg/asset/installconfig/platform.go +++ b/pkg/asset/installconfig/platform.go @@ -18,6 +18,7 @@ import ( libvirtconfig "github.com/openshift/installer/pkg/asset/installconfig/libvirt" openstackconfig "github.com/openshift/installer/pkg/asset/installconfig/openstack" ovirtconfig "github.com/openshift/installer/pkg/asset/installconfig/ovirt" + powervsconfig "github.com/openshift/installer/pkg/asset/installconfig/powervs" vsphereconfig "github.com/openshift/installer/pkg/asset/installconfig/vsphere" "github.com/openshift/installer/pkg/types" "github.com/openshift/installer/pkg/types/aws" @@ -30,6 +31,7 @@ import ( "github.com/openshift/installer/pkg/types/none" "github.com/openshift/installer/pkg/types/openstack" "github.com/openshift/installer/pkg/types/ovirt" + "github.com/openshift/installer/pkg/types/powervs" "github.com/openshift/installer/pkg/types/vsphere" ) @@ -106,6 +108,11 @@ func (a *platform) Generate(asset.Parents) error { if err != nil { return err } + case powervs.Name: + a.PowerVS, err = powervsconfig.Platform() + if err != nil { + return err + } default: return fmt.Errorf("unknown platform type %q", platform) } diff --git a/pkg/asset/installconfig/platformcredscheck.go b/pkg/asset/installconfig/platformcredscheck.go index 62a58b5913d..ea77a214156 100644 --- a/pkg/asset/installconfig/platformcredscheck.go +++ b/pkg/asset/installconfig/platformcredscheck.go @@ -12,6 +12,7 @@ import ( kubevirtconfig "github.com/openshift/installer/pkg/asset/installconfig/kubevirt" openstackconfig "github.com/openshift/installer/pkg/asset/installconfig/openstack" ovirtconfig "github.com/openshift/installer/pkg/asset/installconfig/ovirt" + powervsconfig "github.com/openshift/installer/pkg/asset/installconfig/powervs" "github.com/openshift/installer/pkg/types/aws" "github.com/openshift/installer/pkg/types/azure" "github.com/openshift/installer/pkg/types/baremetal" @@ -22,6 +23,7 @@ import ( "github.com/openshift/installer/pkg/types/none" "github.com/openshift/installer/pkg/types/openstack" "github.com/openshift/installer/pkg/types/ovirt" + "github.com/openshift/installer/pkg/types/powervs" "github.com/openshift/installer/pkg/types/vsphere" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -61,6 +63,9 @@ func (a *PlatformCredsCheck) Generate(dependencies asset.Parents) error { } case ibmcloud.Name: _, err = ibmcloudconfig.NewClient() + // meh ... is there a way to name this session ibmcloud? but have the installconfig Name as powervs? + case powervs.Name: + _, err = powervsconfig.GetSession() if err != nil { return errors.Wrap(err, "creating IBM Cloud session") } diff --git a/pkg/asset/installconfig/platformpermscheck.go b/pkg/asset/installconfig/platformpermscheck.go index 8939158bd67..1f4675802d7 100644 --- a/pkg/asset/installconfig/platformpermscheck.go +++ b/pkg/asset/installconfig/platformpermscheck.go @@ -10,6 +10,8 @@ import ( awsconfig "github.com/openshift/installer/pkg/asset/installconfig/aws" gcpconfig "github.com/openshift/installer/pkg/asset/installconfig/gcp" kubevirtconfig "github.com/openshift/installer/pkg/asset/installconfig/kubevirt" + + //powervsconfig "github.com/openshift/installer/pkg/asset/installconfig/powervs" "github.com/openshift/installer/pkg/types" "github.com/openshift/installer/pkg/types/aws" "github.com/openshift/installer/pkg/types/azure" @@ -21,6 +23,7 @@ import ( "github.com/openshift/installer/pkg/types/none" "github.com/openshift/installer/pkg/types/openstack" "github.com/openshift/installer/pkg/types/ovirt" + "github.com/openshift/installer/pkg/types/powervs" "github.com/openshift/installer/pkg/types/vsphere" ) @@ -102,6 +105,8 @@ func (a *PlatformPermsCheck) Generate(dependencies asset.Parents) error { if err != nil { return errors.Wrap(err, "Kubevirt permissions validation failed") } + case powervs.Name: + //@TODO add check that the account plan is anything but "lite" case azure.Name, baremetal.Name, libvirt.Name, none.Name, openstack.Name, ovirt.Name, vsphere.Name: // no permissions to check default: diff --git a/pkg/asset/installconfig/platformprovisioncheck.go b/pkg/asset/installconfig/platformprovisioncheck.go index 3aa02edce28..4d8ef8c0da3 100644 --- a/pkg/asset/installconfig/platformprovisioncheck.go +++ b/pkg/asset/installconfig/platformprovisioncheck.go @@ -13,6 +13,7 @@ import ( kubevirtconfig "github.com/openshift/installer/pkg/asset/installconfig/kubevirt" osconfig "github.com/openshift/installer/pkg/asset/installconfig/openstack" ovirtconfig "github.com/openshift/installer/pkg/asset/installconfig/ovirt" + powervsconfig "github.com/openshift/installer/pkg/asset/installconfig/powervs" vsconfig "github.com/openshift/installer/pkg/asset/installconfig/vsphere" "github.com/openshift/installer/pkg/types/aws" "github.com/openshift/installer/pkg/types/azure" @@ -24,6 +25,7 @@ import ( "github.com/openshift/installer/pkg/types/none" "github.com/openshift/installer/pkg/types/openstack" "github.com/openshift/installer/pkg/types/ovirt" + "github.com/openshift/installer/pkg/types/powervs" "github.com/openshift/installer/pkg/types/vsphere" ) @@ -115,6 +117,11 @@ func (a *PlatformProvisionCheck) Generate(dependencies asset.Parents) error { if err != nil { return err } + case powervs.Name: + err = powervsconfig.ValidateForProvisioning() + if err != nil { + return err + } case libvirt.Name, none.Name: // no special provisioning requirements to check default: diff --git a/pkg/asset/installconfig/powervs/metadata.go b/pkg/asset/installconfig/powervs/metadata.go new file mode 100644 index 00000000000..2321095bd23 --- /dev/null +++ b/pkg/asset/installconfig/powervs/metadata.go @@ -0,0 +1,71 @@ +package powervs + +import ( + "context" + "fmt" + "sync" + + "github.com/openshift/installer/pkg/asset/installconfig/ibmcloud" +) + +// Metadata holds additional metadata for InstallConfig resources that +// do not need to be user-supplied (e.g. because it can be retrieved +// from external APIs). +type Metadata struct { + BaseDomain string + + cisInstanceCRN string + client *ibmcloud.Client + + mutex sync.Mutex +} + +// NewMetadata initializes a new Metadata object. +func NewMetadata(baseDomain string) *Metadata { + return &Metadata{BaseDomain: baseDomain} +} + +// CISInstanceCRN returns the Cloud Internet Services instance CRN that is +// managing the DNS zone for the base domain. +func (m *Metadata) CISInstanceCRN(ctx context.Context) (string, error) { + m.mutex.Lock() + defer m.mutex.Unlock() + + if m.cisInstanceCRN == "" { + client, err := m.Client() + if err != nil { + return "", err + } + + zones, err := client.GetDNSZones(ctx) + if err != nil { + return "", err + } + + for _, z := range zones { + if z.Name == m.BaseDomain { + m.SetCISInstanceCRN(z.CISInstanceCRN) + return m.cisInstanceCRN, nil + } + } + return "", fmt.Errorf("cisInstanceCRN unknown due to DNS zone %q not found", m.BaseDomain) + } + return m.cisInstanceCRN, nil +} + +// SetCISInstanceCRN sets Cloud Internet Services instance CRN to a string value. +func (m *Metadata) SetCISInstanceCRN(crn string) { + m.cisInstanceCRN = crn +} + +// Client returns a client used for making API calls to IBM Cloud services. +func (m *Metadata) Client() (*ibmcloud.Client, error) { + if m.client == nil { + client, err := ibmcloud.NewClient() + if err != nil { + return nil, err + } + m.client = client + } + return m.client, nil +} diff --git a/pkg/asset/installconfig/powervs/platform.go b/pkg/asset/installconfig/powervs/platform.go new file mode 100644 index 00000000000..f18296cb8f3 --- /dev/null +++ b/pkg/asset/installconfig/powervs/platform.go @@ -0,0 +1,29 @@ +package powervs + +import ( + "os" + + "github.com/openshift/installer/pkg/types/powervs" +) + +// Platform collects powervs-specific configuration. +func Platform() (*powervs.Platform, error) { + + ssn, err := GetSession() + if err != nil { + return nil, err + } + + var p powervs.Platform + if osOverride := os.Getenv("OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE"); len(osOverride) != 0 { + p.BootstrapOSImage = osOverride + p.ClusterOSImage = osOverride + } + + p.Region = ssn.Session.Region + p.Zone = ssn.Session.Zone + p.APIKey = ssn.Session.IAMToken + p.UserID = ssn.Session.UserAccount + + return &p, nil +} diff --git a/pkg/asset/installconfig/powervs/regions.go b/pkg/asset/installconfig/powervs/regions.go new file mode 100644 index 00000000000..2fe7b42ff3e --- /dev/null +++ b/pkg/asset/installconfig/powervs/regions.go @@ -0,0 +1,140 @@ +package powervs + +import ( + "fmt" + "sort" + "strings" + + survey "github.com/AlecAivazis/survey/v2" + "github.com/AlecAivazis/survey/v2/core" + "github.com/openshift/installer/pkg/rhcos" + "github.com/pkg/errors" +) + +func knownRegions() map[string]string { + + regions := make(map[string]string) + + for _, region := range rhcos.PowerVSRegions { + regions[region.Name] = region.Description + } + return regions +} + +// IsKnownRegion return true is a specified region is Known to the installer. +// A known region is subset of AWS regions and the regions where RHEL CoreOS images are published. +func IsKnownRegion(region string) bool { + if _, ok := knownRegions()[region]; ok { + return true + } + return false +} + +func knownZones(region string) []string { + if _, ok := rhcos.PowerVSRegions[region]; ok { + return rhcos.PowerVSRegions[region].Zones + } + return []string{} +} + +// IsKnownZone return true is a specified zone is known to the installer. +func IsKnownZone(region string, zone string) bool { + zones := knownZones(region) + for _, z := range zones { + if z == zone { + return true + } + } + return false +} + +// GetRegion prompts the user to select a region and returns that region +func GetRegion() (string, error) { + regions := knownRegions() + + longRegions := make([]string, 0, len(regions)) + shortRegions := make([]string, 0, len(regions)) + for id, location := range regions { + longRegions = append(longRegions, fmt.Sprintf("%s (%s)", id, location)) + shortRegions = append(shortRegions, id) + } + sort.Strings(longRegions) + sort.Strings(shortRegions) + + var regionTransform survey.Transformer = func(ans interface{}) interface{} { + switch v := ans.(type) { + case core.OptionAnswer: + return core.OptionAnswer{Value: strings.SplitN(v.Value, " ", 2)[0], Index: v.Index} + case string: + return strings.SplitN(v, " ", 2)[0] + } + return "" + } + + var region string + + err := survey.Ask([]*survey.Question{ + { + Prompt: &survey.Select{ + Message: "Region", + Help: "The Power VS region to be used for installation.", + Options: longRegions, + }, + Validate: survey.ComposeValidators(survey.Required, func(ans interface{}) error { + choice := regionTransform(ans).(core.OptionAnswer).Value + i := sort.SearchStrings(shortRegions, choice) + if i == len(shortRegions) || shortRegions[i] != choice { + return errors.Errorf("Invalid region %q", choice) + } + return nil + }), + Transform: regionTransform, + }, + }, ®ion) + if err != nil { + return "", err + } + + return region, nil +} + +// GetZone prompts the user for a zone given a zone +func GetZone(region string) (string, error) { + zones := knownZones(region) + defaultZone := zones[0] + + var zoneTransform survey.Transformer = func(ans interface{}) interface{} { + switch v := ans.(type) { + case core.OptionAnswer: + return core.OptionAnswer{Value: strings.SplitN(v.Value, " ", 2)[0], Index: v.Index} + case string: + return strings.SplitN(v, " ", 2)[0] + } + return "" + } + + var zone string + err := survey.Ask([]*survey.Question{ + { + Prompt: &survey.Select{ + Message: "Zone", + Help: "The Power VS zone within the region to be used for installation.", + Default: fmt.Sprintf("%s", defaultZone), + Options: zones, + }, + Validate: survey.ComposeValidators(survey.Required, func(ans interface{}) error { + choice := zoneTransform(ans).(core.OptionAnswer).Value + i := sort.SearchStrings(zones, choice) + if i == len(zones) || zones[i] != choice { + return errors.Errorf("Invalid zone %q", choice) + } + return nil + }), + Transform: zoneTransform, + }, + }, &zone) + if err != nil { + return "", err + } + return zone, err +} diff --git a/pkg/asset/installconfig/powervs/session.go b/pkg/asset/installconfig/powervs/session.go new file mode 100644 index 00000000000..7b53062d672 --- /dev/null +++ b/pkg/asset/installconfig/powervs/session.go @@ -0,0 +1,130 @@ +package powervs + +import ( + "os" + "time" + + "github.com/pkg/errors" + + survey "github.com/AlecAivazis/survey/v2" + "github.com/IBM-Cloud/power-go-client/ibmpisession" +) + +var ( + //reqAuthEnvs = []string{"IBMID", "IBMID_PASSWORD"} + //optAuthEnvs = []string{"IBMCLOUD_REGION", "IBMCLOUD_ZONE"} + //debug = false + defSessionTimeout time.Duration = 9000000000000000000.0 + defRegion = "us_south" +) + +// Session is an object representing a session for the IBM Power VS API. +type Session struct { + Session *ibmpisession.IBMPISession +} + +// GetSession returns an IBM Cloud session by using credentials found in default locations in order: +// env IBMID & env IBMID_PASSWORD, +// ~/.bluemix/config.json ? (see TODO below) +// and, if no creds are found, asks for them +/* @TODO: if you do an `ibmcloud login` (or in my case ibmcloud login --sso), you get +// a very nice creds file at ~/.bluemix/config.json, with an IAMToken. There's no username, +// though (just the account's owner id, but that's not the same). It may be necessary +// to use the IAMToken vs the password env var mentioned here: +// https://github.com/IBM-Cloud/power-go-client#ibm-cloud-sdk-for-power-cloud +// Yes, I think we'll need to use the IAMToken. There's a two-factor auth built into the ibmcloud login, +// so the password alone isn't enough. The IAMToken is generated as a result. So either: + 1) require the user has done this already and pull from the file + 2) ask the user to paste in their IAMToken. + 3) let the password env var be the IAMToken? (Going with this atm since it's how I started) + 4) put it into Platform {userid: , iamtoken: , ...} +*/ +func GetSession() (*Session, error) { + s, err := getPISession() + if err != nil { + return nil, errors.Wrap(err, "failed to load credentials") + } + + return &Session{Session: s}, nil +} + +/* +// https://github.com/IBM-Cloud/power-go-client/blob/master/ibmpisession/ibmpowersession.go +*/ +func getPISession() (*ibmpisession.IBMPISession, error) { + + var ( + id, iamtoken, apikey, region, zone string + ) + + var err error + + if id = os.Getenv("IBMID"); len(id) == 0 { + err = survey.Ask([]*survey.Question{ + { + Prompt: &survey.Input{ + Message: "IBM Cloud User ID", + Help: "The login for \nhttps://cloud.ibm.com/", + }, + }, + }, &id) + if err != nil { + return nil, errors.New("error saving the IBM Cloud User ID") + } + } + + // APIKeyEnvVars is a list of environment variable names containing an IBM Cloud API key + var APIKeyEnvVars = []string{"IC_API_KEY", "IBMCLOUD_API_KEY", "BM_API_KEY", "BLUEMIX_API_KEY"} + apikey = getEnv(APIKeyEnvVars) + + if len(apikey) == 0 { + err = survey.Ask([]*survey.Question{ + { + Prompt: &survey.Password{ + Message: "IBM Cloud API Key", + Help: "The api key installation.\nhttps://cloud.ibm.com/iam/apikeys", + }, + }, + }, &apikey) + if err != nil { + return nil, errors.New("error saving the API Key") + } + } + os.Setenv("IC_API_KEY", apikey) + + // this can also be pulled from ~/bluemix/config.json + var regionEnvVars = []string{"IBMCLOUD_REGION", "IC_REGION"} + region = getEnv(regionEnvVars) + if len(region) == 0 { + region, err = GetRegion() + if err != nil { + return nil, err + } + } + + var zoneEnvVars = []string{"IBMCLOUD_ZONE"} + zone = getEnv(zoneEnvVars) + if len(zone) == 0 { + zone, err = GetZone(region) + if err != nil { + return nil, err + } + } + + iamtoken = apikey + s, err := ibmpisession.New(iamtoken, region, false, defSessionTimeout, id, zone) + if err != nil { + return nil, err + } + + return s, err +} + +func getEnv(envs []string) string { + for _, k := range envs { + if v := os.Getenv(k); v != "" { + return v + } + } + return "" +} diff --git a/pkg/asset/installconfig/powervs/validation.go b/pkg/asset/installconfig/powervs/validation.go new file mode 100644 index 00000000000..954b2e3b2e5 --- /dev/null +++ b/pkg/asset/installconfig/powervs/validation.go @@ -0,0 +1,8 @@ +package powervs + +// ValidateForProvisioning only validates credentials +// @TODO: Expand this to use the install config creds +func ValidateForProvisioning() error { + _, err := GetSession() + return err +} diff --git a/pkg/asset/machines/master.go b/pkg/asset/machines/master.go index d711b62bebe..2b7e54b9075 100644 --- a/pkg/asset/machines/master.go +++ b/pkg/asset/machines/master.go @@ -20,6 +20,8 @@ import ( libvirtprovider "github.com/openshift/cluster-api-provider-libvirt/pkg/apis/libvirtproviderconfig/v1beta1" ovirtproviderapi "github.com/openshift/cluster-api-provider-ovirt/pkg/apis" ovirtprovider "github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1" + powervsapi "github.com/openshift/cluster-api-provider-powervs/pkg/apis" + powervsprovider "github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1" machineapi "github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1" vsphereapi "github.com/openshift/machine-api-operator/pkg/apis/vsphereprovider" vsphereprovider "github.com/openshift/machine-api-operator/pkg/apis/vsphereprovider/v1beta1" @@ -48,6 +50,7 @@ import ( "github.com/openshift/installer/pkg/asset/machines/machineconfig" "github.com/openshift/installer/pkg/asset/machines/openstack" "github.com/openshift/installer/pkg/asset/machines/ovirt" + "github.com/openshift/installer/pkg/asset/machines/powervs" "github.com/openshift/installer/pkg/asset/machines/vsphere" "github.com/openshift/installer/pkg/asset/rhcos" rhcosutils "github.com/openshift/installer/pkg/rhcos" @@ -64,6 +67,7 @@ import ( nonetypes "github.com/openshift/installer/pkg/types/none" openstacktypes "github.com/openshift/installer/pkg/types/openstack" ovirttypes "github.com/openshift/installer/pkg/types/ovirt" + powervstypes "github.com/openshift/installer/pkg/types/powervs" vspheretypes "github.com/openshift/installer/pkg/types/vsphere" ) @@ -402,6 +406,19 @@ func (m *Master) Generate(dependencies asset.Parents) error { if err != nil { return errors.Wrap(err, "failed to create master machine objects for kubevirt provider") } + case powervstypes.Name: + mpool := defaultPowerVSMachinePoolPlatform() + mpool.Set(ic.Platform.PowerVS.DefaultMachinePlatform) + mpool.Set(pool.Platform.PowerVS) + // Only the service instance is guaranteed to exist and be passed via the install config + // The other two, we should standardize a name including the cluster id. At this point, all + // we have are names. + pool.Platform.PowerVS = &mpool + machines, err = powervs.Machines(clusterID.InfraID, ic, &pool, "master", "master-user-data") + if err != nil { + return errors.Wrap(err, "failed to create master machine objects") + } + powervs.ConfigMasters(machines, clusterID.InfraID) case nonetypes.Name: default: return fmt.Errorf("invalid Platform") @@ -532,6 +549,7 @@ func (m *Master) Machines() ([]machineapi.Machine, error) { ovirtproviderapi.AddToScheme(scheme) vsphereapi.AddToScheme(scheme) kubevirtproviderapi.AddToScheme(scheme) + powervsapi.AddToScheme(scheme) decoder := serializer.NewCodecFactory(scheme).UniversalDecoder( awsprovider.SchemeGroupVersion, azureprovider.SchemeGroupVersion, @@ -543,6 +561,7 @@ func (m *Master) Machines() ([]machineapi.Machine, error) { vsphereprovider.SchemeGroupVersion, ovirtprovider.SchemeGroupVersion, kubevirtprovider.SchemeGroupVersion, + powervsprovider.GroupVersion, ) machines := []machineapi.Machine{} diff --git a/pkg/asset/machines/master_test.go b/pkg/asset/machines/master_test.go index ae1c5754cef..646a9c7413b 100644 --- a/pkg/asset/machines/master_test.go +++ b/pkg/asset/machines/master_test.go @@ -13,6 +13,7 @@ import ( "github.com/openshift/installer/pkg/asset/rhcos" "github.com/openshift/installer/pkg/types" awstypes "github.com/openshift/installer/pkg/types/aws" + powervstypes "github.com/openshift/installer/pkg/types/powervs" ) func TestMasterGenerateMachineConfigs(t *testing.T) { @@ -192,6 +193,57 @@ spec: } } +func TestPowerVSMaster(t *testing.T) { + t.Log("Testing powerVS platform master") + parents := asset.Parents{} + parents.Add( + &installconfig.ClusterID{ + UUID: "test-uuid", + InfraID: "test-infra-id", + }, + &installconfig.InstallConfig{ + Config: &types.InstallConfig{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-cluster", + }, + SSHKey: "dummy ssh key", + BaseDomain: "test-domain", + Platform: types.Platform{ + PowerVS: &powervstypes.Platform{}, + }, + ControlPlane: &types.MachinePool{ + Hyperthreading: types.HyperthreadingEnabled, + Replicas: pointer.Int64Ptr(1), + Platform: types.MachinePoolPlatform{ + PowerVS: &powervstypes.MachinePool{ + ServiceInstance: "dummy-service-instance", + ImageName: "dummy-image", + NetworkIDs: []string{"dummy-network"}, + KeyPairName: "dummy-keypair", + }, + }, + }, + }, + }, + (*rhcos.Image)(pointer.StringPtr("test-image")), + &machine.Master{ + File: &asset.File{ + Filename: "master-ignition", + Data: []byte("test-ignition"), + }, + }, + ) + master := &Master{} + if err := master.Generate(parents); err != nil { + t.Fatalf("failed to generate master machines: %v", err) + } + + _, err := master.Machines() + if err != nil { + t.Fatalf("failed to get master machine set: %v", err) + } +} + func TestControlPlaneIsNotModified(t *testing.T) { parents := asset.Parents{} installConfig := installconfig.InstallConfig{ diff --git a/pkg/asset/machines/powervs/machines.go b/pkg/asset/machines/powervs/machines.go new file mode 100644 index 00000000000..00401483621 --- /dev/null +++ b/pkg/asset/machines/powervs/machines.go @@ -0,0 +1,106 @@ +// Package powervs generates Machine objects for powerVS. +package powervs + +import ( + "fmt" + + corev1 "k8s.io/api/core/v1" + + powervsprovider "github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1" + "github.com/openshift/installer/pkg/types" + "github.com/openshift/installer/pkg/types/powervs" + machineapi "github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// Machines returns a list of machines for a machinepool. +func Machines(clusterID string, config *types.InstallConfig, pool *types.MachinePool, role, userDataSecret string) ([]machineapi.Machine, error) { + if poolPlatform := pool.Platform.Name(); poolPlatform != powervs.Name { + return nil, fmt.Errorf("non-PowerVS machine-pool: %q", poolPlatform) + } + platform := config.Platform.PowerVS + mpool := pool.Platform.PowerVS + + // Only the service instance is guaranteed to exist and be passed via the install config + // The other two, we should standardize a name including the cluster id. + + if platform.SSHKeyName != "" { + mpool.KeyPairName = platform.SSHKeyName + } else { + mpool.KeyPairName = fmt.Sprintf("%s-key", clusterID) + } + if platform.ClusterOSImage != "" { + mpool.ImageName = platform.ClusterOSImage + } else { + mpool.ImageName = fmt.Sprintf("rhcos-%s", clusterID) + } + if platform.PVSNetworkName != "" { + mpool.NetworkIDs = []string{platform.PVSNetworkName} + } else { + mpool.NetworkIDs = []string{fmt.Sprintf("pvs-net-%s", clusterID)} + } + + total := int64(1) + if pool.Replicas != nil { + total = *pool.Replicas + } + var machines []machineapi.Machine + for idx := int64(0); idx < total; idx++ { + provider, err := provider(clusterID, platform, mpool, userDataSecret, platform.UserTags) + if err != nil { + return nil, errors.Wrap(err, "failed to create provider") + } + machine := machineapi.Machine{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "machine.openshift.io/v1beta1", + Kind: "Machine", + }, + ObjectMeta: metav1.ObjectMeta{ + Namespace: "openshift-machine-api", + Name: fmt.Sprintf("%s-%s-%d", clusterID, pool.Name, idx), + Labels: map[string]string{ + "machine.openshift.io/cluster-api-cluster": clusterID, + "machine.openshift.io/cluster-api-machine-role": role, + "machine.openshift.io/cluster-api-machine-type": role, + }, + }, + Spec: machineapi.MachineSpec{ + ProviderSpec: machineapi.ProviderSpec{ + Value: &runtime.RawExtension{Object: provider}, + }, + }, + } + machines = append(machines, machine) + } + return machines, nil +} + +func provider(clusterID string, platform *powervs.Platform, mpool *powervs.MachinePool, userDataSecret string, userTags map[string]string) (*powervsprovider.PowerVSMachineProviderConfig, error) { + + //Setting only the mandatory parameters + config := &powervsprovider.PowerVSMachineProviderConfig{ + TypeMeta: metav1.TypeMeta{ + Kind: "PowerVSMachineProviderConfig", + APIVersion: powervsprovider.GroupVersion.String(), + }, + ObjectMeta: metav1.ObjectMeta{}, + ServiceInstanceID: platform.ServiceInstanceID, + Image: powervsprovider.PowerVSResourceReference{Name: &mpool.ImageName}, + UserDataSecret: &corev1.LocalObjectReference{Name: userDataSecret}, + CredentialsSecret: &corev1.LocalObjectReference{Name: "powervs-credentials"}, + SysType: mpool.SysType, + ProcType: mpool.ProcType, + Processors: fmt.Sprintf("%f", mpool.Processors), + Memory: fmt.Sprintf("%d", mpool.Memory), + Network: powervsprovider.PowerVSResourceReference{Name: &mpool.NetworkIDs[0]}, + KeyPairName: mpool.KeyPairName, + } + return config, nil +} + +// ConfigMasters sets the network and boot image IDs +func ConfigMasters(machines []machineapi.Machine, clusterID string) { + +} diff --git a/pkg/asset/machines/powervs/machinesets.go b/pkg/asset/machines/powervs/machinesets.go new file mode 100644 index 00000000000..811c46e27a3 --- /dev/null +++ b/pkg/asset/machines/powervs/machinesets.go @@ -0,0 +1,96 @@ +// Package powervs generates Machine objects for IBM Power VS. +package powervs + +import ( + "fmt" + + "github.com/openshift/installer/pkg/types/powervs" + + machineapi "github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + + "github.com/openshift/installer/pkg/types" +) + +// MachineSets returns a list of machinesets for a machinepool. +func MachineSets(clusterID string, config *types.InstallConfig, pool *types.MachinePool, role, userDataSecret string, userTags map[string]string) ([]*machineapi.MachineSet, error) { + if configPlatform := config.Platform.Name(); configPlatform != powervs.Name { + return nil, fmt.Errorf("non-powerVS configuration: %q", configPlatform) + } + if poolPlatform := pool.Platform.Name(); poolPlatform != powervs.Name { + return nil, fmt.Errorf("non-powerVS machine-pool: %q", poolPlatform) + } + + platform := config.Platform.PowerVS + mpool := pool.Platform.PowerVS + + if platform.SSHKeyName != "" { + mpool.KeyPairName = platform.SSHKeyName + } else { + mpool.KeyPairName = fmt.Sprintf("%s-key", clusterID) + } + if platform.ClusterOSImage != "" { + mpool.ImageName = platform.ClusterOSImage + } else { + mpool.ImageName = fmt.Sprintf("rhcos-%s", clusterID) + } + if platform.PVSNetworkName != "" { + mpool.NetworkIDs = []string{platform.PVSNetworkName} + } else { + mpool.NetworkIDs = []string{fmt.Sprintf("pvs-net-%s", clusterID)} + } + + total := int32(0) + if pool.Replicas != nil { + total = int32(*pool.Replicas) + } + var machinesets []*machineapi.MachineSet + provider, err := provider(clusterID, platform, mpool, userDataSecret, userTags) + if err != nil { + return nil, errors.Wrap(err, "failed to create provider") + } + + name := fmt.Sprintf("%s-%s", clusterID, pool.Name) + mset := &machineapi.MachineSet{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "machine.openshift.io/v1beta1", + Kind: "MachineSet", + }, + ObjectMeta: metav1.ObjectMeta{ + Namespace: "openshift-machine-api", + Name: name, + Labels: map[string]string{ + "machine.openshift.io/cluster-api-cluster": clusterID, + }, + }, + Spec: machineapi.MachineSetSpec{ + Replicas: &total, + Selector: metav1.LabelSelector{ + MatchLabels: map[string]string{ + "machine.openshift.io/cluster-api-machineset": name, + "machine.openshift.io/cluster-api-cluster": clusterID, + }, + }, + Template: machineapi.MachineTemplateSpec{ + ObjectMeta: machineapi.ObjectMeta{ + Labels: map[string]string{ + "machine.openshift.io/cluster-api-machineset": name, + "machine.openshift.io/cluster-api-cluster": clusterID, + "machine.openshift.io/cluster-api-machine-role": role, + "machine.openshift.io/cluster-api-machine-type": role, + }, + }, + Spec: machineapi.MachineSpec{ + ProviderSpec: machineapi.ProviderSpec{ + Value: &runtime.RawExtension{Object: provider}, + }, + }, + }, + }, + } + machinesets = append(machinesets, mset) + + return machinesets, nil +} diff --git a/pkg/asset/machines/worker.go b/pkg/asset/machines/worker.go index b7bca7f0d39..02b26203781 100644 --- a/pkg/asset/machines/worker.go +++ b/pkg/asset/machines/worker.go @@ -7,6 +7,8 @@ import ( "path/filepath" "strings" + "github.com/openshift/installer/pkg/asset/machines/powervs" + "github.com/ghodss/yaml" baremetalapi "github.com/metal3-io/cluster-api-provider-baremetal/pkg/apis" baremetalprovider "github.com/metal3-io/cluster-api-provider-baremetal/pkg/apis/baremetal/v1alpha1" @@ -20,6 +22,8 @@ import ( libvirtprovider "github.com/openshift/cluster-api-provider-libvirt/pkg/apis/libvirtproviderconfig/v1beta1" ovirtproviderapi "github.com/openshift/cluster-api-provider-ovirt/pkg/apis" ovirtprovider "github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1" + powervsapi "github.com/openshift/cluster-api-provider-powervs/pkg/apis" + powervsprovider "github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1" machineapi "github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1" vsphereproviderapi "github.com/openshift/machine-api-operator/pkg/apis/vsphereprovider" vsphereprovider "github.com/openshift/machine-api-operator/pkg/apis/vsphereprovider/v1beta1" @@ -64,6 +68,7 @@ import ( nonetypes "github.com/openshift/installer/pkg/types/none" openstacktypes "github.com/openshift/installer/pkg/types/openstack" ovirttypes "github.com/openshift/installer/pkg/types/ovirt" + powervstypes "github.com/openshift/installer/pkg/types/powervs" vspheretypes "github.com/openshift/installer/pkg/types/vsphere" ) @@ -163,8 +168,20 @@ func defaultKubevirtMachinePoolPlatform() kubevirttypes.MachinePool { } } +// The Power VS offering doesn't have a concept similar to "flavors," +// etc., so the following have to be specified: +func defaultPowerVSMachinePoolPlatform() powervstypes.MachinePool { + return powervstypes.MachinePool{ + Memory: 32, + Processors: 0.5, + ProcType: "shared", + SysType: "s922", + } +} + func awsDefaultWorkerMachineTypes(region string, arch types.Architecture) []string { classes := awsdefaults.InstanceClasses(region, arch) + types := make([]string, len(classes)) for i, c := range classes { types[i] = fmt.Sprintf("%s.large", c) @@ -457,6 +474,18 @@ func (w *Worker) Generate(dependencies asset.Parents) error { for _, set := range sets { machineSets = append(machineSets, set) } + case powervstypes.Name: + mpool := defaultPowerVSMachinePoolPlatform() + mpool.Set(ic.Platform.PowerVS.DefaultMachinePlatform) + mpool.Set(pool.Platform.PowerVS) + pool.Platform.PowerVS = &mpool + sets, err := powervs.MachineSets(clusterID.InfraID, ic, &pool, "worker", "worker-user-data", installConfig.Config.Platform.PowerVS.UserTags) + if err != nil { + return errors.Wrap(err, "failed to create worker machine objects for powervs provider") + } + for _, set := range sets { + machineSets = append(machineSets, set) + } case nonetypes.Name: default: return fmt.Errorf("invalid Platform") @@ -543,6 +572,7 @@ func (w *Worker) MachineSets() ([]machineapi.MachineSet, error) { ovirtproviderapi.AddToScheme(scheme) vsphereproviderapi.AddToScheme(scheme) kubevirtproviderapi.AddToScheme(scheme) + powervsapi.AddToScheme(scheme) decoder := serializer.NewCodecFactory(scheme).UniversalDecoder( awsprovider.SchemeGroupVersion, azureprovider.SchemeGroupVersion, @@ -554,6 +584,7 @@ func (w *Worker) MachineSets() ([]machineapi.MachineSet, error) { ovirtprovider.SchemeGroupVersion, vsphereprovider.SchemeGroupVersion, kubevirtprovider.SchemeGroupVersion, + powervsprovider.GroupVersion, //TODO: Should we rename from GroupVersion to SchemeGroupVersion ) machineSets := []machineapi.MachineSet{} diff --git a/pkg/asset/machines/worker_test.go b/pkg/asset/machines/worker_test.go index 07877089a49..877cb15e53d 100644 --- a/pkg/asset/machines/worker_test.go +++ b/pkg/asset/machines/worker_test.go @@ -3,6 +3,8 @@ package machines import ( "testing" + powervstypes "github.com/openshift/installer/pkg/types/powervs" + "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/pointer" @@ -249,3 +251,51 @@ func TestComputeIsNotModified(t *testing.T) { t.Fatalf("compute in the install config has been modified") } } + +func TestPowerVSWorker(t *testing.T) { + t.Log("Testing Power VS platform worker") + parents := asset.Parents{} + parents.Add( + &installconfig.ClusterID{ + UUID: "test-uuid", + InfraID: "test-infra-id", + }, + &installconfig.InstallConfig{ + Config: &types.InstallConfig{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-cluster", + }, + SSHKey: "dummy ssh key", + BaseDomain: "test-domain", + Platform: types.Platform{ + PowerVS: &powervstypes.Platform{}, + }, + Compute: []types.MachinePool{ + { + Hyperthreading: types.HyperthreadingEnabled, + Replicas: pointer.Int64Ptr(1), + Platform: types.MachinePoolPlatform{ + PowerVS: &powervstypes.MachinePool{ + ServiceInstance: "dummy-service-instance", + ImageName: "dummy-image-name", + NetworkIDs: []string{"dummy-network"}, + KeyPairName: "dummy-keypair", + }, + }, + }, + }, + }, + }, + (*rhcos.Image)(pointer.StringPtr("test-image")), + &machine.Worker{ + File: &asset.File{ + Filename: "master-ignition", + Data: []byte("test-ignition"), + }, + }, + ) + worker := &Worker{} + if err := worker.Generate(parents); err != nil { + t.Fatalf("failed to generate worker machines: %v", err) + } +} diff --git a/pkg/asset/manifests/cloudproviderconfig.go b/pkg/asset/manifests/cloudproviderconfig.go index e5ccb4d3246..2073b74e08b 100644 --- a/pkg/asset/manifests/cloudproviderconfig.go +++ b/pkg/asset/manifests/cloudproviderconfig.go @@ -31,6 +31,7 @@ import ( nonetypes "github.com/openshift/installer/pkg/types/none" openstacktypes "github.com/openshift/installer/pkg/types/openstack" ovirttypes "github.com/openshift/installer/pkg/types/ovirt" + powervstypes "github.com/openshift/installer/pkg/types/powervs" vspheretypes "github.com/openshift/installer/pkg/types/vsphere" ) @@ -90,7 +91,7 @@ func (cpc *CloudProviderConfig) Generate(dependencies asset.Parents) error { } switch installConfig.Config.Platform.Name() { - case libvirttypes.Name, nonetypes.Name, baremetaltypes.Name, ovirttypes.Name: + case libvirttypes.Name, nonetypes.Name, baremetaltypes.Name, ovirttypes.Name, powervstypes.Name: return nil case awstypes.Name: // Store the additional trust bundle in the ca-bundle.pem key if the cluster is being installed on a C2S region. diff --git a/pkg/asset/manifests/dns.go b/pkg/asset/manifests/dns.go index 4e5eed5c298..d77131e227b 100644 --- a/pkg/asset/manifests/dns.go +++ b/pkg/asset/manifests/dns.go @@ -28,6 +28,7 @@ import ( nonetypes "github.com/openshift/installer/pkg/types/none" openstacktypes "github.com/openshift/installer/pkg/types/openstack" ovirttypes "github.com/openshift/installer/pkg/types/ovirt" + powervstypes "github.com/openshift/installer/pkg/types/powervs" vspheretypes "github.com/openshift/installer/pkg/types/vsphere" ) @@ -146,7 +147,7 @@ func (d *DNS) Generate(dependencies asset.Parents) error { config.Spec.PrivateZone = &configv1.DNSZone{ ID: zoneID, } - case libvirttypes.Name, openstacktypes.Name, baremetaltypes.Name, nonetypes.Name, vspheretypes.Name, ovirttypes.Name, kubevirttypes.Name: + case libvirttypes.Name, openstacktypes.Name, baremetaltypes.Name, nonetypes.Name, vspheretypes.Name, ovirttypes.Name, kubevirttypes.Name, powervstypes.Name: default: return errors.New("invalid Platform") } diff --git a/pkg/asset/manifests/infrastructure.go b/pkg/asset/manifests/infrastructure.go index b63d2ef2252..b9d71557548 100644 --- a/pkg/asset/manifests/infrastructure.go +++ b/pkg/asset/manifests/infrastructure.go @@ -22,6 +22,7 @@ import ( "github.com/openshift/installer/pkg/types/none" "github.com/openshift/installer/pkg/types/openstack" "github.com/openshift/installer/pkg/types/ovirt" + "github.com/openshift/installer/pkg/types/powervs" "github.com/openshift/installer/pkg/types/vsphere" ) @@ -205,6 +206,13 @@ func (i *Infrastructure) Generate(dependencies asset.Parents) error { APIServerInternalIP: installConfig.Config.Kubevirt.APIVIP, IngressIP: installConfig.Config.Kubevirt.IngressVIP, } + case powervs.Name: + config.Spec.PlatformSpec.Type = configv1.PowerVSPlatformType + config.Status.PlatformStatus.PowerVS = &configv1.PowerVSPlatformStatus{ + Region: installConfig.Config.Platform.PowerVS.Region, + Zone: installConfig.Config.Platform.PowerVS.Zone, + } + default: config.Spec.PlatformSpec.Type = configv1.NonePlatformType } diff --git a/pkg/asset/quota/quota.go b/pkg/asset/quota/quota.go index e5a6ab9c044..105ea2299cc 100644 --- a/pkg/asset/quota/quota.go +++ b/pkg/asset/quota/quota.go @@ -31,6 +31,7 @@ import ( "github.com/openshift/installer/pkg/types/none" typesopenstack "github.com/openshift/installer/pkg/types/openstack" "github.com/openshift/installer/pkg/types/ovirt" + "github.com/openshift/installer/pkg/types/powervs" "github.com/openshift/installer/pkg/types/vsphere" ) @@ -141,7 +142,7 @@ func (a *PlatformQuotaCheck) Generate(dependencies asset.Parents) error { return summarizeFailingReport(reports) } summarizeReport(reports) - case azure.Name, baremetal.Name, ibmcloud.Name, libvirt.Name, none.Name, ovirt.Name, vsphere.Name, kubevirt.Name: + case azure.Name, baremetal.Name, ibmcloud.Name, libvirt.Name, none.Name, ovirt.Name, powervs.Name, vsphere.Name, kubevirt.Name: // no special provisioning requirements to check default: err = fmt.Errorf("unknown platform type %q", platform) diff --git a/pkg/asset/rhcos/image.go b/pkg/asset/rhcos/image.go index 2f339ac1bd5..abd9c8bc80d 100644 --- a/pkg/asset/rhcos/image.go +++ b/pkg/asset/rhcos/image.go @@ -25,6 +25,7 @@ import ( "github.com/openshift/installer/pkg/types/none" "github.com/openshift/installer/pkg/types/openstack" "github.com/openshift/installer/pkg/types/ovirt" + "github.com/openshift/installer/pkg/types/powervs" "github.com/openshift/installer/pkg/types/vsphere" ) @@ -158,6 +159,16 @@ func osImage(config *types.InstallConfig) (string, error) { return rhcos.FindArtifactURL(a) } return "", fmt.Errorf("%s: No vmware build found", st.FormatPrefix(archName)) + case powervs.Name: + // Check for image URL override + if config.Platform.PowerVS.ClusterOSImage != "" { + return config.Platform.PowerVS.ClusterOSImage, nil + } + + if a, ok := streamArch.Artifacts["powervs"]; ok { + return rhcos.FindArtifactURL(a) + } + return "", fmt.Errorf("%s: No Power VS build found", st.FormatPrefix(archName)) case none.Name: return "", nil default: diff --git a/pkg/explain/printer_test.go b/pkg/explain/printer_test.go index 05d987bc4a7..b6229bcc0f3 100644 --- a/pkg/explain/printer_test.go +++ b/pkg/explain/printer_test.go @@ -114,6 +114,9 @@ func Test_PrintFields(t *testing.T) { ovirt Ovirt is the configuration used when installing on oVirt. + powervs + PowerVS is the configuration used when installing on Power VS. + vsphere VSphere is the configuration used when installing on vSphere.`, }, { diff --git a/pkg/rhcos/powervs_regions.go b/pkg/rhcos/powervs_regions.go new file mode 100644 index 00000000000..66678b1dff4 --- /dev/null +++ b/pkg/rhcos/powervs_regions.go @@ -0,0 +1,86 @@ +package rhcos + +// Since there is no API to query these, we have to hard-code them here. + +// PowerVSRegion describes resources associated with a region in Power VS. +// We're using a few items from the IBM Cloud VPC offering. The region names +// for VPC are different so another function of this is to correlate those. +type PowerVSRegion struct { + Name string + Description string + VPCRegion string + Zones []string +} + +// PowerVSRegions holds the regions for IBM Power VS, and descriptions used during the survey +var PowerVSRegions = map[string]PowerVSRegion{ + "dal": { + Name: "dal", + Description: "Dallas, USA", + VPCRegion: "us-south", + Zones: []string{"dal12"}, + }, + "eu-de": { + Name: "eu-de", + Description: "Frankfurt, Germany", + VPCRegion: "eu-de", + Zones: []string{ + "eu-de-1", + "eu-de-2", + }, + }, + "lon": { + Name: "lon", + Description: "London, UK.", + VPCRegion: "eu-gb", + Zones: []string{ + "lon04", + "lon06", + }, + }, + "osa": { + Name: "osa", + Description: "Osaka, Japan", + VPCRegion: "jp-osa", + Zones: []string{"osa21"}, + }, + "syd": { + Name: "syd", + Description: "Sydney, Australia", + VPCRegion: "au-syd", + Zones: []string{"syd04"}, + }, + "sao": { + Name: "sao", + Description: "São Paulo, Brazil", + VPCRegion: "br-sao", + Zones: []string{"sao01"}, + }, + "tor": { + Name: "tor", + Description: "Toronto, Canada", + VPCRegion: "ca-tor", + Zones: []string{"tor01"}, + }, + "tok": { + Name: "tok", + Description: "Tokyo, Japan", + VPCRegion: "jp-tok", + Zones: []string{"tok04"}, + }, + "us-east": { + Name: "us-east", + Description: "Washington DC, USA", + VPCRegion: "us-east", + Zones: []string{"us-east"}, + }, +} + +// PowerVSZones retrieves a slice of all zones in Power VS +func PowerVSZones() []string { + var zones []string + for _, r := range PowerVSRegions { + zones = append(zones, r.Zones...) + } + return zones +} diff --git a/pkg/terraform/exec/plugins/ibms3presign.go b/pkg/terraform/exec/plugins/ibms3presign.go new file mode 100644 index 00000000000..21a0f742caf --- /dev/null +++ b/pkg/terraform/exec/plugins/ibms3presign.go @@ -0,0 +1,15 @@ +package plugins + +import ( + "github.com/hashicorp/terraform-plugin-sdk/plugin" + "github.com/openshift/installer/pkg/terraform/exec/plugins/ibms3presign" +) + +func init() { + ibmS3PresignProvider := func() { + plugin.Serve(&plugin.ServeOpts{ + ProviderFunc: ibms3presign.Provider, + }) + } + KnownPlugins["terraform-provider-ibms3presign"] = ibmS3PresignProvider +} diff --git a/pkg/terraform/exec/plugins/ibms3presign/provider.go b/pkg/terraform/exec/plugins/ibms3presign/provider.go new file mode 100644 index 00000000000..35a8beef52a --- /dev/null +++ b/pkg/terraform/exec/plugins/ibms3presign/provider.go @@ -0,0 +1,15 @@ +package ibms3presign + +import ( + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +// Provider returns a terraform.ResourceProvider. +func Provider() terraform.ResourceProvider { + return &schema.Provider{ + ResourcesMap: map[string]*schema.Resource{ + "ibms3presign": resourcePresign(), + }, + } +} diff --git a/pkg/terraform/exec/plugins/ibms3presign/resource_presign.go b/pkg/terraform/exec/plugins/ibms3presign/resource_presign.go new file mode 100644 index 00000000000..f780866ce10 --- /dev/null +++ b/pkg/terraform/exec/plugins/ibms3presign/resource_presign.go @@ -0,0 +1,154 @@ +package ibms3presign + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/s3" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +var storageClasses = []string{ + "standard", "vault", "cold", "flex", "smart", +} + +var endpointTypes = []string{ + "public", "private", "direct", +} + +func resourcePresign() *schema.Resource { + return &schema.Resource{ + Create: resourceIBMCOSBucketObjectPresignCreate, + Read: resourceIBMCOSBucketObjectPresignCreate, + Delete: resourceIBMCOSBucketObjectPresignDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "access_key_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Sensitive: true, + Description: "access_key_id", + }, + "secret_access_key": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Sensitive: true, + Description: "secret_access_key", + }, + "bucket_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "COS Bucket name", + }, + "key": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "COS object key", + }, + "region_location": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "Region Location info.", + }, + "storage_class": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateAllowedStringValue(storageClasses), + ForceNew: true, + Description: "Storage class info", + }, + "endpoint_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateAllowedStringValue(endpointTypes), + Description: "public, private or direct", + Default: "public", + }, + "presigned_url": { + Type: schema.TypeString, + Computed: true, + Optional: true, + Sensitive: true, + Description: "Presigned URL", + }, + "expire": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + Description: "Set expire time for URL in minutes", + Default: 60, + }, + }, + } +} + +func validateAllowedStringValue(validValues []string) schema.SchemaValidateFunc { + return func(v interface{}, k string) (ws []string, errors []error) { + input := v.(string) + existed := false + for _, s := range validValues { + if s == input { + existed = true + break + } + } + if !existed { + errors = append(errors, fmt.Errorf( + "%q must contain a value from %#v, got %q", + k, validValues, input)) + } + return + + } +} + +// resourceIBMCOSBucketObjectPresignDelete is just a placeholder NOP function to satisfy the schema resource +func resourceIBMCOSBucketObjectPresignDelete(d *schema.ResourceData, m interface{}) error { + return nil +} + +func resourceIBMCOSBucketObjectPresignCreate(d *schema.ResourceData, m interface{}) error { + storageClass := d.Get("storage_class").(string) + bucketName := d.Get("bucket_name").(string) + object := d.Get("key").(string) + regionLocation := d.Get("region_location").(string) + endpointType := d.Get("endpoint_type").(string) + accessKey := d.Get("access_key_id").(string) + secretKey := d.Get("secret_access_key").(string) + expire := d.Get("expire").(int) + var svcEndpoint string + if endpointType != "public" { + regionLocation = fmt.Sprintf("%s.%s", endpointType, regionLocation) + } + svcEndpoint = fmt.Sprintf("https://s3.%s.cloud-object-storage.appdomain.cloud", regionLocation) + region := fmt.Sprintf("%s-%s", regionLocation, storageClass) + conf := aws.NewConfig(). + WithRegion(region). + WithEndpoint(svcEndpoint). + WithS3ForcePathStyle(true). + WithCredentials(credentials.NewStaticCredentials(accessKey, secretKey, "")) + sess := session.Must(session.NewSession()) // Creating a new session + client := s3.New(sess, conf) + req, _ := client.GetObjectRequest(&s3.GetObjectInput{ + Bucket: aws.String(bucketName), + Key: aws.String(object), + }) + presignedURL, err := req.Presign(time.Duration(expire) * time.Minute) + if err != nil { + return err + } + d.Set("presigned_url", presignedURL) + d.SetId(fmt.Sprintf("%s/%s", bucketName, object)) + return nil +} diff --git a/pkg/tfvars/powervs/powervs.go b/pkg/tfvars/powervs/powervs.go new file mode 100644 index 00000000000..f3f442d3170 --- /dev/null +++ b/pkg/tfvars/powervs/powervs.go @@ -0,0 +1,89 @@ +// Package powervs contains Power Virtual Servers-specific Terraform-variable logic. +package powervs + +import ( + "encoding/json" + "fmt" + "math/rand" + "time" + + "github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1" + "github.com/openshift/installer/pkg/rhcos" +) + +type config struct { + ServiceInstanceID string `json:"powervs_cloud_instance_id"` + APIKey string `json:"powervs_api_key"` + SSHKey string `json:"powervs_ssh_key"` + PowerVSRegion string `json:"powervs_region"` + PowerVSZone string `json:"powervs_zone"` + VPCRegion string `json:"powervs_vpc_region"` + VPCZone string `json:"powervs_vpc_zone"` + PowerVSResourceGroup string `json:"powervs_resource_group"` + CISInstanceCRN string `json:"powervs_cis_crn"` + ImageName string `json:"powervs_image_name"` + ImageID string `json:"powervs_image_id"` + NetworkName string `json:"powervs_network_name"` + VPCName string `json:"powervs_vpc_name"` + VPCSubnetName string `json:"powervs_vpc_subnet_name"` + BootstrapMemory string `json:"powervs_bootstrap_memory"` + BootstrapProcessors string `json:"powervs_bootstrap_processors"` + MasterMemory string `json:"powervs_master_memory"` + MasterProcessors string `json:"powervs_master_processors"` + ProcType string `json:"powervs_proc_type"` + SysType string `json:"powervs_sys_type"` +} + +// TFVarsSources contains the parameters to be converted into Terraform variables +type TFVarsSources struct { + MasterConfigs []*v1alpha1.PowerVSMachineProviderConfig + APIKey string + SSHKey string + Region string + Zone string + NetworkName string + PowerVSResourceGroup string + VPCZone string + CISInstanceCRN string + VPCName string + VPCSubnetName string +} + +// TFVars generates Power VS-specific Terraform variables launching the cluster. +func TFVars(sources TFVarsSources) ([]byte, error) { + masterConfig := sources.MasterConfigs[0] + // TODO(mjturek): Allow user to specify vpcRegion in install config like we're doing for vpcZone + vpcRegion := rhcos.PowerVSRegions[sources.Region].VPCRegion + + vpcZone := sources.VPCZone + if vpcZone == "" { + // Randomly select a zone in the VPC region. + rand.Seed(time.Now().UnixNano()) + vpcZone = fmt.Sprintf("%s-%d", vpcRegion, rand.Intn(3)+1) + } + + //@TODO: Add resource group to platform + cfg := &config{ + ServiceInstanceID: masterConfig.ServiceInstanceID, + APIKey: sources.APIKey, + SSHKey: sources.SSHKey, + PowerVSRegion: sources.Region, + PowerVSZone: sources.Zone, + VPCRegion: vpcRegion, + VPCZone: vpcZone, + PowerVSResourceGroup: sources.PowerVSResourceGroup, + CISInstanceCRN: sources.CISInstanceCRN, + ImageName: *masterConfig.Image.Name, + NetworkName: *masterConfig.Network.Name, + VPCName: sources.VPCName, + VPCSubnetName: sources.VPCSubnetName, + BootstrapMemory: masterConfig.Memory, + BootstrapProcessors: masterConfig.Processors, + MasterMemory: masterConfig.Memory, + MasterProcessors: masterConfig.Processors, + ProcType: masterConfig.ProcType, + SysType: masterConfig.SysType, + } + + return json.MarshalIndent(cfg, "", " ") +} diff --git a/pkg/types/clustermetadata.go b/pkg/types/clustermetadata.go index 73c7486563c..d6f1851a46f 100644 --- a/pkg/types/clustermetadata.go +++ b/pkg/types/clustermetadata.go @@ -10,6 +10,7 @@ import ( "github.com/openshift/installer/pkg/types/libvirt" "github.com/openshift/installer/pkg/types/openstack" "github.com/openshift/installer/pkg/types/ovirt" + "github.com/openshift/installer/pkg/types/powervs" "github.com/openshift/installer/pkg/types/vsphere" ) @@ -35,6 +36,7 @@ type ClusterPlatformMetadata struct { IBMCloud *ibmcloud.Metadata `json:"ibmcloud,omitempty"` BareMetal *baremetal.Metadata `json:"baremetal,omitempty"` Ovirt *ovirt.Metadata `json:"ovirt,omitempty"` + PowerVS *powervs.Metadata `json:"powervs,omitempty"` VSphere *vsphere.Metadata `json:"vsphere,omitempty"` Kubevirt *kubevirt.Metadata `json:"kubevirt,omitempty"` } @@ -70,6 +72,9 @@ func (cpm *ClusterPlatformMetadata) Platform() string { if cpm.Ovirt != nil { return ovirt.Name } + if cpm.PowerVS != nil { + return powervs.Name + } if cpm.VSphere != nil { return vsphere.Name } diff --git a/pkg/types/defaults/installconfig.go b/pkg/types/defaults/installconfig.go index e7d2bcafaa8..5d8627b6485 100644 --- a/pkg/types/defaults/installconfig.go +++ b/pkg/types/defaults/installconfig.go @@ -15,6 +15,7 @@ import ( nonedefaults "github.com/openshift/installer/pkg/types/none/defaults" openstackdefaults "github.com/openshift/installer/pkg/types/openstack/defaults" ovirtdefaults "github.com/openshift/installer/pkg/types/ovirt/defaults" + powervsdefaults "github.com/openshift/installer/pkg/types/powervs/defaults" vspheredefaults "github.com/openshift/installer/pkg/types/vsphere/defaults" ) @@ -106,6 +107,8 @@ func SetInstallConfigDefaults(c *types.InstallConfig) { for i := range c.Compute { ovirtdefaults.SetComputeDefaults(c.Platform.Ovirt, &c.Compute[i]) } + case c.Platform.PowerVS != nil: + powervsdefaults.SetPlatformDefaults(c.Platform.PowerVS) case c.Platform.Kubevirt != nil: kubevirtdefaults.SetPlatformDefaults(c.Platform.Kubevirt) case c.Platform.None != nil: diff --git a/pkg/types/installconfig.go b/pkg/types/installconfig.go index 00bb8e294ad..399c14ec7a2 100644 --- a/pkg/types/installconfig.go +++ b/pkg/types/installconfig.go @@ -15,6 +15,7 @@ import ( "github.com/openshift/installer/pkg/types/none" "github.com/openshift/installer/pkg/types/openstack" "github.com/openshift/installer/pkg/types/ovirt" + "github.com/openshift/installer/pkg/types/powervs" "github.com/openshift/installer/pkg/types/vsphere" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -47,6 +48,7 @@ var ( ibmcloud.Name, kubevirt.Name, none.Name, + powervs.Name, } // OKD is a setting to enable community-only modifications @@ -200,6 +202,10 @@ type Platform struct { // +optional OpenStack *openstack.Platform `json:"openstack,omitempty"` + // PowerVS is the configuration used when installing on Power VS. + // +optional + PowerVS *powervs.Platform `json:"powervs,omitempty"` + // VSphere is the configuration used when installing on vSphere. // +optional VSphere *vsphere.Platform `json:"vsphere,omitempty"` @@ -240,6 +246,8 @@ func (p *Platform) Name() string { return vsphere.Name case p.Ovirt != nil: return ovirt.Name + case p.PowerVS != nil: + return powervs.Name case p.Kubevirt != nil: return kubevirt.Name default: diff --git a/pkg/types/machinepools.go b/pkg/types/machinepools.go index 683981a20a8..49d7bf88611 100644 --- a/pkg/types/machinepools.go +++ b/pkg/types/machinepools.go @@ -10,6 +10,7 @@ import ( "github.com/openshift/installer/pkg/types/libvirt" "github.com/openshift/installer/pkg/types/openstack" "github.com/openshift/installer/pkg/types/ovirt" + "github.com/openshift/installer/pkg/types/powervs" "github.com/openshift/installer/pkg/types/vsphere" ) @@ -98,6 +99,9 @@ type MachinePoolPlatform struct { // Ovirt is the configuration used when installing on oVirt. Ovirt *ovirt.MachinePool `json:"ovirt,omitempty"` + // PowerVS is the configuration used when installing on IBM Power VS. + PowerVS *powervs.MachinePool `json:"powervs,omitempty"` + // Kubevirt is the configuration used when installing on Kubevirt. Kubevirt *kubevirt.MachinePool `json:"kubevirt,omitempty"` } @@ -127,6 +131,8 @@ func (p *MachinePoolPlatform) Name() string { return vsphere.Name case p.Ovirt != nil: return ovirt.Name + case p.PowerVS != nil: + return powervs.Name case p.Kubevirt != nil: return kubevirt.Name default: diff --git a/pkg/types/powervs/OWNERS b/pkg/types/powervs/OWNERS new file mode 100644 index 00000000000..dbf1edc8d97 --- /dev/null +++ b/pkg/types/powervs/OWNERS @@ -0,0 +1,8 @@ +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md +# This file just uses aliases defined in OWNERS_ALIASES in the root of the +# installer repo. + +approvers: + - powervs-approvers +reviewers: + - powervs-reviewers diff --git a/pkg/types/powervs/defaults/platform.go b/pkg/types/powervs/defaults/platform.go new file mode 100644 index 00000000000..86d8cda6730 --- /dev/null +++ b/pkg/types/powervs/defaults/platform.go @@ -0,0 +1,9 @@ +package defaults + +import ( + "github.com/openshift/installer/pkg/types/powervs" +) + +// SetPlatformDefaults sets the defaults for the platform. +func SetPlatformDefaults(p *powervs.Platform) { +} diff --git a/pkg/types/powervs/doc.go b/pkg/types/powervs/doc.go new file mode 100644 index 00000000000..7f0864590c0 --- /dev/null +++ b/pkg/types/powervs/doc.go @@ -0,0 +1,6 @@ +// Package powervs contains Power VS-specific structures for installer +// configuration and management. +package powervs + +// Name is name for the Power VS platform. +const Name string = "powervs" diff --git a/pkg/types/powervs/machinepools.go b/pkg/types/powervs/machinepools.go new file mode 100644 index 00000000000..2a1126279a9 --- /dev/null +++ b/pkg/types/powervs/machinepools.go @@ -0,0 +1,69 @@ +package powervs + +// MachinePool stores the configuration for a machine pool installed on IBM Power VS. +type MachinePool struct { + // ServiceInstance is Service Instance to install into. + // + ServiceInstance string `json:"serviceinstance"` + + // Name is the name of the instance + // + Name string `json:"name"` + + // KeyPairName is the name of an SSH key pair stored in the Power VS + // Service Instance + KeyPairName string `json:"keypairname"` + + // VolumeIDs is the list of volumes attached to the instance. + // + // +optional + VolumeIDs []string `json:"volumeIDs"` + + // Memory defines the memory in GB for the instance. + // + Memory int `json:"memory"` + + // Processors defines the processing units for the instance. + // @TODO: + Processors float64 `json:"processors"` + + // ProcType defines the processor sharing model for the instance. + // + // +optional + ProcType string `json:"procType"` + + // ImageName defines the boot image name for the instance. + // + ImageName string `json:"imageName"` + + // NetworkIDs defines the network IDs of the instance. + // + NetworkIDs []string `json:"networkIDs"` + + // SysType defines the system type for instance. + // + // +optional + SysType string `json:"sysType"` +} + +// Set stores values from required into a +func (a *MachinePool) Set(required *MachinePool) { + if required == nil || a == nil { + return + } + if required.ImageName != "" { + a.ImageName = required.ImageName + } + if required.ServiceInstance != "" { + a.ServiceInstance = required.ServiceInstance + } + if len(required.NetworkIDs) > 0 { + a.NetworkIDs = required.NetworkIDs + } + if required.ServiceInstance != "" { + a.ServiceInstance = required.ServiceInstance + } + if required.KeyPairName != "" { + a.KeyPairName = required.KeyPairName + } +} diff --git a/pkg/types/powervs/metadata.go b/pkg/types/powervs/metadata.go new file mode 100644 index 00000000000..ef67610ab97 --- /dev/null +++ b/pkg/types/powervs/metadata.go @@ -0,0 +1,8 @@ +package powervs + +// Metadata contains Power VS metadata (e.g. for uninstalling the cluster). +type Metadata struct { + CISInstanceCRN string `json:"cisInstanceCRN"` + Region string `json:"region"` + Zone string `json:"zone"` +} diff --git a/pkg/types/powervs/platform.go b/pkg/types/powervs/platform.go new file mode 100644 index 00000000000..f8c35f54b60 --- /dev/null +++ b/pkg/types/powervs/platform.go @@ -0,0 +1,80 @@ +package powervs + +// Platform stores all the global configuration that all machinesets +// use. +// Note: The subsequent mentions of future-TF support refer to work that is +// undergoing and should be available to test well in time for 4.10 feature- +// freeze. We do not plan to GA with these as required inputs. +type Platform struct { + + // ServiceInstanceID is the ID of the Power IAAS instance created from the IBM Cloud Catalog + ServiceInstanceID string `json:"serviceInstance"` + + // PowerVSResourceGroup is the resource group for creating Power VS resources. + PowerVSResourceGroup string `json:"powervsResourceGroup"` + + // Region specifies the IBM Cloud region where the cluster will be created. + Region string `json:"region"` + + // Zone specifies the IBM Cloud colo region where the cluster will be created. + // Required for multi-zone regions. + Zone string `json:"zone"` + + // Zone in the region used to create VPC resources. Leave unset + // to allow installer to randomly select a zone. + // + // +optional + VPCZone string `json:"vpcRegion,omitempty"` + + // UserID is the login for the user's IBM Cloud account. + UserID string `json:"userID"` + + // APIKey is the API key for the user's IBM Cloud account. + // + // +optional + APIKey string `json:"APIKey,omitempty"` + + // SSHKeyName is the name of an SSH key stored in the Service Instance. + SSHKeyName string `json:"SSHKeyName,omitempty"` + + // VPC is a VPC inside IBM Cloud. Needed in order to create VPC Load Balancers. + // + // @TODO: make this +optional when we have TF support + VPC string `json:"vpc,omitempty"` + + // Subnets specifies existing subnets (by ID) where cluster + // resources will be created. Leave unset to have the installer + // create subnets in a new VPC on your behalf. + // @TODO: Rename VPCSubnetID & make into string + // + // @TODO: make this +optional when we have TF support + Subnets []string `json:"subnets,omitempty"` + + // PVSNetworkName specifies an existing network within the Power VS Service Instance. + // @TODO: make this +optional when we have TF support + PVSNetworkName string `json:"pvsNetworkName,omitempty"` + + // UserTags additional keys and values that the installer will add + // as tags to all resources that it creates. Resources created by the + // cluster itself may not include these tags. + // +optional + UserTags map[string]string `json:"userTags,omitempty"` + + // BootstrapOSImage is a pre-created boot image to override the default + // OS image for the bootstrap node. + // + // +optional + BootstrapOSImage string `json:"bootstrapOSImage,omitempty"` + + // ClusterOSImage is a pre-created Power VS boot image that overrides the + // default image for cluster nodes. + // + // @TODO: make this +optional, add omitempty when we have TF support + ClusterOSImage string `json:"clusterOSImage"` + + // DefaultMachinePlatform is the default configuration used when + // installing on Power VS for machine pools which do not define their own + // platform configuration. + // +optional + DefaultMachinePlatform *MachinePool `json:"defaultMachinePlatform,omitempty"` +} diff --git a/pkg/types/powervs/validation/machinepool.go b/pkg/types/powervs/validation/machinepool.go new file mode 100644 index 00000000000..b214e4a0bae --- /dev/null +++ b/pkg/types/powervs/validation/machinepool.go @@ -0,0 +1,27 @@ +package validation + +import ( + "k8s.io/apimachinery/pkg/util/validation/field" + + "github.com/openshift/installer/pkg/types/powervs" +) + +// ValidateMachinePool checks that the specified machine pool is valid. +func ValidateMachinePool(p *powervs.MachinePool, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + /* + for i, zone := range p.Zones { + if !strings.HasPrefix(zone, platform.Region) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("zones").Index(i), zone, fmt.Sprintf("Zone not in configured region (%s)", platform.Region))) + } + } + + if p.OSDisk.DiskType != "" { + diskTypes := sets.NewString("pd-standard", "pd-ssd") + if !diskTypes.Has(p.OSDisk.DiskType) { + allErrs = append(allErrs, field.NotSupported(fldPath.Child("diskType"), p.OSDisk.DiskType, diskTypes.List())) + } + }*/ + + return allErrs +} diff --git a/pkg/types/powervs/validation/platform.go b/pkg/types/powervs/validation/platform.go new file mode 100644 index 00000000000..ec3855f144c --- /dev/null +++ b/pkg/types/powervs/validation/platform.go @@ -0,0 +1,23 @@ +package validation + +import ( + "k8s.io/apimachinery/pkg/util/validation/field" + + "github.com/openshift/installer/pkg/types/powervs" +) + +// ValidatePlatform checks that the specified platform is valid. +func ValidatePlatform(p *powervs.Platform, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + if p.Region == "" { + allErrs = append(allErrs, field.Required(fldPath.Child("region"), "region must be specified")) + } + + /*if p.DefaultMachinePlatform != nil { + allErrs = append(allErrs, ValidateMachinePool(p, p.DefaultMachinePlatform, fldPath.Child("defaultMachinePlatform"))...) + }*/ + return allErrs +} + +//var schemeRE = regexp.MustCompile("^([^:]+)://") diff --git a/pkg/types/validation/installconfig.go b/pkg/types/validation/installconfig.go index eff0cca665b..39ca14d8910 100644 --- a/pkg/types/validation/installconfig.go +++ b/pkg/types/validation/installconfig.go @@ -39,6 +39,8 @@ import ( openstackvalidation "github.com/openshift/installer/pkg/types/openstack/validation" "github.com/openshift/installer/pkg/types/ovirt" ovirtvalidation "github.com/openshift/installer/pkg/types/ovirt/validation" + "github.com/openshift/installer/pkg/types/powervs" + powervsvalidation "github.com/openshift/installer/pkg/types/powervs/validation" "github.com/openshift/installer/pkg/types/vsphere" vspherevalidation "github.com/openshift/installer/pkg/types/vsphere/validation" "github.com/openshift/installer/pkg/validate" @@ -465,6 +467,9 @@ func validatePlatform(platform *types.Platform, fldPath *field.Path, network *ty return openstackvalidation.ValidatePlatform(platform.OpenStack, network, f, c) }) } + if platform.PowerVS != nil { + validate(powervs.Name, platform.PowerVS, func(f *field.Path) field.ErrorList { return powervsvalidation.ValidatePlatform(platform.PowerVS, f) }) + } if platform.VSphere != nil { validate(vsphere.Name, platform.VSphere, func(f *field.Path) field.ErrorList { return vspherevalidation.ValidatePlatform(platform.VSphere, f) }) } diff --git a/pkg/types/validation/installconfig_test.go b/pkg/types/validation/installconfig_test.go index c2cfcc90254..388a1a7f283 100644 --- a/pkg/types/validation/installconfig_test.go +++ b/pkg/types/validation/installconfig_test.go @@ -514,7 +514,7 @@ func TestValidateInstallConfig(t *testing.T) { c.Platform = types.Platform{} return c }(), - expectedError: `^platform: Invalid value: "": must specify one of the platforms \(aws, azure, baremetal, gcp, ibmcloud, kubevirt, none, openstack, ovirt, vsphere\)$`, + expectedError: `^platform: Invalid value: "": must specify one of the platforms \(aws, azure, baremetal, gcp, ibmcloud, kubevirt, none, openstack, ovirt, powervs, vsphere\)$`, }, { name: "multiple platforms", @@ -545,7 +545,7 @@ func TestValidateInstallConfig(t *testing.T) { } return c }(), - expectedError: `^platform: Invalid value: "libvirt": must specify one of the platforms \(aws, azure, baremetal, gcp, ibmcloud, kubevirt, none, openstack, ovirt, vsphere\)$`, + expectedError: `^platform: Invalid value: "libvirt": must specify one of the platforms \(aws, azure, baremetal, gcp, ibmcloud, kubevirt, none, openstack, ovirt, powervs, vsphere\)$`, }, { name: "invalid libvirt platform", @@ -557,7 +557,7 @@ func TestValidateInstallConfig(t *testing.T) { c.Platform.Libvirt.URI = "" return c }(), - expectedError: `^\[platform: Invalid value: "libvirt": must specify one of the platforms \(aws, azure, baremetal, gcp, ibmcloud, kubevirt, none, openstack, ovirt, vsphere\), platform\.libvirt\.uri: Invalid value: "": invalid URI "" \(no scheme\)]$`, + expectedError: `^\[platform: Invalid value: "libvirt": must specify one of the platforms \(aws, azure, baremetal, gcp, ibmcloud, kubevirt, none, openstack, ovirt, powervs, vsphere\), platform\.libvirt\.uri: Invalid value: "": invalid URI "" \(no scheme\)]$`, }, { name: "valid none platform", diff --git a/pkg/types/validation/machinepools.go b/pkg/types/validation/machinepools.go index d97562168fb..06dca783593 100644 --- a/pkg/types/validation/machinepools.go +++ b/pkg/types/validation/machinepools.go @@ -24,6 +24,8 @@ import ( openstackvalidation "github.com/openshift/installer/pkg/types/openstack/validation" "github.com/openshift/installer/pkg/types/ovirt" ovirtvalidation "github.com/openshift/installer/pkg/types/ovirt/validation" + "github.com/openshift/installer/pkg/types/powervs" + powervsvalidation "github.com/openshift/installer/pkg/types/powervs/validation" "github.com/openshift/installer/pkg/types/vsphere" vspherevalidation "github.com/openshift/installer/pkg/types/vsphere/validation" ) @@ -119,6 +121,9 @@ func validateMachinePoolPlatform(platform *types.Platform, p *types.MachinePoolP if p.Ovirt != nil { validate(ovirt.Name, p.Ovirt, func(f *field.Path) field.ErrorList { return ovirtvalidation.ValidateMachinePool(p.Ovirt, f) }) } + if p.PowerVS != nil { + validate(powervs.Name, p.PowerVS, func(f *field.Path) field.ErrorList { return powervsvalidation.ValidateMachinePool(p.PowerVS, f) }) + } if p.Kubevirt != nil { validate(kubevirt.Name, p.Kubevirt, func(f *field.Path) field.ErrorList { return kubevirtvalidation.ValidateMachinePool(p.Kubevirt, f) }) } From 1a5cb86d848a67e1be1b0d5b645dab2576b6f8e7 Mon Sep 17 00:00:00 2001 From: Christy Norman Date: Thu, 30 Sep 2021 11:04:09 -0500 Subject: [PATCH 2/2] vendor updates putting these into a seperate commit to keep things a little cleaner Signed-off-by: Christy Norman --- go.sum | 78 +-- .../clients/instance/ibm-pi-clonevolumes.go | 74 +- .../instance/ibm-pi-cloud-connection.go | 84 ++- .../clients/instance/ibm-pi-cloud-instance.go | 7 +- .../clients/instance/ibm-pi-image.go | 5 +- .../clients/instance/ibm-pi-instance.go | 14 +- .../clients/instance/ibm-pi-key.go | 14 +- .../clients/instance/ibm-pi-network.go | 9 +- .../instance/ibm-pi-placement-groups.go | 95 +++ .../instance/ibm-pi-storage-capacity.go | 37 +- .../clients/instance/ibm-pi-system-pools.go | 3 +- .../clients/instance/ibm-pi-tasks.go | 5 +- .../clients/instance/ibm-pi-volume.go | 27 +- .../power-go-client/errors/errors.go | 137 ++++ .../power-go-client/helpers/constants.go | 92 ++- .../p_cloud_cloud_connections_client.go | 53 +- ...cloud_cloudconnections_delete_responses.go | 36 + .../pcloud_cloudconnections_get_responses.go | 36 + ...cloud_cloudconnections_getall_responses.go | 36 + ...udconnections_networks_delete_responses.go | 70 ++ ...loudconnections_networks_get_parameters.go | 178 ----- ...cloudconnections_networks_get_responses.go | 175 ----- ...cloudconnections_networks_put_responses.go | 70 ++ .../pcloud_cloudconnections_post_responses.go | 36 + .../pcloud_cloudconnections_put_responses.go | 114 +++- ...s_virtualprivateclouds_getall_responses.go | 36 + .../pcloud_events_get_responses.go | 36 + .../pcloud_events_getquery_responses.go | 36 + ..._cloudinstances_images_delete_responses.go | 36 + ...dinstances_images_export_post_responses.go | 36 + ...oud_cloudinstances_images_get_responses.go | 36 + ..._cloudinstances_images_getall_responses.go | 36 + ...ud_cloudinstances_images_post_responses.go | 36 + ...loudinstances_stockimages_get_responses.go | 36 + ...instances_stockimages_getall_parameters.go | 32 + ...dinstances_stockimages_getall_responses.go | 36 + .../pcloud_images_get_responses.go | 36 + .../pcloud_images_getall_parameters.go | 32 + .../pcloud_images_getall_responses.go | 36 + .../pcloud_cloudinstances_delete_responses.go | 36 + .../pcloud_cloudinstances_get_responses.go | 36 + .../pcloud_cloudinstances_put_responses.go | 36 + .../pcloud_networks_delete_responses.go | 36 + .../pcloud_networks_get_responses.go | 36 + .../pcloud_networks_getall_responses.go | 36 + .../pcloud_networks_ports_delete_responses.go | 36 + .../pcloud_networks_ports_get_responses.go | 36 + .../pcloud_networks_ports_getall_responses.go | 36 + .../pcloud_networks_ports_post_responses.go | 36 + .../pcloud_networks_ports_put_responses.go | 36 + .../pcloud_networks_post_responses.go | 36 + .../pcloud_networks_put_responses.go | 36 + .../p_cloud_p_vm_instances_client.go | 2 +- ...loud_pvminstances_action_post_responses.go | 36 + ...oud_pvminstances_capture_post_responses.go | 36 + ...cloud_pvminstances_clone_post_responses.go | 36 + ...oud_pvminstances_console_post_responses.go | 36 + .../pcloud_pvminstances_delete_responses.go | 36 + .../pcloud_pvminstances_get_responses.go | 36 + .../pcloud_pvminstances_getall_responses.go | 36 + ..._pvminstances_networks_delete_responses.go | 36 + ...oud_pvminstances_networks_get_responses.go | 36 + ..._pvminstances_networks_getall_responses.go | 36 + ...ud_pvminstances_networks_post_responses.go | 36 + ..._pvminstances_operations_post_responses.go | 36 + .../pcloud_pvminstances_post_parameters.go | 2 +- .../pcloud_pvminstances_post_responses.go | 36 + .../pcloud_pvminstances_put_responses.go | 36 + ...pvminstances_snapshots_getall_responses.go | 72 ++ ...d_pvminstances_snapshots_post_responses.go | 72 ++ ...tances_snapshots_restore_post_responses.go | 36 + .../p_cloud_placement_groups_client.go | 204 ++++++ ...cloud_placementgroups_delete_parameters.go | 157 +++++ ...pcloud_placementgroups_delete_responses.go | 173 +++++ .../pcloud_placementgroups_get_parameters.go | 157 +++++ .../pcloud_placementgroups_get_responses.go | 139 ++++ ...cloud_placementgroups_getall_parameters.go | 136 ++++ ...pcloud_placementgroups_getall_responses.go | 175 +++++ ...acementgroups_members_delete_parameters.go | 181 +++++ ...lacementgroups_members_delete_responses.go | 211 ++++++ ...placementgroups_members_post_parameters.go | 181 +++++ ..._placementgroups_members_post_responses.go | 211 ++++++ .../pcloud_placementgroups_post_parameters.go | 160 +++++ .../pcloud_placementgroups_post_responses.go | 211 ++++++ .../p_cloud_s_a_p/pcloud_sap_get_responses.go | 36 + .../pcloud_sap_getall_responses.go | 36 + .../pcloud_sap_post_responses.go | 36 + ...oudinstances_snapshots_delete_responses.go | 72 ++ ..._cloudinstances_snapshots_get_responses.go | 36 + ...oudinstances_snapshots_getall_responses.go | 36 + ..._cloudinstances_snapshots_put_responses.go | 36 + ...oud_storagecapacity_pools_get_responses.go | 36 + ..._storagecapacity_pools_getall_responses.go | 36 + ...oud_storagecapacity_types_get_responses.go | 36 + ..._storagecapacity_types_getall_responses.go | 36 + .../pcloud_systempools_get_responses.go | 36 + .../pcloud_tasks_delete_responses.go | 72 ++ .../pcloud_tasks_get_responses.go | 36 + .../pcloud_tenants_get_responses.go | 72 ++ .../pcloud_tenants_put_responses.go | 36 + ...pcloud_tenants_sshkeys_delete_responses.go | 36 + .../pcloud_tenants_sshkeys_get_responses.go | 36 + ...pcloud_tenants_sshkeys_getall_responses.go | 36 + .../pcloud_tenants_sshkeys_post_responses.go | 36 + .../pcloud_tenants_sshkeys_put_responses.go | 36 + .../p_cloud_volumes/p_cloud_volumes_client.go | 29 + ...cloudinstances_volumes_delete_responses.go | 36 + ...ud_cloudinstances_volumes_get_responses.go | 36 + ...cloudinstances_volumes_getall_responses.go | 36 + ...d_cloudinstances_volumes_post_responses.go | 36 + ...ud_cloudinstances_volumes_put_responses.go | 36 + ...loud_pvminstances_volumes_get_responses.go | 36 + ...d_pvminstances_volumes_getall_responses.go | 36 + ...instances_volumes_setboot_put_responses.go | 36 + ...v2_pvminstances_volumes_post_parameters.go | 181 +++++ ..._v2_pvminstances_volumes_post_responses.go | 211 ++++++ .../pcloud_v2_volumes_clone_post_responses.go | 36 + ...oud_v2_volumes_clonetasks_get_responses.go | 36 + .../pcloud_v2_volumes_post_responses.go | 72 ++ ...d_v2_volumesclone_cancel_post_responses.go | 36 + ...pcloud_v2_volumesclone_delete_responses.go | 36 + ..._v2_volumesclone_execute_post_responses.go | 36 + .../pcloud_v2_volumesclone_get_responses.go | 36 + ...pcloud_v2_volumesclone_getall_responses.go | 36 + .../pcloud_v2_volumesclone_post_responses.go | 36 + ...ud_v2_volumesclone_start_post_responses.go | 36 + .../pcloud_volumes_clone_post_responses.go | 36 + .../power/client/power_iaas_client.go | 7 + .../power/models/cloud_connection_create.go | 33 +- .../cloud_connection_endpoint_classic.go | 2 +- ...loud_connection_endpoint_classic_update.go | 74 ++ .../models/cloud_connection_endpoint_g_r_e.go | 83 --- .../models/cloud_connection_g_r_e_tunnel.go | 19 +- .../cloud_connection_g_r_e_tunnel_create.go | 81 +++ .../power/models/cloud_connection_speed.go | 54 ++ .../power/models/cloud_connection_update.go | 44 +- ...cloud_connection_virtual_private_clouds.go | 17 + .../power/models/create_data_volume.go | 12 +- .../power/models/create_image.go | 30 +- .../power/models/multi_volumes_create.go | 12 +- .../power/models/owner_info.go | 31 +- .../power/models/p_vm_instance.go | 21 +- .../power/models/p_vm_instance_create.go | 36 +- .../power/models/p_vm_instance_reference.go | 14 +- .../power/models/p_vm_instance_update.go | 6 + .../models/p_vm_instance_update_response.go | 3 + .../power/models/placement_group.go | 152 +++++ .../power/models/placement_group_create.go | 118 ++++ .../power/models/placement_group_server.go | 64 ++ .../power/models/placement_groups.go | 82 +++ .../power/models/s_a_p_create.go | 31 + .../power/models/softlayer_subscription.go | 81 +++ .../power/models/storage_affinity.go | 112 ++++ .../power-go-client/power/models/volume.go | 3 + .../power/models/volume_reference.go | 3 + .../power/models/volumes_attach.go | 64 ++ .../models/volumes_attachment_response.go | 64 ++ .../models/volumes_clone_async_request.go | 6 +- .../power/models/volumes_clone_cancel.go | 2 +- .../power/models/volumes_clone_execute.go | 6 +- .../go-openapi/jsonpointer/.travis.yml | 4 +- .../go-openapi/jsonpointer/pointer.go | 60 +- .../go-openapi/jsonreference/.golangci.yml | 41 -- .../go-openapi/jsonreference/.travis.yml | 15 +- .../github.com/go-openapi/swag/.golangci.yml | 17 - vendor/github.com/go-openapi/swag/.travis.yml | 26 +- vendor/github.com/go-openapi/swag/README.md | 1 + vendor/github.com/go-openapi/swag/go.mod | 14 +- vendor/github.com/go-openapi/swag/go.sum | 29 +- vendor/github.com/go-openapi/swag/loading.go | 24 +- vendor/github.com/go-openapi/swag/util.go | 6 +- ...ersion-operator_01_clusterversion.crd.yaml | 136 +--- ...0_10_config-operator_01_apiserver.crd.yaml | 2 +- .../0000_10_config-operator_01_build.crd.yaml | 2 +- ...ig-operator_01_imagecontentpolicy.crd.yaml | 68 -- ...config-operator_01_infrastructure.crd.yaml | 70 +- ...000_10_config-operator_01_ingress.crd.yaml | 13 +- .../0000_10_config-operator_01_oauth.crd.yaml | 2 +- .../openshift/api/config/v1/register.go | 2 - .../openshift/api/config/v1/types.go | 10 +- .../api/config/v1/types_apiserver.go | 7 +- .../api/config/v1/types_cluster_operator.go | 69 +- .../api/config/v1/types_cluster_version.go | 134 +--- .../openshift/api/config/v1/types_feature.go | 20 +- .../config/v1/types_image_content_policy.go | 89 --- .../api/config/v1/types_infrastructure.go | 103 +-- .../openshift/api/config/v1/types_oauth.go | 2 - .../api/config/v1/zz_generated.deepcopy.go | 275 +------- .../v1/zz_generated.swagger_doc_generated.go | 147 +--- ...ess-operator_00-ingresscontroller.crd.yaml | 9 +- ...00_70_cluster-network-operator_01.crd.yaml | 631 ------------------ ...cluster-network-operator_01.crd.yaml-patch | 3 - ...00_70_cluster-network-operator_01_crd.yaml | 443 ++++++++++++ ...0_90_cluster_csi_driver_01_config.crd.yaml | 3 - ...luster_csi_driver_01_config.crd.yaml-patch | 3 - .../operator/v1/types_csi_cluster_driver.go | 3 - .../api/operator/v1/types_ingress.go | 26 +- .../v1/zz_generated.swagger_doc_generated.go | 2 +- .../cluster-api-provider-powervs/LICENSE | 201 ++++++ ...cheme_openshiftpowervsprovider_v1alpha1.go | 26 + .../pkg/apis/apis.go | 33 + .../v1alpha1/groupversion_info.go | 106 +++ .../powervsmachineproviderconfig_types.go | 90 +++ .../powervsmachineproviderstatus_types.go | 81 +++ .../v1alpha1/zz_generated.deepcopy.go | 178 +++++ .../pkg/apis/machine/v1beta1/consts.go | 6 + .../apis/machine/v1beta1/machine_webhook.go | 24 +- .../v1beta1/machinehealthcheck_types.go | 6 +- .../machine/v1beta1/zz_generated.deepcopy.go | 6 +- vendor/modules.txt | 21 +- 210 files changed, 9493 insertions(+), 2601 deletions(-) create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-placement-groups.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/errors/errors.go delete mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_get_parameters.go delete mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_get_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic_update.go delete mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_g_r_e.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_g_r_e_tunnel_create.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_speed.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group_create.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group_server.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_groups.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/softlayer_subscription.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_affinity.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_attach.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_attachment_response.go delete mode 100644 vendor/github.com/go-openapi/jsonreference/.golangci.yml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagecontentpolicy.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/types_image_content_policy.go delete mode 100644 vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01.crd.yaml delete mode 100644 vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01.crd.yaml-patch create mode 100644 vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01_crd.yaml create mode 100644 vendor/github.com/openshift/cluster-api-provider-powervs/LICENSE create mode 100644 vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/addtoscheme_openshiftpowervsprovider_v1alpha1.go create mode 100644 vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/apis.go create mode 100644 vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/groupversion_info.go create mode 100644 vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/powervsmachineproviderconfig_types.go create mode 100644 vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/powervsmachineproviderstatus_types.go create mode 100644 vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/zz_generated.deepcopy.go diff --git a/go.sum b/go.sum index fc73c3d2614..5f6da251148 100644 --- a/go.sum +++ b/go.sum @@ -115,11 +115,13 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/Djarvur/go-err113 v0.0.0-20200410182137-af658d038157/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Djarvur/go-err113 v0.0.0-20200511133814-5174e21577d5/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Djarvur/go-err113 v0.1.0/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= +github.com/IBM-Cloud/bluemix-go v0.0.0-20200921095234-26d1d0148c62/go.mod h1:gPJbH1etcDj7qS/hBRiLuYW9CY0bRcostSKusa51xR0= github.com/IBM-Cloud/bluemix-go v0.0.0-20210611051827-cdc80c935c05 h1:b/epmuvf99xhUlf81l0r/ciONJSjoUs78t+BC7lCcvI= github.com/IBM-Cloud/bluemix-go v0.0.0-20210611051827-cdc80c935c05/go.mod h1:kqTYO0mts71aa8PVwviaKlCKYud/NbEkFIqU8aHH3/g= github.com/IBM-Cloud/ibm-cloud-cli-sdk v0.5.3/go.mod h1:RiUvKuHKTBmBApDMUQzBL14pQUGKcx/IioKQPIcRQjs= -github.com/IBM-Cloud/power-go-client v1.0.55 h1:XoRU8FWYY8NUKau1nkErkf2FHAUbFEbbXtbLTvaGp9c= github.com/IBM-Cloud/power-go-client v1.0.55/go.mod h1:I4r5tCrA8mV5GFqGAJG4/Tn+/JpR+XLnDCLLNVKJxuI= +github.com/IBM-Cloud/power-go-client v1.0.72 h1:5qoU8JPnFL5dRVR6oimGtAlcnSSDrD9KWs8Co9hAdMs= +github.com/IBM-Cloud/power-go-client v1.0.72/go.mod h1:I4r5tCrA8mV5GFqGAJG4/Tn+/JpR+XLnDCLLNVKJxuI= github.com/IBM/apigateway-go-sdk v0.0.0-20210714141226-a5d5d49caaca h1:crniVcf+YcmgF03NmmfonXwSQ73oJF+IohFYBwknMxs= github.com/IBM/apigateway-go-sdk v0.0.0-20210714141226-a5d5d49caaca/go.mod h1:IjXrnOcTe92Q4pEBHmui3H/GM1hw5Pd0zXA5cw5/iZU= github.com/IBM/appconfiguration-go-admin-sdk v0.1.0 h1:9rdOk32VQFnMqsBB7cTpkZbD7/b0EnwrU3VNN8vuUYc= @@ -590,16 +592,14 @@ github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.4 h1:3Vw+rh13uq2JFNxgnMTGE1rnoieU9FmyE1gvnyylsYg= github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= -github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= @@ -627,9 +627,8 @@ github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.19.4/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.9 h1:1IxuqvBUU3S2Bi4YC7tlP9SJF1gVpCvqN0T2Qof4azE= github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/validate v0.19.8 h1:YFzsdWIDfVuLvIOF+ZmKjVg1MbPJ1QgY9PihMwei1ys= github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= @@ -1121,7 +1120,6 @@ github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -1421,29 +1419,16 @@ github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.m github.com/opencontainers/selinux v1.5.2/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g= github.com/openshift-metal3/terraform-provider-ironic v0.2.6 h1:R48DOxq2z6NpFkRs/OHzbkWA8aLZMIXljMK2aq1VvbM= github.com/openshift-metal3/terraform-provider-ironic v0.2.6/go.mod h1:ux2W6gsCIYsY/fX5N0V0ZgwFEBNN7P8g6RlH6ACi97k= -github.com/openshift/api v0.0.0-20191219222812-2987a591a72c/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= -github.com/openshift/api v0.0.0-20200326160804-ecb9283fe820/go.mod h1:RKMJ5CBnljLfnej+BJ/xnOWc3kZDvJUaIAEq2oKSPtE= -github.com/openshift/api v0.0.0-20200424083944-0422dc17083e/go.mod h1:VnbEzX8SAaRj7Yfl836NykdQIlbEjfL6/CD+AaJQg5Q= -github.com/openshift/api v0.0.0-20200827090112-c05698d102cf/go.mod h1:M3xexPhgM8DISzzRpuFUy+jfPjQPIcs9yqEYj17mXV8= -github.com/openshift/api v0.0.0-20200829102639-8a3a835f1acf/go.mod h1:M3xexPhgM8DISzzRpuFUy+jfPjQPIcs9yqEYj17mXV8= -github.com/openshift/api v0.0.0-20200901182017-7ac89ba6b971/go.mod h1:M3xexPhgM8DISzzRpuFUy+jfPjQPIcs9yqEYj17mXV8= -github.com/openshift/api v0.0.0-20200929171550-c99a4deebbe5/go.mod h1:Si/I9UGeRR3qzg01YWPmtlr0GeGk2fnuggXJRmjAZ6U= -github.com/openshift/api v0.0.0-20201019163320-c6a5ec25f267/go.mod h1:RDvBcRQMGLa3aNuDuejVBbTEQj/2i14NXdpOLqbNBvM= -github.com/openshift/api v0.0.0-20201214114959-164a2fb63b5f/go.mod h1:aqU5Cq+kqKKPbDMqxo9FojgDeSpNJI7iuskjXjtojDg= -github.com/openshift/api v0.0.0-20201216151826-78a19e96f9eb/go.mod h1:aqU5Cq+kqKKPbDMqxo9FojgDeSpNJI7iuskjXjtojDg= -github.com/openshift/api v0.0.0-20210331193751-3acddb19d360/go.mod h1:dZ4kytOo3svxJHNYd0J55hwe/6IQG5gAUHUE0F3Jkio= -github.com/openshift/api v0.0.0-20210412212256-79bd8cfbbd59/go.mod h1:dZ4kytOo3svxJHNYd0J55hwe/6IQG5gAUHUE0F3Jkio= -github.com/openshift/api v0.0.0-20210416115537-a60c0dc032fd/go.mod h1:dZ4kytOo3svxJHNYd0J55hwe/6IQG5gAUHUE0F3Jkio= -github.com/openshift/api v0.0.0-20210924154557-a4f696157341 h1:UUFuSm+bNyMr0Bf8CTY1eDbEmB2DiO8zENK850DgAMU= -github.com/openshift/api v0.0.0-20210924154557-a4f696157341/go.mod h1:RsQCVJu4qhUawxxDP7pGlwU3IA4F01wYm3qKEu29Su8= +github.com/openshift-powervs/api v0.0.0-20210729234416-b883aff9d9db h1:LUI17rrx7qfoDDbGb7AwBLK6UDYR60qJWI/wOBbO+2A= +github.com/openshift-powervs/api v0.0.0-20210729234416-b883aff9d9db/go.mod h1:wf/SnvIX5Aq1NkALk26b2extjOGm3Q781gEgvr0+CDY= +github.com/openshift-powervs/machine-api-operator v0.2.1-0.20210809115935-a9fd8f5d2767 h1:HjHocKp0/sxuNiNHbTkGzbp30YEsTovjEu7x5YFK1lk= +github.com/openshift-powervs/machine-api-operator v0.2.1-0.20210809115935-a9fd8f5d2767/go.mod h1:+b/AyRJ/X/1Hceap+ybH/L/wq558FCYm3JPEbh5xALs= github.com/openshift/baremetal-operator v0.0.0-20210706141527-5240e42f012a h1:7rEVkEhSyg7wxFsH5BWzG9svhlG3GSY+hhSGNjU20P8= github.com/openshift/baremetal-operator v0.0.0-20210706141527-5240e42f012a/go.mod h1:N80LeH5dJtqtrknj5vxwRaXyfF1UdxLm74B/QpH8QI0= github.com/openshift/baremetal-operator/apis v0.0.0-20210706141527-5240e42f012a h1:oXPw/sck0Lr0yAarZZCOCFE/3+9+UziPIIhREzhE2SU= github.com/openshift/baremetal-operator/apis v0.0.0-20210706141527-5240e42f012a/go.mod h1:b2uTLrpVxUWaXRhQeaONl8jOjPxSjtdmjCNKlgsoGI0= github.com/openshift/build-machinery-go v0.0.0-20200211121458-5e3d6e570160/go.mod h1:1CkcsT3aVebzRBzVTSbiKSkJMsC/CASqxesfqEMfJEc= -github.com/openshift/build-machinery-go v0.0.0-20200424080330-082bf86082cc/go.mod h1:1CkcsT3aVebzRBzVTSbiKSkJMsC/CASqxesfqEMfJEc= github.com/openshift/build-machinery-go v0.0.0-20200819073603-48aa266c95f7/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= -github.com/openshift/build-machinery-go v0.0.0-20200917070002-f171684f77ab/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= github.com/openshift/build-machinery-go v0.0.0-20210209125900-0da259a2c359/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= github.com/openshift/build-machinery-go v0.0.0-20210712174854-1bb7fd1518d3/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= github.com/openshift/client-go v0.0.0-20200929181438-91d71ef2122c h1:DQTWW8DGRN7fu5qwEPcbdP9hAxXi7dm5cvi0hrdR3UE= @@ -1459,10 +1444,6 @@ github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20210626224711- github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20210626224711-5d94c794092f/go.mod h1:GR+ocB8I+Z7JTSBdO+DMu/diBfH66lRlRpnc1KWysUM= github.com/openshift/cluster-api-provider-baremetal v0.0.0-20190821174549-a2a477909c1d h1:6+XwaVvSMPHm3nFdZW3g+iXiOHpf0Y2ajY5/Zr66Dt0= github.com/openshift/cluster-api-provider-baremetal v0.0.0-20190821174549-a2a477909c1d/go.mod h1:S+wtA0Rm2FZ5ccC9zNQXUWUDesR6Jsdn5eb6HjAR+Gs= -github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20200701112720-3a7d727c9a10/go.mod h1:wgkZrOlcIMWTzo8khB4Js2PoDJDlIUUdzCBm7BuDdqw= -github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20200713133651-5c8a640669ac/go.mod h1:XVYX9JE339nKbDDa/W481XD+1GTeqeaBm8bDPr7WE7I= -github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20200901173901-9056dbc8c9b9/go.mod h1:rcwAydGZX+z4l91wtOdbq+fqDwuo6iu0YuFik3UUc+8= -github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20201002065957-9854f7420570/go.mod h1:7NRECVE26rvP1/fs1CbhfY5gsgnnFQNhb9txTFzWmUw= github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20201201000827-1117a4fc438c/go.mod h1:21N0wWjiTQypZ7WosEYhcGJHr9JoDR1RBFztE0NvdYM= github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20201203141909-4dc702fd57a5 h1:75U75i/GfStAartlsP/F9v3Gv3MwzuLwqdLTjP1vPeE= github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20201203141909-4dc702fd57a5/go.mod h1:/XjFaKnqBc8K/jcRXHO7tau39CmzNinqmpxYaQGRvnE= @@ -1476,30 +1457,17 @@ github.com/openshift/cluster-api-provider-openstack v0.0.0-20210302164104-849824 github.com/openshift/cluster-api-provider-openstack v0.0.0-20210302164104-8498241fa4bd/go.mod h1:ONl4R7ziQtgnsBjR59fcZbOLjBEPVeZ69C1TPKevynw= github.com/openshift/cluster-api-provider-ovirt v0.1.1-0.20210817084941-2262c7c6cece h1:w32C7hy52lkIpDvJqz/tRyYCIZmhE/8bSIVt+L0c9Mg= github.com/openshift/cluster-api-provider-ovirt v0.1.1-0.20210817084941-2262c7c6cece/go.mod h1:lrKTKMpd3OERMlQgVJi6VKcE57EvtUORGSFIoE7BEAs= +github.com/openshift/cluster-api-provider-powervs v0.0.2-0.20210928133618-8eb5ebcb07a1 h1:fFRg32p+RR2Li1ynhl74RtSvEFstYEQ+QQufdE6plx8= +github.com/openshift/cluster-api-provider-powervs v0.0.2-0.20210928133618-8eb5ebcb07a1/go.mod h1:J5ynCgpZbdXNBPF9ukQXWeEt5ruMn8BEPSq/h55NfLo= github.com/openshift/cluster-autoscaler-operator v0.0.0-20190521201101-62768a6ba480/go.mod h1:/XmV44Fh28Vo3Ye93qFrxAbcFJ/Uy+7LPD+jGjmfJYc= github.com/openshift/custom-resource-status v0.0.0-20190822192428-e62f2f3b79f3 h1:XuAys09+XqT5/FjdR23G/UtbBLII89dFe9XIi73EKIQ= github.com/openshift/custom-resource-status v0.0.0-20190822192428-e62f2f3b79f3/go.mod h1:GDjWl0tX6FNIj82vIxeudWeSx2Ff6nDZ8uJn0ohUFvo= github.com/openshift/hashicorp-terraform-plugin-sdk v1.14.0-openshift h1:CuH9qNELLH3y0QoSaLchdG+7We75AO4kNBy6P3+oLug= github.com/openshift/hashicorp-terraform-plugin-sdk v1.14.0-openshift/go.mod h1:t62Xy+m7Zjq5tA2vrs8Wuo/TQ0sc9Mx9MjXL3+7MHBQ= github.com/openshift/library-go v0.0.0-20191003152030-97c62d8a2901/go.mod h1:NBttNjZpWwup/nthuLbPAPSYC8Qyo+BBK5bCtFoyYjo= -github.com/openshift/library-go v0.0.0-20200512120242-21a1ff978534/go.mod h1:2kWwXTkpoQJUN3jZ3QW88EIY1hdRMqxgRs2hheEW/pg= github.com/openshift/library-go v0.0.0-20200831114015-2ab0c61c15de/go.mod h1:6vwp+YhYOIlj8MpkQKkebTTSn2TuYyvgiAFQ206jIEQ= -github.com/openshift/library-go v0.0.0-20200909173121-1d055d971916/go.mod h1:6vwp+YhYOIlj8MpkQKkebTTSn2TuYyvgiAFQ206jIEQ= -github.com/openshift/library-go v0.0.0-20201109112824-093ad3cf6600/go.mod h1:1xYaYQcQsn+AyCRsvOU+Qn5z6GGiCmcblXkT/RZLVfo= -github.com/openshift/library-go v0.0.0-20201215165635-4ee79b1caed5/go.mod h1:udseDnqxn5ON8i+NBjDp00fBTK0JRu1/6Y6tf6EivDE= github.com/openshift/library-go v0.0.0-20210408164723-7a65fdb398e2 h1:eYdrmOSwRqHhfuPK8bhCSkBRUmCNYkgkOLgnImnz3Rs= github.com/openshift/library-go v0.0.0-20210408164723-7a65fdb398e2/go.mod h1:pnz961veImKsbn7pQcuFbcVpCQosYiC1fUOjzEDeOLU= -github.com/openshift/machine-api-operator v0.0.0-20190312153711-9650e16c9880/go.mod h1:7HeAh0v04zQn1L+4ItUjvpBQYsm2Nf81WaZLiXTcnkc= -github.com/openshift/machine-api-operator v0.2.1-0.20200611014855-9a69f85c32dd/go.mod h1:6vMi+R3xqznBdq5rgeal9N3ak3sOpy50t0fdRCcQXjE= -github.com/openshift/machine-api-operator v0.2.1-0.20200701225707-950912b03628/go.mod h1:cxjy/RUzv5C2T5FNl1KKXUgtakWsezWQ642B/CD9VQA= -github.com/openshift/machine-api-operator v0.2.1-0.20200722104429-f4f9b84df9b7/go.mod h1:XDsNRAVEJtkI00e51SAZ/PnqNJl1zv0rHXSdl9L1oOY= -github.com/openshift/machine-api-operator v0.2.1-0.20200926044412-b7d860f8074c/go.mod h1:cp/wPVzxHZeLUjOLkNPNqrk4wyyW6HuHd3Kz9+hl5xw= -github.com/openshift/machine-api-operator v0.2.1-0.20201002104344-6abfb5440597/go.mod h1:+oAfoCl+TUd2TM79/6NdqLpFUHIJpmqkKdmiHe2O7mw= -github.com/openshift/machine-api-operator v0.2.1-0.20201203125141-79567cb3368e/go.mod h1:Vxdx8K+8sbdcGozW86hSvcVl5JgJOqNFYhLRRhEM9HY= -github.com/openshift/machine-api-operator v0.2.1-0.20210104142355-8e6ae0acdfcf/go.mod h1:U5eAHChde1XvtQy3s1Zcr7ll4X7heb0SzYpaiAwxmQc= -github.com/openshift/machine-api-operator v0.2.1-0.20210504014029-a132ec00f7dd/go.mod h1:DFZBMPtC2TYZH5NE9+2JQIpbZAnruqc9F26QmbOm9pw= -github.com/openshift/machine-api-operator v0.2.1-0.20210505133115-b7ef098180db h1:uxSkm3BCC6jkrygfCxjm0iEJqJvNL8zDTXWQv2gmyZI= -github.com/openshift/machine-api-operator v0.2.1-0.20210505133115-b7ef098180db/go.mod h1:DFZBMPtC2TYZH5NE9+2JQIpbZAnruqc9F26QmbOm9pw= github.com/openshift/machine-config-operator v0.0.1-0.20201009041932-4fe8559913b8 h1:C4gCipkWTDp0B9jb0wZdLgB+HWC7EzVVwQOeNaKnTRA= github.com/openshift/machine-config-operator v0.0.1-0.20201009041932-4fe8559913b8/go.mod h1:fjKreLaKEeUKsyIkT4wlzIQwUVJ2ZKDUh3CI73ckYIY= github.com/openshift/prom-label-proxy v0.1.1-0.20191016113035-b8153a7f39f1/go.mod h1:p5MuxzsYP1JPsNGwtjtcgRHHlGziCJJfztff91nNixw= @@ -1580,6 +1548,7 @@ github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXq github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/posener/complete/v2 v2.0.1-alpha.12/go.mod h1://JlL91cS2JV7rOl6LVHrRqBXoBUecJu3ILQPgbJiMQ= github.com/posener/script v1.0.4/go.mod h1:Rg3ijooqulo05aGLyGsHoLmIOUzHUVK19WVgrYBPU/E= +github.com/ppc64le-cloud/powervs-utils v0.0.0-20210415051532-4cdd6a79c8fa/go.mod h1:KImYgHmvBVtAczNhyDBDSN54PGIdz0+QiPVQMmObEQY= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/ffjson v0.0.0-20181028064349-e517b90714f7/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= @@ -2060,7 +2029,6 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= @@ -2268,7 +2236,6 @@ golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191204011308-9611592c72f6/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200115044656-831fdb1e1868/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -2454,7 +2421,6 @@ k8s.io/api v0.0.0-20190918155943-95b840bb6a1f/go.mod h1:uWuOHnjmNrtQomJrvEBg0c0H k8s.io/api v0.16.4/go.mod h1:AtzMnsR45tccQss5q8RnF+W8L81DH6XwXwo/joEx9u0= k8s.io/api v0.17.0/go.mod h1:npsyOePkeP0CPwyGfXDHxvypiYMJxBWAMpQxCaJ4ZxI= k8s.io/api v0.18.0-beta.2/go.mod h1:2oeNnWEqcSmaM/ibSh3t7xcIqbkGXhzZdn4ezV9T4m0= -k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8= k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= k8s.io/api v0.19.0/go.mod h1:I1K45XlvTrDjmj5LoM5LuP/KYrhWbjUKT/SoPG0qTjw= k8s.io/api v0.19.1/go.mod h1:+u/k4/K/7vp4vsfdT7dyl8Oxk1F26Md4g5F26Tu85PU= @@ -2464,6 +2430,7 @@ k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= k8s.io/api v0.21.0-beta.1/go.mod h1:8A+GKfJYDnFlmsIqnwi7z2l5+GwI3fbIdAkPu3xiZKA= k8s.io/api v0.21.0-rc.0/go.mod h1:Dkc/ZauWJrgZhjOjeBgW89xZQiTBJA2RaBKYHXPsi2Y= k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU= +k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.22.0/go.mod h1:0AoXXqst47OI/L0oGKq9DG61dvGRPXs7X4/B7KyjBCU= k8s.io/api v0.22.1 h1:ISu3tD/jRhYfSW8jI/Q1e+lRxkR7w9UwQEZ7FgslrwY= k8s.io/api v0.22.1/go.mod h1:bh13rkTp3F1XEaLGykbyRD2QaTTzPm0e/BMd8ptFONY= @@ -2472,8 +2439,6 @@ k8s.io/apiextensions-apiserver v0.16.4/go.mod h1:HYQwjujEkXmQNhap2C9YDdIVOSskGZ3 k8s.io/apiextensions-apiserver v0.18.0-beta.2/go.mod h1:Hnrg5jx8/PbxRbUoqDGxtQkULjwx8FDW4WYJaKNK+fk= k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= k8s.io/apiextensions-apiserver v0.19.0/go.mod h1:znfQxNpjqz/ZehvbfMg5N6fvBJW5Lqu5HVLTJQdP4Fs= -k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg= -k8s.io/apiextensions-apiserver v0.20.0/go.mod h1:ZH+C33L2Bh1LY1+HphoRmN1IQVLTShVcTojivK3N9xg= k8s.io/apiextensions-apiserver v0.21.0-beta.1/go.mod h1:vluMqsJ5+hPgM9UtBhkFSGrfD86KUac9yeKVqpGBZz0= k8s.io/apiextensions-apiserver v0.21.0-rc.0 h1:gxeak4PvTBhuiZagZRFv9WyNnAdG39/VCmI9XTwVCRk= k8s.io/apiextensions-apiserver v0.21.0-rc.0/go.mod h1:ItIoMBJU1gy93Qwr/B2699r4b0VmZqAOU+15BvozxMY= @@ -2506,8 +2471,6 @@ k8s.io/apiserver v0.18.0-beta.2/go.mod h1:bnblMkMoCFnIfVnVftd0SXJPzyvrk3RtaqSbbl k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= k8s.io/apiserver v0.19.0/go.mod h1:XvzqavYj73931x7FLtyagh8WibHpePJ1QwWrSJs2CLk= k8s.io/apiserver v0.19.1/go.mod h1:iRxYIjA0X2XEyoW8KslN4gDhasfH4bWcjj6ckVeZX28= -k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA= -k8s.io/apiserver v0.20.0/go.mod h1:6gRIWiOkvGvQt12WTYmsiYoUyYW0FXSiMdNl4m+sxY8= k8s.io/apiserver v0.21.0-beta.1/go.mod h1:nl/H4DPS1abtRhCj8bhosbyU9XOgnMt0QFK3fAFEhSE= k8s.io/apiserver v0.21.0-rc.0/go.mod h1:QlW7+1CZTZtAcKvJ34/n4DIb8sC93FeQpkd1KSU+Sok= k8s.io/apiserver v0.21.0/go.mod h1:w2YSn4/WIwYuxG5zJmcqtRdtqgW/J2JRgFAqps3bBpg= @@ -2522,24 +2485,19 @@ k8s.io/code-generator v0.0.0-20190912054826-cd179ad6a269/go.mod h1:V5BD6M4CyaN5m k8s.io/code-generator v0.0.0-20191003035328-700b1226c0bd/go.mod h1:HC9p4y3SBN+txSs8x57qmNPXFZ/CxdCHiDTNnocCSEw= k8s.io/code-generator v0.16.4/go.mod h1:mJUgkl06XV4kstAnLHAIzJPVCOzVR+ZcfPIv4fUsFCY= k8s.io/code-generator v0.18.0-beta.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= -k8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/code-generator v0.19.0/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= k8s.io/code-generator v0.19.1/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= -k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= -k8s.io/code-generator v0.20.0/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/code-generator v0.21.0-beta.1/go.mod h1:IpCUojpiKp25KNB3/UbEeElznqpQUMvhAOUoC7AbISY= k8s.io/code-generator v0.21.0-rc.0/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/code-generator v0.21.0/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= -k8s.io/code-generator v0.22.1/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= +k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/component-base v0.0.0-20190918160511-547f6c5d7090/go.mod h1:933PBGtQFJky3TEwYx4aEPZ4IxqhWh3R6DCmzqIn1hA= k8s.io/component-base v0.16.4/go.mod h1:GYQ+4hlkEwdlpAp59Ztc4gYuFhdoZqiAJD1unYDJ3FM= k8s.io/component-base v0.18.0-beta.2/go.mod h1:HVk5FpRnyzQ/MjBr9//e/yEBjTVa2qjGXCTuUzcD7ks= k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= k8s.io/component-base v0.19.0/go.mod h1:dKsY8BxkA+9dZIAh2aWJLL/UdASFDNtGYTCItL4LM7Y= k8s.io/component-base v0.19.1/go.mod h1:b0vDKYa8EdJJ8dHUA6fGPj4z8taqGks5mfZvp3p/jVo= -k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= -k8s.io/component-base v0.20.0/go.mod h1:wKPj+RHnAr8LW2EIBIK7AxOHPde4gme2lzXwVSoRXeA= k8s.io/component-base v0.21.0-beta.1/go.mod h1:WPMZyV0sNk3ruzA8cWt1EO2KWAnLDK2docEC14JWbTM= k8s.io/component-base v0.21.0-rc.0/go.mod h1:XlP0bM7QJFWRGZYPc5NmphkvsYQ+o7804HWH3GTGjDY= k8s.io/component-base v0.21.0 h1:tLLGp4BBjQaCpS/KiuWh7m2xqvAdsxLm4ATxHSe5Zpg= @@ -2552,7 +2510,6 @@ k8s.io/gengo v0.0.0-20190907103519-ebc107f98eab/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8 k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20190306015804-8e90cee79f82/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -2569,11 +2526,8 @@ k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-aggregator v0.18.0-beta.2/go.mod h1:O3Td9mheraINbLHH4pzoFP2gRzG0Wk1COqzdSL4rBPk= -k8s.io/kube-aggregator v0.18.2/go.mod h1:ijq6FnNUoKinA6kKbkN6svdTacSoQVNtKqmQ1+XJEYQ= k8s.io/kube-aggregator v0.19.0/go.mod h1:1Ln45PQggFAG8xOqWPIYMxUq8WNtpPnYsbUJ39DpF/A= k8s.io/kube-aggregator v0.19.1/go.mod h1:oAj1kWeSDCh7sdzUOs6XXPn/jbzJY+yGGxDd0QyLJC8= -k8s.io/kube-aggregator v0.19.2/go.mod h1:wVsjy6OTeUrWkgG9WVsGftnjpm8JIY0vJV7LH2j4nhM= -k8s.io/kube-aggregator v0.20.0/go.mod h1:3Is/gzzWmhhG/rA3CpA1+eVye87lreBQDFGcAGT7gzo= k8s.io/kube-aggregator v0.21.0-rc.0 h1:PxnBqTgEQHCOhWl3J6EX2OKbfx0epwgKF4phlhgNyFA= k8s.io/kube-aggregator v0.21.0-rc.0/go.mod h1:M+whOmsAeQf8ObJ0/eO9Af1Dz2UQEB9OW9BWmt9b2sU= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0= @@ -2586,7 +2540,6 @@ k8s.io/utils v0.0.0-20190529001817-6999998975a7/go.mod h1:sZAwmy6armz5eXlNoLmJcl k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200229041039-0a110f9eb7ab/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200327001022-6496210b90e8/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20200821003339-5e75c0163111/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -2617,7 +2570,6 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/controller-runtime v0.9.0-alpha.1 h1:yIYTxDHQfcrYWO1hjZvHhjkGY1fYFo1k07FzlTono4E= sigs.k8s.io/controller-runtime v0.9.0-alpha.1/go.mod h1:BARxVvgj+8Ihw9modUvYh7/OJmjxuBtLK8P36jdf7rY= diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-clonevolumes.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-clonevolumes.go index 7f875026779..20f1f71a4ae 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-clonevolumes.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-clonevolumes.go @@ -2,6 +2,8 @@ package instance import ( "fmt" + "github.com/IBM-Cloud/power-go-client/errors" + "log" "time" "github.com/IBM-Cloud/power-go-client/helpers" @@ -28,42 +30,86 @@ func (f *IBMPICloneVolumeClient) Create(cloneParams *p_cloud_volumes.PcloudV2Vol params := p_cloud_volumes.NewPcloudV2VolumesClonePostParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(cloneParams.CloudInstanceID).WithBody(cloneParams.Body) resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumesClonePost(params, ibmpisession.NewAuth(f.session, cloneParams.CloudInstanceID)) if err != nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to perform Create operation... %s", err) + return nil, fmt.Errorf(errors.CreateCloneOperationFailed, err) } return resp.Payload, nil } -//DeleteClone Deletes a clone -func (f *IBMPICloneVolumeClient) DeleteClone(cloneParams *p_cloud_volumes.PcloudV2VolumescloneDeleteParams, id, cloudinstance string, timeout time.Duration) (models.Object, error) { - params := p_cloud_volumes.NewPcloudV2VolumescloneDeleteParamsWithTimeout(helpers.PIDeleteTimeOut).WithCloudInstanceID(cloudinstance).WithVolumesCloneID(id) +// Get status of a clone request +func (f *IBMPICloneVolumeClient) Get(powerinstanceid, clonetaskid string, timeout time.Duration) (*models.CloneTaskStatus, error) { + params := p_cloud_volumes.NewPcloudV2VolumesClonetasksGetParamsWithTimeout(helpers.PIGetTimeOut).WithCloudInstanceID(powerinstanceid).WithCloneTaskID(clonetaskid) + resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumesClonetasksGet(params, ibmpisession.NewAuth(f.session, powerinstanceid)) + if err != nil || resp.Payload == nil { + return nil, fmt.Errorf(errors.GetCloneOperationFailed, powerinstanceid, err) + } + return resp.Payload, nil +} - resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumescloneDelete(params, ibmpisession.NewAuth(f.session, cloudinstance)) +// Create a volumes clone V2 Version = This is the prepare operation +func (f *IBMPICloneVolumeClient) CreateV2Clone(powerinstanceid string, cloneparams *p_cloud_volumes.PcloudV2VolumesclonePostParams) (*models.VolumesClone, error) { + params := p_cloud_volumes.NewPcloudV2VolumesclonePostParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithBody(cloneparams.Body) + resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumesclonePost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) + if err != nil || resp.Payload == nil { + return nil, fmt.Errorf(errors.PrepareCloneOperationFailed, err) + } + return resp.Payload, nil +} + +// Get a list of volume-clones request for a cloud instance +func (f *IBMPICloneVolumeClient) GetV2Clones(powerinstanceid, query_filter string) (*models.VolumesClones, error) { + params := p_cloud_volumes.NewPcloudV2VolumescloneGetallParamsWithTimeout(helpers.PIGetTimeOut).WithCloudInstanceID(powerinstanceid).WithFilter(&query_filter) + log.Printf("the query filter is %s", query_filter) + resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumescloneGetall(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to perform Delete operation... %s", err) + return nil, fmt.Errorf(errors.GetCloneOperationFailed, powerinstanceid, err) } return resp.Payload, nil } -// Cancel a Clone +// Delete a volume- clone request +func (f *IBMPICloneVolumeClient) DeleteClone(cloneParams *p_cloud_volumes.PcloudV2VolumescloneDeleteParams, id, cloudinstance string, timeout time.Duration) (models.Object, error) { + params := p_cloud_volumes.NewPcloudV2VolumescloneDeleteParamsWithTimeout(helpers.PIDeleteTimeOut).WithCloudInstanceID(cloudinstance).WithVolumesCloneID(id) + + resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumescloneDelete(params, ibmpisession.NewAuth(f.session, cloudinstance)) -// Get status of a clone request -func (f *IBMPICloneVolumeClient) Get(powerinstanceid, clonetaskid string, timeout time.Duration) (*models.CloneTaskStatus, error) { - params := p_cloud_volumes.NewPcloudV2VolumesClonetasksGetParamsWithTimeout(helpers.PIGetTimeOut).WithCloudInstanceID(powerinstanceid).WithCloneTaskID(clonetaskid) - resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumesClonetasksGet(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to perform the get operation for clones... %s", err) + return nil, fmt.Errorf(errors.DeleteCloneOperationFailed, err) } return resp.Payload, nil } -//StartClone ... +// Initiate the start clone request + func (f *IBMPICloneVolumeClient) StartClone(powerinstanceid, volumeCloneID string, timeout time.Duration) (*models.VolumesClone, error) { params := p_cloud_volumes.NewPcloudV2VolumescloneStartPostParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithVolumesCloneID(volumeCloneID) resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumescloneStartPost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to perform the start operation for clones... %s", err) + return nil, fmt.Errorf(errors.StartCloneOperationFailed, err) + } + return resp.Payload, nil +} + +// Initiate the execute action for a clone request +func (f *IBMPICloneVolumeClient) PrepareClone(powerinstanceid, volumeCloneID string, timeout time.Duration) (*models.VolumesClone, error) { + params := p_cloud_volumes.NewPcloudV2VolumescloneExecutePostParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithVolumesCloneID(volumeCloneID) + resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumescloneExecutePost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) + + if err != nil || resp.Payload == nil { + return nil, fmt.Errorf(errors.PrepareCloneOperationFailed, err) + } + return resp.Payload, nil +} + +// Get V2Clone Task Status + +func (f *IBMPICloneVolumeClient) GetV2CloneStatus(powerinstanceid, clone_name string) (*models.VolumesCloneDetail, error) { + log.Printf("starting the clone status get operation..") + params := p_cloud_volumes.NewPcloudV2VolumescloneGetParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithVolumesCloneID(clone_name) + resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumescloneGet(params, ibmpisession.NewAuth(f.session, powerinstanceid)) + if err != nil || resp.Payload == nil { + return nil, fmt.Errorf(errors.GetCloneOperationFailed, powerinstanceid, err) } return resp.Payload, nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-connection.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-connection.go index 8366ea42f95..c60b2d74e62 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-connection.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-connection.go @@ -2,6 +2,8 @@ package instance import ( "fmt" + "github.com/IBM-Cloud/power-go-client/errors" + "github.com/IBM-Cloud/power-go-client/helpers" "time" "github.com/IBM-Cloud/power-go-client/ibmpisession" @@ -26,10 +28,10 @@ func NewIBMPICloudConnectionClient(sess *ibmpisession.IBMPISession, powerinstanc // Create a Cloud Connection func (f *IBMPICloudConnectionClient) Create(pclouddef *p_cloud_cloud_connections.PcloudCloudconnectionsPostParams, powerinstanceid string) (*models.CloudConnection, error) { - params := p_cloud_cloud_connections.NewPcloudCloudconnectionsPostParamsWithTimeout(postTimeOut).WithCloudInstanceID(powerinstanceid).WithBody(pclouddef.Body) - postok, postcreated, err, _ := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsPost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) + params := p_cloud_cloud_connections.NewPcloudCloudconnectionsPostParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithBody(pclouddef.Body) + postok, postcreated, postAccepted, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsPost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil { - return nil, fmt.Errorf("Failed to create cloud connection %s", err) + return nil, fmt.Errorf(errors.CreateCloudConnectionOperationFailed, powerinstanceid, err) } if postok != nil { return postok.Payload, nil @@ -37,32 +39,28 @@ func (f *IBMPICloudConnectionClient) Create(pclouddef *p_cloud_cloud_connections if postcreated != nil { return postcreated.Payload, nil } + + if postAccepted != nil { + return postAccepted.Payload, nil + } return nil, nil } -/* - gets a cloud connection s state information -*/ - // Get ... -func (f *IBMPICloudConnectionClient) Get(pclouddef *p_cloud_cloud_connections.PcloudCloudconnectionsGetParams) (*models.CloudConnection, error) { +func (f *IBMPICloudConnectionClient) Get(cloudinstanceid, cloudconnectionid string) (*models.CloudConnection, error) { - params := p_cloud_cloud_connections.NewPcloudCloudconnectionsGetParams().WithCloudInstanceID(pclouddef.CloudInstanceID).WithCloudConnectionID(pclouddef.CloudConnectionID) - resp, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsGet(params, ibmpisession.NewAuth(f.session, pclouddef.CloudInstanceID)) + params := p_cloud_cloud_connections.NewPcloudCloudconnectionsGetParamsWithTimeout(helpers.PIGetTimeOut).WithCloudInstanceID(cloudinstanceid).WithCloudConnectionID(cloudconnectionid) + resp, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsGet(params, ibmpisession.NewAuth(f.session, cloudinstanceid)) if err != nil { - return nil, fmt.Errorf("Failed to get cloud connection %s", err) + return nil, fmt.Errorf(errors.GetCloudConnectionOperationFailed, err) } return resp.Payload, nil } -/* - gets a cloud connection s state information -*/ - // GetAll .. func (f *IBMPICloudConnectionClient) GetAll(powerinstanceid string, timeout time.Duration) (*models.CloudConnections, error) { - params := p_cloud_cloud_connections.NewPcloudCloudconnectionsGetallParamsWithTimeout(timeout).WithCloudInstanceID(powerinstanceid) + params := p_cloud_cloud_connections.NewPcloudCloudconnectionsGetallParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid) resp, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsGetall(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil { return nil, fmt.Errorf("Failed to get all cloud connection %s", err) @@ -73,54 +71,68 @@ func (f *IBMPICloudConnectionClient) GetAll(powerinstanceid string, timeout time // Update a cloud Connection func (f *IBMPICloudConnectionClient) Update(updateparams *p_cloud_cloud_connections.PcloudCloudconnectionsPutParams) (*models.CloudConnection, error) { - params := p_cloud_cloud_connections.NewPcloudCloudconnectionsPutParams().WithCloudInstanceID(updateparams.CloudInstanceID).WithCloudConnectionID(updateparams.CloudConnectionID).WithBody(updateparams.Body) - resp, err, _ := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsPut(params, ibmpisession.NewAuth(f.session, updateparams.CloudInstanceID)) + params := p_cloud_cloud_connections.NewPcloudCloudconnectionsPutParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(updateparams.CloudInstanceID).WithCloudConnectionID(updateparams.CloudConnectionID).WithBody(updateparams.Body) + _, _, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsPut(params, ibmpisession.NewAuth(f.session, updateparams.CloudInstanceID)) if err != nil { - return nil, fmt.Errorf("Failed to update all cloud connection %s", err) + return nil, fmt.Errorf(errors.UpdateCloudConnectionOperationFailed, updateparams.CloudConnectionID, err) } - return resp.Payload, nil + + return nil, nil } // Delete a Cloud Connection -func (f *IBMPICloudConnectionClient) Delete(pclouddef *p_cloud_cloud_connections.PcloudCloudconnectionsDeleteParams) (models.Object, error) { - params := p_cloud_cloud_connections.NewPcloudCloudconnectionsDeleteParams().WithCloudInstanceID(pclouddef.CloudInstanceID).WithCloudConnectionID(pclouddef.CloudConnectionID) - respok, _, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsDelete(params, ibmpisession.NewAuth(f.session, pclouddef.CloudInstanceID)) +func (f *IBMPICloudConnectionClient) Delete(cloudinstanceid, cloudconnectionid string) (models.Object, error) { + params := p_cloud_cloud_connections.NewPcloudCloudconnectionsDeleteParamsWithTimeout(helpers.PIDeleteTimeOut).WithCloudInstanceID(cloudinstanceid).WithCloudConnectionID(cloudconnectionid) + respok, _, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsDelete(params, ibmpisession.NewAuth(f.session, cloudinstanceid)) - if err != nil || respok.Payload == nil { - return nil, fmt.Errorf("Failed to Delete all cloud connection %s", err) + if err != nil { + return nil, fmt.Errorf(errors.DeleteCloudConnectionOperationFailed, cloudconnectionid, err) } return respok.Payload, nil } // AddNetwork to a cloud connection func (f *IBMPICloudConnectionClient) AddNetwork(pcloudnetworkdef *p_cloud_cloud_connections.PcloudCloudconnectionsNetworksPutParams) (*models.CloudConnection, error) { - params := p_cloud_cloud_connections.NewPcloudCloudconnectionsNetworksPutParams().WithCloudInstanceID(pcloudnetworkdef.CloudInstanceID).WithCloudConnectionID(pcloudnetworkdef.CloudConnectionID).WithNetworkID(pcloudnetworkdef.NetworkID) - resp, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsNetworksPut(params, ibmpisession.NewAuth(f.session, pcloudnetworkdef.CloudInstanceID)) - if err != nil || resp.Payload == nil { + params := p_cloud_cloud_connections.NewPcloudCloudconnectionsNetworksPutParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(pcloudnetworkdef.CloudInstanceID).WithCloudConnectionID(pcloudnetworkdef.CloudConnectionID).WithNetworkID(pcloudnetworkdef.NetworkID) + _, _, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsNetworksPut(params, ibmpisession.NewAuth(f.session, pcloudnetworkdef.CloudInstanceID)) + if err != nil { return nil, fmt.Errorf("Failed to add the network to the cloudconnection %s", err) } - return resp.Payload, nil + return nil, nil } // DeleteNetwork Deletes a network from a cloud connection func (f *IBMPICloudConnectionClient) DeleteNetwork(pcloudnetworkdef *p_cloud_cloud_connections.PcloudCloudconnectionsNetworksDeleteParams) (*models.CloudConnection, error) { - params := p_cloud_cloud_connections.NewPcloudCloudconnectionsNetworksDeleteParams().WithCloudInstanceID(pcloudnetworkdef.CloudInstanceID).WithCloudConnectionID(pcloudnetworkdef.CloudConnectionID).WithNetworkID(pcloudnetworkdef.NetworkID) - resp, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsNetworksDelete(params, ibmpisession.NewAuth(f.session, pcloudnetworkdef.CloudInstanceID)) + params := p_cloud_cloud_connections.NewPcloudCloudconnectionsNetworksDeleteParamsWithTimeout(helpers.PIDeleteTimeOut).WithCloudInstanceID(pcloudnetworkdef.CloudInstanceID).WithCloudConnectionID(pcloudnetworkdef.CloudConnectionID).WithNetworkID(pcloudnetworkdef.NetworkID) + _, _, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsNetworksDelete(params, ibmpisession.NewAuth(f.session, pcloudnetworkdef.CloudInstanceID)) - if err != nil || resp.Payload == nil { + if err != nil { return nil, fmt.Errorf("Failed to perform the delete operation... %s", err) } - return resp.Payload, nil + return nil, nil } // UpdateNetwork Update a network from a cloud connection func (f *IBMPICloudConnectionClient) UpdateNetwork(pcloudnetworkdef *p_cloud_cloud_connections.PcloudCloudconnectionsNetworksPutParams) (*models.CloudConnection, error) { - params := p_cloud_cloud_connections.NewPcloudCloudconnectionsNetworksPutParams().WithCloudInstanceID(pcloudnetworkdef.CloudInstanceID).WithCloudConnectionID(pcloudnetworkdef.CloudConnectionID).WithNetworkID(pcloudnetworkdef.NetworkID) - resp, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsNetworksPut(params, ibmpisession.NewAuth(f.session, pcloudnetworkdef.CloudInstanceID)) + params := p_cloud_cloud_connections.NewPcloudCloudconnectionsNetworksPutParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(pcloudnetworkdef.CloudInstanceID).WithCloudConnectionID(pcloudnetworkdef.CloudConnectionID).WithNetworkID(pcloudnetworkdef.NetworkID) + resp, _, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsNetworksPut(params, ibmpisession.NewAuth(f.session, pcloudnetworkdef.CloudInstanceID)) + + if err != nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to perform the update operation...%v", err) + } + return resp.Payload, nil +} +// get VPCs + +func (f *IBMPICloudConnectionClient) GetVPC(cloudinstanceid string) (*models.CloudConnectionVirtualPrivateClouds, error) { + params := p_cloud_cloud_connections.NewPcloudCloudconnectionsVirtualprivatecloudsGetallParamsWithTimeout(helpers.PIGetTimeOut).WithCloudInstanceID(cloudinstanceid) + + resp, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsVirtualprivatecloudsGetall(params, ibmpisession.NewAuth(f.session, cloudinstanceid)) if err != nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to perform the update operation... %s", err) + + return nil, fmt.Errorf("failed to perform the getvpc operation...%v", err) } return resp.Payload, nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-instance.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-instance.go index 19068084f73..61d9b91fe12 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-instance.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-instance.go @@ -2,6 +2,7 @@ package instance import ( "fmt" + "github.com/IBM-Cloud/power-go-client/errors" "github.com/IBM-Cloud/power-go-client/ibmpisession" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances" @@ -27,7 +28,7 @@ func (f *IBMPICloudInstanceClient) Get(powerinstanceid string) (*models.CloudIns params := p_cloud_instances.NewPcloudCloudinstancesGetParams().WithCloudInstanceID(powerinstanceid) resp, err := f.session.Power.PCloudInstances.PcloudCloudinstancesGet(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil { - return nil, fmt.Errorf("Failed to Get Cloud Instance %s: %s", powerinstanceid, err) + return nil, fmt.Errorf(errors.GetCloudInstanceOperationFailed, powerinstanceid, err) } return resp.Payload, nil } @@ -37,7 +38,7 @@ func (f *IBMPICloudInstanceClient) Update(powerinstanceid string, updateparams * params := p_cloud_instances.NewPcloudCloudinstancesPutParamsWithTimeout(f.session.Timeout).WithCloudInstanceID(powerinstanceid).WithBody(updateparams.Body) resp, err := f.session.Power.PCloudInstances.PcloudCloudinstancesPut(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil { - return nil, fmt.Errorf("Failed to Update Cloud Instance %s: %s", powerinstanceid, err) + return nil, fmt.Errorf(errors.UpdateCloudInstanceOperationFailed, powerinstanceid, err) } return resp.Payload, nil @@ -48,7 +49,7 @@ func (f *IBMPICloudInstanceClient) Delete(powerinstanceid string) (models.Object params := p_cloud_instances.NewPcloudCloudinstancesDeleteParams().WithCloudInstanceID(powerinstanceid) resp, err := f.session.Power.PCloudInstances.PcloudCloudinstancesDelete(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to Delete Cloud Instance %s: %s", powerinstanceid, err) + return nil, fmt.Errorf(errors.DeleteCloudInstanceOperationFailed, powerinstanceid, err) } return resp.Payload, nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-image.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-image.go index 3026d906c01..e15996c379c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-image.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-image.go @@ -2,6 +2,7 @@ package instance import ( "fmt" + "github.com/IBM-Cloud/power-go-client/errors" "github.com/IBM-Cloud/power-go-client/helpers" "github.com/IBM-Cloud/power-go-client/ibmpisession" @@ -30,7 +31,7 @@ func (f *IBMPIImageClient) Get(id, powerinstanceid string) (*models.Image, error resp, err := f.session.Power.PCloudImages.PcloudCloudinstancesImagesGet(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp == nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to Get PI Image %s :%s", id, err) + return nil, fmt.Errorf(errors.GetImageOperationFailed, id, err) } return resp.Payload, nil } @@ -59,7 +60,7 @@ func (f *IBMPIImageClient) Create(name, imageid string, powerinstanceid string) params := p_cloud_images.NewPcloudCloudinstancesImagesPostParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithBody(&body) _, result, err := f.session.Power.PCloudImages.PcloudCloudinstancesImagesPost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || result == nil || result.Payload == nil { - return nil, fmt.Errorf("Failed to Create Image of the PVM instance %s : %s", powerinstanceid, err) + return nil, fmt.Errorf(errors.CreateImageOperationFailed, powerinstanceid, err) } return result.Payload, nil diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-instance.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-instance.go index 10b6276a5d6..0e76c9895d4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-instance.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-instance.go @@ -37,7 +37,7 @@ func (f *IBMPIInstanceClient) Get(id, powerinstanceid string, timeout time.Durat params := p_cloud_p_vm_instances.NewPcloudPvminstancesGetParamsWithTimeout(helpers.PIGetTimeOut).WithCloudInstanceID(powerinstanceid).WithPvmInstanceID(id) resp, err := f.session.Power.PCloudPVMInstances.PcloudPvminstancesGet(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to Get PVM Instance %s :%s", id, err) + return nil, fmt.Errorf("Failed to Get PVM Instance %s :%v", id, err) } return resp.Payload, nil } @@ -45,10 +45,10 @@ func (f *IBMPIInstanceClient) Get(id, powerinstanceid string, timeout time.Durat // GetAll Information about all the PVM Instances for a Client func (f *IBMPIInstanceClient) GetAll(powerinstanceid string, timeout time.Duration) (*models.PVMInstances, error) { - params := p_cloud_p_vm_instances.NewPcloudPvminstancesGetallParamsWithTimeout(getTimeOut).WithCloudInstanceID(powerinstanceid) + params := p_cloud_p_vm_instances.NewPcloudPvminstancesGetallParamsWithTimeout(helpers.PIGetTimeOut).WithCloudInstanceID(powerinstanceid) resp, err := f.session.Power.PCloudPVMInstances.PcloudPvminstancesGetall(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to Get all PVM Instances of Power Instance %s :%s", powerinstanceid, err) + return nil, fmt.Errorf("Failed to Get all PVM Instances of Power Instance %s :%v", powerinstanceid, err) } return resp.Payload, nil } @@ -60,7 +60,7 @@ func (f *IBMPIInstanceClient) Create(powerdef *p_cloud_p_vm_instances.PcloudPvmi postok, postcreated, postAccepted, err := f.session.Power.PCloudPVMInstances.PcloudPvminstancesPost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil { - return nil, fmt.Errorf("Failed to Create PVM Instance :%s", err) + return nil, fmt.Errorf("Failed to Create PVM Instance :%v", err) } if postok != nil && len(postok.Payload) > 0 { @@ -163,7 +163,7 @@ func (f *IBMPIInstanceClient) GetSnapShotVM(powerinstanceid, pvminstanceid strin params := p_cloud_p_vm_instances.NewPcloudPvminstancesSnapshotsGetallParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithPvmInstanceID(pvminstanceid) resp, err := f.session.Power.PCloudPVMInstances.PcloudPvminstancesSnapshotsGetall(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to Get the snapshot for the pvminstance [%s]: %s", pvminstanceid, err) + return nil, fmt.Errorf("Failed to Get the snapshot for the pvminstance [%s]: %v", pvminstanceid, err) } return resp.Payload, nil @@ -174,7 +174,7 @@ func (f *IBMPIInstanceClient) RestoreSnapShotVM(powerinstanceid, pvminstanceid, params := p_cloud_p_vm_instances.NewPcloudPvminstancesSnapshotsRestorePostParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithPvmInstanceID(pvminstanceid).WithSnapshotID(snapshotid).WithRestoreFailAction(&restoreAction).WithBody(restoreparams.Body) resp, err := f.session.Power.PCloudPVMInstances.PcloudPvminstancesSnapshotsRestorePost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp == nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to restrore the snapshot for the pvminstance [%s]: %s", pvminstanceid, err) + return nil, fmt.Errorf("Failed to restrore the snapshot for the pvminstance [%s]: %v", pvminstanceid, err) } return resp.Payload, nil } @@ -186,7 +186,7 @@ func (f *IBMPIInstanceClient) AddNetwork(powerinstanceid, pvminstanceid string, resp, err := f.session.Power.PCloudPVMInstances.PcloudPvminstancesNetworksPost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp.Payload.NetworkID == "" { - return nil, fmt.Errorf("Failed to attach the network to the pvminstanceid %s : %s", pvminstanceid, err) + return nil, fmt.Errorf("Failed to attach the network to the pvminstanceid %s : %v", pvminstanceid, err) } return resp.Payload, nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-key.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-key.go index fc96fd39483..9a22c4318ea 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-key.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-key.go @@ -2,6 +2,8 @@ package instance import ( "fmt" + "github.com/IBM-Cloud/power-go-client/errors" + "github.com/IBM-Cloud/power-go-client/helpers" "github.com/IBM-Cloud/power-go-client/ibmpisession" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys" @@ -28,11 +30,11 @@ The Power-IAAS API requires the crn to be passed in the header. func (f *IBMPIKeyClient) Get(id, powerinstanceid string) (*models.SSHKey, error) { var tenantid = f.session.UserAccount - params := p_cloud_tenants_ssh_keys.NewPcloudTenantsSshkeysGetParams().WithTenantID(tenantid).WithSshkeyName(id) + params := p_cloud_tenants_ssh_keys.NewPcloudTenantsSshkeysGetParamsWithTimeout(helpers.PIGetTimeOut).WithTenantID(tenantid).WithSshkeyName(id) resp, err := f.session.Power.PCloudTenantsSSHKeys.PcloudTenantsSshkeysGet(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp == nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to Get PI Key %s :%s", id, err) + return nil, fmt.Errorf(errors.GetPIKeyOperationFailed, id, err) } return resp.Payload, nil } @@ -43,10 +45,10 @@ func (f *IBMPIKeyClient) Create(name string, sshkey, powerinstanceid string) (*m Name: &name, SSHKey: &sshkey, } - params := p_cloud_tenants_ssh_keys.NewPcloudTenantsSshkeysPostParamsWithTimeout(f.session.Timeout).WithTenantID(f.session.UserAccount).WithBody(&body) + params := p_cloud_tenants_ssh_keys.NewPcloudTenantsSshkeysPostParamsWithTimeout(helpers.PICreateTimeOut).WithTenantID(f.session.UserAccount).WithBody(&body) _, postok, err := f.session.Power.PCloudTenantsSSHKeys.PcloudTenantsSshkeysPost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || postok == nil { - return nil, nil, fmt.Errorf("Failed to Create PI Key %s :%s", name, err) + return nil, nil, fmt.Errorf(errors.CreatePIKeyOperationFailed, name, err) } return nil, postok.Payload, nil @@ -55,10 +57,10 @@ func (f *IBMPIKeyClient) Create(name string, sshkey, powerinstanceid string) (*m // Delete ... func (f *IBMPIKeyClient) Delete(id string, powerinstanceid string) error { var tenantid = f.session.UserAccount - params := p_cloud_tenants_ssh_keys.NewPcloudTenantsSshkeysDeleteParamsWithTimeout(f.session.Timeout).WithTenantID(tenantid).WithSshkeyName(id) + params := p_cloud_tenants_ssh_keys.NewPcloudTenantsSshkeysDeleteParamsWithTimeout(helpers.PIDeleteTimeOut).WithTenantID(tenantid).WithSshkeyName(id) _, err := f.session.Power.PCloudTenantsSSHKeys.PcloudTenantsSshkeysDelete(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil { - return fmt.Errorf("Failed to Delete PI Key %s :%s", id, err) + return fmt.Errorf(errors.DeletePIKeyOperationFailed, id, err) } return nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-network.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-network.go index 3a86e52b2d0..de1dc2f13f0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-network.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-network.go @@ -2,6 +2,7 @@ package instance import ( "fmt" + "github.com/IBM-Cloud/power-go-client/errors" "time" "github.com/IBM-Cloud/power-go-client/ibmpisession" @@ -29,7 +30,7 @@ func (f *IBMPINetworkClient) Get(id, powerinstanceid string, timeout time.Durati resp, err := f.session.Power.PCloudNetworks.PcloudNetworksGet(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp == nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to Get PI Network %s :%s", id, err) + return nil, fmt.Errorf(errors.GetNetworkOperationFailed, id, err) } return resp.Payload, nil } @@ -61,7 +62,7 @@ func (f *IBMPINetworkClient) Create(name string, networktype string, cidr string _, resp, err := f.session.Power.PCloudNetworks.PcloudNetworksPost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp == nil || resp.Payload == nil { - return nil, nil, fmt.Errorf("Failed to Create PI Network %s :%s", name, err) + return nil, nil, fmt.Errorf(errors.CreateNetworkOperationFailed, name, err) } return resp.Payload, nil, nil @@ -121,7 +122,7 @@ func (f *IBMPINetworkClient) CreatePort(id string, powerinstanceid string, netwo params := p_cloud_networks.NewPcloudNetworksPortsPostParamsWithTimeout(timeout).WithCloudInstanceID(powerinstanceid).WithNetworkID(id).WithBody(networkportdef.Body) resp, err := f.session.Power.PCloudNetworks.PcloudNetworksPortsPost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp == nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to create the network port for network %s cloudinstance id [%s]", id, powerinstanceid) + return nil, fmt.Errorf(errors.CreateNetworkPortOperationFailed, id, err) } return resp.Payload, nil } @@ -151,7 +152,7 @@ func (f *IBMPINetworkClient) AttachPort(powerinstanceid, networkID, portID, desc params := p_cloud_networks.NewPcloudNetworksPortsPutParamsWithTimeout(timeout).WithCloudInstanceID(powerinstanceid).WithNetworkID(networkID).WithPortID(portID).WithBody(&body) resp, err := f.session.Power.PCloudNetworks.PcloudNetworksPortsPut(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp == nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to attach the port [%s] to network %s the pvminstance [%s]", portID, networkID, pvminstanceid) + return nil, fmt.Errorf(errors.AttachNetworkPortOperationFailed, portID, networkID, err) } return resp.Payload, nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-placement-groups.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-placement-groups.go new file mode 100644 index 00000000000..e650eceec06 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-placement-groups.go @@ -0,0 +1,95 @@ +package instance + +import ( + "fmt" + "github.com/IBM-Cloud/power-go-client/errors" + "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups" + + "github.com/IBM-Cloud/power-go-client/helpers" + "github.com/IBM-Cloud/power-go-client/ibmpisession" + "github.com/IBM-Cloud/power-go-client/power/models" +) + +//IBMPIPlacementGroupClient ... +type IBMPIPlacementGroupClient struct { + session *ibmpisession.IBMPISession + powerinstanceid string +} + +// NewIBMPIImageClient ... +func NewIBMPIPlacementGroupClient(sess *ibmpisession.IBMPISession, powerinstanceid string) *IBMPIPlacementGroupClient { + return &IBMPIPlacementGroupClient{ + session: sess, + powerinstanceid: powerinstanceid, + } +} + +// Get PI Placementgroup +func (f *IBMPIPlacementGroupClient) Get(id, powerinstanceid string) (*models.PlacementGroup, error) { + + params := p_cloud_placement_groups.NewPcloudPlacementgroupsGetParamsWithTimeout(helpers.PIGetTimeOut).WithCloudInstanceID(powerinstanceid).WithPlacementGroupID(id) + resp, err := f.session.Power.PCloudPlacementGroups.PcloudPlacementgroupsGet(params, ibmpisession.NewAuth(f.session, powerinstanceid)) + + if err != nil { + return nil, fmt.Errorf(errors.GetPlacementGroupOperationFailed, id, err) + } + return resp.Payload, nil +} + +// GEt All placement groups + +func (f *IBMPIPlacementGroupClient) GetAll(powerinstanceid string) (*models.PlacementGroups, error) { + params := p_cloud_placement_groups.NewPcloudPlacementgroupsGetallParamsWithTimeout(helpers.PIGetTimeOut).WithCloudInstanceID(powerinstanceid) + resp, err := f.session.Power.PCloudPlacementGroups.PcloudPlacementgroupsGetall(params, ibmpisession.NewAuth(f.session, powerinstanceid)) + + if err != nil { + return nil, fmt.Errorf(errors.GetPlacementGroupOperationFailed, powerinstanceid, err) + } + return resp.Payload, nil +} + +//Create the placement group +func (f *IBMPIPlacementGroupClient) Create(powerdef *p_cloud_placement_groups.PcloudPlacementgroupsPostParams, powerinstanceid string) (*models.PlacementGroup, error) { + + params := p_cloud_placement_groups.NewPcloudPlacementgroupsPostParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithBody(powerdef.Body) + result, err := f.session.Power.PCloudPlacementGroups.PcloudPlacementgroupsPost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) + if err != nil || result == nil || result.Payload == nil { + return nil, fmt.Errorf(errors.CreatePlacementGroupOperationFailed, powerinstanceid, err) + } + return result.Payload, nil + +} + +// Delete Placement Group +func (f *IBMPIPlacementGroupClient) Delete(id string, powerinstanceid string) error { + params := p_cloud_placement_groups.NewPcloudPlacementgroupsDeleteParamsWithTimeout(helpers.PIDeleteTimeOut).WithCloudInstanceID(powerinstanceid).WithPlacementGroupID(id) + _, err := f.session.Power.PCloudPlacementGroups.PcloudPlacementgroupsDelete(params, ibmpisession.NewAuth(f.session, powerinstanceid)) + if err != nil { + return fmt.Errorf(errors.DeletePlacementGroupOperationFailed, id, err) + } + return nil +} + +// Adding a member to a Placement Group +func (f *IBMPIPlacementGroupClient) Update(placementdef *p_cloud_placement_groups.PcloudPlacementgroupsMembersPostParams, placementgroupid, powerinstanceid string) (*models.PlacementGroup, error) { + + params := p_cloud_placement_groups.NewPcloudPlacementgroupsMembersPostParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithPlacementGroupID(placementgroupid).WithBody(placementdef.Body) + resp, err := f.session.Power.PCloudPlacementGroups.PcloudPlacementgroupsMembersPost(params, ibmpisession.NewAuth(f.session, f.powerinstanceid)) + + if err != nil { + return nil, fmt.Errorf(errors.UpdatePlacementGroupOperationFailed, powerinstanceid, placementgroupid, err) + } + return resp.Payload, nil +} + +// Delete Member from Placement Group +func (f *IBMPIPlacementGroupClient) DeleteMember(placementdef *p_cloud_placement_groups.PcloudPlacementgroupsMembersPostParams, placementgroupid, powerinstanceid string) (*models.PlacementGroup, error) { + + params := p_cloud_placement_groups.NewPcloudPlacementgroupsMembersDeleteParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithPlacementGroupID(placementgroupid).WithBody(placementdef.Body) + resp, err := f.session.Power.PCloudPlacementGroups.PcloudPlacementgroupsMembersDelete(params, ibmpisession.NewAuth(f.session, f.powerinstanceid)) + + if err != nil { + return nil, fmt.Errorf(errors.DeleteMemberPlacementGroupOperationFailed, powerinstanceid, placementgroupid, err) + } + return resp.Payload, nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-storage-capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-storage-capacity.go index 5b8cb269be9..13fb5192dd4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-storage-capacity.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-storage-capacity.go @@ -22,12 +22,43 @@ func NewIBMPIStorageCapacityClient(sess *ibmpisession.IBMPISession, powerinstanc } } -//GetAll information about all the storage pools -func (f *IBMPIStorageCapacityClient) GetAll(powerinstanceid string, timeout time.Duration) (*models.StoragePoolsCapacity, error) { +//Storage capacity for all available storage pools in a region +func (f *IBMPIStorageCapacityClient) GetAllStoragePools(powerinstanceid string, timeout time.Duration) (*models.StoragePoolsCapacity, error) { params := p_cloud_storage_capacity.NewPcloudStoragecapacityPoolsGetallParamsWithTimeout(timeout).WithCloudInstanceID(powerinstanceid) resp, err := f.session.Power.PCloudStorageCapacity.PcloudStoragecapacityPoolsGetall(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to get all storage pools %s", err) + return nil, fmt.Errorf("failed to get all storage pools %v", err) + } + return resp.Payload, nil +} + +// Storage capacity for a storage pool in a region +func (f *IBMPIStorageCapacityClient) GetAvailableStoragePool(powerinstanceid, storagepool string, timeout time.Duration) (*models.StoragePoolCapacity, error) { + params := p_cloud_storage_capacity.NewPcloudStoragecapacityPoolsGetParamsWithTimeout(timeout).WithCloudInstanceID(powerinstanceid).WithStoragePoolName(storagepool) + resp, err := f.session.Power.PCloudStorageCapacity.PcloudStoragecapacityPoolsGet(params, ibmpisession.NewAuth(f.session, powerinstanceid)) + + if err != nil || resp.Payload == nil { + fmt.Errorf("failed to get the capacity for storage pool %v", err) + } + return resp.Payload, nil +} + +// Storage capacity for a storage type in a region +func (f *IBMPIStorageCapacityClient) GetAvailableStorageCapacity(powerinstanceid, storage_tier string, timeout time.Duration) (*models.StorageTypeCapacity, error) { + params := p_cloud_storage_capacity.NewPcloudStoragecapacityTypesGetParamsWithTimeout(timeout).WithCloudInstanceID(powerinstanceid).WithStorageTypeName(storage_tier) + resp, err := f.session.Power.PCloudStorageCapacity.PcloudStoragecapacityTypesGet(params, ibmpisession.NewAuth(f.session, powerinstanceid)) + if err != nil || resp.Payload == nil { + fmt.Errorf("failed to get the capacity for storage pool %v", err) + } + return resp.Payload, nil +} + +// Storage capacity for all available storage types in a region +func (f *IBMPIStorageCapacityClient) GetAvailableStorageType(powerinstanceid string, timeout time.Duration) (*models.StorageTypesCapacity, error) { + params := p_cloud_storage_capacity.NewPcloudStoragecapacityTypesGetallParamsWithTimeout(timeout).WithCloudInstanceID(powerinstanceid) + resp, err := f.session.Power.PCloudStorageCapacity.PcloudStoragecapacityTypesGetall(params, ibmpisession.NewAuth(f.session, powerinstanceid)) + if err != nil || resp.Payload == nil { + fmt.Errorf("failed to get the capacity for storage tiers %v", err) } return resp.Payload, nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-system-pools.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-system-pools.go index 4b5ab04d988..c8ace83dd13 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-system-pools.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-system-pools.go @@ -2,6 +2,7 @@ package instance import ( "fmt" + "github.com/IBM-Cloud/power-go-client/errors" "github.com/IBM-Cloud/power-go-client/ibmpisession" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools" @@ -27,7 +28,7 @@ func (f *IBMPISystemPoolClient) Get(powerinstanceid string) (models.SystemPools, resp, err := f.session.Power.PCloudSystemPools.PcloudSystempoolsGet(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to perform get operation... %s", err) + return nil, fmt.Errorf(errors.GetSystemPoolsOperationFailed, powerinstanceid, err) } return resp.Payload, nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-tasks.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-tasks.go index 67261bf87f2..a1eafcdf05b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-tasks.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-tasks.go @@ -3,6 +3,7 @@ package instance import ( "fmt" + "github.com/IBM-Cloud/power-go-client/helpers" "github.com/IBM-Cloud/power-go-client/ibmpisession" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks" "github.com/IBM-Cloud/power-go-client/power/models" @@ -24,7 +25,7 @@ func NewIBMPITaskClient(sess *ibmpisession.IBMPISession, powerinstanceid string) // Get ... func (f *IBMPITaskClient) Get(id, powerinstanceid string) (*models.Task, error) { - params := p_cloud_tasks.NewPcloudTasksGetParamsWithTimeout(postTimeOut).WithTaskID(id) + params := p_cloud_tasks.NewPcloudTasksGetParamsWithTimeout(helpers.PIGetTimeOut).WithTaskID(id) resp, err := f.session.Power.PCloudTasks.PcloudTasksGet(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp.Payload == nil { @@ -36,7 +37,7 @@ func (f *IBMPITaskClient) Get(id, powerinstanceid string) (*models.Task, error) // Delete ... func (f *IBMPITaskClient) Delete(id, powerinstanceid string) (models.Object, error) { - params := p_cloud_tasks.NewPcloudTasksDeleteParamsWithTimeout(postTimeOut).WithTaskID(id) + params := p_cloud_tasks.NewPcloudTasksDeleteParamsWithTimeout(helpers.PICreateTimeOut).WithTaskID(id) resp, err := f.session.Power.PCloudTasks.PcloudTasksDelete(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp.Payload == nil { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume.go index d9e8c58b05e..acb6e2ba923 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume.go @@ -2,6 +2,7 @@ package instance import ( "fmt" + "github.com/IBM-Cloud/power-go-client/errors" "time" "github.com/IBM-Cloud/power-go-client/helpers" @@ -16,14 +17,6 @@ type IBMPIVolumeClient struct { powerinstanceid string } -const ( - - // Timeouts for power - postTimeOut = 30 * time.Second - getTimeOut = 60 * time.Second - deleteTimeOut = 30 * time.Second -) - // NewIBMPIVolumeClient ... func NewIBMPIVolumeClient(sess *ibmpisession.IBMPISession, powerinstanceid string) *IBMPIVolumeClient { return &IBMPIVolumeClient{ @@ -37,7 +30,7 @@ func (f *IBMPIVolumeClient) Get(id, powerinstanceid string, timeout time.Duratio resp, err := f.session.Power.PCloudVolumes.PcloudCloudinstancesVolumesGet(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to Get PI Volume %s :%s", id, err) + return nil, fmt.Errorf(errors.GetVolumeOperationFailed, id, err) } return resp.Payload, nil } @@ -47,7 +40,7 @@ func (f *IBMPIVolumeClient) CreateVolumeV2(createVolDefs *p_cloud_volumes.Pcloud params := p_cloud_volumes.NewPcloudV2VolumesPostParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithBody(createVolDefs.Body) resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumesPost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil { - return nil, fmt.Errorf("Failed to Create PI Volume %s :%s", *createVolDefs.Body.Name, err) + return nil, fmt.Errorf(errors.CreateVolumeV2OperationFailed, *createVolDefs.Body.Name, err) } return resp.Payload, nil } @@ -57,7 +50,7 @@ func (f *IBMPIVolumeClient) CreateVolume(createVolDefs *p_cloud_volumes.PcloudCl params := p_cloud_volumes.NewPcloudCloudinstancesVolumesPostParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithBody(createVolDefs.Body) resp, err := f.session.Power.PCloudVolumes.PcloudCloudinstancesVolumesPost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp == nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to Create PI Instance Volume %s :%s", *createVolDefs.Body.Name, err) + return nil, fmt.Errorf(errors.CreateVolumeOperationFailed, *createVolDefs.Body.Name, err) } return resp.Payload, nil } @@ -67,7 +60,7 @@ func (f *IBMPIVolumeClient) UpdateVolume(updateVolDefs *p_cloud_volumes.PcloudCl params := p_cloud_volumes.NewPcloudCloudinstancesVolumesPutParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithBody(updateVolDefs.Body).WithVolumeID(volumeid) resp, err := f.session.Power.PCloudVolumes.PcloudCloudinstancesVolumesPut(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp == nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to Update PI Instance Volume %s :%s", volumeid, err) + return nil, fmt.Errorf(errors.UpdateVolumeOperationFailed, volumeid, err) } return resp.Payload, nil } @@ -77,7 +70,7 @@ func (f *IBMPIVolumeClient) DeleteVolume(id string, powerinstanceid string, time params := p_cloud_volumes.NewPcloudCloudinstancesVolumesDeleteParamsWithTimeout(helpers.PIDeleteTimeOut).WithCloudInstanceID(powerinstanceid).WithVolumeID(id) _, err := f.session.Power.PCloudVolumes.PcloudCloudinstancesVolumesDelete(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil { - return fmt.Errorf("Failed to Delete PI Instance Volume %s :%s", id, err) + return fmt.Errorf(errors.DeleteVolumeOperationFailed, id, err) } return nil } @@ -96,7 +89,7 @@ func (f *IBMPIVolumeClient) Create(volumename string, volumesize float64, volume params := p_cloud_volumes.NewPcloudCloudinstancesVolumesPostParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithBody(&body) resp, err := f.session.Power.PCloudVolumes.PcloudCloudinstancesVolumesPost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp == nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to Create PI Instance Volume %s :%s", volumename, err) + return nil, fmt.Errorf(errors.CreateVolumeOperationFailed, volumename, err) } return resp.Payload, nil } @@ -107,7 +100,7 @@ func (f *IBMPIVolumeClient) Delete(id string, powerinstanceid string, timeout ti params := p_cloud_volumes.NewPcloudCloudinstancesVolumesDeleteParamsWithTimeout(helpers.PIDeleteTimeOut).WithCloudInstanceID(powerinstanceid).WithVolumeID(id) _, err := f.session.Power.PCloudVolumes.PcloudCloudinstancesVolumesDelete(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil { - return fmt.Errorf("Failed to Delete PI Instance Volume %s :%s", id, err) + return fmt.Errorf(errors.DeleteVolumeOperationFailed, id, err) } return nil } @@ -129,7 +122,7 @@ func (f *IBMPIVolumeClient) Update(id, volumename string, volumesize float64, vo params := p_cloud_volumes.NewPcloudCloudinstancesVolumesPutParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithVolumeID(id).WithBody(&patchbody) resp, err := f.session.Power.PCloudVolumes.PcloudCloudinstancesVolumesPut(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp == nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to Update PI Instance Volume %s :%s", id, err) + return nil, fmt.Errorf(errors.UpdateVolumeOperationFailed, id, err) } return resp.Payload, nil } @@ -139,7 +132,7 @@ func (f *IBMPIVolumeClient) Attach(id, volumename string, powerinstanceid string params := p_cloud_volumes.NewPcloudPvminstancesVolumesPostParamsWithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(powerinstanceid).WithPvmInstanceID(id).WithVolumeID(volumename) resp, err := f.session.Power.PCloudVolumes.PcloudPvminstancesVolumesPost(params, ibmpisession.NewAuth(f.session, powerinstanceid)) if err != nil || resp == nil || resp.Payload == nil { - return nil, fmt.Errorf("Failed to Attach PI Instance Volume %s :%s", id, err) + return nil, fmt.Errorf(errors.AttachVolumeOperationFailed, id, err) } return resp.Payload, nil diff --git a/vendor/github.com/IBM-Cloud/power-go-client/errors/errors.go b/vendor/github.com/IBM-Cloud/power-go-client/errors/errors.go new file mode 100644 index 00000000000..14ad3b69b0a --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/errors/errors.go @@ -0,0 +1,137 @@ +package errors + +import ( + "encoding/json" + "reflect" + //"strconv" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// start of Placementgroup Messages + +const GetPlacementGroupOperationFailed = "failed to perform Get Placement Group Operation for placement group %s with error %v" +const CreatePlacementGroupOperationFailed = "failed to perform Create Placement Group Operation for powerinstanceid %s with error %v" +const DeletePlacementGroupOperationFailed = "failed to perform Delete Placement Group Operation for placement group %s with error %v" +const UpdatePlacementGroupOperationFailed = "failed to perform Update Placement Group Operation for powerinstanceid %s and placement group %s with error %v" +const DeleteMemberPlacementGroupOperationFailed = "failed to perform Delete Placement Group Operation for powerinstanceid %s and placement group %s with error %v" + +// start of Cloud Connection Messages + +const GetCloudConnectionOperationFailed = "failed to perform Get Cloud Connections Operation for powerinstanceid %s with error %v" +const CreateCloudConnectionOperationFailed = "failed to perform Create Cloud Connection Operation for powerinstanceid %s with error %v" +const UpdateCloudConnectionOperationFailed = "failed to perform Update Cloud Connection Operation for cloudconnectionid %s with error %v" +const DeleteCloudConnectionOperationFailed = "failed to perform Delete Cloud Connection Operation for cloudconnectionid %s with error %v" + +// start of System-Pools Messages +const GetSystemPoolsOperationFailed = "failed to perform Get System Pools Operation for powerinstanceid %s with error %v" + +// start of Image Messages + +const GetImageOperationFailed = "failed to perform Get Image Operation for image %s with error %v" +const CreateImageOperationFailed = "failed to perform Create Image Operation for powerinstanceid %s with error %v" + +// Start of Network Messages +const GetNetworkOperationFailed = "failed to perform Get Network Operation for Network id %s with error %v" +const CreateNetworkOperationFailed = "failed to perform Create Network Operation for Network %s with error %v" +const CreateNetworkPortOperationFailed = "failed to perform Create Network Port Operation for Network %s with error %v" +const AttachNetworkPortOperationFailed = "failed to perform Attach Network Port Operation for Port %s to Network %s with error %v" + +// start of Volume Messages +const DeleteVolumeOperationFailed = "failed to perform Delete Volume Operation for volume %s with error %v" +const UpdateVolumeOperationFailed = "failed to perform Update Volume Operation for volume %s with error %v" +const GetVolumeOperationFailed = "failed to perform the Get Volume Operation for volume %s with error %v" +const CreateVolumeOperationFailed = "failed to perform the Create volume Operation for volume %s with error %v" +const CreateVolumeV2OperationFailed = "failed to perform the Create volume Operation V2 for volume %s with error %v" +const AttachVolumeOperationFailed = "failed to perform the Attach volume Operation for volume %s with error %v" + +// start of Clone Messages +const StartCloneOperationFailed = "failed to start the clone operation for %v" +const PrepareCloneOperationFailed = "failed to prepare the clone operation for %v" +const DeleteCloneOperationFailed = "failed to perform Delete operation %v" +const GetCloneOperationFailed = "failed to get the volumes-clone for the power instanceid %s with error %v" +const CreateCloneOperationFailed = "failed to perform the create clone operation %v" + +// start of Cloud Instance Messages +const GetCloudInstanceOperationFailed = "failed to Get Cloud Instance %s with error %v" +const UpdateCloudInstanceOperationFailed = "failed to update the Cloud instance %s with error %v" +const DeleteCloudInstanceOperationFailed = "failed to delete the Cloud instance %s with error %v" + +// start of PI Key Messages +const GetPIKeyOperationFailed = "failed to Get PI Key %s with error %v" +const CreatePIKeyOperationFailed = "failed to Create PI Key %s with error %v" +const DeletePIKeyOperationFailed = "failed to Delete PI Key %s with error %v" + +// ErrorTarget ... +type ErrorTarget struct { + Name string + Type string +} + +// SingleError ... +type SingleError struct { + Code string + Message string + MoreInfo string + Target ErrorTarget +} + +// PowerError ... +type Error struct { + Payload *models.Error +} + +func (e Error) Error() string { + b, _ := json.Marshal(e.Payload) + return string(b) +} + +// ToError ... +func ToError(err error) error { + if err == nil { + return nil + } + + // check if its ours + kind := reflect.TypeOf(err).Kind() + if kind != reflect.Ptr { + return err + } + + // next follow pointer + errstruct := reflect.TypeOf(err).Elem() + if errstruct.Kind() != reflect.Struct { + return err + } + + n := errstruct.NumField() + found := false + for i := 0; i < n; i++ { + if errstruct.Field(i).Name == "Payload" { + found = true + break + } + } + + if !found { + return err + } + + // check if a payload field exists + payloadValue := reflect.ValueOf(err).Elem().FieldByName("Payload") + if payloadValue.Interface() == nil { + return err + } + + payloadIntf := payloadValue.Elem().Interface() + payload, parsed := payloadIntf.(models.Error) + if !parsed { + return err + } + + var reterr = Error{ + Payload: &payload, + } + + return reterr +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/helpers/constants.go b/vendor/github.com/IBM-Cloud/power-go-client/helpers/constants.go index 000f47b8c71..92542175777 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/helpers/constants.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/helpers/constants.go @@ -5,32 +5,35 @@ import "time" const ( // IBM PI Instance - PIInstanceName = "pi_instance_name" - PIInstanceDate = "pi_creation_date" - PIInstanceSSHKeyName = "pi_key_pair_name" - PIInstanceImageName = "pi_image_id" - PIInstanceProcessors = "pi_processors" - PIInstanceProcType = "pi_proc_type" - PIInstanceMemory = "pi_memory" - PIInstanceSystemType = "pi_sys_type" - PIInstanceId = "pi_instance_id" - PIInstanceDiskSize = "pi_disk_size" - PIInstanceStatus = "pi_instance_status" - PIInstanceMinProc = "pi_minproc" - PIInstanceVolumeIds = "pi_volume_ids" - PIInstanceNetworkIds = "pi_network_ids" - PIInstancePublicNetwork = "pi_public_network" - PIInstanceMigratable = "pi_migratable" - PICloudInstanceId = "pi_cloud_instance_id" - PICloudInstanceSubnetName = "pi_cloud_instance_subnet_name" - PIInstanceMimMem = "pi_minmem" - PIInstanceMaxProc = "pi_maxproc" - PIInstanceMaxMem = "pi_maxmem" - PIInstanceReboot = "pi_reboot" - PITenantId = "pi_tenant_id" - PIVirtualCoresAssigned = "pi_virtual_cores_assigned" - PIVirtualCoresMax = "pi_virtual_cores_max" - PIVirtualCoresMin = "pi_virutal_cores_min" + PIInstanceName = "pi_instance_name" + PIInstanceDate = "pi_creation_date" + PIInstanceSSHKeyName = "pi_key_pair_name" + PIInstanceImageName = "pi_image_id" + PIInstanceProcessors = "pi_processors" + PIInstanceProcType = "pi_proc_type" + PIInstanceMemory = "pi_memory" + PIInstanceSystemType = "pi_sys_type" + PIInstanceId = "pi_instance_id" + PIInstanceDiskSize = "pi_disk_size" + PIInstanceStatus = "pi_instance_status" + PIInstanceMinProc = "pi_minproc" + PIInstanceVolumeIds = "pi_volume_ids" + PIInstanceNetworkIds = "pi_network_ids" + PIInstancePublicNetwork = "pi_public_network" + PIInstanceMigratable = "pi_migratable" + PICloudInstanceId = "pi_cloud_instance_id" + PICloudInstanceSubnetName = "pi_cloud_instance_subnet_name" + PIInstanceMimMem = "pi_minmem" + PIInstanceMaxProc = "pi_maxproc" + PIInstanceMaxMem = "pi_maxmem" + PIInstanceReboot = "pi_reboot" + PITenantId = "pi_tenant_id" + PIVirtualCoresAssigned = "pi_virtual_cores_assigned" + PIVirtualCoresMax = "pi_virtual_cores_max" + PIVirtualCoresMin = "pi_virtual_cores_min" + PIInstancePVMNetwork = "pi_instance_pvm_network" + PIInstanceStoragePool = "pi_instance_storage_pool" + PIInstanceStorageAffinityPool = "pi_instance_storage_affinity_pool" PIInstanceHealthStatus = "pi_health_status" PIInstanceReplicants = "pi_replicants" @@ -54,6 +57,10 @@ const ( PIVolumePool = "pi_volume_pool" PIAffinityPolicy = "pi_volume_affinity_policy" PIAffinityVolume = "pi_volume_affinity" + PIAffinityInstance = "pi_volume_affinity_instance" + PIAffinityDiskCount = "pi_volume_disk_count" + PIStoragePoolValue = "pi_storage_pool_type" + PIStoragePoolName = "pi_storage_pool_name" // IBM PI Snapshots @@ -63,6 +70,20 @@ const ( PISnapshotAction = "pi_snap_shot_action" PISnapshotComplete = "pi_snap_shot_complete" + // IBM PI SAP Profile + + PISAPProfileID = "pi_sap_profile_id" + PISAPProfile = "pi_sap_profile" + PISAPProfileMemory = "pi_sap_profile_memory" + PISAPProfileCertified = "pi_sap_profile_certified" + PISAPProfileType = "pi_sap_profile_type" + PISAPProfileCores = "pi_sap_profile_cores" + + // IBM PI Clone Volume + PIVolumeCloneStatus = "pi_volume_clone_status" + PIVolumeClonePercent = "pi_volume_clone_percent" + PIVolumeCloneFailure = "pi_volume_clone_failure" + // IBM PI Image PIImageName = "pi_image_name" @@ -125,6 +146,25 @@ const ( PIInstanceCaptureCloudStorageAccessKey = "pi_capture_cloud_storage_access_key" PIInstanceCaptureCloudStorageSecretKey = "pi_capture_cloud_storage_secret_key" + // IBM PI Cloud Connections + + PICloudConnectionsName = "pi_cloud_connection_name" + PICloudConnectionStatus = "pi_cloud_connection_status" + PICloudConnectionMetered = "pi_cloud_connection_metered" + PICloudConnectionUserIPAddress = "pi_cloud_connection_user_ip_address" + PICloudConnectionIBMIPAddress = "pi_cloud_connection_ibm_ip_address" + PICloudConnectionSpeed = "pi_cloud_connection_speed" + PICloudConnectionPort = "pi_cloud_connection_port" + PICloudConnectionGlobalRouting = "pi_global_routing" + PICloudConnectionId = "pi_cloud_connection_id" + PICloudConnectionClassic = "pi_cloud_connection_classic" + + // IBM PI Placement Groups + + PIPlacementGroupName = "pi_placement_group_name" + PIPlacementGroupPolicy = "pi_placement_group_policy" + PIPlacementGroupID = "pi_placement_group_id" + // Status For all the resources PIVolumeDeleting = "deleting" diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go index dbb88b41b57..6cf9dc61c8a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go @@ -120,7 +120,7 @@ func (a *Client) PcloudCloudconnectionsGetall(params *PcloudCloudconnectionsGeta /* PcloudCloudconnectionsNetworksDelete deletes a network from a cloud connection */ -func (a *Client) PcloudCloudconnectionsNetworksDelete(params *PcloudCloudconnectionsNetworksDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*PcloudCloudconnectionsNetworksDeleteOK, error) { +func (a *Client) PcloudCloudconnectionsNetworksDelete(params *PcloudCloudconnectionsNetworksDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*PcloudCloudconnectionsNetworksDeleteOK, *PcloudCloudconnectionsNetworksDeleteAccepted, error) { // TODO: Validate the params before sending if params == nil { params = NewPcloudCloudconnectionsNetworksDeleteParams() @@ -140,45 +140,22 @@ func (a *Client) PcloudCloudconnectionsNetworksDelete(params *PcloudCloudconnect Client: params.HTTPClient, }) if err != nil { - return nil, err - } - return result.(*PcloudCloudconnectionsNetworksDeleteOK), nil - -} - -/* -PcloudCloudconnectionsNetworksGet gets information about a cloud connections attached network -*/ -func (a *Client) PcloudCloudconnectionsNetworksGet(params *PcloudCloudconnectionsNetworksGetParams, authInfo runtime.ClientAuthInfoWriter) (*PcloudCloudconnectionsNetworksGetOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPcloudCloudconnectionsNetworksGetParams() + return nil, nil, err } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "pcloud.cloudconnections.networks.get", - Method: "GET", - PathPattern: "/pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PcloudCloudconnectionsNetworksGetReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err + switch value := result.(type) { + case *PcloudCloudconnectionsNetworksDeleteOK: + return value, nil, nil + case *PcloudCloudconnectionsNetworksDeleteAccepted: + return nil, value, nil } - return result.(*PcloudCloudconnectionsNetworksGetOK), nil + return nil, nil, nil } /* PcloudCloudconnectionsNetworksPut adds a network to the cloud connection */ -func (a *Client) PcloudCloudconnectionsNetworksPut(params *PcloudCloudconnectionsNetworksPutParams, authInfo runtime.ClientAuthInfoWriter) (*PcloudCloudconnectionsNetworksPutOK, error) { +func (a *Client) PcloudCloudconnectionsNetworksPut(params *PcloudCloudconnectionsNetworksPutParams, authInfo runtime.ClientAuthInfoWriter) (*PcloudCloudconnectionsNetworksPutOK, *PcloudCloudconnectionsNetworksPutAccepted, error) { // TODO: Validate the params before sending if params == nil { params = NewPcloudCloudconnectionsNetworksPutParams() @@ -198,9 +175,15 @@ func (a *Client) PcloudCloudconnectionsNetworksPut(params *PcloudCloudconnection Client: params.HTTPClient, }) if err != nil { - return nil, err + return nil, nil, err + } + switch value := result.(type) { + case *PcloudCloudconnectionsNetworksPutOK: + return value, nil, nil + case *PcloudCloudconnectionsNetworksPutAccepted: + return nil, value, nil } - return result.(*PcloudCloudconnectionsNetworksPutOK), nil + return nil, nil, nil } @@ -277,7 +260,7 @@ func (a *Client) PcloudCloudconnectionsPut(params *PcloudCloudconnectionsPutPara } /* -PcloudCloudconnectionsVirtualprivatecloudsGetall gets all cloud connections in this cloud instance +PcloudCloudconnectionsVirtualprivatecloudsGetall gets all virtual private cloud connections in this cloud instance */ func (a *Client) PcloudCloudconnectionsVirtualprivatecloudsGetall(params *PcloudCloudconnectionsVirtualprivatecloudsGetallParams, authInfo runtime.ClientAuthInfoWriter) (*PcloudCloudconnectionsVirtualprivatecloudsGetallOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go index 392d4aa5a2a..902093064af 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go @@ -46,6 +46,13 @@ func (o *PcloudCloudconnectionsDeleteReader) ReadResponse(response runtime.Clien } return nil, result + case 401: + result := NewPcloudCloudconnectionsDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 410: result := NewPcloudCloudconnectionsDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -148,6 +155,35 @@ func (o *PcloudCloudconnectionsDeleteBadRequest) readResponse(response runtime.C return nil } +// NewPcloudCloudconnectionsDeleteUnauthorized creates a PcloudCloudconnectionsDeleteUnauthorized with default headers values +func NewPcloudCloudconnectionsDeleteUnauthorized() *PcloudCloudconnectionsDeleteUnauthorized { + return &PcloudCloudconnectionsDeleteUnauthorized{} +} + +/*PcloudCloudconnectionsDeleteUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudconnectionsDeleteUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudconnectionsDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudconnectionsDeleteUnauthorized) 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 +} + // NewPcloudCloudconnectionsDeleteGone creates a PcloudCloudconnectionsDeleteGone with default headers values func NewPcloudCloudconnectionsDeleteGone() *PcloudCloudconnectionsDeleteGone { return &PcloudCloudconnectionsDeleteGone{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go index df1a91e221e..52b0f7e391c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudconnectionsGetReader) ReadResponse(response runtime.ClientRe } return nil, result + case 401: + result := NewPcloudCloudconnectionsGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudCloudconnectionsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudCloudconnectionsGetBadRequest) readResponse(response runtime.Clie return nil } +// NewPcloudCloudconnectionsGetUnauthorized creates a PcloudCloudconnectionsGetUnauthorized with default headers values +func NewPcloudCloudconnectionsGetUnauthorized() *PcloudCloudconnectionsGetUnauthorized { + return &PcloudCloudconnectionsGetUnauthorized{} +} + +/*PcloudCloudconnectionsGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudconnectionsGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudconnectionsGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudconnectionsGetUnauthorized) 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 +} + // NewPcloudCloudconnectionsGetNotFound creates a PcloudCloudconnectionsGetNotFound with default headers values func NewPcloudCloudconnectionsGetNotFound() *PcloudCloudconnectionsGetNotFound { return &PcloudCloudconnectionsGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go index bf3befbd472..ddb4087584a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudconnectionsGetallReader) ReadResponse(response runtime.Clien } return nil, result + case 401: + result := NewPcloudCloudconnectionsGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: result := NewPcloudCloudconnectionsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -109,6 +116,35 @@ func (o *PcloudCloudconnectionsGetallBadRequest) readResponse(response runtime.C return nil } +// NewPcloudCloudconnectionsGetallUnauthorized creates a PcloudCloudconnectionsGetallUnauthorized with default headers values +func NewPcloudCloudconnectionsGetallUnauthorized() *PcloudCloudconnectionsGetallUnauthorized { + return &PcloudCloudconnectionsGetallUnauthorized{} +} + +/*PcloudCloudconnectionsGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudconnectionsGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudconnectionsGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudconnectionsGetallUnauthorized) 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 +} + // NewPcloudCloudconnectionsGetallInternalServerError creates a PcloudCloudconnectionsGetallInternalServerError with default headers values func NewPcloudCloudconnectionsGetallInternalServerError() *PcloudCloudconnectionsGetallInternalServerError { return &PcloudCloudconnectionsGetallInternalServerError{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go index 88cef00aa28..eec64a15656 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go @@ -32,6 +32,13 @@ func (o *PcloudCloudconnectionsNetworksDeleteReader) ReadResponse(response runti } return result, nil + case 202: + result := NewPcloudCloudconnectionsNetworksDeleteAccepted() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: result := NewPcloudCloudconnectionsNetworksDeleteBadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -39,6 +46,13 @@ func (o *PcloudCloudconnectionsNetworksDeleteReader) ReadResponse(response runti } return nil, result + case 401: + result := NewPcloudCloudconnectionsNetworksDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 410: result := NewPcloudCloudconnectionsNetworksDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -87,6 +101,33 @@ func (o *PcloudCloudconnectionsNetworksDeleteOK) readResponse(response runtime.C return nil } +// NewPcloudCloudconnectionsNetworksDeleteAccepted creates a PcloudCloudconnectionsNetworksDeleteAccepted with default headers values +func NewPcloudCloudconnectionsNetworksDeleteAccepted() *PcloudCloudconnectionsNetworksDeleteAccepted { + return &PcloudCloudconnectionsNetworksDeleteAccepted{} +} + +/*PcloudCloudconnectionsNetworksDeleteAccepted handles this case with default header values. + +Accepted +*/ +type PcloudCloudconnectionsNetworksDeleteAccepted struct { + Payload models.Object +} + +func (o *PcloudCloudconnectionsNetworksDeleteAccepted) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteAccepted %+v", 202, o.Payload) +} + +func (o *PcloudCloudconnectionsNetworksDeleteAccepted) 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 +} + // NewPcloudCloudconnectionsNetworksDeleteBadRequest creates a PcloudCloudconnectionsNetworksDeleteBadRequest with default headers values func NewPcloudCloudconnectionsNetworksDeleteBadRequest() *PcloudCloudconnectionsNetworksDeleteBadRequest { return &PcloudCloudconnectionsNetworksDeleteBadRequest{} @@ -116,6 +157,35 @@ func (o *PcloudCloudconnectionsNetworksDeleteBadRequest) readResponse(response r return nil } +// NewPcloudCloudconnectionsNetworksDeleteUnauthorized creates a PcloudCloudconnectionsNetworksDeleteUnauthorized with default headers values +func NewPcloudCloudconnectionsNetworksDeleteUnauthorized() *PcloudCloudconnectionsNetworksDeleteUnauthorized { + return &PcloudCloudconnectionsNetworksDeleteUnauthorized{} +} + +/*PcloudCloudconnectionsNetworksDeleteUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudconnectionsNetworksDeleteUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) 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 +} + // NewPcloudCloudconnectionsNetworksDeleteGone creates a PcloudCloudconnectionsNetworksDeleteGone with default headers values func NewPcloudCloudconnectionsNetworksDeleteGone() *PcloudCloudconnectionsNetworksDeleteGone { return &PcloudCloudconnectionsNetworksDeleteGone{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_get_parameters.go deleted file mode 100644 index bf4756c494b..00000000000 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_get_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package p_cloud_cloud_connections - -// 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" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewPcloudCloudconnectionsNetworksGetParams creates a new PcloudCloudconnectionsNetworksGetParams object -// with the default values initialized. -func NewPcloudCloudconnectionsNetworksGetParams() *PcloudCloudconnectionsNetworksGetParams { - var () - return &PcloudCloudconnectionsNetworksGetParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewPcloudCloudconnectionsNetworksGetParamsWithTimeout creates a new PcloudCloudconnectionsNetworksGetParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewPcloudCloudconnectionsNetworksGetParamsWithTimeout(timeout time.Duration) *PcloudCloudconnectionsNetworksGetParams { - var () - return &PcloudCloudconnectionsNetworksGetParams{ - - timeout: timeout, - } -} - -// NewPcloudCloudconnectionsNetworksGetParamsWithContext creates a new PcloudCloudconnectionsNetworksGetParams object -// with the default values initialized, and the ability to set a context for a request -func NewPcloudCloudconnectionsNetworksGetParamsWithContext(ctx context.Context) *PcloudCloudconnectionsNetworksGetParams { - var () - return &PcloudCloudconnectionsNetworksGetParams{ - - Context: ctx, - } -} - -// NewPcloudCloudconnectionsNetworksGetParamsWithHTTPClient creates a new PcloudCloudconnectionsNetworksGetParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewPcloudCloudconnectionsNetworksGetParamsWithHTTPClient(client *http.Client) *PcloudCloudconnectionsNetworksGetParams { - var () - return &PcloudCloudconnectionsNetworksGetParams{ - HTTPClient: client, - } -} - -/*PcloudCloudconnectionsNetworksGetParams contains all the parameters to send to the API endpoint -for the pcloud cloudconnections networks get operation typically these are written to a http.Request -*/ -type PcloudCloudconnectionsNetworksGetParams struct { - - /*CloudConnectionID - Cloud Connection ID - - */ - CloudConnectionID string - /*CloudInstanceID - Cloud Instance ID of a PCloud Instance - - */ - CloudInstanceID string - /*NetworkID - Network ID - - */ - NetworkID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the pcloud cloudconnections networks get params -func (o *PcloudCloudconnectionsNetworksGetParams) WithTimeout(timeout time.Duration) *PcloudCloudconnectionsNetworksGetParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the pcloud cloudconnections networks get params -func (o *PcloudCloudconnectionsNetworksGetParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the pcloud cloudconnections networks get params -func (o *PcloudCloudconnectionsNetworksGetParams) WithContext(ctx context.Context) *PcloudCloudconnectionsNetworksGetParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the pcloud cloudconnections networks get params -func (o *PcloudCloudconnectionsNetworksGetParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the pcloud cloudconnections networks get params -func (o *PcloudCloudconnectionsNetworksGetParams) WithHTTPClient(client *http.Client) *PcloudCloudconnectionsNetworksGetParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the pcloud cloudconnections networks get params -func (o *PcloudCloudconnectionsNetworksGetParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCloudConnectionID adds the cloudConnectionID to the pcloud cloudconnections networks get params -func (o *PcloudCloudconnectionsNetworksGetParams) WithCloudConnectionID(cloudConnectionID string) *PcloudCloudconnectionsNetworksGetParams { - o.SetCloudConnectionID(cloudConnectionID) - return o -} - -// SetCloudConnectionID adds the cloudConnectionId to the pcloud cloudconnections networks get params -func (o *PcloudCloudconnectionsNetworksGetParams) SetCloudConnectionID(cloudConnectionID string) { - o.CloudConnectionID = cloudConnectionID -} - -// WithCloudInstanceID adds the cloudInstanceID to the pcloud cloudconnections networks get params -func (o *PcloudCloudconnectionsNetworksGetParams) WithCloudInstanceID(cloudInstanceID string) *PcloudCloudconnectionsNetworksGetParams { - o.SetCloudInstanceID(cloudInstanceID) - return o -} - -// SetCloudInstanceID adds the cloudInstanceId to the pcloud cloudconnections networks get params -func (o *PcloudCloudconnectionsNetworksGetParams) SetCloudInstanceID(cloudInstanceID string) { - o.CloudInstanceID = cloudInstanceID -} - -// WithNetworkID adds the networkID to the pcloud cloudconnections networks get params -func (o *PcloudCloudconnectionsNetworksGetParams) WithNetworkID(networkID string) *PcloudCloudconnectionsNetworksGetParams { - o.SetNetworkID(networkID) - return o -} - -// SetNetworkID adds the networkId to the pcloud cloudconnections networks get params -func (o *PcloudCloudconnectionsNetworksGetParams) SetNetworkID(networkID string) { - o.NetworkID = networkID -} - -// WriteToRequest writes these params to a swagger request -func (o *PcloudCloudconnectionsNetworksGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cloud_connection_id - if err := r.SetPathParam("cloud_connection_id", o.CloudConnectionID); err != nil { - return err - } - - // path param cloud_instance_id - if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { - return err - } - - // path param network_id - if err := r.SetPathParam("network_id", o.NetworkID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_get_responses.go deleted file mode 100644 index b39dcbfc610..00000000000 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_get_responses.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package p_cloud_cloud_connections - -// 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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/IBM-Cloud/power-go-client/power/models" -) - -// PcloudCloudconnectionsNetworksGetReader is a Reader for the PcloudCloudconnectionsNetworksGet structure. -type PcloudCloudconnectionsNetworksGetReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PcloudCloudconnectionsNetworksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewPcloudCloudconnectionsNetworksGetOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - case 400: - result := NewPcloudCloudconnectionsNetworksGetBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - - case 404: - result := NewPcloudCloudconnectionsNetworksGetNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - - case 500: - result := NewPcloudCloudconnectionsNetworksGetInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) - } -} - -// NewPcloudCloudconnectionsNetworksGetOK creates a PcloudCloudconnectionsNetworksGetOK with default headers values -func NewPcloudCloudconnectionsNetworksGetOK() *PcloudCloudconnectionsNetworksGetOK { - return &PcloudCloudconnectionsNetworksGetOK{} -} - -/*PcloudCloudconnectionsNetworksGetOK handles this case with default header values. - -OK -*/ -type PcloudCloudconnectionsNetworksGetOK struct { - Payload *models.Network -} - -func (o *PcloudCloudconnectionsNetworksGetOK) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksGetOK %+v", 200, o.Payload) -} - -func (o *PcloudCloudconnectionsNetworksGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Network) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPcloudCloudconnectionsNetworksGetBadRequest creates a PcloudCloudconnectionsNetworksGetBadRequest with default headers values -func NewPcloudCloudconnectionsNetworksGetBadRequest() *PcloudCloudconnectionsNetworksGetBadRequest { - return &PcloudCloudconnectionsNetworksGetBadRequest{} -} - -/*PcloudCloudconnectionsNetworksGetBadRequest handles this case with default header values. - -Bad Request -*/ -type PcloudCloudconnectionsNetworksGetBadRequest struct { - Payload *models.Error -} - -func (o *PcloudCloudconnectionsNetworksGetBadRequest) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksGetBadRequest %+v", 400, o.Payload) -} - -func (o *PcloudCloudconnectionsNetworksGetBadRequest) 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 -} - -// NewPcloudCloudconnectionsNetworksGetNotFound creates a PcloudCloudconnectionsNetworksGetNotFound with default headers values -func NewPcloudCloudconnectionsNetworksGetNotFound() *PcloudCloudconnectionsNetworksGetNotFound { - return &PcloudCloudconnectionsNetworksGetNotFound{} -} - -/*PcloudCloudconnectionsNetworksGetNotFound handles this case with default header values. - -Not Found -*/ -type PcloudCloudconnectionsNetworksGetNotFound struct { - Payload *models.Error -} - -func (o *PcloudCloudconnectionsNetworksGetNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksGetNotFound %+v", 404, o.Payload) -} - -func (o *PcloudCloudconnectionsNetworksGetNotFound) 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 -} - -// NewPcloudCloudconnectionsNetworksGetInternalServerError creates a PcloudCloudconnectionsNetworksGetInternalServerError with default headers values -func NewPcloudCloudconnectionsNetworksGetInternalServerError() *PcloudCloudconnectionsNetworksGetInternalServerError { - return &PcloudCloudconnectionsNetworksGetInternalServerError{} -} - -/*PcloudCloudconnectionsNetworksGetInternalServerError handles this case with default header values. - -Internal Server Error -*/ -type PcloudCloudconnectionsNetworksGetInternalServerError struct { - Payload *models.Error -} - -func (o *PcloudCloudconnectionsNetworksGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksGetInternalServerError %+v", 500, o.Payload) -} - -func (o *PcloudCloudconnectionsNetworksGetInternalServerError) 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/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go index 8406a663c4f..64bf139cf4a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go @@ -32,6 +32,13 @@ func (o *PcloudCloudconnectionsNetworksPutReader) ReadResponse(response runtime. } return result, nil + case 202: + result := NewPcloudCloudconnectionsNetworksPutAccepted() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: result := NewPcloudCloudconnectionsNetworksPutBadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -39,6 +46,13 @@ func (o *PcloudCloudconnectionsNetworksPutReader) ReadResponse(response runtime. } return nil, result + case 401: + result := NewPcloudCloudconnectionsNetworksPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: result := NewPcloudCloudconnectionsNetworksPutUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -87,6 +101,33 @@ func (o *PcloudCloudconnectionsNetworksPutOK) readResponse(response runtime.Clie return nil } +// NewPcloudCloudconnectionsNetworksPutAccepted creates a PcloudCloudconnectionsNetworksPutAccepted with default headers values +func NewPcloudCloudconnectionsNetworksPutAccepted() *PcloudCloudconnectionsNetworksPutAccepted { + return &PcloudCloudconnectionsNetworksPutAccepted{} +} + +/*PcloudCloudconnectionsNetworksPutAccepted handles this case with default header values. + +Accepted +*/ +type PcloudCloudconnectionsNetworksPutAccepted struct { + Payload models.Object +} + +func (o *PcloudCloudconnectionsNetworksPutAccepted) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutAccepted %+v", 202, o.Payload) +} + +func (o *PcloudCloudconnectionsNetworksPutAccepted) 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 +} + // NewPcloudCloudconnectionsNetworksPutBadRequest creates a PcloudCloudconnectionsNetworksPutBadRequest with default headers values func NewPcloudCloudconnectionsNetworksPutBadRequest() *PcloudCloudconnectionsNetworksPutBadRequest { return &PcloudCloudconnectionsNetworksPutBadRequest{} @@ -116,6 +157,35 @@ func (o *PcloudCloudconnectionsNetworksPutBadRequest) readResponse(response runt return nil } +// NewPcloudCloudconnectionsNetworksPutUnauthorized creates a PcloudCloudconnectionsNetworksPutUnauthorized with default headers values +func NewPcloudCloudconnectionsNetworksPutUnauthorized() *PcloudCloudconnectionsNetworksPutUnauthorized { + return &PcloudCloudconnectionsNetworksPutUnauthorized{} +} + +/*PcloudCloudconnectionsNetworksPutUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudconnectionsNetworksPutUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudconnectionsNetworksPutUnauthorized) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudconnectionsNetworksPutUnauthorized) 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 +} + // NewPcloudCloudconnectionsNetworksPutUnprocessableEntity creates a PcloudCloudconnectionsNetworksPutUnprocessableEntity with default headers values func NewPcloudCloudconnectionsNetworksPutUnprocessableEntity() *PcloudCloudconnectionsNetworksPutUnprocessableEntity { return &PcloudCloudconnectionsNetworksPutUnprocessableEntity{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go index 61bb04049a8..9f63a4e9f32 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go @@ -53,6 +53,13 @@ func (o *PcloudCloudconnectionsPostReader) ReadResponse(response runtime.ClientR } return nil, result + case 401: + result := NewPcloudCloudconnectionsPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: result := NewPcloudCloudconnectionsPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -195,6 +202,35 @@ func (o *PcloudCloudconnectionsPostBadRequest) readResponse(response runtime.Cli return nil } +// NewPcloudCloudconnectionsPostUnauthorized creates a PcloudCloudconnectionsPostUnauthorized with default headers values +func NewPcloudCloudconnectionsPostUnauthorized() *PcloudCloudconnectionsPostUnauthorized { + return &PcloudCloudconnectionsPostUnauthorized{} +} + +/*PcloudCloudconnectionsPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudconnectionsPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudconnectionsPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudconnectionsPostUnauthorized) 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 +} + // NewPcloudCloudconnectionsPostConflict creates a PcloudCloudconnectionsPostConflict with default headers values func NewPcloudCloudconnectionsPostConflict() *PcloudCloudconnectionsPostConflict { return &PcloudCloudconnectionsPostConflict{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go index c7ec47ff39d..1cb11463a79 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go @@ -46,6 +46,27 @@ func (o *PcloudCloudconnectionsPutReader) ReadResponse(response runtime.ClientRe } return nil, result + case 401: + result := NewPcloudCloudconnectionsPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 404: + result := NewPcloudCloudconnectionsPutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 405: + result := NewPcloudCloudconnectionsPutMethodNotAllowed() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: result := NewPcloudCloudconnectionsPutUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -104,7 +125,7 @@ func NewPcloudCloudconnectionsPutAccepted() *PcloudCloudconnectionsPutAccepted { Accepted */ type PcloudCloudconnectionsPutAccepted struct { - Payload *models.CloudConnection + Payload models.Object } func (o *PcloudCloudconnectionsPutAccepted) Error() string { @@ -113,10 +134,8 @@ func (o *PcloudCloudconnectionsPutAccepted) Error() string { func (o *PcloudCloudconnectionsPutAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.CloudConnection) - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } @@ -152,6 +171,93 @@ func (o *PcloudCloudconnectionsPutBadRequest) readResponse(response runtime.Clie return nil } +// NewPcloudCloudconnectionsPutUnauthorized creates a PcloudCloudconnectionsPutUnauthorized with default headers values +func NewPcloudCloudconnectionsPutUnauthorized() *PcloudCloudconnectionsPutUnauthorized { + return &PcloudCloudconnectionsPutUnauthorized{} +} + +/*PcloudCloudconnectionsPutUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudconnectionsPutUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudconnectionsPutUnauthorized) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudconnectionsPutUnauthorized) 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 +} + +// NewPcloudCloudconnectionsPutNotFound creates a PcloudCloudconnectionsPutNotFound with default headers values +func NewPcloudCloudconnectionsPutNotFound() *PcloudCloudconnectionsPutNotFound { + return &PcloudCloudconnectionsPutNotFound{} +} + +/*PcloudCloudconnectionsPutNotFound handles this case with default header values. + +Not Found +*/ +type PcloudCloudconnectionsPutNotFound struct { + Payload *models.Error +} + +func (o *PcloudCloudconnectionsPutNotFound) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudconnectionsPutNotFound) 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 +} + +// NewPcloudCloudconnectionsPutMethodNotAllowed creates a PcloudCloudconnectionsPutMethodNotAllowed with default headers values +func NewPcloudCloudconnectionsPutMethodNotAllowed() *PcloudCloudconnectionsPutMethodNotAllowed { + return &PcloudCloudconnectionsPutMethodNotAllowed{} +} + +/*PcloudCloudconnectionsPutMethodNotAllowed handles this case with default header values. + +Method Not Allowed +*/ +type PcloudCloudconnectionsPutMethodNotAllowed struct { + Payload *models.Error +} + +func (o *PcloudCloudconnectionsPutMethodNotAllowed) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutMethodNotAllowed %+v", 405, o.Payload) +} + +func (o *PcloudCloudconnectionsPutMethodNotAllowed) 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 +} + // NewPcloudCloudconnectionsPutUnprocessableEntity creates a PcloudCloudconnectionsPutUnprocessableEntity with default headers values func NewPcloudCloudconnectionsPutUnprocessableEntity() *PcloudCloudconnectionsPutUnprocessableEntity { return &PcloudCloudconnectionsPutUnprocessableEntity{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go index 41e0bfca491..971f611f48a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallReader) ReadResponse(re } return nil, result + case 401: + result := NewPcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: result := NewPcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -109,6 +116,35 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest) readRespons return nil } +// NewPcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized creates a PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized with default headers values +func NewPcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized() *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized { + return &PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized{} +} + +/*PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) 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 +} + // NewPcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError creates a PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError with default headers values func NewPcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError() *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError { return &PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_responses.go index 795d78c34f4..0285dc7a2c9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudEventsGetReader) ReadResponse(response runtime.ClientResponse, co } return nil, result + case 401: + result := NewPcloudEventsGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudEventsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudEventsGetBadRequest) readResponse(response runtime.ClientResponse return nil } +// NewPcloudEventsGetUnauthorized creates a PcloudEventsGetUnauthorized with default headers values +func NewPcloudEventsGetUnauthorized() *PcloudEventsGetUnauthorized { + return &PcloudEventsGetUnauthorized{} +} + +/*PcloudEventsGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudEventsGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudEventsGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudEventsGetUnauthorized) 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 +} + // NewPcloudEventsGetNotFound creates a PcloudEventsGetNotFound with default headers values func NewPcloudEventsGetNotFound() *PcloudEventsGetNotFound { return &PcloudEventsGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_responses.go index 40cfbd3423e..f6087864019 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_responses.go @@ -39,6 +39,13 @@ func (o *PcloudEventsGetqueryReader) ReadResponse(response runtime.ClientRespons } return nil, result + case 401: + result := NewPcloudEventsGetqueryUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: result := NewPcloudEventsGetqueryInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -109,6 +116,35 @@ func (o *PcloudEventsGetqueryBadRequest) readResponse(response runtime.ClientRes return nil } +// NewPcloudEventsGetqueryUnauthorized creates a PcloudEventsGetqueryUnauthorized with default headers values +func NewPcloudEventsGetqueryUnauthorized() *PcloudEventsGetqueryUnauthorized { + return &PcloudEventsGetqueryUnauthorized{} +} + +/*PcloudEventsGetqueryUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudEventsGetqueryUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudEventsGetqueryUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudEventsGetqueryUnauthorized) 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 +} + // NewPcloudEventsGetqueryInternalServerError creates a PcloudEventsGetqueryInternalServerError with default headers values func NewPcloudEventsGetqueryInternalServerError() *PcloudEventsGetqueryInternalServerError { return &PcloudEventsGetqueryInternalServerError{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go index 0be0ba32059..180ec1184de 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesImagesDeleteReader) ReadResponse(response runtime.C } return nil, result + case 401: + result := NewPcloudCloudinstancesImagesDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 410: result := NewPcloudCloudinstancesImagesDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +121,35 @@ func (o *PcloudCloudinstancesImagesDeleteBadRequest) readResponse(response runti return nil } +// NewPcloudCloudinstancesImagesDeleteUnauthorized creates a PcloudCloudinstancesImagesDeleteUnauthorized with default headers values +func NewPcloudCloudinstancesImagesDeleteUnauthorized() *PcloudCloudinstancesImagesDeleteUnauthorized { + return &PcloudCloudinstancesImagesDeleteUnauthorized{} +} + +/*PcloudCloudinstancesImagesDeleteUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesImagesDeleteUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesImagesDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesImagesDeleteUnauthorized) 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 +} + // NewPcloudCloudinstancesImagesDeleteGone creates a PcloudCloudinstancesImagesDeleteGone with default headers values func NewPcloudCloudinstancesImagesDeleteGone() *PcloudCloudinstancesImagesDeleteGone { return &PcloudCloudinstancesImagesDeleteGone{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go index 215635c358b..91a3ad90c93 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesImagesExportPostReader) ReadResponse(response runti } return nil, result + case 401: + result := NewPcloudCloudinstancesImagesExportPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudCloudinstancesImagesExportPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +121,35 @@ func (o *PcloudCloudinstancesImagesExportPostBadRequest) readResponse(response r return nil } +// NewPcloudCloudinstancesImagesExportPostUnauthorized creates a PcloudCloudinstancesImagesExportPostUnauthorized with default headers values +func NewPcloudCloudinstancesImagesExportPostUnauthorized() *PcloudCloudinstancesImagesExportPostUnauthorized { + return &PcloudCloudinstancesImagesExportPostUnauthorized{} +} + +/*PcloudCloudinstancesImagesExportPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesImagesExportPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesImagesExportPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesImagesExportPostUnauthorized) 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 +} + // NewPcloudCloudinstancesImagesExportPostNotFound creates a PcloudCloudinstancesImagesExportPostNotFound with default headers values func NewPcloudCloudinstancesImagesExportPostNotFound() *PcloudCloudinstancesImagesExportPostNotFound { return &PcloudCloudinstancesImagesExportPostNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go index da20793f5fb..eafde453889 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesImagesGetReader) ReadResponse(response runtime.Clie } return nil, result + case 401: + result := NewPcloudCloudinstancesImagesGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudCloudinstancesImagesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudCloudinstancesImagesGetBadRequest) readResponse(response runtime. return nil } +// NewPcloudCloudinstancesImagesGetUnauthorized creates a PcloudCloudinstancesImagesGetUnauthorized with default headers values +func NewPcloudCloudinstancesImagesGetUnauthorized() *PcloudCloudinstancesImagesGetUnauthorized { + return &PcloudCloudinstancesImagesGetUnauthorized{} +} + +/*PcloudCloudinstancesImagesGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesImagesGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesImagesGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesImagesGetUnauthorized) 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 +} + // NewPcloudCloudinstancesImagesGetNotFound creates a PcloudCloudinstancesImagesGetNotFound with default headers values func NewPcloudCloudinstancesImagesGetNotFound() *PcloudCloudinstancesImagesGetNotFound { return &PcloudCloudinstancesImagesGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go index fffd794fee8..02b4454c780 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesImagesGetallReader) ReadResponse(response runtime.C } return nil, result + case 401: + result := NewPcloudCloudinstancesImagesGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudCloudinstancesImagesGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudCloudinstancesImagesGetallBadRequest) readResponse(response runti return nil } +// NewPcloudCloudinstancesImagesGetallUnauthorized creates a PcloudCloudinstancesImagesGetallUnauthorized with default headers values +func NewPcloudCloudinstancesImagesGetallUnauthorized() *PcloudCloudinstancesImagesGetallUnauthorized { + return &PcloudCloudinstancesImagesGetallUnauthorized{} +} + +/*PcloudCloudinstancesImagesGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesImagesGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesImagesGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesImagesGetallUnauthorized) 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 +} + // NewPcloudCloudinstancesImagesGetallNotFound creates a PcloudCloudinstancesImagesGetallNotFound with default headers values func NewPcloudCloudinstancesImagesGetallNotFound() *PcloudCloudinstancesImagesGetallNotFound { return &PcloudCloudinstancesImagesGetallNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go index 9ec57afbacf..14254d376d5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go @@ -46,6 +46,13 @@ func (o *PcloudCloudinstancesImagesPostReader) ReadResponse(response runtime.Cli } return nil, result + case 401: + result := NewPcloudCloudinstancesImagesPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: result := NewPcloudCloudinstancesImagesPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -159,6 +166,35 @@ func (o *PcloudCloudinstancesImagesPostBadRequest) readResponse(response runtime return nil } +// NewPcloudCloudinstancesImagesPostUnauthorized creates a PcloudCloudinstancesImagesPostUnauthorized with default headers values +func NewPcloudCloudinstancesImagesPostUnauthorized() *PcloudCloudinstancesImagesPostUnauthorized { + return &PcloudCloudinstancesImagesPostUnauthorized{} +} + +/*PcloudCloudinstancesImagesPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesImagesPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesImagesPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesImagesPostUnauthorized) 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 +} + // NewPcloudCloudinstancesImagesPostConflict creates a PcloudCloudinstancesImagesPostConflict with default headers values func NewPcloudCloudinstancesImagesPostConflict() *PcloudCloudinstancesImagesPostConflict { return &PcloudCloudinstancesImagesPostConflict{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go index 564aad9675f..bbb04327a76 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesStockimagesGetReader) ReadResponse(response runtime } return nil, result + case 401: + result := NewPcloudCloudinstancesStockimagesGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudCloudinstancesStockimagesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudCloudinstancesStockimagesGetBadRequest) readResponse(response run return nil } +// NewPcloudCloudinstancesStockimagesGetUnauthorized creates a PcloudCloudinstancesStockimagesGetUnauthorized with default headers values +func NewPcloudCloudinstancesStockimagesGetUnauthorized() *PcloudCloudinstancesStockimagesGetUnauthorized { + return &PcloudCloudinstancesStockimagesGetUnauthorized{} +} + +/*PcloudCloudinstancesStockimagesGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesStockimagesGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesStockimagesGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesStockimagesGetUnauthorized) 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 +} + // NewPcloudCloudinstancesStockimagesGetNotFound creates a PcloudCloudinstancesStockimagesGetNotFound with default headers values func NewPcloudCloudinstancesStockimagesGetNotFound() *PcloudCloudinstancesStockimagesGetNotFound { return &PcloudCloudinstancesStockimagesGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_parameters.go index ea73e175e52..52f1f03cfdf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_parameters.go @@ -72,6 +72,11 @@ type PcloudCloudinstancesStockimagesGetallParams struct { */ Sap *bool + /*Vtl + Include VTL images with get available stock images + + */ + Vtl *bool timeout time.Duration Context context.Context @@ -133,6 +138,17 @@ func (o *PcloudCloudinstancesStockimagesGetallParams) SetSap(sap *bool) { o.Sap = sap } +// WithVtl adds the vtl to the pcloud cloudinstances stockimages getall params +func (o *PcloudCloudinstancesStockimagesGetallParams) WithVtl(vtl *bool) *PcloudCloudinstancesStockimagesGetallParams { + o.SetVtl(vtl) + return o +} + +// SetVtl adds the vtl to the pcloud cloudinstances stockimages getall params +func (o *PcloudCloudinstancesStockimagesGetallParams) SetVtl(vtl *bool) { + o.Vtl = vtl +} + // WriteToRequest writes these params to a swagger request func (o *PcloudCloudinstancesStockimagesGetallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -162,6 +178,22 @@ func (o *PcloudCloudinstancesStockimagesGetallParams) WriteToRequest(r runtime.C } + if o.Vtl != nil { + + // query param vtl + var qrVtl bool + if o.Vtl != nil { + qrVtl = *o.Vtl + } + qVtl := swag.FormatBool(qrVtl) + if qVtl != "" { + if err := r.SetQueryParam("vtl", qVtl); err != nil { + return err + } + } + + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go index 58dee5af645..30af9166131 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesStockimagesGetallReader) ReadResponse(response runt } return nil, result + case 401: + result := NewPcloudCloudinstancesStockimagesGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudCloudinstancesStockimagesGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudCloudinstancesStockimagesGetallBadRequest) readResponse(response return nil } +// NewPcloudCloudinstancesStockimagesGetallUnauthorized creates a PcloudCloudinstancesStockimagesGetallUnauthorized with default headers values +func NewPcloudCloudinstancesStockimagesGetallUnauthorized() *PcloudCloudinstancesStockimagesGetallUnauthorized { + return &PcloudCloudinstancesStockimagesGetallUnauthorized{} +} + +/*PcloudCloudinstancesStockimagesGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesStockimagesGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) 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 +} + // NewPcloudCloudinstancesStockimagesGetallNotFound creates a PcloudCloudinstancesStockimagesGetallNotFound with default headers values func NewPcloudCloudinstancesStockimagesGetallNotFound() *PcloudCloudinstancesStockimagesGetallNotFound { return &PcloudCloudinstancesStockimagesGetallNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_responses.go index 1e32b1daeb9..a9bd635b89e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudImagesGetReader) ReadResponse(response runtime.ClientResponse, co } return nil, result + case 401: + result := NewPcloudImagesGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudImagesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudImagesGetBadRequest) readResponse(response runtime.ClientResponse return nil } +// NewPcloudImagesGetUnauthorized creates a PcloudImagesGetUnauthorized with default headers values +func NewPcloudImagesGetUnauthorized() *PcloudImagesGetUnauthorized { + return &PcloudImagesGetUnauthorized{} +} + +/*PcloudImagesGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudImagesGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudImagesGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudImagesGetUnauthorized) 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 +} + // NewPcloudImagesGetNotFound creates a PcloudImagesGetNotFound with default headers values func NewPcloudImagesGetNotFound() *PcloudImagesGetNotFound { return &PcloudImagesGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_parameters.go index b9a55a57994..0de7385b0ce 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_parameters.go @@ -67,6 +67,11 @@ type PcloudImagesGetallParams struct { */ Sap *bool + /*Vtl + Include VTL images with get available stock images + + */ + Vtl *bool timeout time.Duration Context context.Context @@ -117,6 +122,17 @@ func (o *PcloudImagesGetallParams) SetSap(sap *bool) { o.Sap = sap } +// WithVtl adds the vtl to the pcloud images getall params +func (o *PcloudImagesGetallParams) WithVtl(vtl *bool) *PcloudImagesGetallParams { + o.SetVtl(vtl) + return o +} + +// SetVtl adds the vtl to the pcloud images getall params +func (o *PcloudImagesGetallParams) SetVtl(vtl *bool) { + o.Vtl = vtl +} + // WriteToRequest writes these params to a swagger request func (o *PcloudImagesGetallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -141,6 +157,22 @@ func (o *PcloudImagesGetallParams) WriteToRequest(r runtime.ClientRequest, reg s } + if o.Vtl != nil { + + // query param vtl + var qrVtl bool + if o.Vtl != nil { + qrVtl = *o.Vtl + } + qVtl := swag.FormatBool(qrVtl) + if qVtl != "" { + if err := r.SetQueryParam("vtl", qVtl); err != nil { + return err + } + } + + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_responses.go index 9b5b595a587..242dc4a0cad 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_responses.go @@ -39,6 +39,13 @@ func (o *PcloudImagesGetallReader) ReadResponse(response runtime.ClientResponse, } return nil, result + case 401: + result := NewPcloudImagesGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudImagesGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudImagesGetallBadRequest) readResponse(response runtime.ClientRespo return nil } +// NewPcloudImagesGetallUnauthorized creates a PcloudImagesGetallUnauthorized with default headers values +func NewPcloudImagesGetallUnauthorized() *PcloudImagesGetallUnauthorized { + return &PcloudImagesGetallUnauthorized{} +} + +/*PcloudImagesGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudImagesGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudImagesGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudImagesGetallUnauthorized) 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 +} + // NewPcloudImagesGetallNotFound creates a PcloudImagesGetallNotFound with default headers values func NewPcloudImagesGetallNotFound() *PcloudImagesGetallNotFound { return &PcloudImagesGetallNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go index 83d4b62ad5b..c9d968005bf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesDeleteReader) ReadResponse(response runtime.ClientR } return nil, result + case 401: + result := NewPcloudCloudinstancesDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 410: result := NewPcloudCloudinstancesDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +121,35 @@ func (o *PcloudCloudinstancesDeleteBadRequest) readResponse(response runtime.Cli return nil } +// NewPcloudCloudinstancesDeleteUnauthorized creates a PcloudCloudinstancesDeleteUnauthorized with default headers values +func NewPcloudCloudinstancesDeleteUnauthorized() *PcloudCloudinstancesDeleteUnauthorized { + return &PcloudCloudinstancesDeleteUnauthorized{} +} + +/*PcloudCloudinstancesDeleteUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesDeleteUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesDeleteUnauthorized) 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 +} + // NewPcloudCloudinstancesDeleteGone creates a PcloudCloudinstancesDeleteGone with default headers values func NewPcloudCloudinstancesDeleteGone() *PcloudCloudinstancesDeleteGone { return &PcloudCloudinstancesDeleteGone{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go index a485801dfcb..c2e7517d654 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesGetReader) ReadResponse(response runtime.ClientResp } return nil, result + case 401: + result := NewPcloudCloudinstancesGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudCloudinstancesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudCloudinstancesGetBadRequest) readResponse(response runtime.Client return nil } +// NewPcloudCloudinstancesGetUnauthorized creates a PcloudCloudinstancesGetUnauthorized with default headers values +func NewPcloudCloudinstancesGetUnauthorized() *PcloudCloudinstancesGetUnauthorized { + return &PcloudCloudinstancesGetUnauthorized{} +} + +/*PcloudCloudinstancesGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesGetUnauthorized) 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 +} + // NewPcloudCloudinstancesGetNotFound creates a PcloudCloudinstancesGetNotFound with default headers values func NewPcloudCloudinstancesGetNotFound() *PcloudCloudinstancesGetNotFound { return &PcloudCloudinstancesGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go index bbe76c87699..8e7cdbc3950 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesPutReader) ReadResponse(response runtime.ClientResp } return nil, result + case 401: + result := NewPcloudCloudinstancesPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: result := NewPcloudCloudinstancesPutUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudCloudinstancesPutBadRequest) readResponse(response runtime.Client return nil } +// NewPcloudCloudinstancesPutUnauthorized creates a PcloudCloudinstancesPutUnauthorized with default headers values +func NewPcloudCloudinstancesPutUnauthorized() *PcloudCloudinstancesPutUnauthorized { + return &PcloudCloudinstancesPutUnauthorized{} +} + +/*PcloudCloudinstancesPutUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesPutUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesPutUnauthorized) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesPutUnauthorized) 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 +} + // NewPcloudCloudinstancesPutUnprocessableEntity creates a PcloudCloudinstancesPutUnprocessableEntity with default headers values func NewPcloudCloudinstancesPutUnprocessableEntity() *PcloudCloudinstancesPutUnprocessableEntity { return &PcloudCloudinstancesPutUnprocessableEntity{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_responses.go index cdd74b11a60..75172ea3fdd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_responses.go @@ -39,6 +39,13 @@ func (o *PcloudNetworksDeleteReader) ReadResponse(response runtime.ClientRespons } return nil, result + case 401: + result := NewPcloudNetworksDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 410: result := NewPcloudNetworksDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +121,35 @@ func (o *PcloudNetworksDeleteBadRequest) readResponse(response runtime.ClientRes return nil } +// NewPcloudNetworksDeleteUnauthorized creates a PcloudNetworksDeleteUnauthorized with default headers values +func NewPcloudNetworksDeleteUnauthorized() *PcloudNetworksDeleteUnauthorized { + return &PcloudNetworksDeleteUnauthorized{} +} + +/*PcloudNetworksDeleteUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudNetworksDeleteUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudNetworksDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudNetworksDeleteUnauthorized) 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 +} + // NewPcloudNetworksDeleteGone creates a PcloudNetworksDeleteGone with default headers values func NewPcloudNetworksDeleteGone() *PcloudNetworksDeleteGone { return &PcloudNetworksDeleteGone{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_responses.go index c7e324eefe4..13369bee455 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudNetworksGetReader) ReadResponse(response runtime.ClientResponse, } return nil, result + case 401: + result := NewPcloudNetworksGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudNetworksGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudNetworksGetBadRequest) readResponse(response runtime.ClientRespon return nil } +// NewPcloudNetworksGetUnauthorized creates a PcloudNetworksGetUnauthorized with default headers values +func NewPcloudNetworksGetUnauthorized() *PcloudNetworksGetUnauthorized { + return &PcloudNetworksGetUnauthorized{} +} + +/*PcloudNetworksGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudNetworksGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudNetworksGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudNetworksGetUnauthorized) 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 +} + // NewPcloudNetworksGetNotFound creates a PcloudNetworksGetNotFound with default headers values func NewPcloudNetworksGetNotFound() *PcloudNetworksGetNotFound { return &PcloudNetworksGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_responses.go index 937d60735c1..21c3d2a47f4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_responses.go @@ -39,6 +39,13 @@ func (o *PcloudNetworksGetallReader) ReadResponse(response runtime.ClientRespons } return nil, result + case 401: + result := NewPcloudNetworksGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: result := NewPcloudNetworksGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -109,6 +116,35 @@ func (o *PcloudNetworksGetallBadRequest) readResponse(response runtime.ClientRes return nil } +// NewPcloudNetworksGetallUnauthorized creates a PcloudNetworksGetallUnauthorized with default headers values +func NewPcloudNetworksGetallUnauthorized() *PcloudNetworksGetallUnauthorized { + return &PcloudNetworksGetallUnauthorized{} +} + +/*PcloudNetworksGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudNetworksGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudNetworksGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudNetworksGetallUnauthorized) 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 +} + // NewPcloudNetworksGetallInternalServerError creates a PcloudNetworksGetallInternalServerError with default headers values func NewPcloudNetworksGetallInternalServerError() *PcloudNetworksGetallInternalServerError { return &PcloudNetworksGetallInternalServerError{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go index 33c7d083f1e..38da0c6c60f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go @@ -39,6 +39,13 @@ func (o *PcloudNetworksPortsDeleteReader) ReadResponse(response runtime.ClientRe } return nil, result + case 401: + result := NewPcloudNetworksPortsDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 410: result := NewPcloudNetworksPortsDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +121,35 @@ func (o *PcloudNetworksPortsDeleteBadRequest) readResponse(response runtime.Clie return nil } +// NewPcloudNetworksPortsDeleteUnauthorized creates a PcloudNetworksPortsDeleteUnauthorized with default headers values +func NewPcloudNetworksPortsDeleteUnauthorized() *PcloudNetworksPortsDeleteUnauthorized { + return &PcloudNetworksPortsDeleteUnauthorized{} +} + +/*PcloudNetworksPortsDeleteUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudNetworksPortsDeleteUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudNetworksPortsDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudNetworksPortsDeleteUnauthorized) 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 +} + // NewPcloudNetworksPortsDeleteGone creates a PcloudNetworksPortsDeleteGone with default headers values func NewPcloudNetworksPortsDeleteGone() *PcloudNetworksPortsDeleteGone { return &PcloudNetworksPortsDeleteGone{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go index db7482dd4f1..d41c736d160 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go @@ -32,6 +32,13 @@ func (o *PcloudNetworksPortsGetReader) ReadResponse(response runtime.ClientRespo } return result, nil + case 401: + result := NewPcloudNetworksPortsGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudNetworksPortsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -80,6 +87,35 @@ func (o *PcloudNetworksPortsGetOK) readResponse(response runtime.ClientResponse, return nil } +// NewPcloudNetworksPortsGetUnauthorized creates a PcloudNetworksPortsGetUnauthorized with default headers values +func NewPcloudNetworksPortsGetUnauthorized() *PcloudNetworksPortsGetUnauthorized { + return &PcloudNetworksPortsGetUnauthorized{} +} + +/*PcloudNetworksPortsGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudNetworksPortsGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudNetworksPortsGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudNetworksPortsGetUnauthorized) 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 +} + // NewPcloudNetworksPortsGetNotFound creates a PcloudNetworksPortsGetNotFound with default headers values func NewPcloudNetworksPortsGetNotFound() *PcloudNetworksPortsGetNotFound { return &PcloudNetworksPortsGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go index 0b290baf809..174f34a00f4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go @@ -39,6 +39,13 @@ func (o *PcloudNetworksPortsGetallReader) ReadResponse(response runtime.ClientRe } return nil, result + case 401: + result := NewPcloudNetworksPortsGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: result := NewPcloudNetworksPortsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -109,6 +116,35 @@ func (o *PcloudNetworksPortsGetallBadRequest) readResponse(response runtime.Clie return nil } +// NewPcloudNetworksPortsGetallUnauthorized creates a PcloudNetworksPortsGetallUnauthorized with default headers values +func NewPcloudNetworksPortsGetallUnauthorized() *PcloudNetworksPortsGetallUnauthorized { + return &PcloudNetworksPortsGetallUnauthorized{} +} + +/*PcloudNetworksPortsGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudNetworksPortsGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudNetworksPortsGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudNetworksPortsGetallUnauthorized) 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 +} + // NewPcloudNetworksPortsGetallInternalServerError creates a PcloudNetworksPortsGetallInternalServerError with default headers values func NewPcloudNetworksPortsGetallInternalServerError() *PcloudNetworksPortsGetallInternalServerError { return &PcloudNetworksPortsGetallInternalServerError{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go index cba7f8237d1..fc2881e2a68 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go @@ -39,6 +39,13 @@ func (o *PcloudNetworksPortsPostReader) ReadResponse(response runtime.ClientResp } return nil, result + case 401: + result := NewPcloudNetworksPortsPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: result := NewPcloudNetworksPortsPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -123,6 +130,35 @@ func (o *PcloudNetworksPortsPostBadRequest) readResponse(response runtime.Client return nil } +// NewPcloudNetworksPortsPostUnauthorized creates a PcloudNetworksPortsPostUnauthorized with default headers values +func NewPcloudNetworksPortsPostUnauthorized() *PcloudNetworksPortsPostUnauthorized { + return &PcloudNetworksPortsPostUnauthorized{} +} + +/*PcloudNetworksPortsPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudNetworksPortsPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudNetworksPortsPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudNetworksPortsPostUnauthorized) 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 +} + // NewPcloudNetworksPortsPostConflict creates a PcloudNetworksPortsPostConflict with default headers values func NewPcloudNetworksPortsPostConflict() *PcloudNetworksPortsPostConflict { return &PcloudNetworksPortsPostConflict{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go index 05d0c3325d4..c801e5f8855 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go @@ -39,6 +39,13 @@ func (o *PcloudNetworksPortsPutReader) ReadResponse(response runtime.ClientRespo } return nil, result + case 401: + result := NewPcloudNetworksPortsPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: result := NewPcloudNetworksPortsPutUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudNetworksPortsPutBadRequest) readResponse(response runtime.ClientR return nil } +// NewPcloudNetworksPortsPutUnauthorized creates a PcloudNetworksPortsPutUnauthorized with default headers values +func NewPcloudNetworksPortsPutUnauthorized() *PcloudNetworksPortsPutUnauthorized { + return &PcloudNetworksPortsPutUnauthorized{} +} + +/*PcloudNetworksPortsPutUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudNetworksPortsPutUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudNetworksPortsPutUnauthorized) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudNetworksPortsPutUnauthorized) 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 +} + // NewPcloudNetworksPortsPutUnprocessableEntity creates a PcloudNetworksPortsPutUnprocessableEntity with default headers values func NewPcloudNetworksPortsPutUnprocessableEntity() *PcloudNetworksPortsPutUnprocessableEntity { return &PcloudNetworksPortsPutUnprocessableEntity{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_responses.go index 3179a066029..5fd002002e1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_responses.go @@ -46,6 +46,13 @@ func (o *PcloudNetworksPostReader) ReadResponse(response runtime.ClientResponse, } return nil, result + case 401: + result := NewPcloudNetworksPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: result := NewPcloudNetworksPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -159,6 +166,35 @@ func (o *PcloudNetworksPostBadRequest) readResponse(response runtime.ClientRespo return nil } +// NewPcloudNetworksPostUnauthorized creates a PcloudNetworksPostUnauthorized with default headers values +func NewPcloudNetworksPostUnauthorized() *PcloudNetworksPostUnauthorized { + return &PcloudNetworksPostUnauthorized{} +} + +/*PcloudNetworksPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudNetworksPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudNetworksPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudNetworksPostUnauthorized) 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 +} + // NewPcloudNetworksPostConflict creates a PcloudNetworksPostConflict with default headers values func NewPcloudNetworksPostConflict() *PcloudNetworksPostConflict { return &PcloudNetworksPostConflict{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_responses.go index e4412da0f58..accda0c917f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_responses.go @@ -39,6 +39,13 @@ func (o *PcloudNetworksPutReader) ReadResponse(response runtime.ClientResponse, } return nil, result + case 401: + result := NewPcloudNetworksPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: result := NewPcloudNetworksPutUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudNetworksPutBadRequest) readResponse(response runtime.ClientRespon return nil } +// NewPcloudNetworksPutUnauthorized creates a PcloudNetworksPutUnauthorized with default headers values +func NewPcloudNetworksPutUnauthorized() *PcloudNetworksPutUnauthorized { + return &PcloudNetworksPutUnauthorized{} +} + +/*PcloudNetworksPutUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudNetworksPutUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudNetworksPutUnauthorized) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudNetworksPutUnauthorized) 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 +} + // NewPcloudNetworksPutUnprocessableEntity creates a PcloudNetworksPutUnprocessableEntity with default headers values func NewPcloudNetworksPutUnprocessableEntity() *PcloudNetworksPutUnprocessableEntity { return &PcloudNetworksPutUnprocessableEntity{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/p_cloud_p_vm_instances_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/p_cloud_p_vm_instances_client.go index 22edc1d3a08..f74b7b12ddf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/p_cloud_p_vm_instances_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/p_cloud_p_vm_instances_client.go @@ -321,7 +321,7 @@ func (a *Client) PcloudPvminstancesNetworksGetall(params *PcloudPvminstancesNetw } /* -PcloudPvminstancesNetworksPost performs network addition deletion and listing +PcloudPvminstancesNetworksPost performs network addition */ func (a *Client) PcloudPvminstancesNetworksPost(params *PcloudPvminstancesNetworksPostParams, authInfo runtime.ClientAuthInfoWriter) (*PcloudPvminstancesNetworksPostCreated, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go index 45896fbfb3d..710917529ce 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go @@ -39,6 +39,13 @@ func (o *PcloudPvminstancesActionPostReader) ReadResponse(response runtime.Clien } return nil, result + case 401: + result := NewPcloudPvminstancesActionPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudPvminstancesActionPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +121,35 @@ func (o *PcloudPvminstancesActionPostBadRequest) readResponse(response runtime.C return nil } +// NewPcloudPvminstancesActionPostUnauthorized creates a PcloudPvminstancesActionPostUnauthorized with default headers values +func NewPcloudPvminstancesActionPostUnauthorized() *PcloudPvminstancesActionPostUnauthorized { + return &PcloudPvminstancesActionPostUnauthorized{} +} + +/*PcloudPvminstancesActionPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesActionPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesActionPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesActionPostUnauthorized) 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 +} + // NewPcloudPvminstancesActionPostNotFound creates a PcloudPvminstancesActionPostNotFound with default headers values func NewPcloudPvminstancesActionPostNotFound() *PcloudPvminstancesActionPostNotFound { return &PcloudPvminstancesActionPostNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go index 8974e1f5f32..f9af4acdb3a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go @@ -39,6 +39,13 @@ func (o *PcloudPvminstancesCapturePostReader) ReadResponse(response runtime.Clie } return result, nil + case 401: + result := NewPcloudPvminstancesCapturePostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: result := NewPcloudPvminstancesCapturePostInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -105,6 +112,35 @@ func (o *PcloudPvminstancesCapturePostAccepted) readResponse(response runtime.Cl return nil } +// NewPcloudPvminstancesCapturePostUnauthorized creates a PcloudPvminstancesCapturePostUnauthorized with default headers values +func NewPcloudPvminstancesCapturePostUnauthorized() *PcloudPvminstancesCapturePostUnauthorized { + return &PcloudPvminstancesCapturePostUnauthorized{} +} + +/*PcloudPvminstancesCapturePostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesCapturePostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesCapturePostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesCapturePostUnauthorized) 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 +} + // NewPcloudPvminstancesCapturePostInternalServerError creates a PcloudPvminstancesCapturePostInternalServerError with default headers values func NewPcloudPvminstancesCapturePostInternalServerError() *PcloudPvminstancesCapturePostInternalServerError { return &PcloudPvminstancesCapturePostInternalServerError{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go index 52773217fef..b1933405da1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go @@ -39,6 +39,13 @@ func (o *PcloudPvminstancesClonePostReader) ReadResponse(response runtime.Client } return nil, result + case 401: + result := NewPcloudPvminstancesClonePostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: result := NewPcloudPvminstancesClonePostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -123,6 +130,35 @@ func (o *PcloudPvminstancesClonePostBadRequest) readResponse(response runtime.Cl return nil } +// NewPcloudPvminstancesClonePostUnauthorized creates a PcloudPvminstancesClonePostUnauthorized with default headers values +func NewPcloudPvminstancesClonePostUnauthorized() *PcloudPvminstancesClonePostUnauthorized { + return &PcloudPvminstancesClonePostUnauthorized{} +} + +/*PcloudPvminstancesClonePostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesClonePostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesClonePostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesClonePostUnauthorized) 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 +} + // NewPcloudPvminstancesClonePostConflict creates a PcloudPvminstancesClonePostConflict with default headers values func NewPcloudPvminstancesClonePostConflict() *PcloudPvminstancesClonePostConflict { return &PcloudPvminstancesClonePostConflict{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go index e5fca8af213..6a3d7c80b05 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go @@ -32,6 +32,13 @@ func (o *PcloudPvminstancesConsolePostReader) ReadResponse(response runtime.Clie } return result, nil + case 401: + result := NewPcloudPvminstancesConsolePostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: result := NewPcloudPvminstancesConsolePostUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -80,6 +87,35 @@ func (o *PcloudPvminstancesConsolePostCreated) readResponse(response runtime.Cli return nil } +// NewPcloudPvminstancesConsolePostUnauthorized creates a PcloudPvminstancesConsolePostUnauthorized with default headers values +func NewPcloudPvminstancesConsolePostUnauthorized() *PcloudPvminstancesConsolePostUnauthorized { + return &PcloudPvminstancesConsolePostUnauthorized{} +} + +/*PcloudPvminstancesConsolePostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesConsolePostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesConsolePostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesConsolePostUnauthorized) 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 +} + // NewPcloudPvminstancesConsolePostUnprocessableEntity creates a PcloudPvminstancesConsolePostUnprocessableEntity with default headers values func NewPcloudPvminstancesConsolePostUnprocessableEntity() *PcloudPvminstancesConsolePostUnprocessableEntity { return &PcloudPvminstancesConsolePostUnprocessableEntity{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go index fa64c53c133..65007fe27e0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go @@ -39,6 +39,13 @@ func (o *PcloudPvminstancesDeleteReader) ReadResponse(response runtime.ClientRes } return nil, result + case 401: + result := NewPcloudPvminstancesDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudPvminstancesDeleteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -121,6 +128,35 @@ func (o *PcloudPvminstancesDeleteBadRequest) readResponse(response runtime.Clien return nil } +// NewPcloudPvminstancesDeleteUnauthorized creates a PcloudPvminstancesDeleteUnauthorized with default headers values +func NewPcloudPvminstancesDeleteUnauthorized() *PcloudPvminstancesDeleteUnauthorized { + return &PcloudPvminstancesDeleteUnauthorized{} +} + +/*PcloudPvminstancesDeleteUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesDeleteUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesDeleteUnauthorized) 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 +} + // NewPcloudPvminstancesDeleteNotFound creates a PcloudPvminstancesDeleteNotFound with default headers values func NewPcloudPvminstancesDeleteNotFound() *PcloudPvminstancesDeleteNotFound { return &PcloudPvminstancesDeleteNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go index 4b7d77d8684..1ab6096bfca 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudPvminstancesGetReader) ReadResponse(response runtime.ClientRespon } return nil, result + case 401: + result := NewPcloudPvminstancesGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudPvminstancesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudPvminstancesGetBadRequest) readResponse(response runtime.ClientRe return nil } +// NewPcloudPvminstancesGetUnauthorized creates a PcloudPvminstancesGetUnauthorized with default headers values +func NewPcloudPvminstancesGetUnauthorized() *PcloudPvminstancesGetUnauthorized { + return &PcloudPvminstancesGetUnauthorized{} +} + +/*PcloudPvminstancesGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesGetUnauthorized) 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 +} + // NewPcloudPvminstancesGetNotFound creates a PcloudPvminstancesGetNotFound with default headers values func NewPcloudPvminstancesGetNotFound() *PcloudPvminstancesGetNotFound { return &PcloudPvminstancesGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go index 334d18daf3f..03179620a9b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go @@ -39,6 +39,13 @@ func (o *PcloudPvminstancesGetallReader) ReadResponse(response runtime.ClientRes } return nil, result + case 401: + result := NewPcloudPvminstancesGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: result := NewPcloudPvminstancesGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -109,6 +116,35 @@ func (o *PcloudPvminstancesGetallBadRequest) readResponse(response runtime.Clien return nil } +// NewPcloudPvminstancesGetallUnauthorized creates a PcloudPvminstancesGetallUnauthorized with default headers values +func NewPcloudPvminstancesGetallUnauthorized() *PcloudPvminstancesGetallUnauthorized { + return &PcloudPvminstancesGetallUnauthorized{} +} + +/*PcloudPvminstancesGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesGetallUnauthorized) 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 +} + // NewPcloudPvminstancesGetallInternalServerError creates a PcloudPvminstancesGetallInternalServerError with default headers values func NewPcloudPvminstancesGetallInternalServerError() *PcloudPvminstancesGetallInternalServerError { return &PcloudPvminstancesGetallInternalServerError{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go index 06916c3b8ce..750efaf056c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go @@ -39,6 +39,13 @@ func (o *PcloudPvminstancesNetworksDeleteReader) ReadResponse(response runtime.C } return nil, result + case 401: + result := NewPcloudPvminstancesNetworksDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 410: result := NewPcloudPvminstancesNetworksDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +121,35 @@ func (o *PcloudPvminstancesNetworksDeleteBadRequest) readResponse(response runti return nil } +// NewPcloudPvminstancesNetworksDeleteUnauthorized creates a PcloudPvminstancesNetworksDeleteUnauthorized with default headers values +func NewPcloudPvminstancesNetworksDeleteUnauthorized() *PcloudPvminstancesNetworksDeleteUnauthorized { + return &PcloudPvminstancesNetworksDeleteUnauthorized{} +} + +/*PcloudPvminstancesNetworksDeleteUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesNetworksDeleteUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesNetworksDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesNetworksDeleteUnauthorized) 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 +} + // NewPcloudPvminstancesNetworksDeleteGone creates a PcloudPvminstancesNetworksDeleteGone with default headers values func NewPcloudPvminstancesNetworksDeleteGone() *PcloudPvminstancesNetworksDeleteGone { return &PcloudPvminstancesNetworksDeleteGone{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go index c5f0e555f09..3e29b24587e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go @@ -32,6 +32,13 @@ func (o *PcloudPvminstancesNetworksGetReader) ReadResponse(response runtime.Clie } return result, nil + case 401: + result := NewPcloudPvminstancesNetworksGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudPvminstancesNetworksGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -80,6 +87,35 @@ func (o *PcloudPvminstancesNetworksGetOK) readResponse(response runtime.ClientRe return nil } +// NewPcloudPvminstancesNetworksGetUnauthorized creates a PcloudPvminstancesNetworksGetUnauthorized with default headers values +func NewPcloudPvminstancesNetworksGetUnauthorized() *PcloudPvminstancesNetworksGetUnauthorized { + return &PcloudPvminstancesNetworksGetUnauthorized{} +} + +/*PcloudPvminstancesNetworksGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesNetworksGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesNetworksGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesNetworksGetUnauthorized) 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 +} + // NewPcloudPvminstancesNetworksGetNotFound creates a PcloudPvminstancesNetworksGetNotFound with default headers values func NewPcloudPvminstancesNetworksGetNotFound() *PcloudPvminstancesNetworksGetNotFound { return &PcloudPvminstancesNetworksGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go index df7783e3046..7025b1e5d0c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go @@ -39,6 +39,13 @@ func (o *PcloudPvminstancesNetworksGetallReader) ReadResponse(response runtime.C } return nil, result + case 401: + result := NewPcloudPvminstancesNetworksGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: result := NewPcloudPvminstancesNetworksGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -109,6 +116,35 @@ func (o *PcloudPvminstancesNetworksGetallBadRequest) readResponse(response runti return nil } +// NewPcloudPvminstancesNetworksGetallUnauthorized creates a PcloudPvminstancesNetworksGetallUnauthorized with default headers values +func NewPcloudPvminstancesNetworksGetallUnauthorized() *PcloudPvminstancesNetworksGetallUnauthorized { + return &PcloudPvminstancesNetworksGetallUnauthorized{} +} + +/*PcloudPvminstancesNetworksGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesNetworksGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesNetworksGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesNetworksGetallUnauthorized) 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 +} + // NewPcloudPvminstancesNetworksGetallInternalServerError creates a PcloudPvminstancesNetworksGetallInternalServerError with default headers values func NewPcloudPvminstancesNetworksGetallInternalServerError() *PcloudPvminstancesNetworksGetallInternalServerError { return &PcloudPvminstancesNetworksGetallInternalServerError{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go index afc778fd122..17acedd26eb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go @@ -39,6 +39,13 @@ func (o *PcloudPvminstancesNetworksPostReader) ReadResponse(response runtime.Cli } return nil, result + case 401: + result := NewPcloudPvminstancesNetworksPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: result := NewPcloudPvminstancesNetworksPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -123,6 +130,35 @@ func (o *PcloudPvminstancesNetworksPostBadRequest) readResponse(response runtime return nil } +// NewPcloudPvminstancesNetworksPostUnauthorized creates a PcloudPvminstancesNetworksPostUnauthorized with default headers values +func NewPcloudPvminstancesNetworksPostUnauthorized() *PcloudPvminstancesNetworksPostUnauthorized { + return &PcloudPvminstancesNetworksPostUnauthorized{} +} + +/*PcloudPvminstancesNetworksPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesNetworksPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesNetworksPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesNetworksPostUnauthorized) 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 +} + // NewPcloudPvminstancesNetworksPostConflict creates a PcloudPvminstancesNetworksPostConflict with default headers values func NewPcloudPvminstancesNetworksPostConflict() *PcloudPvminstancesNetworksPostConflict { return &PcloudPvminstancesNetworksPostConflict{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go index dfa55ca6b69..5d7e0269aca 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go @@ -39,6 +39,13 @@ func (o *PcloudPvminstancesOperationsPostReader) ReadResponse(response runtime.C } return nil, result + case 401: + result := NewPcloudPvminstancesOperationsPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudPvminstancesOperationsPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -121,6 +128,35 @@ func (o *PcloudPvminstancesOperationsPostBadRequest) readResponse(response runti return nil } +// NewPcloudPvminstancesOperationsPostUnauthorized creates a PcloudPvminstancesOperationsPostUnauthorized with default headers values +func NewPcloudPvminstancesOperationsPostUnauthorized() *PcloudPvminstancesOperationsPostUnauthorized { + return &PcloudPvminstancesOperationsPostUnauthorized{} +} + +/*PcloudPvminstancesOperationsPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesOperationsPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesOperationsPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesOperationsPostUnauthorized) 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 +} + // NewPcloudPvminstancesOperationsPostNotFound creates a PcloudPvminstancesOperationsPostNotFound with default headers values func NewPcloudPvminstancesOperationsPostNotFound() *PcloudPvminstancesOperationsPostNotFound { return &PcloudPvminstancesOperationsPostNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_parameters.go index 3501f48eb05..a615987699e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_parameters.go @@ -65,7 +65,7 @@ for the pcloud pvminstances post operation typically these are written to a http type PcloudPvminstancesPostParams struct { /*Body - Parameters for the creation of a new tenant + Parameters for the creation of a new Power VM Instance */ Body *models.PVMInstanceCreate diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go index aba6a62e65a..4182e17f6ba 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go @@ -53,6 +53,13 @@ func (o *PcloudPvminstancesPostReader) ReadResponse(response runtime.ClientRespo } return nil, result + case 401: + result := NewPcloudPvminstancesPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: result := NewPcloudPvminstancesPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -189,6 +196,35 @@ func (o *PcloudPvminstancesPostBadRequest) readResponse(response runtime.ClientR return nil } +// NewPcloudPvminstancesPostUnauthorized creates a PcloudPvminstancesPostUnauthorized with default headers values +func NewPcloudPvminstancesPostUnauthorized() *PcloudPvminstancesPostUnauthorized { + return &PcloudPvminstancesPostUnauthorized{} +} + +/*PcloudPvminstancesPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesPostUnauthorized) 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 +} + // NewPcloudPvminstancesPostConflict creates a PcloudPvminstancesPostConflict with default headers values func NewPcloudPvminstancesPostConflict() *PcloudPvminstancesPostConflict { return &PcloudPvminstancesPostConflict{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go index 31aefdf0e6d..52186195eb6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go @@ -39,6 +39,13 @@ func (o *PcloudPvminstancesPutReader) ReadResponse(response runtime.ClientRespon } return nil, result + case 401: + result := NewPcloudPvminstancesPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: result := NewPcloudPvminstancesPutUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudPvminstancesPutBadRequest) readResponse(response runtime.ClientRe return nil } +// NewPcloudPvminstancesPutUnauthorized creates a PcloudPvminstancesPutUnauthorized with default headers values +func NewPcloudPvminstancesPutUnauthorized() *PcloudPvminstancesPutUnauthorized { + return &PcloudPvminstancesPutUnauthorized{} +} + +/*PcloudPvminstancesPutUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesPutUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesPutUnauthorized) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesPutUnauthorized) 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 +} + // NewPcloudPvminstancesPutUnprocessableEntity creates a PcloudPvminstancesPutUnprocessableEntity with default headers values func NewPcloudPvminstancesPutUnprocessableEntity() *PcloudPvminstancesPutUnprocessableEntity { return &PcloudPvminstancesPutUnprocessableEntity{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go index 5b3a92355a0..88251dff754 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go @@ -39,6 +39,20 @@ func (o *PcloudPvminstancesSnapshotsGetallReader) ReadResponse(response runtime. } return nil, result + case 401: + result := NewPcloudPvminstancesSnapshotsGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 404: + result := NewPcloudPvminstancesSnapshotsGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: result := NewPcloudPvminstancesSnapshotsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -109,6 +123,64 @@ func (o *PcloudPvminstancesSnapshotsGetallBadRequest) readResponse(response runt return nil } +// NewPcloudPvminstancesSnapshotsGetallUnauthorized creates a PcloudPvminstancesSnapshotsGetallUnauthorized with default headers values +func NewPcloudPvminstancesSnapshotsGetallUnauthorized() *PcloudPvminstancesSnapshotsGetallUnauthorized { + return &PcloudPvminstancesSnapshotsGetallUnauthorized{} +} + +/*PcloudPvminstancesSnapshotsGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesSnapshotsGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) 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 +} + +// NewPcloudPvminstancesSnapshotsGetallNotFound creates a PcloudPvminstancesSnapshotsGetallNotFound with default headers values +func NewPcloudPvminstancesSnapshotsGetallNotFound() *PcloudPvminstancesSnapshotsGetallNotFound { + return &PcloudPvminstancesSnapshotsGetallNotFound{} +} + +/*PcloudPvminstancesSnapshotsGetallNotFound handles this case with default header values. + +Not Found +*/ +type PcloudPvminstancesSnapshotsGetallNotFound struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesSnapshotsGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesSnapshotsGetallNotFound) 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 +} + // NewPcloudPvminstancesSnapshotsGetallInternalServerError creates a PcloudPvminstancesSnapshotsGetallInternalServerError with default headers values func NewPcloudPvminstancesSnapshotsGetallInternalServerError() *PcloudPvminstancesSnapshotsGetallInternalServerError { return &PcloudPvminstancesSnapshotsGetallInternalServerError{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go index 3adea85a34b..13f84a959a5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go @@ -39,6 +39,20 @@ func (o *PcloudPvminstancesSnapshotsPostReader) ReadResponse(response runtime.Cl } return nil, result + case 401: + result := NewPcloudPvminstancesSnapshotsPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 404: + result := NewPcloudPvminstancesSnapshotsPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: result := NewPcloudPvminstancesSnapshotsPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +130,64 @@ func (o *PcloudPvminstancesSnapshotsPostBadRequest) readResponse(response runtim return nil } +// NewPcloudPvminstancesSnapshotsPostUnauthorized creates a PcloudPvminstancesSnapshotsPostUnauthorized with default headers values +func NewPcloudPvminstancesSnapshotsPostUnauthorized() *PcloudPvminstancesSnapshotsPostUnauthorized { + return &PcloudPvminstancesSnapshotsPostUnauthorized{} +} + +/*PcloudPvminstancesSnapshotsPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesSnapshotsPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesSnapshotsPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesSnapshotsPostUnauthorized) 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 +} + +// NewPcloudPvminstancesSnapshotsPostNotFound creates a PcloudPvminstancesSnapshotsPostNotFound with default headers values +func NewPcloudPvminstancesSnapshotsPostNotFound() *PcloudPvminstancesSnapshotsPostNotFound { + return &PcloudPvminstancesSnapshotsPostNotFound{} +} + +/*PcloudPvminstancesSnapshotsPostNotFound handles this case with default header values. + +Not Found +*/ +type PcloudPvminstancesSnapshotsPostNotFound struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesSnapshotsPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesSnapshotsPostNotFound) 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 +} + // NewPcloudPvminstancesSnapshotsPostConflict creates a PcloudPvminstancesSnapshotsPostConflict with default headers values func NewPcloudPvminstancesSnapshotsPostConflict() *PcloudPvminstancesSnapshotsPostConflict { return &PcloudPvminstancesSnapshotsPostConflict{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go index 91029793160..bc3d4601420 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go @@ -39,6 +39,13 @@ func (o *PcloudPvminstancesSnapshotsRestorePostReader) ReadResponse(response run } return nil, result + case 401: + result := NewPcloudPvminstancesSnapshotsRestorePostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: result := NewPcloudPvminstancesSnapshotsRestorePostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudPvminstancesSnapshotsRestorePostBadRequest) readResponse(response return nil } +// NewPcloudPvminstancesSnapshotsRestorePostUnauthorized creates a PcloudPvminstancesSnapshotsRestorePostUnauthorized with default headers values +func NewPcloudPvminstancesSnapshotsRestorePostUnauthorized() *PcloudPvminstancesSnapshotsRestorePostUnauthorized { + return &PcloudPvminstancesSnapshotsRestorePostUnauthorized{} +} + +/*PcloudPvminstancesSnapshotsRestorePostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesSnapshotsRestorePostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) 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 +} + // NewPcloudPvminstancesSnapshotsRestorePostConflict creates a PcloudPvminstancesSnapshotsRestorePostConflict with default headers values func NewPcloudPvminstancesSnapshotsRestorePostConflict() *PcloudPvminstancesSnapshotsRestorePostConflict { return &PcloudPvminstancesSnapshotsRestorePostConflict{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go new file mode 100644 index 00000000000..9f71199f0d4 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go @@ -0,0 +1,204 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_placement_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" +) + +// New creates a new p cloud placement groups API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { + return &Client{transport: transport, formats: formats} +} + +/* +Client for p cloud placement groups API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +/* +PcloudPlacementgroupsDelete deletes server placement group +*/ +func (a *Client) PcloudPlacementgroupsDelete(params *PcloudPlacementgroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*PcloudPlacementgroupsDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPcloudPlacementgroupsDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "pcloud.placementgroups.delete", + Method: "DELETE", + PathPattern: "/pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PcloudPlacementgroupsDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + return result.(*PcloudPlacementgroupsDeleteOK), nil + +} + +/* +PcloudPlacementgroupsGet gets server placement group detail +*/ +func (a *Client) PcloudPlacementgroupsGet(params *PcloudPlacementgroupsGetParams, authInfo runtime.ClientAuthInfoWriter) (*PcloudPlacementgroupsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPcloudPlacementgroupsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "pcloud.placementgroups.get", + Method: "GET", + PathPattern: "/pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PcloudPlacementgroupsGetReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + return result.(*PcloudPlacementgroupsGetOK), nil + +} + +/* +PcloudPlacementgroupsGetall gets all server placement groups +*/ +func (a *Client) PcloudPlacementgroupsGetall(params *PcloudPlacementgroupsGetallParams, authInfo runtime.ClientAuthInfoWriter) (*PcloudPlacementgroupsGetallOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPcloudPlacementgroupsGetallParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "pcloud.placementgroups.getall", + Method: "GET", + PathPattern: "/pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PcloudPlacementgroupsGetallReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + return result.(*PcloudPlacementgroupsGetallOK), nil + +} + +/* +PcloudPlacementgroupsMembersDelete removes server from placement group +*/ +func (a *Client) PcloudPlacementgroupsMembersDelete(params *PcloudPlacementgroupsMembersDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*PcloudPlacementgroupsMembersDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPcloudPlacementgroupsMembersDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "pcloud.placementgroups.members.delete", + Method: "DELETE", + PathPattern: "/pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PcloudPlacementgroupsMembersDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + return result.(*PcloudPlacementgroupsMembersDeleteOK), nil + +} + +/* +PcloudPlacementgroupsMembersPost adds server to placement group +*/ +func (a *Client) PcloudPlacementgroupsMembersPost(params *PcloudPlacementgroupsMembersPostParams, authInfo runtime.ClientAuthInfoWriter) (*PcloudPlacementgroupsMembersPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPcloudPlacementgroupsMembersPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "pcloud.placementgroups.members.post", + Method: "POST", + PathPattern: "/pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PcloudPlacementgroupsMembersPostReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + return result.(*PcloudPlacementgroupsMembersPostOK), nil + +} + +/* +PcloudPlacementgroupsPost creates a new server placement group +*/ +func (a *Client) PcloudPlacementgroupsPost(params *PcloudPlacementgroupsPostParams, authInfo runtime.ClientAuthInfoWriter) (*PcloudPlacementgroupsPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPcloudPlacementgroupsPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "pcloud.placementgroups.post", + Method: "POST", + PathPattern: "/pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PcloudPlacementgroupsPostReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + return result.(*PcloudPlacementgroupsPostOK), nil + +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_parameters.go new file mode 100644 index 00000000000..e89a5ab0c3a --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_placement_groups + +// 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewPcloudPlacementgroupsDeleteParams creates a new PcloudPlacementgroupsDeleteParams object +// with the default values initialized. +func NewPcloudPlacementgroupsDeleteParams() *PcloudPlacementgroupsDeleteParams { + var () + return &PcloudPlacementgroupsDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPcloudPlacementgroupsDeleteParamsWithTimeout creates a new PcloudPlacementgroupsDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPcloudPlacementgroupsDeleteParamsWithTimeout(timeout time.Duration) *PcloudPlacementgroupsDeleteParams { + var () + return &PcloudPlacementgroupsDeleteParams{ + + timeout: timeout, + } +} + +// NewPcloudPlacementgroupsDeleteParamsWithContext creates a new PcloudPlacementgroupsDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewPcloudPlacementgroupsDeleteParamsWithContext(ctx context.Context) *PcloudPlacementgroupsDeleteParams { + var () + return &PcloudPlacementgroupsDeleteParams{ + + Context: ctx, + } +} + +// NewPcloudPlacementgroupsDeleteParamsWithHTTPClient creates a new PcloudPlacementgroupsDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPcloudPlacementgroupsDeleteParamsWithHTTPClient(client *http.Client) *PcloudPlacementgroupsDeleteParams { + var () + return &PcloudPlacementgroupsDeleteParams{ + HTTPClient: client, + } +} + +/*PcloudPlacementgroupsDeleteParams contains all the parameters to send to the API endpoint +for the pcloud placementgroups delete operation typically these are written to a http.Request +*/ +type PcloudPlacementgroupsDeleteParams struct { + + /*CloudInstanceID + Cloud Instance ID of a PCloud Instance + + */ + CloudInstanceID string + /*PlacementGroupID + Placement Group ID + + */ + PlacementGroupID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the pcloud placementgroups delete params +func (o *PcloudPlacementgroupsDeleteParams) WithTimeout(timeout time.Duration) *PcloudPlacementgroupsDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pcloud placementgroups delete params +func (o *PcloudPlacementgroupsDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pcloud placementgroups delete params +func (o *PcloudPlacementgroupsDeleteParams) WithContext(ctx context.Context) *PcloudPlacementgroupsDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pcloud placementgroups delete params +func (o *PcloudPlacementgroupsDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pcloud placementgroups delete params +func (o *PcloudPlacementgroupsDeleteParams) WithHTTPClient(client *http.Client) *PcloudPlacementgroupsDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pcloud placementgroups delete params +func (o *PcloudPlacementgroupsDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudInstanceID adds the cloudInstanceID to the pcloud placementgroups delete params +func (o *PcloudPlacementgroupsDeleteParams) WithCloudInstanceID(cloudInstanceID string) *PcloudPlacementgroupsDeleteParams { + o.SetCloudInstanceID(cloudInstanceID) + return o +} + +// SetCloudInstanceID adds the cloudInstanceId to the pcloud placementgroups delete params +func (o *PcloudPlacementgroupsDeleteParams) SetCloudInstanceID(cloudInstanceID string) { + o.CloudInstanceID = cloudInstanceID +} + +// WithPlacementGroupID adds the placementGroupID to the pcloud placementgroups delete params +func (o *PcloudPlacementgroupsDeleteParams) WithPlacementGroupID(placementGroupID string) *PcloudPlacementgroupsDeleteParams { + o.SetPlacementGroupID(placementGroupID) + return o +} + +// SetPlacementGroupID adds the placementGroupId to the pcloud placementgroups delete params +func (o *PcloudPlacementgroupsDeleteParams) SetPlacementGroupID(placementGroupID string) { + o.PlacementGroupID = placementGroupID +} + +// WriteToRequest writes these params to a swagger request +func (o *PcloudPlacementgroupsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloud_instance_id + if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { + return err + } + + // path param placement_group_id + if err := r.SetPathParam("placement_group_id", o.PlacementGroupID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go new file mode 100644 index 00000000000..fac91ef8589 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_placement_groups + +// 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/IBM-Cloud/power-go-client/power/models" +) + +// PcloudPlacementgroupsDeleteReader is a Reader for the PcloudPlacementgroupsDelete structure. +type PcloudPlacementgroupsDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PcloudPlacementgroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + + case 200: + result := NewPcloudPlacementgroupsDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + case 400: + result := NewPcloudPlacementgroupsDeleteBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 404: + result := NewPcloudPlacementgroupsDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 500: + result := NewPcloudPlacementgroupsDeleteInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPcloudPlacementgroupsDeleteOK creates a PcloudPlacementgroupsDeleteOK with default headers values +func NewPcloudPlacementgroupsDeleteOK() *PcloudPlacementgroupsDeleteOK { + return &PcloudPlacementgroupsDeleteOK{} +} + +/*PcloudPlacementgroupsDeleteOK handles this case with default header values. + +OK +*/ +type PcloudPlacementgroupsDeleteOK struct { + Payload models.Object +} + +func (o *PcloudPlacementgroupsDeleteOK) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteOK %+v", 200, o.Payload) +} + +func (o *PcloudPlacementgroupsDeleteOK) 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 +} + +// NewPcloudPlacementgroupsDeleteBadRequest creates a PcloudPlacementgroupsDeleteBadRequest with default headers values +func NewPcloudPlacementgroupsDeleteBadRequest() *PcloudPlacementgroupsDeleteBadRequest { + return &PcloudPlacementgroupsDeleteBadRequest{} +} + +/*PcloudPlacementgroupsDeleteBadRequest handles this case with default header values. + +Bad Request +*/ +type PcloudPlacementgroupsDeleteBadRequest struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsDeleteBadRequest) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudPlacementgroupsDeleteBadRequest) 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 +} + +// NewPcloudPlacementgroupsDeleteNotFound creates a PcloudPlacementgroupsDeleteNotFound with default headers values +func NewPcloudPlacementgroupsDeleteNotFound() *PcloudPlacementgroupsDeleteNotFound { + return &PcloudPlacementgroupsDeleteNotFound{} +} + +/*PcloudPlacementgroupsDeleteNotFound handles this case with default header values. + +Not Found +*/ +type PcloudPlacementgroupsDeleteNotFound struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsDeleteNotFound) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPlacementgroupsDeleteNotFound) 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 +} + +// NewPcloudPlacementgroupsDeleteInternalServerError creates a PcloudPlacementgroupsDeleteInternalServerError with default headers values +func NewPcloudPlacementgroupsDeleteInternalServerError() *PcloudPlacementgroupsDeleteInternalServerError { + return &PcloudPlacementgroupsDeleteInternalServerError{} +} + +/*PcloudPlacementgroupsDeleteInternalServerError handles this case with default header values. + +Internal Server Error +*/ +type PcloudPlacementgroupsDeleteInternalServerError struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsDeleteInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteInternalServerError %+v", 500, o.Payload) +} + +func (o *PcloudPlacementgroupsDeleteInternalServerError) 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/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_parameters.go new file mode 100644 index 00000000000..d03aeb446d4 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_placement_groups + +// 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewPcloudPlacementgroupsGetParams creates a new PcloudPlacementgroupsGetParams object +// with the default values initialized. +func NewPcloudPlacementgroupsGetParams() *PcloudPlacementgroupsGetParams { + var () + return &PcloudPlacementgroupsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPcloudPlacementgroupsGetParamsWithTimeout creates a new PcloudPlacementgroupsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPcloudPlacementgroupsGetParamsWithTimeout(timeout time.Duration) *PcloudPlacementgroupsGetParams { + var () + return &PcloudPlacementgroupsGetParams{ + + timeout: timeout, + } +} + +// NewPcloudPlacementgroupsGetParamsWithContext creates a new PcloudPlacementgroupsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewPcloudPlacementgroupsGetParamsWithContext(ctx context.Context) *PcloudPlacementgroupsGetParams { + var () + return &PcloudPlacementgroupsGetParams{ + + Context: ctx, + } +} + +// NewPcloudPlacementgroupsGetParamsWithHTTPClient creates a new PcloudPlacementgroupsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPcloudPlacementgroupsGetParamsWithHTTPClient(client *http.Client) *PcloudPlacementgroupsGetParams { + var () + return &PcloudPlacementgroupsGetParams{ + HTTPClient: client, + } +} + +/*PcloudPlacementgroupsGetParams contains all the parameters to send to the API endpoint +for the pcloud placementgroups get operation typically these are written to a http.Request +*/ +type PcloudPlacementgroupsGetParams struct { + + /*CloudInstanceID + Cloud Instance ID of a PCloud Instance + + */ + CloudInstanceID string + /*PlacementGroupID + Placement Group ID + + */ + PlacementGroupID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the pcloud placementgroups get params +func (o *PcloudPlacementgroupsGetParams) WithTimeout(timeout time.Duration) *PcloudPlacementgroupsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pcloud placementgroups get params +func (o *PcloudPlacementgroupsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pcloud placementgroups get params +func (o *PcloudPlacementgroupsGetParams) WithContext(ctx context.Context) *PcloudPlacementgroupsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pcloud placementgroups get params +func (o *PcloudPlacementgroupsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pcloud placementgroups get params +func (o *PcloudPlacementgroupsGetParams) WithHTTPClient(client *http.Client) *PcloudPlacementgroupsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pcloud placementgroups get params +func (o *PcloudPlacementgroupsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudInstanceID adds the cloudInstanceID to the pcloud placementgroups get params +func (o *PcloudPlacementgroupsGetParams) WithCloudInstanceID(cloudInstanceID string) *PcloudPlacementgroupsGetParams { + o.SetCloudInstanceID(cloudInstanceID) + return o +} + +// SetCloudInstanceID adds the cloudInstanceId to the pcloud placementgroups get params +func (o *PcloudPlacementgroupsGetParams) SetCloudInstanceID(cloudInstanceID string) { + o.CloudInstanceID = cloudInstanceID +} + +// WithPlacementGroupID adds the placementGroupID to the pcloud placementgroups get params +func (o *PcloudPlacementgroupsGetParams) WithPlacementGroupID(placementGroupID string) *PcloudPlacementgroupsGetParams { + o.SetPlacementGroupID(placementGroupID) + return o +} + +// SetPlacementGroupID adds the placementGroupId to the pcloud placementgroups get params +func (o *PcloudPlacementgroupsGetParams) SetPlacementGroupID(placementGroupID string) { + o.PlacementGroupID = placementGroupID +} + +// WriteToRequest writes these params to a swagger request +func (o *PcloudPlacementgroupsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloud_instance_id + if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { + return err + } + + // path param placement_group_id + if err := r.SetPathParam("placement_group_id", o.PlacementGroupID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go new file mode 100644 index 00000000000..e3b74d28f75 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_placement_groups + +// 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/IBM-Cloud/power-go-client/power/models" +) + +// PcloudPlacementgroupsGetReader is a Reader for the PcloudPlacementgroupsGet structure. +type PcloudPlacementgroupsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PcloudPlacementgroupsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + + case 200: + result := NewPcloudPlacementgroupsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + case 400: + result := NewPcloudPlacementgroupsGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 500: + result := NewPcloudPlacementgroupsGetInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPcloudPlacementgroupsGetOK creates a PcloudPlacementgroupsGetOK with default headers values +func NewPcloudPlacementgroupsGetOK() *PcloudPlacementgroupsGetOK { + return &PcloudPlacementgroupsGetOK{} +} + +/*PcloudPlacementgroupsGetOK handles this case with default header values. + +OK +*/ +type PcloudPlacementgroupsGetOK struct { + Payload *models.PlacementGroup +} + +func (o *PcloudPlacementgroupsGetOK) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetOK %+v", 200, o.Payload) +} + +func (o *PcloudPlacementgroupsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PlacementGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPcloudPlacementgroupsGetBadRequest creates a PcloudPlacementgroupsGetBadRequest with default headers values +func NewPcloudPlacementgroupsGetBadRequest() *PcloudPlacementgroupsGetBadRequest { + return &PcloudPlacementgroupsGetBadRequest{} +} + +/*PcloudPlacementgroupsGetBadRequest handles this case with default header values. + +Bad Request +*/ +type PcloudPlacementgroupsGetBadRequest struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsGetBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudPlacementgroupsGetBadRequest) 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 +} + +// NewPcloudPlacementgroupsGetInternalServerError creates a PcloudPlacementgroupsGetInternalServerError with default headers values +func NewPcloudPlacementgroupsGetInternalServerError() *PcloudPlacementgroupsGetInternalServerError { + return &PcloudPlacementgroupsGetInternalServerError{} +} + +/*PcloudPlacementgroupsGetInternalServerError handles this case with default header values. + +Internal Server Error +*/ +type PcloudPlacementgroupsGetInternalServerError struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsGetInternalServerError) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetInternalServerError %+v", 500, o.Payload) +} + +func (o *PcloudPlacementgroupsGetInternalServerError) 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/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_parameters.go new file mode 100644 index 00000000000..01279c2d2f3 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_placement_groups + +// 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewPcloudPlacementgroupsGetallParams creates a new PcloudPlacementgroupsGetallParams object +// with the default values initialized. +func NewPcloudPlacementgroupsGetallParams() *PcloudPlacementgroupsGetallParams { + var () + return &PcloudPlacementgroupsGetallParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPcloudPlacementgroupsGetallParamsWithTimeout creates a new PcloudPlacementgroupsGetallParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPcloudPlacementgroupsGetallParamsWithTimeout(timeout time.Duration) *PcloudPlacementgroupsGetallParams { + var () + return &PcloudPlacementgroupsGetallParams{ + + timeout: timeout, + } +} + +// NewPcloudPlacementgroupsGetallParamsWithContext creates a new PcloudPlacementgroupsGetallParams object +// with the default values initialized, and the ability to set a context for a request +func NewPcloudPlacementgroupsGetallParamsWithContext(ctx context.Context) *PcloudPlacementgroupsGetallParams { + var () + return &PcloudPlacementgroupsGetallParams{ + + Context: ctx, + } +} + +// NewPcloudPlacementgroupsGetallParamsWithHTTPClient creates a new PcloudPlacementgroupsGetallParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPcloudPlacementgroupsGetallParamsWithHTTPClient(client *http.Client) *PcloudPlacementgroupsGetallParams { + var () + return &PcloudPlacementgroupsGetallParams{ + HTTPClient: client, + } +} + +/*PcloudPlacementgroupsGetallParams contains all the parameters to send to the API endpoint +for the pcloud placementgroups getall operation typically these are written to a http.Request +*/ +type PcloudPlacementgroupsGetallParams struct { + + /*CloudInstanceID + Cloud Instance ID of a PCloud Instance + + */ + CloudInstanceID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the pcloud placementgroups getall params +func (o *PcloudPlacementgroupsGetallParams) WithTimeout(timeout time.Duration) *PcloudPlacementgroupsGetallParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pcloud placementgroups getall params +func (o *PcloudPlacementgroupsGetallParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pcloud placementgroups getall params +func (o *PcloudPlacementgroupsGetallParams) WithContext(ctx context.Context) *PcloudPlacementgroupsGetallParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pcloud placementgroups getall params +func (o *PcloudPlacementgroupsGetallParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pcloud placementgroups getall params +func (o *PcloudPlacementgroupsGetallParams) WithHTTPClient(client *http.Client) *PcloudPlacementgroupsGetallParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pcloud placementgroups getall params +func (o *PcloudPlacementgroupsGetallParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudInstanceID adds the cloudInstanceID to the pcloud placementgroups getall params +func (o *PcloudPlacementgroupsGetallParams) WithCloudInstanceID(cloudInstanceID string) *PcloudPlacementgroupsGetallParams { + o.SetCloudInstanceID(cloudInstanceID) + return o +} + +// SetCloudInstanceID adds the cloudInstanceId to the pcloud placementgroups getall params +func (o *PcloudPlacementgroupsGetallParams) SetCloudInstanceID(cloudInstanceID string) { + o.CloudInstanceID = cloudInstanceID +} + +// WriteToRequest writes these params to a swagger request +func (o *PcloudPlacementgroupsGetallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloud_instance_id + if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go new file mode 100644 index 00000000000..f792a5244d9 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_placement_groups + +// 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/IBM-Cloud/power-go-client/power/models" +) + +// PcloudPlacementgroupsGetallReader is a Reader for the PcloudPlacementgroupsGetall structure. +type PcloudPlacementgroupsGetallReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PcloudPlacementgroupsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + + case 200: + result := NewPcloudPlacementgroupsGetallOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + case 400: + result := NewPcloudPlacementgroupsGetallBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 401: + result := NewPcloudPlacementgroupsGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 500: + result := NewPcloudPlacementgroupsGetallInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPcloudPlacementgroupsGetallOK creates a PcloudPlacementgroupsGetallOK with default headers values +func NewPcloudPlacementgroupsGetallOK() *PcloudPlacementgroupsGetallOK { + return &PcloudPlacementgroupsGetallOK{} +} + +/*PcloudPlacementgroupsGetallOK handles this case with default header values. + +OK +*/ +type PcloudPlacementgroupsGetallOK struct { + Payload *models.PlacementGroups +} + +func (o *PcloudPlacementgroupsGetallOK) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallOK %+v", 200, o.Payload) +} + +func (o *PcloudPlacementgroupsGetallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PlacementGroups) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPcloudPlacementgroupsGetallBadRequest creates a PcloudPlacementgroupsGetallBadRequest with default headers values +func NewPcloudPlacementgroupsGetallBadRequest() *PcloudPlacementgroupsGetallBadRequest { + return &PcloudPlacementgroupsGetallBadRequest{} +} + +/*PcloudPlacementgroupsGetallBadRequest handles this case with default header values. + +Bad Request +*/ +type PcloudPlacementgroupsGetallBadRequest struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsGetallBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudPlacementgroupsGetallBadRequest) 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 +} + +// NewPcloudPlacementgroupsGetallUnauthorized creates a PcloudPlacementgroupsGetallUnauthorized with default headers values +func NewPcloudPlacementgroupsGetallUnauthorized() *PcloudPlacementgroupsGetallUnauthorized { + return &PcloudPlacementgroupsGetallUnauthorized{} +} + +/*PcloudPlacementgroupsGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPlacementgroupsGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPlacementgroupsGetallUnauthorized) 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 +} + +// NewPcloudPlacementgroupsGetallInternalServerError creates a PcloudPlacementgroupsGetallInternalServerError with default headers values +func NewPcloudPlacementgroupsGetallInternalServerError() *PcloudPlacementgroupsGetallInternalServerError { + return &PcloudPlacementgroupsGetallInternalServerError{} +} + +/*PcloudPlacementgroupsGetallInternalServerError handles this case with default header values. + +Internal Server Error +*/ +type PcloudPlacementgroupsGetallInternalServerError struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsGetallInternalServerError) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallInternalServerError %+v", 500, o.Payload) +} + +func (o *PcloudPlacementgroupsGetallInternalServerError) 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/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_parameters.go new file mode 100644 index 00000000000..f9422bd761d --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_parameters.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_placement_groups + +// 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/IBM-Cloud/power-go-client/power/models" +) + +// NewPcloudPlacementgroupsMembersDeleteParams creates a new PcloudPlacementgroupsMembersDeleteParams object +// with the default values initialized. +func NewPcloudPlacementgroupsMembersDeleteParams() *PcloudPlacementgroupsMembersDeleteParams { + var () + return &PcloudPlacementgroupsMembersDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPcloudPlacementgroupsMembersDeleteParamsWithTimeout creates a new PcloudPlacementgroupsMembersDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPcloudPlacementgroupsMembersDeleteParamsWithTimeout(timeout time.Duration) *PcloudPlacementgroupsMembersDeleteParams { + var () + return &PcloudPlacementgroupsMembersDeleteParams{ + + timeout: timeout, + } +} + +// NewPcloudPlacementgroupsMembersDeleteParamsWithContext creates a new PcloudPlacementgroupsMembersDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewPcloudPlacementgroupsMembersDeleteParamsWithContext(ctx context.Context) *PcloudPlacementgroupsMembersDeleteParams { + var () + return &PcloudPlacementgroupsMembersDeleteParams{ + + Context: ctx, + } +} + +// NewPcloudPlacementgroupsMembersDeleteParamsWithHTTPClient creates a new PcloudPlacementgroupsMembersDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPcloudPlacementgroupsMembersDeleteParamsWithHTTPClient(client *http.Client) *PcloudPlacementgroupsMembersDeleteParams { + var () + return &PcloudPlacementgroupsMembersDeleteParams{ + HTTPClient: client, + } +} + +/*PcloudPlacementgroupsMembersDeleteParams contains all the parameters to send to the API endpoint +for the pcloud placementgroups members delete operation typically these are written to a http.Request +*/ +type PcloudPlacementgroupsMembersDeleteParams struct { + + /*Body + Parameters for removing a Server in a Placement Group + + */ + Body *models.PlacementGroupServer + /*CloudInstanceID + Cloud Instance ID of a PCloud Instance + + */ + CloudInstanceID string + /*PlacementGroupID + Placement Group ID + + */ + PlacementGroupID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the pcloud placementgroups members delete params +func (o *PcloudPlacementgroupsMembersDeleteParams) WithTimeout(timeout time.Duration) *PcloudPlacementgroupsMembersDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pcloud placementgroups members delete params +func (o *PcloudPlacementgroupsMembersDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pcloud placementgroups members delete params +func (o *PcloudPlacementgroupsMembersDeleteParams) WithContext(ctx context.Context) *PcloudPlacementgroupsMembersDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pcloud placementgroups members delete params +func (o *PcloudPlacementgroupsMembersDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pcloud placementgroups members delete params +func (o *PcloudPlacementgroupsMembersDeleteParams) WithHTTPClient(client *http.Client) *PcloudPlacementgroupsMembersDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pcloud placementgroups members delete params +func (o *PcloudPlacementgroupsMembersDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the pcloud placementgroups members delete params +func (o *PcloudPlacementgroupsMembersDeleteParams) WithBody(body *models.PlacementGroupServer) *PcloudPlacementgroupsMembersDeleteParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the pcloud placementgroups members delete params +func (o *PcloudPlacementgroupsMembersDeleteParams) SetBody(body *models.PlacementGroupServer) { + o.Body = body +} + +// WithCloudInstanceID adds the cloudInstanceID to the pcloud placementgroups members delete params +func (o *PcloudPlacementgroupsMembersDeleteParams) WithCloudInstanceID(cloudInstanceID string) *PcloudPlacementgroupsMembersDeleteParams { + o.SetCloudInstanceID(cloudInstanceID) + return o +} + +// SetCloudInstanceID adds the cloudInstanceId to the pcloud placementgroups members delete params +func (o *PcloudPlacementgroupsMembersDeleteParams) SetCloudInstanceID(cloudInstanceID string) { + o.CloudInstanceID = cloudInstanceID +} + +// WithPlacementGroupID adds the placementGroupID to the pcloud placementgroups members delete params +func (o *PcloudPlacementgroupsMembersDeleteParams) WithPlacementGroupID(placementGroupID string) *PcloudPlacementgroupsMembersDeleteParams { + o.SetPlacementGroupID(placementGroupID) + return o +} + +// SetPlacementGroupID adds the placementGroupId to the pcloud placementgroups members delete params +func (o *PcloudPlacementgroupsMembersDeleteParams) SetPlacementGroupID(placementGroupID string) { + o.PlacementGroupID = placementGroupID +} + +// WriteToRequest writes these params to a swagger request +func (o *PcloudPlacementgroupsMembersDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloud_instance_id + if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { + return err + } + + // path param placement_group_id + if err := r.SetPathParam("placement_group_id", o.PlacementGroupID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go new file mode 100644 index 00000000000..8c3dde34a72 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go @@ -0,0 +1,211 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_placement_groups + +// 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/IBM-Cloud/power-go-client/power/models" +) + +// PcloudPlacementgroupsMembersDeleteReader is a Reader for the PcloudPlacementgroupsMembersDelete structure. +type PcloudPlacementgroupsMembersDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PcloudPlacementgroupsMembersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + + case 200: + result := NewPcloudPlacementgroupsMembersDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + case 400: + result := NewPcloudPlacementgroupsMembersDeleteBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 409: + result := NewPcloudPlacementgroupsMembersDeleteConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 422: + result := NewPcloudPlacementgroupsMembersDeleteUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 500: + result := NewPcloudPlacementgroupsMembersDeleteInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPcloudPlacementgroupsMembersDeleteOK creates a PcloudPlacementgroupsMembersDeleteOK with default headers values +func NewPcloudPlacementgroupsMembersDeleteOK() *PcloudPlacementgroupsMembersDeleteOK { + return &PcloudPlacementgroupsMembersDeleteOK{} +} + +/*PcloudPlacementgroupsMembersDeleteOK handles this case with default header values. + +OK +*/ +type PcloudPlacementgroupsMembersDeleteOK struct { + Payload *models.PlacementGroup +} + +func (o *PcloudPlacementgroupsMembersDeleteOK) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteOK %+v", 200, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PlacementGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPcloudPlacementgroupsMembersDeleteBadRequest creates a PcloudPlacementgroupsMembersDeleteBadRequest with default headers values +func NewPcloudPlacementgroupsMembersDeleteBadRequest() *PcloudPlacementgroupsMembersDeleteBadRequest { + return &PcloudPlacementgroupsMembersDeleteBadRequest{} +} + +/*PcloudPlacementgroupsMembersDeleteBadRequest handles this case with default header values. + +Bad Request +*/ +type PcloudPlacementgroupsMembersDeleteBadRequest struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsMembersDeleteBadRequest) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersDeleteBadRequest) 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 +} + +// NewPcloudPlacementgroupsMembersDeleteConflict creates a PcloudPlacementgroupsMembersDeleteConflict with default headers values +func NewPcloudPlacementgroupsMembersDeleteConflict() *PcloudPlacementgroupsMembersDeleteConflict { + return &PcloudPlacementgroupsMembersDeleteConflict{} +} + +/*PcloudPlacementgroupsMembersDeleteConflict handles this case with default header values. + +Conflict +*/ +type PcloudPlacementgroupsMembersDeleteConflict struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsMembersDeleteConflict) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteConflict %+v", 409, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersDeleteConflict) 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 +} + +// NewPcloudPlacementgroupsMembersDeleteUnprocessableEntity creates a PcloudPlacementgroupsMembersDeleteUnprocessableEntity with default headers values +func NewPcloudPlacementgroupsMembersDeleteUnprocessableEntity() *PcloudPlacementgroupsMembersDeleteUnprocessableEntity { + return &PcloudPlacementgroupsMembersDeleteUnprocessableEntity{} +} + +/*PcloudPlacementgroupsMembersDeleteUnprocessableEntity handles this case with default header values. + +Unprocessable Entity +*/ +type PcloudPlacementgroupsMembersDeleteUnprocessableEntity struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) 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 +} + +// NewPcloudPlacementgroupsMembersDeleteInternalServerError creates a PcloudPlacementgroupsMembersDeleteInternalServerError with default headers values +func NewPcloudPlacementgroupsMembersDeleteInternalServerError() *PcloudPlacementgroupsMembersDeleteInternalServerError { + return &PcloudPlacementgroupsMembersDeleteInternalServerError{} +} + +/*PcloudPlacementgroupsMembersDeleteInternalServerError handles this case with default header values. + +Internal Server Error +*/ +type PcloudPlacementgroupsMembersDeleteInternalServerError struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteInternalServerError %+v", 500, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) 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/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_parameters.go new file mode 100644 index 00000000000..05d85b1aa30 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_parameters.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_placement_groups + +// 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/IBM-Cloud/power-go-client/power/models" +) + +// NewPcloudPlacementgroupsMembersPostParams creates a new PcloudPlacementgroupsMembersPostParams object +// with the default values initialized. +func NewPcloudPlacementgroupsMembersPostParams() *PcloudPlacementgroupsMembersPostParams { + var () + return &PcloudPlacementgroupsMembersPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPcloudPlacementgroupsMembersPostParamsWithTimeout creates a new PcloudPlacementgroupsMembersPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPcloudPlacementgroupsMembersPostParamsWithTimeout(timeout time.Duration) *PcloudPlacementgroupsMembersPostParams { + var () + return &PcloudPlacementgroupsMembersPostParams{ + + timeout: timeout, + } +} + +// NewPcloudPlacementgroupsMembersPostParamsWithContext creates a new PcloudPlacementgroupsMembersPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewPcloudPlacementgroupsMembersPostParamsWithContext(ctx context.Context) *PcloudPlacementgroupsMembersPostParams { + var () + return &PcloudPlacementgroupsMembersPostParams{ + + Context: ctx, + } +} + +// NewPcloudPlacementgroupsMembersPostParamsWithHTTPClient creates a new PcloudPlacementgroupsMembersPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPcloudPlacementgroupsMembersPostParamsWithHTTPClient(client *http.Client) *PcloudPlacementgroupsMembersPostParams { + var () + return &PcloudPlacementgroupsMembersPostParams{ + HTTPClient: client, + } +} + +/*PcloudPlacementgroupsMembersPostParams contains all the parameters to send to the API endpoint +for the pcloud placementgroups members post operation typically these are written to a http.Request +*/ +type PcloudPlacementgroupsMembersPostParams struct { + + /*Body + Parameters for adding a server to a Server Placement Group + + */ + Body *models.PlacementGroupServer + /*CloudInstanceID + Cloud Instance ID of a PCloud Instance + + */ + CloudInstanceID string + /*PlacementGroupID + Placement Group ID + + */ + PlacementGroupID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the pcloud placementgroups members post params +func (o *PcloudPlacementgroupsMembersPostParams) WithTimeout(timeout time.Duration) *PcloudPlacementgroupsMembersPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pcloud placementgroups members post params +func (o *PcloudPlacementgroupsMembersPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pcloud placementgroups members post params +func (o *PcloudPlacementgroupsMembersPostParams) WithContext(ctx context.Context) *PcloudPlacementgroupsMembersPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pcloud placementgroups members post params +func (o *PcloudPlacementgroupsMembersPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pcloud placementgroups members post params +func (o *PcloudPlacementgroupsMembersPostParams) WithHTTPClient(client *http.Client) *PcloudPlacementgroupsMembersPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pcloud placementgroups members post params +func (o *PcloudPlacementgroupsMembersPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the pcloud placementgroups members post params +func (o *PcloudPlacementgroupsMembersPostParams) WithBody(body *models.PlacementGroupServer) *PcloudPlacementgroupsMembersPostParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the pcloud placementgroups members post params +func (o *PcloudPlacementgroupsMembersPostParams) SetBody(body *models.PlacementGroupServer) { + o.Body = body +} + +// WithCloudInstanceID adds the cloudInstanceID to the pcloud placementgroups members post params +func (o *PcloudPlacementgroupsMembersPostParams) WithCloudInstanceID(cloudInstanceID string) *PcloudPlacementgroupsMembersPostParams { + o.SetCloudInstanceID(cloudInstanceID) + return o +} + +// SetCloudInstanceID adds the cloudInstanceId to the pcloud placementgroups members post params +func (o *PcloudPlacementgroupsMembersPostParams) SetCloudInstanceID(cloudInstanceID string) { + o.CloudInstanceID = cloudInstanceID +} + +// WithPlacementGroupID adds the placementGroupID to the pcloud placementgroups members post params +func (o *PcloudPlacementgroupsMembersPostParams) WithPlacementGroupID(placementGroupID string) *PcloudPlacementgroupsMembersPostParams { + o.SetPlacementGroupID(placementGroupID) + return o +} + +// SetPlacementGroupID adds the placementGroupId to the pcloud placementgroups members post params +func (o *PcloudPlacementgroupsMembersPostParams) SetPlacementGroupID(placementGroupID string) { + o.PlacementGroupID = placementGroupID +} + +// WriteToRequest writes these params to a swagger request +func (o *PcloudPlacementgroupsMembersPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloud_instance_id + if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { + return err + } + + // path param placement_group_id + if err := r.SetPathParam("placement_group_id", o.PlacementGroupID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go new file mode 100644 index 00000000000..fce6e411da0 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go @@ -0,0 +1,211 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_placement_groups + +// 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/IBM-Cloud/power-go-client/power/models" +) + +// PcloudPlacementgroupsMembersPostReader is a Reader for the PcloudPlacementgroupsMembersPost structure. +type PcloudPlacementgroupsMembersPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PcloudPlacementgroupsMembersPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + + case 200: + result := NewPcloudPlacementgroupsMembersPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + case 400: + result := NewPcloudPlacementgroupsMembersPostBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 409: + result := NewPcloudPlacementgroupsMembersPostConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 422: + result := NewPcloudPlacementgroupsMembersPostUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 500: + result := NewPcloudPlacementgroupsMembersPostInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPcloudPlacementgroupsMembersPostOK creates a PcloudPlacementgroupsMembersPostOK with default headers values +func NewPcloudPlacementgroupsMembersPostOK() *PcloudPlacementgroupsMembersPostOK { + return &PcloudPlacementgroupsMembersPostOK{} +} + +/*PcloudPlacementgroupsMembersPostOK handles this case with default header values. + +OK +*/ +type PcloudPlacementgroupsMembersPostOK struct { + Payload *models.PlacementGroup +} + +func (o *PcloudPlacementgroupsMembersPostOK) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostOK %+v", 200, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PlacementGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPcloudPlacementgroupsMembersPostBadRequest creates a PcloudPlacementgroupsMembersPostBadRequest with default headers values +func NewPcloudPlacementgroupsMembersPostBadRequest() *PcloudPlacementgroupsMembersPostBadRequest { + return &PcloudPlacementgroupsMembersPostBadRequest{} +} + +/*PcloudPlacementgroupsMembersPostBadRequest handles this case with default header values. + +Bad Request +*/ +type PcloudPlacementgroupsMembersPostBadRequest struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsMembersPostBadRequest) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersPostBadRequest) 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 +} + +// NewPcloudPlacementgroupsMembersPostConflict creates a PcloudPlacementgroupsMembersPostConflict with default headers values +func NewPcloudPlacementgroupsMembersPostConflict() *PcloudPlacementgroupsMembersPostConflict { + return &PcloudPlacementgroupsMembersPostConflict{} +} + +/*PcloudPlacementgroupsMembersPostConflict handles this case with default header values. + +Conflict +*/ +type PcloudPlacementgroupsMembersPostConflict struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsMembersPostConflict) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostConflict %+v", 409, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersPostConflict) 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 +} + +// NewPcloudPlacementgroupsMembersPostUnprocessableEntity creates a PcloudPlacementgroupsMembersPostUnprocessableEntity with default headers values +func NewPcloudPlacementgroupsMembersPostUnprocessableEntity() *PcloudPlacementgroupsMembersPostUnprocessableEntity { + return &PcloudPlacementgroupsMembersPostUnprocessableEntity{} +} + +/*PcloudPlacementgroupsMembersPostUnprocessableEntity handles this case with default header values. + +Unprocessable Entity +*/ +type PcloudPlacementgroupsMembersPostUnprocessableEntity struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) 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 +} + +// NewPcloudPlacementgroupsMembersPostInternalServerError creates a PcloudPlacementgroupsMembersPostInternalServerError with default headers values +func NewPcloudPlacementgroupsMembersPostInternalServerError() *PcloudPlacementgroupsMembersPostInternalServerError { + return &PcloudPlacementgroupsMembersPostInternalServerError{} +} + +/*PcloudPlacementgroupsMembersPostInternalServerError handles this case with default header values. + +Internal Server Error +*/ +type PcloudPlacementgroupsMembersPostInternalServerError struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsMembersPostInternalServerError) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostInternalServerError %+v", 500, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersPostInternalServerError) 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/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_parameters.go new file mode 100644 index 00000000000..edb21247625 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_parameters.go @@ -0,0 +1,160 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_placement_groups + +// 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/IBM-Cloud/power-go-client/power/models" +) + +// NewPcloudPlacementgroupsPostParams creates a new PcloudPlacementgroupsPostParams object +// with the default values initialized. +func NewPcloudPlacementgroupsPostParams() *PcloudPlacementgroupsPostParams { + var () + return &PcloudPlacementgroupsPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPcloudPlacementgroupsPostParamsWithTimeout creates a new PcloudPlacementgroupsPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPcloudPlacementgroupsPostParamsWithTimeout(timeout time.Duration) *PcloudPlacementgroupsPostParams { + var () + return &PcloudPlacementgroupsPostParams{ + + timeout: timeout, + } +} + +// NewPcloudPlacementgroupsPostParamsWithContext creates a new PcloudPlacementgroupsPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewPcloudPlacementgroupsPostParamsWithContext(ctx context.Context) *PcloudPlacementgroupsPostParams { + var () + return &PcloudPlacementgroupsPostParams{ + + Context: ctx, + } +} + +// NewPcloudPlacementgroupsPostParamsWithHTTPClient creates a new PcloudPlacementgroupsPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPcloudPlacementgroupsPostParamsWithHTTPClient(client *http.Client) *PcloudPlacementgroupsPostParams { + var () + return &PcloudPlacementgroupsPostParams{ + HTTPClient: client, + } +} + +/*PcloudPlacementgroupsPostParams contains all the parameters to send to the API endpoint +for the pcloud placementgroups post operation typically these are written to a http.Request +*/ +type PcloudPlacementgroupsPostParams struct { + + /*Body + Parameters for the creation of a new Server Placement Group + + */ + Body *models.PlacementGroupCreate + /*CloudInstanceID + Cloud Instance ID of a PCloud Instance + + */ + CloudInstanceID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the pcloud placementgroups post params +func (o *PcloudPlacementgroupsPostParams) WithTimeout(timeout time.Duration) *PcloudPlacementgroupsPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pcloud placementgroups post params +func (o *PcloudPlacementgroupsPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pcloud placementgroups post params +func (o *PcloudPlacementgroupsPostParams) WithContext(ctx context.Context) *PcloudPlacementgroupsPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pcloud placementgroups post params +func (o *PcloudPlacementgroupsPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pcloud placementgroups post params +func (o *PcloudPlacementgroupsPostParams) WithHTTPClient(client *http.Client) *PcloudPlacementgroupsPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pcloud placementgroups post params +func (o *PcloudPlacementgroupsPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the pcloud placementgroups post params +func (o *PcloudPlacementgroupsPostParams) WithBody(body *models.PlacementGroupCreate) *PcloudPlacementgroupsPostParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the pcloud placementgroups post params +func (o *PcloudPlacementgroupsPostParams) SetBody(body *models.PlacementGroupCreate) { + o.Body = body +} + +// WithCloudInstanceID adds the cloudInstanceID to the pcloud placementgroups post params +func (o *PcloudPlacementgroupsPostParams) WithCloudInstanceID(cloudInstanceID string) *PcloudPlacementgroupsPostParams { + o.SetCloudInstanceID(cloudInstanceID) + return o +} + +// SetCloudInstanceID adds the cloudInstanceId to the pcloud placementgroups post params +func (o *PcloudPlacementgroupsPostParams) SetCloudInstanceID(cloudInstanceID string) { + o.CloudInstanceID = cloudInstanceID +} + +// WriteToRequest writes these params to a swagger request +func (o *PcloudPlacementgroupsPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloud_instance_id + if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go new file mode 100644 index 00000000000..ff49f94d280 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go @@ -0,0 +1,211 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_placement_groups + +// 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/IBM-Cloud/power-go-client/power/models" +) + +// PcloudPlacementgroupsPostReader is a Reader for the PcloudPlacementgroupsPost structure. +type PcloudPlacementgroupsPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PcloudPlacementgroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + + case 200: + result := NewPcloudPlacementgroupsPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + case 400: + result := NewPcloudPlacementgroupsPostBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 409: + result := NewPcloudPlacementgroupsPostConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 422: + result := NewPcloudPlacementgroupsPostUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 500: + result := NewPcloudPlacementgroupsPostInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPcloudPlacementgroupsPostOK creates a PcloudPlacementgroupsPostOK with default headers values +func NewPcloudPlacementgroupsPostOK() *PcloudPlacementgroupsPostOK { + return &PcloudPlacementgroupsPostOK{} +} + +/*PcloudPlacementgroupsPostOK handles this case with default header values. + +OK +*/ +type PcloudPlacementgroupsPostOK struct { + Payload *models.PlacementGroup +} + +func (o *PcloudPlacementgroupsPostOK) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostOK %+v", 200, o.Payload) +} + +func (o *PcloudPlacementgroupsPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PlacementGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPcloudPlacementgroupsPostBadRequest creates a PcloudPlacementgroupsPostBadRequest with default headers values +func NewPcloudPlacementgroupsPostBadRequest() *PcloudPlacementgroupsPostBadRequest { + return &PcloudPlacementgroupsPostBadRequest{} +} + +/*PcloudPlacementgroupsPostBadRequest handles this case with default header values. + +Bad Request +*/ +type PcloudPlacementgroupsPostBadRequest struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsPostBadRequest) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudPlacementgroupsPostBadRequest) 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 +} + +// NewPcloudPlacementgroupsPostConflict creates a PcloudPlacementgroupsPostConflict with default headers values +func NewPcloudPlacementgroupsPostConflict() *PcloudPlacementgroupsPostConflict { + return &PcloudPlacementgroupsPostConflict{} +} + +/*PcloudPlacementgroupsPostConflict handles this case with default header values. + +Conflict +*/ +type PcloudPlacementgroupsPostConflict struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsPostConflict) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostConflict %+v", 409, o.Payload) +} + +func (o *PcloudPlacementgroupsPostConflict) 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 +} + +// NewPcloudPlacementgroupsPostUnprocessableEntity creates a PcloudPlacementgroupsPostUnprocessableEntity with default headers values +func NewPcloudPlacementgroupsPostUnprocessableEntity() *PcloudPlacementgroupsPostUnprocessableEntity { + return &PcloudPlacementgroupsPostUnprocessableEntity{} +} + +/*PcloudPlacementgroupsPostUnprocessableEntity handles this case with default header values. + +Unprocessable Entity +*/ +type PcloudPlacementgroupsPostUnprocessableEntity struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsPostUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PcloudPlacementgroupsPostUnprocessableEntity) 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 +} + +// NewPcloudPlacementgroupsPostInternalServerError creates a PcloudPlacementgroupsPostInternalServerError with default headers values +func NewPcloudPlacementgroupsPostInternalServerError() *PcloudPlacementgroupsPostInternalServerError { + return &PcloudPlacementgroupsPostInternalServerError{} +} + +/*PcloudPlacementgroupsPostInternalServerError handles this case with default header values. + +Internal Server Error +*/ +type PcloudPlacementgroupsPostInternalServerError struct { + Payload *models.Error +} + +func (o *PcloudPlacementgroupsPostInternalServerError) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostInternalServerError %+v", 500, o.Payload) +} + +func (o *PcloudPlacementgroupsPostInternalServerError) 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/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go index d6362f7d357..b8215456ed3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudSapGetReader) ReadResponse(response runtime.ClientResponse, consu } return nil, result + case 401: + result := NewPcloudSapGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudSapGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudSapGetBadRequest) readResponse(response runtime.ClientResponse, c return nil } +// NewPcloudSapGetUnauthorized creates a PcloudSapGetUnauthorized with default headers values +func NewPcloudSapGetUnauthorized() *PcloudSapGetUnauthorized { + return &PcloudSapGetUnauthorized{} +} + +/*PcloudSapGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudSapGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudSapGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudSapGetUnauthorized) 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 +} + // NewPcloudSapGetNotFound creates a PcloudSapGetNotFound with default headers values func NewPcloudSapGetNotFound() *PcloudSapGetNotFound { return &PcloudSapGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go index e2cf74fc59f..f2c277b3f15 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go @@ -39,6 +39,13 @@ func (o *PcloudSapGetallReader) ReadResponse(response runtime.ClientResponse, co } return nil, result + case 401: + result := NewPcloudSapGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: result := NewPcloudSapGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -109,6 +116,35 @@ func (o *PcloudSapGetallBadRequest) readResponse(response runtime.ClientResponse return nil } +// NewPcloudSapGetallUnauthorized creates a PcloudSapGetallUnauthorized with default headers values +func NewPcloudSapGetallUnauthorized() *PcloudSapGetallUnauthorized { + return &PcloudSapGetallUnauthorized{} +} + +/*PcloudSapGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudSapGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudSapGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudSapGetallUnauthorized) 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 +} + // NewPcloudSapGetallInternalServerError creates a PcloudSapGetallInternalServerError with default headers values func NewPcloudSapGetallInternalServerError() *PcloudSapGetallInternalServerError { return &PcloudSapGetallInternalServerError{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go index d3951686b07..559beea2b36 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go @@ -53,6 +53,13 @@ func (o *PcloudSapPostReader) ReadResponse(response runtime.ClientResponse, cons } return nil, result + case 401: + result := NewPcloudSapPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: result := NewPcloudSapPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -189,6 +196,35 @@ func (o *PcloudSapPostBadRequest) readResponse(response runtime.ClientResponse, return nil } +// NewPcloudSapPostUnauthorized creates a PcloudSapPostUnauthorized with default headers values +func NewPcloudSapPostUnauthorized() *PcloudSapPostUnauthorized { + return &PcloudSapPostUnauthorized{} +} + +/*PcloudSapPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudSapPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudSapPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudSapPostUnauthorized) 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 +} + // NewPcloudSapPostConflict creates a PcloudSapPostConflict with default headers values func NewPcloudSapPostConflict() *PcloudSapPostConflict { return &PcloudSapPostConflict{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go index d87794e51ec..d3ad4507aad 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go @@ -39,6 +39,20 @@ func (o *PcloudCloudinstancesSnapshotsDeleteReader) ReadResponse(response runtim } return nil, result + case 401: + result := NewPcloudCloudinstancesSnapshotsDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 404: + result := NewPcloudCloudinstancesSnapshotsDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 410: result := NewPcloudCloudinstancesSnapshotsDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +128,64 @@ func (o *PcloudCloudinstancesSnapshotsDeleteBadRequest) readResponse(response ru return nil } +// NewPcloudCloudinstancesSnapshotsDeleteUnauthorized creates a PcloudCloudinstancesSnapshotsDeleteUnauthorized with default headers values +func NewPcloudCloudinstancesSnapshotsDeleteUnauthorized() *PcloudCloudinstancesSnapshotsDeleteUnauthorized { + return &PcloudCloudinstancesSnapshotsDeleteUnauthorized{} +} + +/*PcloudCloudinstancesSnapshotsDeleteUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesSnapshotsDeleteUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) 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 +} + +// NewPcloudCloudinstancesSnapshotsDeleteNotFound creates a PcloudCloudinstancesSnapshotsDeleteNotFound with default headers values +func NewPcloudCloudinstancesSnapshotsDeleteNotFound() *PcloudCloudinstancesSnapshotsDeleteNotFound { + return &PcloudCloudinstancesSnapshotsDeleteNotFound{} +} + +/*PcloudCloudinstancesSnapshotsDeleteNotFound handles this case with default header values. + +Not Found +*/ +type PcloudCloudinstancesSnapshotsDeleteNotFound struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) 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 +} + // NewPcloudCloudinstancesSnapshotsDeleteGone creates a PcloudCloudinstancesSnapshotsDeleteGone with default headers values func NewPcloudCloudinstancesSnapshotsDeleteGone() *PcloudCloudinstancesSnapshotsDeleteGone { return &PcloudCloudinstancesSnapshotsDeleteGone{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go index 57240c0b985..fc2265ef392 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesSnapshotsGetReader) ReadResponse(response runtime.C } return nil, result + case 401: + result := NewPcloudCloudinstancesSnapshotsGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudCloudinstancesSnapshotsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudCloudinstancesSnapshotsGetBadRequest) readResponse(response runti return nil } +// NewPcloudCloudinstancesSnapshotsGetUnauthorized creates a PcloudCloudinstancesSnapshotsGetUnauthorized with default headers values +func NewPcloudCloudinstancesSnapshotsGetUnauthorized() *PcloudCloudinstancesSnapshotsGetUnauthorized { + return &PcloudCloudinstancesSnapshotsGetUnauthorized{} +} + +/*PcloudCloudinstancesSnapshotsGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesSnapshotsGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) 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 +} + // NewPcloudCloudinstancesSnapshotsGetNotFound creates a PcloudCloudinstancesSnapshotsGetNotFound with default headers values func NewPcloudCloudinstancesSnapshotsGetNotFound() *PcloudCloudinstancesSnapshotsGetNotFound { return &PcloudCloudinstancesSnapshotsGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go index c557417dca8..43130ea2138 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesSnapshotsGetallReader) ReadResponse(response runtim } return nil, result + case 401: + result := NewPcloudCloudinstancesSnapshotsGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: result := NewPcloudCloudinstancesSnapshotsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -109,6 +116,35 @@ func (o *PcloudCloudinstancesSnapshotsGetallBadRequest) readResponse(response ru return nil } +// NewPcloudCloudinstancesSnapshotsGetallUnauthorized creates a PcloudCloudinstancesSnapshotsGetallUnauthorized with default headers values +func NewPcloudCloudinstancesSnapshotsGetallUnauthorized() *PcloudCloudinstancesSnapshotsGetallUnauthorized { + return &PcloudCloudinstancesSnapshotsGetallUnauthorized{} +} + +/*PcloudCloudinstancesSnapshotsGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesSnapshotsGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) 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 +} + // NewPcloudCloudinstancesSnapshotsGetallInternalServerError creates a PcloudCloudinstancesSnapshotsGetallInternalServerError with default headers values func NewPcloudCloudinstancesSnapshotsGetallInternalServerError() *PcloudCloudinstancesSnapshotsGetallInternalServerError { return &PcloudCloudinstancesSnapshotsGetallInternalServerError{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go index 6c8ca7a5ace..9fbccd4cb44 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesSnapshotsPutReader) ReadResponse(response runtime.C } return nil, result + case 401: + result := NewPcloudCloudinstancesSnapshotsPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudCloudinstancesSnapshotsPutNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +121,35 @@ func (o *PcloudCloudinstancesSnapshotsPutBadRequest) readResponse(response runti return nil } +// NewPcloudCloudinstancesSnapshotsPutUnauthorized creates a PcloudCloudinstancesSnapshotsPutUnauthorized with default headers values +func NewPcloudCloudinstancesSnapshotsPutUnauthorized() *PcloudCloudinstancesSnapshotsPutUnauthorized { + return &PcloudCloudinstancesSnapshotsPutUnauthorized{} +} + +/*PcloudCloudinstancesSnapshotsPutUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesSnapshotsPutUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) 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 +} + // NewPcloudCloudinstancesSnapshotsPutNotFound creates a PcloudCloudinstancesSnapshotsPutNotFound with default headers values func NewPcloudCloudinstancesSnapshotsPutNotFound() *PcloudCloudinstancesSnapshotsPutNotFound { return &PcloudCloudinstancesSnapshotsPutNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go index 44ca460be50..862c1a63500 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go @@ -32,6 +32,13 @@ func (o *PcloudStoragecapacityPoolsGetReader) ReadResponse(response runtime.Clie } return result, nil + case 401: + result := NewPcloudStoragecapacityPoolsGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudStoragecapacityPoolsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -80,6 +87,35 @@ func (o *PcloudStoragecapacityPoolsGetOK) readResponse(response runtime.ClientRe return nil } +// NewPcloudStoragecapacityPoolsGetUnauthorized creates a PcloudStoragecapacityPoolsGetUnauthorized with default headers values +func NewPcloudStoragecapacityPoolsGetUnauthorized() *PcloudStoragecapacityPoolsGetUnauthorized { + return &PcloudStoragecapacityPoolsGetUnauthorized{} +} + +/*PcloudStoragecapacityPoolsGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudStoragecapacityPoolsGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudStoragecapacityPoolsGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudStoragecapacityPoolsGetUnauthorized) 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 +} + // NewPcloudStoragecapacityPoolsGetNotFound creates a PcloudStoragecapacityPoolsGetNotFound with default headers values func NewPcloudStoragecapacityPoolsGetNotFound() *PcloudStoragecapacityPoolsGetNotFound { return &PcloudStoragecapacityPoolsGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go index b97fe55711e..f62b5831f10 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go @@ -32,6 +32,13 @@ func (o *PcloudStoragecapacityPoolsGetallReader) ReadResponse(response runtime.C } return result, nil + case 401: + result := NewPcloudStoragecapacityPoolsGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: result := NewPcloudStoragecapacityPoolsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -73,6 +80,35 @@ func (o *PcloudStoragecapacityPoolsGetallOK) readResponse(response runtime.Clien return nil } +// NewPcloudStoragecapacityPoolsGetallUnauthorized creates a PcloudStoragecapacityPoolsGetallUnauthorized with default headers values +func NewPcloudStoragecapacityPoolsGetallUnauthorized() *PcloudStoragecapacityPoolsGetallUnauthorized { + return &PcloudStoragecapacityPoolsGetallUnauthorized{} +} + +/*PcloudStoragecapacityPoolsGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudStoragecapacityPoolsGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudStoragecapacityPoolsGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudStoragecapacityPoolsGetallUnauthorized) 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 +} + // NewPcloudStoragecapacityPoolsGetallInternalServerError creates a PcloudStoragecapacityPoolsGetallInternalServerError with default headers values func NewPcloudStoragecapacityPoolsGetallInternalServerError() *PcloudStoragecapacityPoolsGetallInternalServerError { return &PcloudStoragecapacityPoolsGetallInternalServerError{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go index 9adf16720c8..0ff52a04a4b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go @@ -32,6 +32,13 @@ func (o *PcloudStoragecapacityTypesGetReader) ReadResponse(response runtime.Clie } return result, nil + case 401: + result := NewPcloudStoragecapacityTypesGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudStoragecapacityTypesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -80,6 +87,35 @@ func (o *PcloudStoragecapacityTypesGetOK) readResponse(response runtime.ClientRe return nil } +// NewPcloudStoragecapacityTypesGetUnauthorized creates a PcloudStoragecapacityTypesGetUnauthorized with default headers values +func NewPcloudStoragecapacityTypesGetUnauthorized() *PcloudStoragecapacityTypesGetUnauthorized { + return &PcloudStoragecapacityTypesGetUnauthorized{} +} + +/*PcloudStoragecapacityTypesGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudStoragecapacityTypesGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudStoragecapacityTypesGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudStoragecapacityTypesGetUnauthorized) 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 +} + // NewPcloudStoragecapacityTypesGetNotFound creates a PcloudStoragecapacityTypesGetNotFound with default headers values func NewPcloudStoragecapacityTypesGetNotFound() *PcloudStoragecapacityTypesGetNotFound { return &PcloudStoragecapacityTypesGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go index 9f6f19e0d5d..88467e7d42d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go @@ -32,6 +32,13 @@ func (o *PcloudStoragecapacityTypesGetallReader) ReadResponse(response runtime.C } return result, nil + case 401: + result := NewPcloudStoragecapacityTypesGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: result := NewPcloudStoragecapacityTypesGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -73,6 +80,35 @@ func (o *PcloudStoragecapacityTypesGetallOK) readResponse(response runtime.Clien return nil } +// NewPcloudStoragecapacityTypesGetallUnauthorized creates a PcloudStoragecapacityTypesGetallUnauthorized with default headers values +func NewPcloudStoragecapacityTypesGetallUnauthorized() *PcloudStoragecapacityTypesGetallUnauthorized { + return &PcloudStoragecapacityTypesGetallUnauthorized{} +} + +/*PcloudStoragecapacityTypesGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudStoragecapacityTypesGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudStoragecapacityTypesGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudStoragecapacityTypesGetallUnauthorized) 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 +} + // NewPcloudStoragecapacityTypesGetallInternalServerError creates a PcloudStoragecapacityTypesGetallInternalServerError with default headers values func NewPcloudStoragecapacityTypesGetallInternalServerError() *PcloudStoragecapacityTypesGetallInternalServerError { return &PcloudStoragecapacityTypesGetallInternalServerError{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go index 47d0b86c372..2f5aec49ef5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go @@ -32,6 +32,13 @@ func (o *PcloudSystempoolsGetReader) ReadResponse(response runtime.ClientRespons } return result, nil + case 401: + result := NewPcloudSystempoolsGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: result := NewPcloudSystempoolsGetInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -71,6 +78,35 @@ func (o *PcloudSystempoolsGetOK) readResponse(response runtime.ClientResponse, c return nil } +// NewPcloudSystempoolsGetUnauthorized creates a PcloudSystempoolsGetUnauthorized with default headers values +func NewPcloudSystempoolsGetUnauthorized() *PcloudSystempoolsGetUnauthorized { + return &PcloudSystempoolsGetUnauthorized{} +} + +/*PcloudSystempoolsGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudSystempoolsGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudSystempoolsGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudSystempoolsGetUnauthorized) 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 +} + // NewPcloudSystempoolsGetInternalServerError creates a PcloudSystempoolsGetInternalServerError with default headers values func NewPcloudSystempoolsGetInternalServerError() *PcloudSystempoolsGetInternalServerError { return &PcloudSystempoolsGetInternalServerError{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go index 44d5342e9bd..d739a07ed9f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go @@ -39,6 +39,20 @@ func (o *PcloudTasksDeleteReader) ReadResponse(response runtime.ClientResponse, } return nil, result + case 401: + result := NewPcloudTasksDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 404: + result := NewPcloudTasksDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 410: result := NewPcloudTasksDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +128,64 @@ func (o *PcloudTasksDeleteBadRequest) readResponse(response runtime.ClientRespon return nil } +// NewPcloudTasksDeleteUnauthorized creates a PcloudTasksDeleteUnauthorized with default headers values +func NewPcloudTasksDeleteUnauthorized() *PcloudTasksDeleteUnauthorized { + return &PcloudTasksDeleteUnauthorized{} +} + +/*PcloudTasksDeleteUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudTasksDeleteUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudTasksDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudTasksDeleteUnauthorized) 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 +} + +// NewPcloudTasksDeleteNotFound creates a PcloudTasksDeleteNotFound with default headers values +func NewPcloudTasksDeleteNotFound() *PcloudTasksDeleteNotFound { + return &PcloudTasksDeleteNotFound{} +} + +/*PcloudTasksDeleteNotFound handles this case with default header values. + +Not Found +*/ +type PcloudTasksDeleteNotFound struct { + Payload *models.Error +} + +func (o *PcloudTasksDeleteNotFound) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteNotFound %+v", 404, o.Payload) +} + +func (o *PcloudTasksDeleteNotFound) 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 +} + // NewPcloudTasksDeleteGone creates a PcloudTasksDeleteGone with default headers values func NewPcloudTasksDeleteGone() *PcloudTasksDeleteGone { return &PcloudTasksDeleteGone{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go index f1312b393c6..2315afbbf08 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudTasksGetReader) ReadResponse(response runtime.ClientResponse, con } return nil, result + case 401: + result := NewPcloudTasksGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudTasksGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudTasksGetBadRequest) readResponse(response runtime.ClientResponse, return nil } +// NewPcloudTasksGetUnauthorized creates a PcloudTasksGetUnauthorized with default headers values +func NewPcloudTasksGetUnauthorized() *PcloudTasksGetUnauthorized { + return &PcloudTasksGetUnauthorized{} +} + +/*PcloudTasksGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudTasksGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudTasksGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudTasksGetUnauthorized) 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 +} + // NewPcloudTasksGetNotFound creates a PcloudTasksGetNotFound with default headers values func NewPcloudTasksGetNotFound() *PcloudTasksGetNotFound { return &PcloudTasksGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go index 04ab304d1c3..1f6d9202145 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go @@ -39,6 +39,20 @@ func (o *PcloudTenantsGetReader) ReadResponse(response runtime.ClientResponse, c } return nil, result + case 401: + result := NewPcloudTenantsGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 403: + result := NewPcloudTenantsGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudTenantsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +130,64 @@ func (o *PcloudTenantsGetBadRequest) readResponse(response runtime.ClientRespons return nil } +// NewPcloudTenantsGetUnauthorized creates a PcloudTenantsGetUnauthorized with default headers values +func NewPcloudTenantsGetUnauthorized() *PcloudTenantsGetUnauthorized { + return &PcloudTenantsGetUnauthorized{} +} + +/*PcloudTenantsGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudTenantsGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudTenantsGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudTenantsGetUnauthorized) 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 +} + +// NewPcloudTenantsGetForbidden creates a PcloudTenantsGetForbidden with default headers values +func NewPcloudTenantsGetForbidden() *PcloudTenantsGetForbidden { + return &PcloudTenantsGetForbidden{} +} + +/*PcloudTenantsGetForbidden handles this case with default header values. + +Forbidden +*/ +type PcloudTenantsGetForbidden struct { + Payload *models.Error +} + +func (o *PcloudTenantsGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTenantsGetForbidden) 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 +} + // NewPcloudTenantsGetNotFound creates a PcloudTenantsGetNotFound with default headers values func NewPcloudTenantsGetNotFound() *PcloudTenantsGetNotFound { return &PcloudTenantsGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go index 8fdd1ba1630..d81ccd0f3b6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go @@ -39,6 +39,13 @@ func (o *PcloudTenantsPutReader) ReadResponse(response runtime.ClientResponse, c } return nil, result + case 401: + result := NewPcloudTenantsPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: result := NewPcloudTenantsPutUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudTenantsPutBadRequest) readResponse(response runtime.ClientRespons return nil } +// NewPcloudTenantsPutUnauthorized creates a PcloudTenantsPutUnauthorized with default headers values +func NewPcloudTenantsPutUnauthorized() *PcloudTenantsPutUnauthorized { + return &PcloudTenantsPutUnauthorized{} +} + +/*PcloudTenantsPutUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudTenantsPutUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudTenantsPutUnauthorized) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudTenantsPutUnauthorized) 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 +} + // NewPcloudTenantsPutUnprocessableEntity creates a PcloudTenantsPutUnprocessableEntity with default headers values func NewPcloudTenantsPutUnprocessableEntity() *PcloudTenantsPutUnprocessableEntity { return &PcloudTenantsPutUnprocessableEntity{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go index 49583089700..fd350dd982f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go @@ -39,6 +39,13 @@ func (o *PcloudTenantsSshkeysDeleteReader) ReadResponse(response runtime.ClientR } return nil, result + case 401: + result := NewPcloudTenantsSshkeysDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 410: result := NewPcloudTenantsSshkeysDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +121,35 @@ func (o *PcloudTenantsSshkeysDeleteBadRequest) readResponse(response runtime.Cli return nil } +// NewPcloudTenantsSshkeysDeleteUnauthorized creates a PcloudTenantsSshkeysDeleteUnauthorized with default headers values +func NewPcloudTenantsSshkeysDeleteUnauthorized() *PcloudTenantsSshkeysDeleteUnauthorized { + return &PcloudTenantsSshkeysDeleteUnauthorized{} +} + +/*PcloudTenantsSshkeysDeleteUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudTenantsSshkeysDeleteUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudTenantsSshkeysDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudTenantsSshkeysDeleteUnauthorized) 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 +} + // NewPcloudTenantsSshkeysDeleteGone creates a PcloudTenantsSshkeysDeleteGone with default headers values func NewPcloudTenantsSshkeysDeleteGone() *PcloudTenantsSshkeysDeleteGone { return &PcloudTenantsSshkeysDeleteGone{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go index f49279efa7a..bc40960ed50 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudTenantsSshkeysGetReader) ReadResponse(response runtime.ClientResp } return nil, result + case 401: + result := NewPcloudTenantsSshkeysGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudTenantsSshkeysGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudTenantsSshkeysGetBadRequest) readResponse(response runtime.Client return nil } +// NewPcloudTenantsSshkeysGetUnauthorized creates a PcloudTenantsSshkeysGetUnauthorized with default headers values +func NewPcloudTenantsSshkeysGetUnauthorized() *PcloudTenantsSshkeysGetUnauthorized { + return &PcloudTenantsSshkeysGetUnauthorized{} +} + +/*PcloudTenantsSshkeysGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudTenantsSshkeysGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudTenantsSshkeysGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudTenantsSshkeysGetUnauthorized) 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 +} + // NewPcloudTenantsSshkeysGetNotFound creates a PcloudTenantsSshkeysGetNotFound with default headers values func NewPcloudTenantsSshkeysGetNotFound() *PcloudTenantsSshkeysGetNotFound { return &PcloudTenantsSshkeysGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go index 06b31465164..0405bfdb59b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go @@ -39,6 +39,13 @@ func (o *PcloudTenantsSshkeysGetallReader) ReadResponse(response runtime.ClientR } return nil, result + case 401: + result := NewPcloudTenantsSshkeysGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudTenantsSshkeysGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudTenantsSshkeysGetallBadRequest) readResponse(response runtime.Cli return nil } +// NewPcloudTenantsSshkeysGetallUnauthorized creates a PcloudTenantsSshkeysGetallUnauthorized with default headers values +func NewPcloudTenantsSshkeysGetallUnauthorized() *PcloudTenantsSshkeysGetallUnauthorized { + return &PcloudTenantsSshkeysGetallUnauthorized{} +} + +/*PcloudTenantsSshkeysGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudTenantsSshkeysGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudTenantsSshkeysGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudTenantsSshkeysGetallUnauthorized) 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 +} + // NewPcloudTenantsSshkeysGetallNotFound creates a PcloudTenantsSshkeysGetallNotFound with default headers values func NewPcloudTenantsSshkeysGetallNotFound() *PcloudTenantsSshkeysGetallNotFound { return &PcloudTenantsSshkeysGetallNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go index dbe77406527..53e307ebcbf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go @@ -46,6 +46,13 @@ func (o *PcloudTenantsSshkeysPostReader) ReadResponse(response runtime.ClientRes } return nil, result + case 401: + result := NewPcloudTenantsSshkeysPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: result := NewPcloudTenantsSshkeysPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -159,6 +166,35 @@ func (o *PcloudTenantsSshkeysPostBadRequest) readResponse(response runtime.Clien return nil } +// NewPcloudTenantsSshkeysPostUnauthorized creates a PcloudTenantsSshkeysPostUnauthorized with default headers values +func NewPcloudTenantsSshkeysPostUnauthorized() *PcloudTenantsSshkeysPostUnauthorized { + return &PcloudTenantsSshkeysPostUnauthorized{} +} + +/*PcloudTenantsSshkeysPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudTenantsSshkeysPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudTenantsSshkeysPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudTenantsSshkeysPostUnauthorized) 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 +} + // NewPcloudTenantsSshkeysPostConflict creates a PcloudTenantsSshkeysPostConflict with default headers values func NewPcloudTenantsSshkeysPostConflict() *PcloudTenantsSshkeysPostConflict { return &PcloudTenantsSshkeysPostConflict{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go index 02a1b32b701..a15df56827c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go @@ -39,6 +39,13 @@ func (o *PcloudTenantsSshkeysPutReader) ReadResponse(response runtime.ClientResp } return nil, result + case 401: + result := NewPcloudTenantsSshkeysPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: result := NewPcloudTenantsSshkeysPutUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudTenantsSshkeysPutBadRequest) readResponse(response runtime.Client return nil } +// NewPcloudTenantsSshkeysPutUnauthorized creates a PcloudTenantsSshkeysPutUnauthorized with default headers values +func NewPcloudTenantsSshkeysPutUnauthorized() *PcloudTenantsSshkeysPutUnauthorized { + return &PcloudTenantsSshkeysPutUnauthorized{} +} + +/*PcloudTenantsSshkeysPutUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudTenantsSshkeysPutUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudTenantsSshkeysPutUnauthorized) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudTenantsSshkeysPutUnauthorized) 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 +} + // NewPcloudTenantsSshkeysPutUnprocessableEntity creates a PcloudTenantsSshkeysPutUnprocessableEntity with default headers values func NewPcloudTenantsSshkeysPutUnprocessableEntity() *PcloudTenantsSshkeysPutUnprocessableEntity { return &PcloudTenantsSshkeysPutUnprocessableEntity{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/p_cloud_volumes_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/p_cloud_volumes_client.go index 1c6a777f64a..03e86ce2e25 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/p_cloud_volumes_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/p_cloud_volumes_client.go @@ -343,6 +343,35 @@ func (a *Client) PcloudPvminstancesVolumesSetbootPut(params *PcloudPvminstancesV } +/* +PcloudV2PvminstancesVolumesPost attaches all volumes to a p VM instance +*/ +func (a *Client) PcloudV2PvminstancesVolumesPost(params *PcloudV2PvminstancesVolumesPostParams, authInfo runtime.ClientAuthInfoWriter) (*PcloudV2PvminstancesVolumesPostAccepted, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPcloudV2PvminstancesVolumesPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "pcloud.v2.pvminstances.volumes.post", + Method: "POST", + PathPattern: "/pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PcloudV2PvminstancesVolumesPostReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + return result.(*PcloudV2PvminstancesVolumesPostAccepted), nil + +} + /* PcloudV2VolumesClonePost creates a volume clone for specified volumes */ diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go index 6978a005a79..25269897841 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesVolumesDeleteReader) ReadResponse(response runtime. } return nil, result + case 401: + result := NewPcloudCloudinstancesVolumesDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 410: result := NewPcloudCloudinstancesVolumesDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +121,35 @@ func (o *PcloudCloudinstancesVolumesDeleteBadRequest) readResponse(response runt return nil } +// NewPcloudCloudinstancesVolumesDeleteUnauthorized creates a PcloudCloudinstancesVolumesDeleteUnauthorized with default headers values +func NewPcloudCloudinstancesVolumesDeleteUnauthorized() *PcloudCloudinstancesVolumesDeleteUnauthorized { + return &PcloudCloudinstancesVolumesDeleteUnauthorized{} +} + +/*PcloudCloudinstancesVolumesDeleteUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesVolumesDeleteUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) 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 +} + // NewPcloudCloudinstancesVolumesDeleteGone creates a PcloudCloudinstancesVolumesDeleteGone with default headers values func NewPcloudCloudinstancesVolumesDeleteGone() *PcloudCloudinstancesVolumesDeleteGone { return &PcloudCloudinstancesVolumesDeleteGone{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go index 7bc1023ea50..9f536aebc14 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesVolumesGetReader) ReadResponse(response runtime.Cli } return nil, result + case 401: + result := NewPcloudCloudinstancesVolumesGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudCloudinstancesVolumesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudCloudinstancesVolumesGetBadRequest) readResponse(response runtime return nil } +// NewPcloudCloudinstancesVolumesGetUnauthorized creates a PcloudCloudinstancesVolumesGetUnauthorized with default headers values +func NewPcloudCloudinstancesVolumesGetUnauthorized() *PcloudCloudinstancesVolumesGetUnauthorized { + return &PcloudCloudinstancesVolumesGetUnauthorized{} +} + +/*PcloudCloudinstancesVolumesGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesVolumesGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesVolumesGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesGetUnauthorized) 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 +} + // NewPcloudCloudinstancesVolumesGetNotFound creates a PcloudCloudinstancesVolumesGetNotFound with default headers values func NewPcloudCloudinstancesVolumesGetNotFound() *PcloudCloudinstancesVolumesGetNotFound { return &PcloudCloudinstancesVolumesGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go index ade48e1cc1b..388793f9e17 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesVolumesGetallReader) ReadResponse(response runtime. } return nil, result + case 401: + result := NewPcloudCloudinstancesVolumesGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudCloudinstancesVolumesGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudCloudinstancesVolumesGetallBadRequest) readResponse(response runt return nil } +// NewPcloudCloudinstancesVolumesGetallUnauthorized creates a PcloudCloudinstancesVolumesGetallUnauthorized with default headers values +func NewPcloudCloudinstancesVolumesGetallUnauthorized() *PcloudCloudinstancesVolumesGetallUnauthorized { + return &PcloudCloudinstancesVolumesGetallUnauthorized{} +} + +/*PcloudCloudinstancesVolumesGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesVolumesGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesVolumesGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesGetallUnauthorized) 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 +} + // NewPcloudCloudinstancesVolumesGetallNotFound creates a PcloudCloudinstancesVolumesGetallNotFound with default headers values func NewPcloudCloudinstancesVolumesGetallNotFound() *PcloudCloudinstancesVolumesGetallNotFound { return &PcloudCloudinstancesVolumesGetallNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go index ace84485189..649f58f589c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesVolumesPostReader) ReadResponse(response runtime.Cl } return nil, result + case 401: + result := NewPcloudCloudinstancesVolumesPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: result := NewPcloudCloudinstancesVolumesPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -123,6 +130,35 @@ func (o *PcloudCloudinstancesVolumesPostBadRequest) readResponse(response runtim return nil } +// NewPcloudCloudinstancesVolumesPostUnauthorized creates a PcloudCloudinstancesVolumesPostUnauthorized with default headers values +func NewPcloudCloudinstancesVolumesPostUnauthorized() *PcloudCloudinstancesVolumesPostUnauthorized { + return &PcloudCloudinstancesVolumesPostUnauthorized{} +} + +/*PcloudCloudinstancesVolumesPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesVolumesPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesVolumesPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesPostUnauthorized) 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 +} + // NewPcloudCloudinstancesVolumesPostConflict creates a PcloudCloudinstancesVolumesPostConflict with default headers values func NewPcloudCloudinstancesVolumesPostConflict() *PcloudCloudinstancesVolumesPostConflict { return &PcloudCloudinstancesVolumesPostConflict{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go index bcabbc44b8f..988937c2060 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go @@ -39,6 +39,13 @@ func (o *PcloudCloudinstancesVolumesPutReader) ReadResponse(response runtime.Cli } return nil, result + case 401: + result := NewPcloudCloudinstancesVolumesPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: result := NewPcloudCloudinstancesVolumesPutConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -123,6 +130,35 @@ func (o *PcloudCloudinstancesVolumesPutBadRequest) readResponse(response runtime return nil } +// NewPcloudCloudinstancesVolumesPutUnauthorized creates a PcloudCloudinstancesVolumesPutUnauthorized with default headers values +func NewPcloudCloudinstancesVolumesPutUnauthorized() *PcloudCloudinstancesVolumesPutUnauthorized { + return &PcloudCloudinstancesVolumesPutUnauthorized{} +} + +/*PcloudCloudinstancesVolumesPutUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesVolumesPutUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesVolumesPutUnauthorized) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesPutUnauthorized) 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 +} + // NewPcloudCloudinstancesVolumesPutConflict creates a PcloudCloudinstancesVolumesPutConflict with default headers values func NewPcloudCloudinstancesVolumesPutConflict() *PcloudCloudinstancesVolumesPutConflict { return &PcloudCloudinstancesVolumesPutConflict{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go index 520403da998..4a52ebd3d1f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudPvminstancesVolumesGetReader) ReadResponse(response runtime.Clien } return nil, result + case 401: + result := NewPcloudPvminstancesVolumesGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudPvminstancesVolumesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudPvminstancesVolumesGetBadRequest) readResponse(response runtime.C return nil } +// NewPcloudPvminstancesVolumesGetUnauthorized creates a PcloudPvminstancesVolumesGetUnauthorized with default headers values +func NewPcloudPvminstancesVolumesGetUnauthorized() *PcloudPvminstancesVolumesGetUnauthorized { + return &PcloudPvminstancesVolumesGetUnauthorized{} +} + +/*PcloudPvminstancesVolumesGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesVolumesGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesVolumesGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesVolumesGetUnauthorized) 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 +} + // NewPcloudPvminstancesVolumesGetNotFound creates a PcloudPvminstancesVolumesGetNotFound with default headers values func NewPcloudPvminstancesVolumesGetNotFound() *PcloudPvminstancesVolumesGetNotFound { return &PcloudPvminstancesVolumesGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go index 9fb49afeb85..37315da8cc0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go @@ -39,6 +39,13 @@ func (o *PcloudPvminstancesVolumesGetallReader) ReadResponse(response runtime.Cl } return nil, result + case 401: + result := NewPcloudPvminstancesVolumesGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudPvminstancesVolumesGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudPvminstancesVolumesGetallBadRequest) readResponse(response runtim return nil } +// NewPcloudPvminstancesVolumesGetallUnauthorized creates a PcloudPvminstancesVolumesGetallUnauthorized with default headers values +func NewPcloudPvminstancesVolumesGetallUnauthorized() *PcloudPvminstancesVolumesGetallUnauthorized { + return &PcloudPvminstancesVolumesGetallUnauthorized{} +} + +/*PcloudPvminstancesVolumesGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesVolumesGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesVolumesGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesVolumesGetallUnauthorized) 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 +} + // NewPcloudPvminstancesVolumesGetallNotFound creates a PcloudPvminstancesVolumesGetallNotFound with default headers values func NewPcloudPvminstancesVolumesGetallNotFound() *PcloudPvminstancesVolumesGetallNotFound { return &PcloudPvminstancesVolumesGetallNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go index 03d1c0e5166..e34c9623907 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go @@ -39,6 +39,13 @@ func (o *PcloudPvminstancesVolumesSetbootPutReader) ReadResponse(response runtim } return nil, result + case 401: + result := NewPcloudPvminstancesVolumesSetbootPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudPvminstancesVolumesSetbootPutNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +121,35 @@ func (o *PcloudPvminstancesVolumesSetbootPutBadRequest) readResponse(response ru return nil } +// NewPcloudPvminstancesVolumesSetbootPutUnauthorized creates a PcloudPvminstancesVolumesSetbootPutUnauthorized with default headers values +func NewPcloudPvminstancesVolumesSetbootPutUnauthorized() *PcloudPvminstancesVolumesSetbootPutUnauthorized { + return &PcloudPvminstancesVolumesSetbootPutUnauthorized{} +} + +/*PcloudPvminstancesVolumesSetbootPutUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudPvminstancesVolumesSetbootPutUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) 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 +} + // NewPcloudPvminstancesVolumesSetbootPutNotFound creates a PcloudPvminstancesVolumesSetbootPutNotFound with default headers values func NewPcloudPvminstancesVolumesSetbootPutNotFound() *PcloudPvminstancesVolumesSetbootPutNotFound { return &PcloudPvminstancesVolumesSetbootPutNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_parameters.go new file mode 100644 index 00000000000..a9331aeba0b --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_parameters.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_volumes + +// 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/IBM-Cloud/power-go-client/power/models" +) + +// NewPcloudV2PvminstancesVolumesPostParams creates a new PcloudV2PvminstancesVolumesPostParams object +// with the default values initialized. +func NewPcloudV2PvminstancesVolumesPostParams() *PcloudV2PvminstancesVolumesPostParams { + var () + return &PcloudV2PvminstancesVolumesPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPcloudV2PvminstancesVolumesPostParamsWithTimeout creates a new PcloudV2PvminstancesVolumesPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPcloudV2PvminstancesVolumesPostParamsWithTimeout(timeout time.Duration) *PcloudV2PvminstancesVolumesPostParams { + var () + return &PcloudV2PvminstancesVolumesPostParams{ + + timeout: timeout, + } +} + +// NewPcloudV2PvminstancesVolumesPostParamsWithContext creates a new PcloudV2PvminstancesVolumesPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewPcloudV2PvminstancesVolumesPostParamsWithContext(ctx context.Context) *PcloudV2PvminstancesVolumesPostParams { + var () + return &PcloudV2PvminstancesVolumesPostParams{ + + Context: ctx, + } +} + +// NewPcloudV2PvminstancesVolumesPostParamsWithHTTPClient creates a new PcloudV2PvminstancesVolumesPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPcloudV2PvminstancesVolumesPostParamsWithHTTPClient(client *http.Client) *PcloudV2PvminstancesVolumesPostParams { + var () + return &PcloudV2PvminstancesVolumesPostParams{ + HTTPClient: client, + } +} + +/*PcloudV2PvminstancesVolumesPostParams contains all the parameters to send to the API endpoint +for the pcloud v2 pvminstances volumes post operation typically these are written to a http.Request +*/ +type PcloudV2PvminstancesVolumesPostParams struct { + + /*Body + Parameter to attach volumes to a PVMInstance + + */ + Body *models.VolumesAttach + /*CloudInstanceID + Cloud Instance ID of a PCloud Instance + + */ + CloudInstanceID string + /*PvmInstanceID + PCloud PVM Instance ID + + */ + PvmInstanceID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the pcloud v2 pvminstances volumes post params +func (o *PcloudV2PvminstancesVolumesPostParams) WithTimeout(timeout time.Duration) *PcloudV2PvminstancesVolumesPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pcloud v2 pvminstances volumes post params +func (o *PcloudV2PvminstancesVolumesPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pcloud v2 pvminstances volumes post params +func (o *PcloudV2PvminstancesVolumesPostParams) WithContext(ctx context.Context) *PcloudV2PvminstancesVolumesPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pcloud v2 pvminstances volumes post params +func (o *PcloudV2PvminstancesVolumesPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pcloud v2 pvminstances volumes post params +func (o *PcloudV2PvminstancesVolumesPostParams) WithHTTPClient(client *http.Client) *PcloudV2PvminstancesVolumesPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pcloud v2 pvminstances volumes post params +func (o *PcloudV2PvminstancesVolumesPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the pcloud v2 pvminstances volumes post params +func (o *PcloudV2PvminstancesVolumesPostParams) WithBody(body *models.VolumesAttach) *PcloudV2PvminstancesVolumesPostParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the pcloud v2 pvminstances volumes post params +func (o *PcloudV2PvminstancesVolumesPostParams) SetBody(body *models.VolumesAttach) { + o.Body = body +} + +// WithCloudInstanceID adds the cloudInstanceID to the pcloud v2 pvminstances volumes post params +func (o *PcloudV2PvminstancesVolumesPostParams) WithCloudInstanceID(cloudInstanceID string) *PcloudV2PvminstancesVolumesPostParams { + o.SetCloudInstanceID(cloudInstanceID) + return o +} + +// SetCloudInstanceID adds the cloudInstanceId to the pcloud v2 pvminstances volumes post params +func (o *PcloudV2PvminstancesVolumesPostParams) SetCloudInstanceID(cloudInstanceID string) { + o.CloudInstanceID = cloudInstanceID +} + +// WithPvmInstanceID adds the pvmInstanceID to the pcloud v2 pvminstances volumes post params +func (o *PcloudV2PvminstancesVolumesPostParams) WithPvmInstanceID(pvmInstanceID string) *PcloudV2PvminstancesVolumesPostParams { + o.SetPvmInstanceID(pvmInstanceID) + return o +} + +// SetPvmInstanceID adds the pvmInstanceId to the pcloud v2 pvminstances volumes post params +func (o *PcloudV2PvminstancesVolumesPostParams) SetPvmInstanceID(pvmInstanceID string) { + o.PvmInstanceID = pvmInstanceID +} + +// WriteToRequest writes these params to a swagger request +func (o *PcloudV2PvminstancesVolumesPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloud_instance_id + if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { + return err + } + + // path param pvm_instance_id + if err := r.SetPathParam("pvm_instance_id", o.PvmInstanceID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go new file mode 100644 index 00000000000..8bb8725272e --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go @@ -0,0 +1,211 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_volumes + +// 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/IBM-Cloud/power-go-client/power/models" +) + +// PcloudV2PvminstancesVolumesPostReader is a Reader for the PcloudV2PvminstancesVolumesPost structure. +type PcloudV2PvminstancesVolumesPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PcloudV2PvminstancesVolumesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + + case 202: + result := NewPcloudV2PvminstancesVolumesPostAccepted() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + case 400: + result := NewPcloudV2PvminstancesVolumesPostBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 401: + result := NewPcloudV2PvminstancesVolumesPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 404: + result := NewPcloudV2PvminstancesVolumesPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + case 500: + result := NewPcloudV2PvminstancesVolumesPostInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPcloudV2PvminstancesVolumesPostAccepted creates a PcloudV2PvminstancesVolumesPostAccepted with default headers values +func NewPcloudV2PvminstancesVolumesPostAccepted() *PcloudV2PvminstancesVolumesPostAccepted { + return &PcloudV2PvminstancesVolumesPostAccepted{} +} + +/*PcloudV2PvminstancesVolumesPostAccepted handles this case with default header values. + +Accepted +*/ +type PcloudV2PvminstancesVolumesPostAccepted struct { + Payload *models.VolumesAttachmentResponse +} + +func (o *PcloudV2PvminstancesVolumesPostAccepted) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostAccepted %+v", 202, o.Payload) +} + +func (o *PcloudV2PvminstancesVolumesPostAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.VolumesAttachmentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPcloudV2PvminstancesVolumesPostBadRequest creates a PcloudV2PvminstancesVolumesPostBadRequest with default headers values +func NewPcloudV2PvminstancesVolumesPostBadRequest() *PcloudV2PvminstancesVolumesPostBadRequest { + return &PcloudV2PvminstancesVolumesPostBadRequest{} +} + +/*PcloudV2PvminstancesVolumesPostBadRequest handles this case with default header values. + +Bad Request +*/ +type PcloudV2PvminstancesVolumesPostBadRequest struct { + Payload *models.Error +} + +func (o *PcloudV2PvminstancesVolumesPostBadRequest) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudV2PvminstancesVolumesPostBadRequest) 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 +} + +// NewPcloudV2PvminstancesVolumesPostUnauthorized creates a PcloudV2PvminstancesVolumesPostUnauthorized with default headers values +func NewPcloudV2PvminstancesVolumesPostUnauthorized() *PcloudV2PvminstancesVolumesPostUnauthorized { + return &PcloudV2PvminstancesVolumesPostUnauthorized{} +} + +/*PcloudV2PvminstancesVolumesPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudV2PvminstancesVolumesPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudV2PvminstancesVolumesPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudV2PvminstancesVolumesPostUnauthorized) 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 +} + +// NewPcloudV2PvminstancesVolumesPostNotFound creates a PcloudV2PvminstancesVolumesPostNotFound with default headers values +func NewPcloudV2PvminstancesVolumesPostNotFound() *PcloudV2PvminstancesVolumesPostNotFound { + return &PcloudV2PvminstancesVolumesPostNotFound{} +} + +/*PcloudV2PvminstancesVolumesPostNotFound handles this case with default header values. + +Not Found +*/ +type PcloudV2PvminstancesVolumesPostNotFound struct { + Payload *models.Error +} + +func (o *PcloudV2PvminstancesVolumesPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudV2PvminstancesVolumesPostNotFound) 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 +} + +// NewPcloudV2PvminstancesVolumesPostInternalServerError creates a PcloudV2PvminstancesVolumesPostInternalServerError with default headers values +func NewPcloudV2PvminstancesVolumesPostInternalServerError() *PcloudV2PvminstancesVolumesPostInternalServerError { + return &PcloudV2PvminstancesVolumesPostInternalServerError{} +} + +/*PcloudV2PvminstancesVolumesPostInternalServerError handles this case with default header values. + +Internal Server Error +*/ +type PcloudV2PvminstancesVolumesPostInternalServerError struct { + Payload *models.Error +} + +func (o *PcloudV2PvminstancesVolumesPostInternalServerError) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostInternalServerError %+v", 500, o.Payload) +} + +func (o *PcloudV2PvminstancesVolumesPostInternalServerError) 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/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go index ea8769645e4..24bb6d00f61 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go @@ -39,6 +39,13 @@ func (o *PcloudV2VolumesClonePostReader) ReadResponse(response runtime.ClientRes } return nil, result + case 401: + result := NewPcloudV2VolumesClonePostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudV2VolumesClonePostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudV2VolumesClonePostBadRequest) readResponse(response runtime.Clien return nil } +// NewPcloudV2VolumesClonePostUnauthorized creates a PcloudV2VolumesClonePostUnauthorized with default headers values +func NewPcloudV2VolumesClonePostUnauthorized() *PcloudV2VolumesClonePostUnauthorized { + return &PcloudV2VolumesClonePostUnauthorized{} +} + +/*PcloudV2VolumesClonePostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudV2VolumesClonePostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudV2VolumesClonePostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudV2VolumesClonePostUnauthorized) 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 +} + // NewPcloudV2VolumesClonePostNotFound creates a PcloudV2VolumesClonePostNotFound with default headers values func NewPcloudV2VolumesClonePostNotFound() *PcloudV2VolumesClonePostNotFound { return &PcloudV2VolumesClonePostNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go index ecb1be0fccd..bbba347e5fb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudV2VolumesClonetasksGetReader) ReadResponse(response runtime.Clien } return nil, result + case 401: + result := NewPcloudV2VolumesClonetasksGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudV2VolumesClonetasksGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -123,6 +130,35 @@ func (o *PcloudV2VolumesClonetasksGetBadRequest) readResponse(response runtime.C return nil } +// NewPcloudV2VolumesClonetasksGetUnauthorized creates a PcloudV2VolumesClonetasksGetUnauthorized with default headers values +func NewPcloudV2VolumesClonetasksGetUnauthorized() *PcloudV2VolumesClonetasksGetUnauthorized { + return &PcloudV2VolumesClonetasksGetUnauthorized{} +} + +/*PcloudV2VolumesClonetasksGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudV2VolumesClonetasksGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudV2VolumesClonetasksGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudV2VolumesClonetasksGetUnauthorized) 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 +} + // NewPcloudV2VolumesClonetasksGetNotFound creates a PcloudV2VolumesClonetasksGetNotFound with default headers values func NewPcloudV2VolumesClonetasksGetNotFound() *PcloudV2VolumesClonetasksGetNotFound { return &PcloudV2VolumesClonetasksGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go index a63631c660d..69414ddb588 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go @@ -39,6 +39,13 @@ func (o *PcloudV2VolumesPostReader) ReadResponse(response runtime.ClientResponse } return nil, result + case 401: + result := NewPcloudV2VolumesPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: result := NewPcloudV2VolumesPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -46,6 +53,13 @@ func (o *PcloudV2VolumesPostReader) ReadResponse(response runtime.ClientResponse } return nil, result + case 422: + result := NewPcloudV2VolumesPostUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: result := NewPcloudV2VolumesPostInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +130,35 @@ func (o *PcloudV2VolumesPostBadRequest) readResponse(response runtime.ClientResp return nil } +// NewPcloudV2VolumesPostUnauthorized creates a PcloudV2VolumesPostUnauthorized with default headers values +func NewPcloudV2VolumesPostUnauthorized() *PcloudV2VolumesPostUnauthorized { + return &PcloudV2VolumesPostUnauthorized{} +} + +/*PcloudV2VolumesPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudV2VolumesPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudV2VolumesPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudV2VolumesPostUnauthorized) 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 +} + // NewPcloudV2VolumesPostConflict creates a PcloudV2VolumesPostConflict with default headers values func NewPcloudV2VolumesPostConflict() *PcloudV2VolumesPostConflict { return &PcloudV2VolumesPostConflict{} @@ -145,6 +188,35 @@ func (o *PcloudV2VolumesPostConflict) readResponse(response runtime.ClientRespon return nil } +// NewPcloudV2VolumesPostUnprocessableEntity creates a PcloudV2VolumesPostUnprocessableEntity with default headers values +func NewPcloudV2VolumesPostUnprocessableEntity() *PcloudV2VolumesPostUnprocessableEntity { + return &PcloudV2VolumesPostUnprocessableEntity{} +} + +/*PcloudV2VolumesPostUnprocessableEntity handles this case with default header values. + +Unprocessable Entity +*/ +type PcloudV2VolumesPostUnprocessableEntity struct { + Payload *models.Error +} + +func (o *PcloudV2VolumesPostUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PcloudV2VolumesPostUnprocessableEntity) 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 +} + // NewPcloudV2VolumesPostInternalServerError creates a PcloudV2VolumesPostInternalServerError with default headers values func NewPcloudV2VolumesPostInternalServerError() *PcloudV2VolumesPostInternalServerError { return &PcloudV2VolumesPostInternalServerError{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go index 258338e7507..74547a7b7c2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go @@ -32,6 +32,13 @@ func (o *PcloudV2VolumescloneCancelPostReader) ReadResponse(response runtime.Cli } return result, nil + case 401: + result := NewPcloudV2VolumescloneCancelPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudV2VolumescloneCancelPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -80,6 +87,35 @@ func (o *PcloudV2VolumescloneCancelPostAccepted) readResponse(response runtime.C return nil } +// NewPcloudV2VolumescloneCancelPostUnauthorized creates a PcloudV2VolumescloneCancelPostUnauthorized with default headers values +func NewPcloudV2VolumescloneCancelPostUnauthorized() *PcloudV2VolumescloneCancelPostUnauthorized { + return &PcloudV2VolumescloneCancelPostUnauthorized{} +} + +/*PcloudV2VolumescloneCancelPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudV2VolumescloneCancelPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudV2VolumescloneCancelPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudV2VolumescloneCancelPostUnauthorized) 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 +} + // NewPcloudV2VolumescloneCancelPostNotFound creates a PcloudV2VolumescloneCancelPostNotFound with default headers values func NewPcloudV2VolumescloneCancelPostNotFound() *PcloudV2VolumescloneCancelPostNotFound { return &PcloudV2VolumescloneCancelPostNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go index f16230f29a7..3869fc69779 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go @@ -39,6 +39,13 @@ func (o *PcloudV2VolumescloneDeleteReader) ReadResponse(response runtime.ClientR } return nil, result + case 401: + result := NewPcloudV2VolumescloneDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudV2VolumescloneDeleteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +121,35 @@ func (o *PcloudV2VolumescloneDeleteBadRequest) readResponse(response runtime.Cli return nil } +// NewPcloudV2VolumescloneDeleteUnauthorized creates a PcloudV2VolumescloneDeleteUnauthorized with default headers values +func NewPcloudV2VolumescloneDeleteUnauthorized() *PcloudV2VolumescloneDeleteUnauthorized { + return &PcloudV2VolumescloneDeleteUnauthorized{} +} + +/*PcloudV2VolumescloneDeleteUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudV2VolumescloneDeleteUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudV2VolumescloneDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudV2VolumescloneDeleteUnauthorized) 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 +} + // NewPcloudV2VolumescloneDeleteNotFound creates a PcloudV2VolumescloneDeleteNotFound with default headers values func NewPcloudV2VolumescloneDeleteNotFound() *PcloudV2VolumescloneDeleteNotFound { return &PcloudV2VolumescloneDeleteNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go index 54efc768ad3..d2cb004a62e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go @@ -39,6 +39,13 @@ func (o *PcloudV2VolumescloneExecutePostReader) ReadResponse(response runtime.Cl } return nil, result + case 401: + result := NewPcloudV2VolumescloneExecutePostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudV2VolumescloneExecutePostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudV2VolumescloneExecutePostBadRequest) readResponse(response runtim return nil } +// NewPcloudV2VolumescloneExecutePostUnauthorized creates a PcloudV2VolumescloneExecutePostUnauthorized with default headers values +func NewPcloudV2VolumescloneExecutePostUnauthorized() *PcloudV2VolumescloneExecutePostUnauthorized { + return &PcloudV2VolumescloneExecutePostUnauthorized{} +} + +/*PcloudV2VolumescloneExecutePostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudV2VolumescloneExecutePostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudV2VolumescloneExecutePostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudV2VolumescloneExecutePostUnauthorized) 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 +} + // NewPcloudV2VolumescloneExecutePostNotFound creates a PcloudV2VolumescloneExecutePostNotFound with default headers values func NewPcloudV2VolumescloneExecutePostNotFound() *PcloudV2VolumescloneExecutePostNotFound { return &PcloudV2VolumescloneExecutePostNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go index 8122b8b9d79..7de160af61d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go @@ -39,6 +39,13 @@ func (o *PcloudV2VolumescloneGetReader) ReadResponse(response runtime.ClientResp } return nil, result + case 401: + result := NewPcloudV2VolumescloneGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudV2VolumescloneGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudV2VolumescloneGetBadRequest) readResponse(response runtime.Client return nil } +// NewPcloudV2VolumescloneGetUnauthorized creates a PcloudV2VolumescloneGetUnauthorized with default headers values +func NewPcloudV2VolumescloneGetUnauthorized() *PcloudV2VolumescloneGetUnauthorized { + return &PcloudV2VolumescloneGetUnauthorized{} +} + +/*PcloudV2VolumescloneGetUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudV2VolumescloneGetUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudV2VolumescloneGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudV2VolumescloneGetUnauthorized) 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 +} + // NewPcloudV2VolumescloneGetNotFound creates a PcloudV2VolumescloneGetNotFound with default headers values func NewPcloudV2VolumescloneGetNotFound() *PcloudV2VolumescloneGetNotFound { return &PcloudV2VolumescloneGetNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go index dcf41fb26ac..e641fecd1bf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go @@ -39,6 +39,13 @@ func (o *PcloudV2VolumescloneGetallReader) ReadResponse(response runtime.ClientR } return nil, result + case 401: + result := NewPcloudV2VolumescloneGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudV2VolumescloneGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudV2VolumescloneGetallBadRequest) readResponse(response runtime.Cli return nil } +// NewPcloudV2VolumescloneGetallUnauthorized creates a PcloudV2VolumescloneGetallUnauthorized with default headers values +func NewPcloudV2VolumescloneGetallUnauthorized() *PcloudV2VolumescloneGetallUnauthorized { + return &PcloudV2VolumescloneGetallUnauthorized{} +} + +/*PcloudV2VolumescloneGetallUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudV2VolumescloneGetallUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudV2VolumescloneGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudV2VolumescloneGetallUnauthorized) 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 +} + // NewPcloudV2VolumescloneGetallNotFound creates a PcloudV2VolumescloneGetallNotFound with default headers values func NewPcloudV2VolumescloneGetallNotFound() *PcloudV2VolumescloneGetallNotFound { return &PcloudV2VolumescloneGetallNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go index 0a26fb0797a..027b2c16d59 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go @@ -39,6 +39,13 @@ func (o *PcloudV2VolumesclonePostReader) ReadResponse(response runtime.ClientRes } return nil, result + case 401: + result := NewPcloudV2VolumesclonePostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: result := NewPcloudV2VolumesclonePostForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -123,6 +130,35 @@ func (o *PcloudV2VolumesclonePostBadRequest) readResponse(response runtime.Clien return nil } +// NewPcloudV2VolumesclonePostUnauthorized creates a PcloudV2VolumesclonePostUnauthorized with default headers values +func NewPcloudV2VolumesclonePostUnauthorized() *PcloudV2VolumesclonePostUnauthorized { + return &PcloudV2VolumesclonePostUnauthorized{} +} + +/*PcloudV2VolumesclonePostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudV2VolumesclonePostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudV2VolumesclonePostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudV2VolumesclonePostUnauthorized) 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 +} + // NewPcloudV2VolumesclonePostForbidden creates a PcloudV2VolumesclonePostForbidden with default headers values func NewPcloudV2VolumesclonePostForbidden() *PcloudV2VolumesclonePostForbidden { return &PcloudV2VolumesclonePostForbidden{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go index 4848db18761..3024d07f293 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go @@ -32,6 +32,13 @@ func (o *PcloudV2VolumescloneStartPostReader) ReadResponse(response runtime.Clie } return result, nil + case 401: + result := NewPcloudV2VolumescloneStartPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: result := NewPcloudV2VolumescloneStartPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -80,6 +87,35 @@ func (o *PcloudV2VolumescloneStartPostOK) readResponse(response runtime.ClientRe return nil } +// NewPcloudV2VolumescloneStartPostUnauthorized creates a PcloudV2VolumescloneStartPostUnauthorized with default headers values +func NewPcloudV2VolumescloneStartPostUnauthorized() *PcloudV2VolumescloneStartPostUnauthorized { + return &PcloudV2VolumescloneStartPostUnauthorized{} +} + +/*PcloudV2VolumescloneStartPostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudV2VolumescloneStartPostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudV2VolumescloneStartPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudV2VolumescloneStartPostUnauthorized) 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 +} + // NewPcloudV2VolumescloneStartPostNotFound creates a PcloudV2VolumescloneStartPostNotFound with default headers values func NewPcloudV2VolumescloneStartPostNotFound() *PcloudV2VolumescloneStartPostNotFound { return &PcloudV2VolumescloneStartPostNotFound{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go index ea9f31799ea..261be98dccf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go @@ -39,6 +39,13 @@ func (o *PcloudVolumesClonePostReader) ReadResponse(response runtime.ClientRespo } return nil, result + case 401: + result := NewPcloudVolumesClonePostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: result := NewPcloudVolumesClonePostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +123,35 @@ func (o *PcloudVolumesClonePostBadRequest) readResponse(response runtime.ClientR return nil } +// NewPcloudVolumesClonePostUnauthorized creates a PcloudVolumesClonePostUnauthorized with default headers values +func NewPcloudVolumesClonePostUnauthorized() *PcloudVolumesClonePostUnauthorized { + return &PcloudVolumesClonePostUnauthorized{} +} + +/*PcloudVolumesClonePostUnauthorized handles this case with default header values. + +Unauthorized +*/ +type PcloudVolumesClonePostUnauthorized struct { + Payload *models.Error +} + +func (o *PcloudVolumesClonePostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudVolumesClonePostUnauthorized) 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 +} + // NewPcloudVolumesClonePostConflict creates a PcloudVolumesClonePostConflict with default headers values func NewPcloudVolumesClonePostConflict() *PcloudVolumesClonePostConflict { return &PcloudVolumesClonePostConflict{} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_iaas_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_iaas_client.go index 71edfb8da01..743659404dc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_iaas_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_iaas_client.go @@ -23,6 +23,7 @@ import ( "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances" + "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity" @@ -104,6 +105,8 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PowerIaas cli.PCloudPVMInstances = p_cloud_p_vm_instances.New(transport, formats) + cli.PCloudPlacementGroups = p_cloud_placement_groups.New(transport, formats) + cli.PCloudSAP = p_cloud_s_a_p.New(transport, formats) cli.PCloudSnapshots = p_cloud_snapshots.New(transport, formats) @@ -196,6 +199,8 @@ type PowerIaas struct { PCloudPVMInstances *p_cloud_p_vm_instances.Client + PCloudPlacementGroups *p_cloud_placement_groups.Client + PCloudSAP *p_cloud_s_a_p.Client PCloudSnapshots *p_cloud_snapshots.Client @@ -251,6 +256,8 @@ func (c *PowerIaas) SetTransport(transport runtime.ClientTransport) { c.PCloudPVMInstances.SetTransport(transport) + c.PCloudPlacementGroups.SetTransport(transport) + c.PCloudSAP.SetTransport(transport) c.PCloudSnapshots.SetTransport(transport) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create.go index 25d7a4c44e5..22f566f4e84 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create.go @@ -6,6 +6,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/errors" @@ -18,7 +20,7 @@ import ( type CloudConnectionCreate struct { // classic - Classic *CloudConnectionEndpointClassic `json:"classic,omitempty"` + Classic *CloudConnectionEndpointClassicUpdate `json:"classic,omitempty"` // enable global routing for this cloud connection (default=false) GlobalRouting bool `json:"globalRouting,omitempty"` @@ -32,8 +34,12 @@ type CloudConnectionCreate struct { // speed of the cloud connection (speed in megabits per second) // Required: true + // Enum: [50 100 200 500 1000 2000 5000 10000] Speed *int64 `json:"speed"` + // list of subnets to attach to cloud connection + Subnets []string `json:"subnets"` + // vpc Vpc *CloudConnectionEndpointVPC `json:"vpc,omitempty"` } @@ -91,12 +97,37 @@ func (m *CloudConnectionCreate) validateName(formats strfmt.Registry) error { return nil } +var cloudConnectionCreateTypeSpeedPropEnum []interface{} + +func init() { + var res []int64 + if err := json.Unmarshal([]byte(`[50,100,200,500,1000,2000,5000,10000]`), &res); err != nil { + panic(err) + } + for _, v := range res { + cloudConnectionCreateTypeSpeedPropEnum = append(cloudConnectionCreateTypeSpeedPropEnum, v) + } +} + +// prop value enum +func (m *CloudConnectionCreate) validateSpeedEnum(path, location string, value int64) error { + if err := validate.Enum(path, location, value, cloudConnectionCreateTypeSpeedPropEnum); err != nil { + return err + } + return nil +} + func (m *CloudConnectionCreate) validateSpeed(formats strfmt.Registry) error { if err := validate.Required("speed", "body", m.Speed); err != nil { return err } + // value enum + if err := m.validateSpeedEnum("speed", "body", *m.Speed); err != nil { + return err + } + return nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic.go index 74b1c934f48..3ff28f5b938 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic.go @@ -20,7 +20,7 @@ type CloudConnectionEndpointClassic struct { Enabled bool `json:"enabled"` // gre - Gre *CloudConnectionEndpointGRE `json:"gre,omitempty"` + Gre *CloudConnectionGRETunnel `json:"gre,omitempty"` } // Validate validates this cloud connection endpoint classic diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic_update.go new file mode 100644 index 00000000000..97a3ad65d04 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic_update.go @@ -0,0 +1,74 @@ +// 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 ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" +) + +// CloudConnectionEndpointClassicUpdate cloud connection endpoint classic update +// swagger:model CloudConnectionEndpointClassicUpdate +type CloudConnectionEndpointClassicUpdate struct { + + // enable classic endpoint destination (default=false) + Enabled bool `json:"enabled"` + + // gre + Gre *CloudConnectionGRETunnelCreate `json:"gre,omitempty"` +} + +// Validate validates this cloud connection endpoint classic update +func (m *CloudConnectionEndpointClassicUpdate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGre(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CloudConnectionEndpointClassicUpdate) validateGre(formats strfmt.Registry) error { + + if swag.IsZero(m.Gre) { // not required + return nil + } + + if m.Gre != nil { + if err := m.Gre.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("gre") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CloudConnectionEndpointClassicUpdate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CloudConnectionEndpointClassicUpdate) UnmarshalBinary(b []byte) error { + var res CloudConnectionEndpointClassicUpdate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_g_r_e.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_g_r_e.go deleted file mode 100644 index 19d235a6d7c..00000000000 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_g_r_e.go +++ /dev/null @@ -1,83 +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 ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// CloudConnectionEndpointGRE cloud connection endpoint g r e -// swagger:model CloudConnectionEndpointGRE -type CloudConnectionEndpointGRE struct { - - // enable gre for this cloud connection (default=false) - Enabled bool `json:"enabled,omitempty"` - - // gre tunnels configured - Tunnels []*CloudConnectionGRETunnel `json:"tunnels"` -} - -// Validate validates this cloud connection endpoint g r e -func (m *CloudConnectionEndpointGRE) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTunnels(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudConnectionEndpointGRE) validateTunnels(formats strfmt.Registry) error { - - if swag.IsZero(m.Tunnels) { // not required - return nil - } - - for i := 0; i < len(m.Tunnels); i++ { - if swag.IsZero(m.Tunnels[i]) { // not required - continue - } - - if m.Tunnels[i] != nil { - if err := m.Tunnels[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tunnels" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudConnectionEndpointGRE) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudConnectionEndpointGRE) UnmarshalBinary(b []byte) error { - var res CloudConnectionEndpointGRE - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_g_r_e_tunnel.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_g_r_e_tunnel.go index 2775719391e..8a41269bf46 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_g_r_e_tunnel.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_g_r_e_tunnel.go @@ -17,27 +17,24 @@ import ( // swagger:model CloudConnectionGRETunnel type CloudConnectionGRETunnel struct { - // gre network in CIDR notation (192.168.0.0/24) - // Required: true - Cidr *string `json:"cidr"` - // gre destination IP address // Required: true DestIPAddress *string `json:"destIPAddress"` // gre auto-assigned source IP address - SourceIPAddress string `json:"sourceIPAddress,omitempty"` + // Required: true + SourceIPAddress *string `json:"sourceIPAddress"` } // Validate validates this cloud connection g r e tunnel func (m *CloudConnectionGRETunnel) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateCidr(formats); err != nil { + if err := m.validateDestIPAddress(formats); err != nil { res = append(res, err) } - if err := m.validateDestIPAddress(formats); err != nil { + if err := m.validateSourceIPAddress(formats); err != nil { res = append(res, err) } @@ -47,18 +44,18 @@ func (m *CloudConnectionGRETunnel) Validate(formats strfmt.Registry) error { return nil } -func (m *CloudConnectionGRETunnel) validateCidr(formats strfmt.Registry) error { +func (m *CloudConnectionGRETunnel) validateDestIPAddress(formats strfmt.Registry) error { - if err := validate.Required("cidr", "body", m.Cidr); err != nil { + if err := validate.Required("destIPAddress", "body", m.DestIPAddress); err != nil { return err } return nil } -func (m *CloudConnectionGRETunnel) validateDestIPAddress(formats strfmt.Registry) error { +func (m *CloudConnectionGRETunnel) validateSourceIPAddress(formats strfmt.Registry) error { - if err := validate.Required("destIPAddress", "body", m.DestIPAddress); err != nil { + if err := validate.Required("sourceIPAddress", "body", m.SourceIPAddress); err != nil { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_g_r_e_tunnel_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_g_r_e_tunnel_create.go new file mode 100644 index 00000000000..7ad4526cb91 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_g_r_e_tunnel_create.go @@ -0,0 +1,81 @@ +// 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 ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// CloudConnectionGRETunnelCreate cloud connection g r e tunnel create +// swagger:model CloudConnectionGRETunnelCreate +type CloudConnectionGRETunnelCreate struct { + + // gre network in CIDR notation (192.168.0.0/24) + // Required: true + Cidr *string `json:"cidr"` + + // gre destination IP address + // Required: true + DestIPAddress *string `json:"destIPAddress"` +} + +// Validate validates this cloud connection g r e tunnel create +func (m *CloudConnectionGRETunnelCreate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCidr(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDestIPAddress(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CloudConnectionGRETunnelCreate) validateCidr(formats strfmt.Registry) error { + + if err := validate.Required("cidr", "body", m.Cidr); err != nil { + return err + } + + return nil +} + +func (m *CloudConnectionGRETunnelCreate) validateDestIPAddress(formats strfmt.Registry) error { + + if err := validate.Required("destIPAddress", "body", m.DestIPAddress); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CloudConnectionGRETunnelCreate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CloudConnectionGRETunnelCreate) UnmarshalBinary(b []byte) error { + var res CloudConnectionGRETunnelCreate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_speed.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_speed.go new file mode 100644 index 00000000000..8ff04b5289a --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_speed.go @@ -0,0 +1,54 @@ +// 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 ( + "encoding/json" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/validate" +) + +// CloudConnectionSpeed cloud connection speed +// swagger:model CloudConnectionSpeed +type CloudConnectionSpeed int64 + +// for schema +var cloudConnectionSpeedEnum []interface{} + +func init() { + var res []CloudConnectionSpeed + if err := json.Unmarshal([]byte(`[50,100,200,500,1000,2000,5000,10000]`), &res); err != nil { + panic(err) + } + for _, v := range res { + cloudConnectionSpeedEnum = append(cloudConnectionSpeedEnum, v) + } +} + +func (m CloudConnectionSpeed) validateCloudConnectionSpeedEnum(path, location string, value CloudConnectionSpeed) error { + if err := validate.Enum(path, location, value, cloudConnectionSpeedEnum); err != nil { + return err + } + return nil +} + +// Validate validates this cloud connection speed +func (m CloudConnectionSpeed) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateCloudConnectionSpeedEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_update.go index 070758a2be9..bcb428800f2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_update.go @@ -6,10 +6,13 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/errors" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // CloudConnectionUpdate cloud connection update @@ -17,7 +20,7 @@ import ( type CloudConnectionUpdate struct { // classic - Classic *CloudConnectionEndpointClassic `json:"classic,omitempty"` + Classic *CloudConnectionEndpointClassicUpdate `json:"classic,omitempty"` // enable global routing for this cloud connection (default=false) GlobalRouting *bool `json:"globalRouting,omitempty"` @@ -29,6 +32,7 @@ type CloudConnectionUpdate struct { Name *string `json:"name,omitempty"` // speed of the cloud connection (speed in megabits per second) + // Enum: [50 100 200 500 1000 2000 5000 10000] Speed *int64 `json:"speed,omitempty"` // vpc @@ -43,6 +47,10 @@ func (m *CloudConnectionUpdate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSpeed(formats); err != nil { + res = append(res, err) + } + if err := m.validateVpc(formats); err != nil { res = append(res, err) } @@ -71,6 +79,40 @@ func (m *CloudConnectionUpdate) validateClassic(formats strfmt.Registry) error { return nil } +var cloudConnectionUpdateTypeSpeedPropEnum []interface{} + +func init() { + var res []int64 + if err := json.Unmarshal([]byte(`[50,100,200,500,1000,2000,5000,10000]`), &res); err != nil { + panic(err) + } + for _, v := range res { + cloudConnectionUpdateTypeSpeedPropEnum = append(cloudConnectionUpdateTypeSpeedPropEnum, v) + } +} + +// prop value enum +func (m *CloudConnectionUpdate) validateSpeedEnum(path, location string, value int64) error { + if err := validate.Enum(path, location, value, cloudConnectionUpdateTypeSpeedPropEnum); err != nil { + return err + } + return nil +} + +func (m *CloudConnectionUpdate) validateSpeed(formats strfmt.Registry) error { + + if swag.IsZero(m.Speed) { // not required + return nil + } + + // value enum + if err := m.validateSpeedEnum("speed", "body", *m.Speed); err != nil { + return err + } + + return nil +} + func (m *CloudConnectionUpdate) validateVpc(formats strfmt.Registry) error { if swag.IsZero(m.Vpc) { // not required diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_virtual_private_clouds.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_virtual_private_clouds.go index fbda0226f87..edd49910152 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_virtual_private_clouds.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_virtual_private_clouds.go @@ -85,6 +85,10 @@ func (m *CloudConnectionVirtualPrivateClouds) UnmarshalBinary(b []byte) error { // swagger:model CloudConnectionVirtualPrivateCloud type CloudConnectionVirtualPrivateCloud struct { + // indicates if vpc uses classic architecture + // Required: true + ClassicAccess *bool `json:"classicAccess"` + // name for the vpc // Required: true Name *string `json:"name"` @@ -102,6 +106,10 @@ type CloudConnectionVirtualPrivateCloud struct { func (m *CloudConnectionVirtualPrivateCloud) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateClassicAccess(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -120,6 +128,15 @@ func (m *CloudConnectionVirtualPrivateCloud) Validate(formats strfmt.Registry) e return nil } +func (m *CloudConnectionVirtualPrivateCloud) validateClassicAccess(formats strfmt.Registry) error { + + if err := validate.Required("classicAccess", "body", m.ClassicAccess); err != nil { + return err + } + + return nil +} + func (m *CloudConnectionVirtualPrivateCloud) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_data_volume.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_data_volume.go index d5b8545fdb6..8c1a4a6e6d6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_data_volume.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_data_volume.go @@ -19,16 +19,22 @@ import ( // swagger:model CreateDataVolume type CreateDataVolume struct { - // PVM Instance (ID or Name) to base volume affinity policy against; required if affinityPolicy is provided and affinityVolume is not provided + // PVM Instance (ID or Name) to base volume affinity policy against; required if requesting affinity and affinityVolume is not provided AffinityPVMInstance *string `json:"affinityPVMInstance,omitempty"` - // Affinity policy for data volume being created; requires affinityPVMInstance or affinityVolume to be specified; ignored if volumePool provided + // Affinity policy for data volume being created; ignored if volumePool provided; for policy affinity requires one of affinityPVMInstance or affinityVolume to be specified; for policy anti-affinity requires one of antiAffinityPVMInstances or antiAffinityVolumes to be specified // Enum: [affinity anti-affinity] AffinityPolicy *string `json:"affinityPolicy,omitempty"` - // Volume (ID or Name) to base volume affinity policy against; required if affinityPolicy is provided and affinityPVMInstance is not provided + // Volume (ID or Name) to base volume affinity policy against; required if requesting affinity and affinityPVMInstance is not provided AffinityVolume *string `json:"affinityVolume,omitempty"` + // List of pvmInstances to base volume anti-affinity policy against; required if requesting anti-affinity and antiAffinityVolumes is not provided + AntiAffinityPVMInstances []string `json:"antiAffinityPVMInstances"` + + // List of volumes to base volume anti-affinity policy against; required if requesting anti-affinity and antiAffinityPVMInstances is not provided + AntiAffinityVolumes []string `json:"antiAffinityVolumes"` + // Type of Disk, required if affinityPolicy and volumePool not provided, otherwise ignored DiskType string `json:"diskType,omitempty"` diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_image.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_image.go index 080f1d1fa15..165bf9963e4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_image.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_image.go @@ -25,7 +25,7 @@ type CreateImage struct { // Cloud Storage bucket name; bucket-name[/optional/folder]; required for import image BucketName string `json:"bucketName,omitempty"` - // Type of Disk + // Type of Disk; will be ignored if storagePool or affinityPolicy is provided DiskType string `json:"diskType,omitempty"` // Cloud Storage image filename; required for import image @@ -54,6 +54,12 @@ type CreateImage struct { // Required: true // Enum: [root-project url] Source *string `json:"source"` + + // The storage affinity data + StorageAffinity *StorageAffinity `json:"storageAffinity,omitempty"` + + // Storage pool where the image will be loaded, used only when importing an image from cloud storage; If provided then affinityPolicy and diskType will be ignored + StoragePool string `json:"storagePool,omitempty"` } // Validate validates this create image @@ -68,6 +74,10 @@ func (m *CreateImage) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStorageAffinity(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -166,6 +176,24 @@ func (m *CreateImage) validateSource(formats strfmt.Registry) error { return nil } +func (m *CreateImage) validateStorageAffinity(formats strfmt.Registry) error { + + if swag.IsZero(m.StorageAffinity) { // not required + return nil + } + + if m.StorageAffinity != nil { + if err := m.StorageAffinity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storageAffinity") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *CreateImage) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/multi_volumes_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/multi_volumes_create.go index c6d33d68dea..2fa3ffc2203 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/multi_volumes_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/multi_volumes_create.go @@ -19,16 +19,22 @@ import ( // swagger:model MultiVolumesCreate type MultiVolumesCreate struct { - // PVM Instance (ID or Name)to base volume affinity policy against; required if affinityPolicy is provided and affinityVolume is not provided + // PVM Instance (ID or Name)to base volume affinity policy against; required if requesting affinity and affinityVolume is not provided AffinityPVMInstance *string `json:"affinityPVMInstance,omitempty"` - // Affinity policy for data volume being created; requires affinityPVMInstance or affinityVolume to be specified; ignored if volumePool provided + // Affinity policy for data volume being created; ignored if volumePool provided; for policy affinity requires one of affinityPVMInstance or affinityVolume to be specified; for policy anti-affinity requires one of antiAffinityPVMInstances or antiAffinityVolumes to be specified // Enum: [affinity anti-affinity] AffinityPolicy *string `json:"affinityPolicy,omitempty"` - // Volume (ID or Name) to base volume affinity policy against; required if affinityPolicy is provided and affinityPVMInstance is not provided + // Volume (ID or Name) to base volume affinity policy against; required if requesting affinity and affinityPVMInstance is not provided AffinityVolume *string `json:"affinityVolume,omitempty"` + // List of pvmInstances to base volume anti-affinity policy against; required if requesting anti-affinity and antiAffinityVolumes is not provided + AntiAffinityPVMInstances []string `json:"antiAffinityPVMInstances"` + + // List of volumes to base volume anti-affinity policy against; required if requesting anti-affinity and antiAffinityPVMInstances is not provided + AntiAffinityVolumes []string `json:"antiAffinityVolumes"` + // Number of volumes to create Count int64 `json:"count,omitempty"` diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/owner_info.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/owner_info.go index 021980fa029..fecd20461bb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/owner_info.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/owner_info.go @@ -6,6 +6,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( + "strconv" + strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/errors" @@ -41,10 +43,13 @@ type OwnerInfo struct { // Required: true Name *string `json:"name"` - // Array of Soft Layer IDs - // Required: true + // (deprecated - replaced by softlayerSubscriptions) Array of Soft Layer IDs SoftlayerIds []string `json:"softlayerIDs"` + // Array of softlayer subscriptions + // Required: true + SoftlayerSubscriptions []*SoftlayerSubscription `json:"softlayerSubscriptions"` + // User id of user // Required: true UserID *string `json:"userID"` @@ -78,7 +83,7 @@ func (m *OwnerInfo) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateSoftlayerIds(formats); err != nil { + if err := m.validateSoftlayerSubscriptions(formats); err != nil { res = append(res, err) } @@ -146,12 +151,28 @@ func (m *OwnerInfo) validateName(formats strfmt.Registry) error { return nil } -func (m *OwnerInfo) validateSoftlayerIds(formats strfmt.Registry) error { +func (m *OwnerInfo) validateSoftlayerSubscriptions(formats strfmt.Registry) error { - if err := validate.Required("softlayerIDs", "body", m.SoftlayerIds); err != nil { + if err := validate.Required("softlayerSubscriptions", "body", m.SoftlayerSubscriptions); err != nil { return err } + for i := 0; i < len(m.SoftlayerSubscriptions); i++ { + if swag.IsZero(m.SoftlayerSubscriptions[i]) { // not required + continue + } + + if m.SoftlayerSubscriptions[i] != nil { + if err := m.SoftlayerSubscriptions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("softlayerSubscriptions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + return nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance.go index ac2720e5149..96c73d7f263 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance.go @@ -41,6 +41,9 @@ type PVMInstance struct { // Required: true ImageID *string `json:"imageID"` + // The VTL license repository capacity TB value + LicenseRepositoryCapacity int64 `json:"licenseRepositoryCapacity,omitempty"` + // Maximum amount of memory that can be allocated (in GB, for resize) Maxmem float64 `json:"maxmem,omitempty"` @@ -70,16 +73,19 @@ type PVMInstance struct { // OS system information (usually version and build) OperatingSystem string `json:"operatingSystem,omitempty"` - // Type of the OS [aix, ibmi, redhat, sles] + // Type of the OS [aix, ibmi, redhat, sles, vtl] // Required: true OsType *string `json:"osType"` // VM pinning policy to use [none, soft, hard] PinPolicy string `json:"pinPolicy,omitempty"` + // The placement group of the server + PlacementGroup *string `json:"placementGroup,omitempty"` + // Processor type (dedicated, shared, capped) // Required: true - // Enum: [dedicated shared capped] + // Enum: [dedicated shared capped ] ProcType *string `json:"procType"` // Number of processors allocated @@ -110,6 +116,12 @@ type PVMInstance struct { // Required: true Status *string `json:"status"` + // Storage Pool where server is deployed + StoragePool string `json:"storagePool,omitempty"` + + // Indicates if all volumes attached to the server must reside in the same storage pool + StoragePoolAffinity *bool `json:"storagePoolAffinity,omitempty"` + // Storage type where server is deployed // Required: true StorageType *string `json:"storageType"` @@ -375,7 +387,7 @@ var pVmInstanceTypeProcTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["dedicated","shared","capped"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["dedicated","shared","capped",""]`), &res); err != nil { panic(err) } for _, v := range res { @@ -393,6 +405,9 @@ const ( // PVMInstanceProcTypeCapped captures enum value "capped" PVMInstanceProcTypeCapped string = "capped" + + // PVMInstanceProcType captures enum value "" + PVMInstanceProcType string = "" ) // prop value enum diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_create.go index 08ce25af0e6..277b39e9a34 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_create.go @@ -27,6 +27,9 @@ type PVMInstanceCreate struct { // The name of the SSH key pair provided to the server for authenticating users (looked up in the tenant's list of keys) KeyPairName string `json:"keyPairName,omitempty"` + // The VTL license repository capacity TB value + LicenseRepositoryCapacity int64 `json:"licenseRepositoryCapacity,omitempty"` + // Amount of memory allocated (in GB) // Required: true Memory *float64 `json:"memory"` @@ -43,6 +46,9 @@ type PVMInstanceCreate struct { // pin policy PinPolicy PinPolicy `json:"pinPolicy,omitempty"` + // The placement group for the server + PlacementGroup string `json:"placementGroup,omitempty"` + // Processor type (dedicated, shared, capped) // Required: true // Enum: [dedicated shared capped] @@ -70,7 +76,13 @@ type PVMInstanceCreate struct { // The pvm instance Software Licenses SoftwareLicenses *SoftwareLicenses `json:"softwareLicenses,omitempty"` - // Storage type for server deployment + // The storage affinity data + StorageAffinity *StorageAffinity `json:"storageAffinity,omitempty"` + + // Storage Pool for server deployment; if provided then storageAffinityPolicy and storageType will be ignored + StoragePool string `json:"storagePool,omitempty"` + + // Storage type for server deployment; will be ignored if storagePool or storageAffinityPolicy is provided StorageType string `json:"storageType,omitempty"` // System type used to host the instance @@ -130,6 +142,10 @@ func (m *PVMInstanceCreate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStorageAffinity(formats); err != nil { + res = append(res, err) + } + if err := m.validateVirtualCores(formats); err != nil { res = append(res, err) } @@ -370,6 +386,24 @@ func (m *PVMInstanceCreate) validateSoftwareLicenses(formats strfmt.Registry) er return nil } +func (m *PVMInstanceCreate) validateStorageAffinity(formats strfmt.Registry) error { + + if swag.IsZero(m.StorageAffinity) { // not required + return nil + } + + if m.StorageAffinity != nil { + if err := m.StorageAffinity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storageAffinity") + } + return err + } + } + + return nil +} + func (m *PVMInstanceCreate) validateVirtualCores(formats strfmt.Registry) error { if swag.IsZero(m.VirtualCores) { // not required diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference.go index c3d92bcb893..119ea04c8f1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference.go @@ -45,6 +45,9 @@ type PVMInstanceReference struct { // Required: true ImageID *string `json:"imageID"` + // The VTL license repository capacity TB value + LicenseRepositoryCapacity int64 `json:"licenseRepositoryCapacity,omitempty"` + // Maximum amount of memory that can be allocated (in GB, for resize) Maxmem float64 `json:"maxmem,omitempty"` @@ -67,7 +70,7 @@ type PVMInstanceReference struct { // OS system information (usually version and build) OperatingSystem string `json:"operatingSystem,omitempty"` - // Type of the OS [aix, ibmi, redhat, sles] + // Type of the OS [aix, ibmi, redhat, sles, vtl] // Required: true OsType *string `json:"osType"` @@ -107,6 +110,15 @@ type PVMInstanceReference struct { // Required: true Status *string `json:"status"` + // Storage Pool where server is deployed + StoragePool string `json:"storagePool,omitempty"` + + // Indicates if all volumes attached to the server must reside in the same storage pool + StoragePoolAffinity *bool `json:"storagePoolAffinity,omitempty"` + + // Storage type of the deployment storage pool + StorageType string `json:"storageType,omitempty"` + // System type used to host the instance SysType string `json:"sysType,omitempty"` diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update.go index cb997f2c487..d9590d845f0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update.go @@ -19,6 +19,9 @@ import ( // swagger:model PVMInstanceUpdate type PVMInstanceUpdate struct { + // The VTL license repository capacity TB value + LicenseRepositoryCapacity int64 `json:"licenseRepositoryCapacity,omitempty"` + // Amount of memory allocated (in GB) Memory float64 `json:"memory,omitempty"` @@ -44,6 +47,9 @@ type PVMInstanceUpdate struct { // The pvm instance Software Licenses SoftwareLicenses *SoftwareLicenses `json:"softwareLicenses,omitempty"` + // Indicates if all volumes attached to the server must reside in the same storage pool + StoragePoolAffinity *bool `json:"storagePoolAffinity,omitempty"` + // The pvm instance virtual CPU information VirtualCores *VirtualCores `json:"virtualCores,omitempty"` } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update_response.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update_response.go index 23dee315d66..029f7f1bc2d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update_response.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update_response.go @@ -19,6 +19,9 @@ import ( // swagger:model PVMInstanceUpdateResponse type PVMInstanceUpdateResponse struct { + // The VTL license repository capacity TB value + LicenseRepositoryCapacity int64 `json:"licenseRepositoryCapacity,omitempty"` + // Amount of memory allocated (in GB) Memory float64 `json:"memory,omitempty"` diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group.go new file mode 100644 index 00000000000..dcd75772a59 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group.go @@ -0,0 +1,152 @@ +// 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 ( + "encoding/json" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PlacementGroup placement group +// swagger:model PlacementGroup +type PlacementGroup struct { + + // The id of the Placement Group + // Required: true + ID *string `json:"id"` + + // The List of PVM Instance IDs associated with the Placement Group + // Required: true + Members []string `json:"members"` + + // The name of the Placement Group + // Required: true + Name *string `json:"name"` + + // The Placement Group Policy + // Required: true + // Enum: [affinity anti-affinity] + Policy *string `json:"policy"` +} + +// Validate validates this placement group +func (m *PlacementGroup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMembers(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PlacementGroup) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *PlacementGroup) validateMembers(formats strfmt.Registry) error { + + if err := validate.Required("members", "body", m.Members); err != nil { + return err + } + + return nil +} + +func (m *PlacementGroup) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +var placementGroupTypePolicyPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["affinity","anti-affinity"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + placementGroupTypePolicyPropEnum = append(placementGroupTypePolicyPropEnum, v) + } +} + +const ( + + // PlacementGroupPolicyAffinity captures enum value "affinity" + PlacementGroupPolicyAffinity string = "affinity" + + // PlacementGroupPolicyAntiAffinity captures enum value "anti-affinity" + PlacementGroupPolicyAntiAffinity string = "anti-affinity" +) + +// prop value enum +func (m *PlacementGroup) validatePolicyEnum(path, location string, value string) error { + if err := validate.Enum(path, location, value, placementGroupTypePolicyPropEnum); err != nil { + return err + } + return nil +} + +func (m *PlacementGroup) validatePolicy(formats strfmt.Registry) error { + + if err := validate.Required("policy", "body", m.Policy); err != nil { + return err + } + + // value enum + if err := m.validatePolicyEnum("policy", "body", *m.Policy); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PlacementGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PlacementGroup) UnmarshalBinary(b []byte) error { + var res PlacementGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group_create.go new file mode 100644 index 00000000000..64004b10314 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group_create.go @@ -0,0 +1,118 @@ +// 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 ( + "encoding/json" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PlacementGroupCreate placement group create +// swagger:model PlacementGroupCreate +type PlacementGroupCreate struct { + + // The name of the Placement Group + // Required: true + Name *string `json:"name"` + + // The Placement Group Policy + // Required: true + // Enum: [affinity anti-affinity] + Policy *string `json:"policy"` +} + +// Validate validates this placement group create +func (m *PlacementGroupCreate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PlacementGroupCreate) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +var placementGroupCreateTypePolicyPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["affinity","anti-affinity"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + placementGroupCreateTypePolicyPropEnum = append(placementGroupCreateTypePolicyPropEnum, v) + } +} + +const ( + + // PlacementGroupCreatePolicyAffinity captures enum value "affinity" + PlacementGroupCreatePolicyAffinity string = "affinity" + + // PlacementGroupCreatePolicyAntiAffinity captures enum value "anti-affinity" + PlacementGroupCreatePolicyAntiAffinity string = "anti-affinity" +) + +// prop value enum +func (m *PlacementGroupCreate) validatePolicyEnum(path, location string, value string) error { + if err := validate.Enum(path, location, value, placementGroupCreateTypePolicyPropEnum); err != nil { + return err + } + return nil +} + +func (m *PlacementGroupCreate) validatePolicy(formats strfmt.Registry) error { + + if err := validate.Required("policy", "body", m.Policy); err != nil { + return err + } + + // value enum + if err := m.validatePolicyEnum("policy", "body", *m.Policy); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PlacementGroupCreate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PlacementGroupCreate) UnmarshalBinary(b []byte) error { + var res PlacementGroupCreate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group_server.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group_server.go new file mode 100644 index 00000000000..f1346950210 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group_server.go @@ -0,0 +1,64 @@ +// 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 ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PlacementGroupServer placement group server +// swagger:model PlacementGroupServer +type PlacementGroupServer struct { + + // The ID of the Server + // Required: true + ID *string `json:"id"` +} + +// Validate validates this placement group server +func (m *PlacementGroupServer) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PlacementGroupServer) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PlacementGroupServer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PlacementGroupServer) UnmarshalBinary(b []byte) error { + var res PlacementGroupServer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_groups.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_groups.go new file mode 100644 index 00000000000..0e6ec690c98 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_groups.go @@ -0,0 +1,82 @@ +// 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 ( + "strconv" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PlacementGroups placement groups +// swagger:model PlacementGroups +type PlacementGroups struct { + + // List of Server Placement Groups + // Required: true + PlacementGroups []*PlacementGroup `json:"placementGroups"` +} + +// Validate validates this placement groups +func (m *PlacementGroups) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePlacementGroups(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PlacementGroups) validatePlacementGroups(formats strfmt.Registry) error { + + if err := validate.Required("placementGroups", "body", m.PlacementGroups); err != nil { + return err + } + + for i := 0; i < len(m.PlacementGroups); i++ { + if swag.IsZero(m.PlacementGroups[i]) { // not required + continue + } + + if m.PlacementGroups[i] != nil { + if err := m.PlacementGroups[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placementGroups" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PlacementGroups) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PlacementGroups) UnmarshalBinary(b []byte) error { + var res PlacementGroups + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_create.go index f2d3af08112..c561a11a141 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_create.go @@ -44,6 +44,15 @@ type SAPCreate struct { // The name of the SSH Key to provide to the server for authenticating SSHKeyName string `json:"sshKeyName,omitempty"` + // The storage affinity data + StorageAffinity *StorageAffinity `json:"storageAffinity,omitempty"` + + // Storage Pool for server deployment; if provided then storageAffinityPolicy and storageType will be ignored + StoragePool string `json:"storagePool,omitempty"` + + // Storage type for server deployment; will be ignored if storagePool or storageAffinityPolicy is provided + StorageType string `json:"storageType,omitempty"` + // Cloud init user defined data UserData string `json:"userData,omitempty"` @@ -79,6 +88,10 @@ func (m *SAPCreate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateStorageAffinity(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -171,6 +184,24 @@ func (m *SAPCreate) validateProfileID(formats strfmt.Registry) error { return nil } +func (m *SAPCreate) validateStorageAffinity(formats strfmt.Registry) error { + + if swag.IsZero(m.StorageAffinity) { // not required + return nil + } + + if m.StorageAffinity != nil { + if err := m.StorageAffinity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storageAffinity") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *SAPCreate) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/softlayer_subscription.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/softlayer_subscription.go new file mode 100644 index 00000000000..c47a1216d60 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/softlayer_subscription.go @@ -0,0 +1,81 @@ +// 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 ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SoftlayerSubscription Softlayer subscription object +// swagger:model SoftlayerSubscription +type SoftlayerSubscription struct { + + // Softlayer ID + // Required: true + ID *string `json:"id"` + + // State of softlayer subscription + // Required: true + State *string `json:"state"` +} + +// Validate validates this softlayer subscription +func (m *SoftlayerSubscription) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateState(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SoftlayerSubscription) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *SoftlayerSubscription) validateState(formats strfmt.Registry) error { + + if err := validate.Required("state", "body", m.State); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SoftlayerSubscription) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SoftlayerSubscription) UnmarshalBinary(b []byte) error { + var res SoftlayerSubscription + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_affinity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_affinity.go new file mode 100644 index 00000000000..b61a3be7380 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_affinity.go @@ -0,0 +1,112 @@ +// 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 ( + "encoding/json" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// StorageAffinity storage affinity +// swagger:model StorageAffinity +type StorageAffinity struct { + + // PVM Instance (ID or Name) to base storage affinity policy against; required if requesting storage affinity and storageAffinityVolume is not provided + AffinityPVMInstance *string `json:"affinityPVMInstance,omitempty"` + + // Affinity policy for storage pool selection where server will be deployed; ignored if storagePool provided; for policy affinity requires one of storageAffinityPVMInstance or storageAffinityVolume to be specified; for policy anti-affinity requires one of storageAntiAffinityPVMInstances or storageAntiAffinityVolumes to be specified + // Enum: [affinity anti-affinity] + AffinityPolicy *string `json:"affinityPolicy,omitempty"` + + // Volume (ID or Name) to base storage affinity policy against; required if requesting storage affinity and storageAffinityPVMInstance is not provided + AffinityVolume *string `json:"affinityVolume,omitempty"` + + // List of pvmInstances to base storage anti-affinity policy against; required if requesting storage anti-affinity and storageAntiAffinityVolumes is not provided + AntiAffinityPVMInstances []string `json:"antiAffinityPVMInstances"` + + // List of volumes to base storage anti-affinity policy against; required if requesting storage anti-affinity and storageAntiAffinityPVMInstances is not provided + AntiAffinityVolumes []string `json:"antiAffinityVolumes"` +} + +// Validate validates this storage affinity +func (m *StorageAffinity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAffinityPolicy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var storageAffinityTypeAffinityPolicyPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["affinity","anti-affinity"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + storageAffinityTypeAffinityPolicyPropEnum = append(storageAffinityTypeAffinityPolicyPropEnum, v) + } +} + +const ( + + // StorageAffinityAffinityPolicyAffinity captures enum value "affinity" + StorageAffinityAffinityPolicyAffinity string = "affinity" + + // StorageAffinityAffinityPolicyAntiAffinity captures enum value "anti-affinity" + StorageAffinityAffinityPolicyAntiAffinity string = "anti-affinity" +) + +// prop value enum +func (m *StorageAffinity) validateAffinityPolicyEnum(path, location string, value string) error { + if err := validate.Enum(path, location, value, storageAffinityTypeAffinityPolicyPropEnum); err != nil { + return err + } + return nil +} + +func (m *StorageAffinity) validateAffinityPolicy(formats strfmt.Registry) error { + + if swag.IsZero(m.AffinityPolicy) { // not required + return nil + } + + // value enum + if err := m.validateAffinityPolicyEnum("affinityPolicy", "body", *m.AffinityPolicy); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *StorageAffinity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StorageAffinity) UnmarshalBinary(b []byte) error { + var res StorageAffinity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume.go index cd842d71edc..a813b1fffde 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume.go @@ -60,6 +60,9 @@ type Volume struct { // Required: true VolumeID *string `json:"volumeID"` + // Volume pool, name of storage pool where the volume is located + VolumePool string `json:"volumePool,omitempty"` + // Volume type, name of storage template used to create the volume VolumeType string `json:"volumeType,omitempty"` diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_reference.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_reference.go index ae20e65e375..33228a49dce 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_reference.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_reference.go @@ -68,6 +68,9 @@ type VolumeReference struct { // Required: true VolumeID *string `json:"volumeID"` + // Volume pool, name of storage pool where the volume is located + VolumePool string `json:"volumePool,omitempty"` + // Volume type, name of storage template used to create the volume VolumeType string `json:"volumeType,omitempty"` diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_attach.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_attach.go new file mode 100644 index 00000000000..1c8c8a3eda2 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_attach.go @@ -0,0 +1,64 @@ +// 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 ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// VolumesAttach volumes attach +// swagger:model volumesAttach +type VolumesAttach struct { + + // List of volumes to be attached to a PVM instance + // Required: true + VolumeIds []string `json:"volumeIDs"` +} + +// Validate validates this volumes attach +func (m *VolumesAttach) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateVolumeIds(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *VolumesAttach) validateVolumeIds(formats strfmt.Registry) error { + + if err := validate.Required("volumeIDs", "body", m.VolumeIds); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *VolumesAttach) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *VolumesAttach) UnmarshalBinary(b []byte) error { + var res VolumesAttach + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_attachment_response.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_attachment_response.go new file mode 100644 index 00000000000..985fe4c5867 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_attachment_response.go @@ -0,0 +1,64 @@ +// 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 ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// VolumesAttachmentResponse volumes attachment response +// swagger:model VolumesAttachmentResponse +type VolumesAttachmentResponse struct { + + // status summary for volume attachment to a PVM Instance + // Required: true + Summary *string `json:"summary"` +} + +// Validate validates this volumes attachment response +func (m *VolumesAttachmentResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSummary(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *VolumesAttachmentResponse) validateSummary(formats strfmt.Registry) error { + + if err := validate.Required("summary", "body", m.Summary); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *VolumesAttachmentResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *VolumesAttachmentResponse) UnmarshalBinary(b []byte) error { + var res VolumesAttachmentResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_async_request.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_async_request.go index 6174a967e26..d6feeecaaa8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_async_request.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_async_request.go @@ -19,11 +19,11 @@ type VolumesCloneAsyncRequest struct { // Base name of the new cloned volume(s). // Cloned Volume names will be prefixed with 'clone-' - // and suffixed with ‘-#####’ (where ##### is a 5 digit random number) + // and suffixed with '-#####' (where ##### is a 5 digit random number) // If multiple volumes cloned they will be further suffixed with an incremental number starting with 1. // Example volume names using name="volume-abcdef" - // single volume clone will be named "clone-volume-abcdef-83081“ - // multi volume clone will be named "clone-volume-abcdef-73721-1”, "clone-volume-abcdef-73721-2”, ... + // single volume clone will be named "clone-volume-abcdef-83081" + // multi volume clone will be named "clone-volume-abcdef-73721-1", "clone-volume-abcdef-73721-2", ... // // Required: true Name *string `json:"name"` diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_cancel.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_cancel.go index 7922a1605c9..b7247a0702a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_cancel.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_cancel.go @@ -15,7 +15,7 @@ import ( // swagger:model VolumesCloneCancel type VolumesCloneCancel struct { - // default False, Cancel will only be allowed if the status is ‘prepared’, or ‘available’ + // default False, Cancel will only be allowed if the status is 'prepared', or 'available' // True, Cancel will be allowed when the status is NOT completed, cancelling, cancelled, or failed // Force bool `json:"force,omitempty"` diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_execute.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_execute.go index 14d9102b919..ff610c70572 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_execute.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_execute.go @@ -19,11 +19,11 @@ type VolumesCloneExecute struct { // Base name of the new cloned volume(s). // Cloned Volume names will be prefixed with 'clone-' - // and suffixed with ‘-#####’ (where ##### is a 5 digit random number) + // and suffixed with '-#####' (where ##### is a 5 digit random number) // If multiple volumes cloned they will be further suffixed with an incremental number starting with 1. // Example volume names using name="volume-abcdef" - // single volume clone will be named "clone-volume-abcdef-83081“ - // multi volume clone will be named "clone-volume-abcdef-73721-1”, "clone-volume-abcdef-73721-2”, ... + // single volume clone will be named "clone-volume-abcdef-83081" + // multi volume clone will be named "clone-volume-abcdef-73721-1", "clone-volume-abcdef-73721-2", ... // // Required: true Name *string `json:"name"` diff --git a/vendor/github.com/go-openapi/jsonpointer/.travis.yml b/vendor/github.com/go-openapi/jsonpointer/.travis.yml index 03a22fe06fd..9aef9184e86 100644 --- a/vendor/github.com/go-openapi/jsonpointer/.travis.yml +++ b/vendor/github.com/go-openapi/jsonpointer/.travis.yml @@ -1,8 +1,8 @@ after_success: - bash <(curl -s https://codecov.io/bash) go: -- 1.14.x -- 1.15.x +- 1.11.x +- 1.12.x install: - GO111MODULE=off go get -u gotest.tools/gotestsum env: diff --git a/vendor/github.com/go-openapi/jsonpointer/pointer.go b/vendor/github.com/go-openapi/jsonpointer/pointer.go index 7df9853def6..b284eb77a62 100644 --- a/vendor/github.com/go-openapi/jsonpointer/pointer.go +++ b/vendor/github.com/go-openapi/jsonpointer/pointer.go @@ -114,16 +114,16 @@ func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.Nam rValue := reflect.Indirect(reflect.ValueOf(node)) kind := rValue.Kind() - if rValue.Type().Implements(jsonPointableType) { - r, err := node.(JSONPointable).JSONLookup(decodedToken) - if err != nil { - return nil, kind, err - } - return r, kind, nil - } - switch kind { + case reflect.Struct: + if rValue.Type().Implements(jsonPointableType) { + r, err := node.(JSONPointable).JSONLookup(decodedToken) + if err != nil { + return nil, kind, err + } + return r, kind, nil + } nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) if !ok { return nil, kind, fmt.Errorf("object has no field %q", decodedToken) @@ -161,17 +161,17 @@ func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.Nam func setSingleImpl(node, data interface{}, decodedToken string, nameProvider *swag.NameProvider) error { rValue := reflect.Indirect(reflect.ValueOf(node)) + switch rValue.Kind() { - if ns, ok := node.(JSONSetable); ok { // pointer impl - return ns.JSONSet(decodedToken, data) - } + case reflect.Struct: + if ns, ok := node.(JSONSetable); ok { // pointer impl + return ns.JSONSet(decodedToken, data) + } - if rValue.Type().Implements(jsonSetableType) { - return node.(JSONSetable).JSONSet(decodedToken, data) - } + if rValue.Type().Implements(jsonSetableType) { + return node.(JSONSetable).JSONSet(decodedToken, data) + } - switch rValue.Kind() { - case reflect.Struct: nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) if !ok { return fmt.Errorf("object has no field %q", decodedToken) @@ -270,22 +270,22 @@ func (p *Pointer) set(node, data interface{}, nameProvider *swag.NameProvider) e rValue := reflect.Indirect(reflect.ValueOf(node)) kind := rValue.Kind() - if rValue.Type().Implements(jsonPointableType) { - r, err := node.(JSONPointable).JSONLookup(decodedToken) - if err != nil { - return err - } - fld := reflect.ValueOf(r) - if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Ptr { - node = fld.Addr().Interface() - continue - } - node = r - continue - } - switch kind { + case reflect.Struct: + if rValue.Type().Implements(jsonPointableType) { + r, err := node.(JSONPointable).JSONLookup(decodedToken) + if err != nil { + return err + } + fld := reflect.ValueOf(r) + if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Ptr { + node = fld.Addr().Interface() + continue + } + node = r + continue + } nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) if !ok { return fmt.Errorf("object has no field %q", decodedToken) diff --git a/vendor/github.com/go-openapi/jsonreference/.golangci.yml b/vendor/github.com/go-openapi/jsonreference/.golangci.yml deleted file mode 100644 index f9381aee541..00000000000 --- a/vendor/github.com/go-openapi/jsonreference/.golangci.yml +++ /dev/null @@ -1,41 +0,0 @@ -linters-settings: - govet: - check-shadowing: true - golint: - min-confidence: 0 - gocyclo: - min-complexity: 30 - maligned: - suggest-new: true - dupl: - threshold: 100 - goconst: - min-len: 2 - min-occurrences: 4 -linters: - enable-all: true - disable: - - maligned - - lll - - gochecknoglobals - - godox - - gocognit - - whitespace - - wsl - - funlen - - gochecknoglobals - - gochecknoinits - - scopelint - - wrapcheck - - exhaustivestruct - - exhaustive - - nlreturn - - testpackage - - gci - - gofumpt - - goerr113 - - gomnd - - tparallel - - nestif - - godot - - errorlint diff --git a/vendor/github.com/go-openapi/jsonreference/.travis.yml b/vendor/github.com/go-openapi/jsonreference/.travis.yml index 05482f4b90c..40b90757d89 100644 --- a/vendor/github.com/go-openapi/jsonreference/.travis.yml +++ b/vendor/github.com/go-openapi/jsonreference/.travis.yml @@ -1,19 +1,10 @@ after_success: - bash <(curl -s https://codecov.io/bash) go: -- 1.14.x -- 1.x +- 1.11.x +- 1.12.x install: -- go get gotest.tools/gotestsum -jobs: - include: - # include linting job, but only for latest go version and amd64 arch - - go: 1.x - arch: amd64 - install: - go get github.com/golangci/golangci-lint/cmd/golangci-lint - script: - - golangci-lint run --new-from-rev master +- GO111MODULE=off go get -u gotest.tools/gotestsum env: - GO111MODULE=on language: go diff --git a/vendor/github.com/go-openapi/swag/.golangci.yml b/vendor/github.com/go-openapi/swag/.golangci.yml index 813c47aa643..625c3d6affe 100644 --- a/vendor/github.com/go-openapi/swag/.golangci.yml +++ b/vendor/github.com/go-openapi/swag/.golangci.yml @@ -20,20 +20,3 @@ linters: - lll - gochecknoinits - gochecknoglobals - - nlreturn - - testpackage - - wrapcheck - - gomnd - - exhaustive - - exhaustivestruct - - goerr113 - - wsl - - whitespace - - gofumpt - - godot - - nestif - - godox - - funlen - - gci - - gocognit - - paralleltest diff --git a/vendor/github.com/go-openapi/swag/.travis.yml b/vendor/github.com/go-openapi/swag/.travis.yml index fc25a887286..f1a3f80b350 100644 --- a/vendor/github.com/go-openapi/swag/.travis.yml +++ b/vendor/github.com/go-openapi/swag/.travis.yml @@ -1,32 +1,8 @@ after_success: - bash <(curl -s https://codecov.io/bash) go: +- 1.13.x - 1.14.x -- 1.x -arch: -- amd64 -jobs: - include: - # include arch ppc, but only for latest go version - skip testing for race - - go: 1.x - arch: ppc64le - install: ~ - script: - - go test -v - - #- go: 1.x - # arch: arm - # install: ~ - # script: - # - go test -v - - # include linting job, but only for latest go version and amd64 arch - - go: 1.x - arch: amd64 - install: - go get github.com/golangci/golangci-lint/cmd/golangci-lint - script: - - golangci-lint run --new-from-rev master install: - GO111MODULE=off go get -u gotest.tools/gotestsum language: go diff --git a/vendor/github.com/go-openapi/swag/README.md b/vendor/github.com/go-openapi/swag/README.md index 217f6fa5054..eb60ae80abe 100644 --- a/vendor/github.com/go-openapi/swag/README.md +++ b/vendor/github.com/go-openapi/swag/README.md @@ -2,6 +2,7 @@ [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/swag/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/swag?status.svg)](http://godoc.org/github.com/go-openapi/swag) +[![GolangCI](https://golangci.com/badges/github.com/go-openapi/swag.svg)](https://golangci.com) [![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/swag)](https://goreportcard.com/report/github.com/go-openapi/swag) Contains a bunch of helper functions for go-openapi and go-swagger projects. diff --git a/vendor/github.com/go-openapi/swag/go.mod b/vendor/github.com/go-openapi/swag/go.mod index fb29b65b256..4aef463e425 100644 --- a/vendor/github.com/go-openapi/swag/go.mod +++ b/vendor/github.com/go-openapi/swag/go.mod @@ -2,17 +2,15 @@ module github.com/go-openapi/swag require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/kr/text v0.2.0 // indirect - github.com/mailru/easyjson v0.7.6 - github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect - github.com/stretchr/testify v1.6.1 - gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect - gopkg.in/yaml.v2 v2.4.0 - gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect + github.com/kr/pretty v0.1.0 // indirect + github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 + github.com/stretchr/testify v1.3.0 + gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect + gopkg.in/yaml.v2 v2.2.4 ) replace github.com/golang/lint => golang.org/x/lint v0.0.0-20190409202823-959b441ac422 replace sourcegraph.com/sourcegraph/go-diff => github.com/sourcegraph/go-diff v0.5.1 -go 1.11 +go 1.13 diff --git a/vendor/github.com/go-openapi/swag/go.sum b/vendor/github.com/go-openapi/swag/go.sum index a45da809afa..e8a80bacf0a 100644 --- a/vendor/github.com/go-openapi/swag/go.sum +++ b/vendor/github.com/go-openapi/swag/go.sum @@ -1,29 +1,20 @@ -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/go-openapi/swag/loading.go b/vendor/github.com/go-openapi/swag/loading.go index 9a60409725e..04160b89ba9 100644 --- a/vendor/github.com/go-openapi/swag/loading.go +++ b/vendor/github.com/go-openapi/swag/loading.go @@ -19,9 +19,7 @@ import ( "io/ioutil" "log" "net/http" - "net/url" "path/filepath" - "runtime" "strings" "time" ) @@ -59,26 +57,6 @@ func LoadStrategy(path string, local, remote func(string) ([]byte, error)) func( if err != nil { return nil, err } - - if strings.HasPrefix(pth, `file://`) { - if runtime.GOOS == "windows" { - // support for canonical file URIs on windows. - // Zero tolerance here for dodgy URIs. - u, _ := url.Parse(upth) - if u.Host != "" { - // assume UNC name (volume share) - // file://host/share/folder\... ==> \\host\share\path\folder - // NOTE: UNC port not yet supported - upth = strings.Join([]string{`\`, u.Host, u.Path}, `\`) - } else { - // file:///c:/folder/... ==> just remove the leading slash - upth = strings.TrimPrefix(upth, `file:///`) - } - } else { - upth = strings.TrimPrefix(upth, `file://`) - } - } - return local(filepath.FromSlash(upth)) } } @@ -86,7 +64,7 @@ func LoadStrategy(path string, local, remote func(string) ([]byte, error)) func( func loadHTTPBytes(timeout time.Duration) func(path string) ([]byte, error) { return func(path string) ([]byte, error) { client := &http.Client{Timeout: timeout} - req, err := http.NewRequest("GET", path, nil) // nolint: noctx + req, err := http.NewRequest("GET", path, nil) if err != nil { return nil, err } diff --git a/vendor/github.com/go-openapi/swag/util.go b/vendor/github.com/go-openapi/swag/util.go index 193702f2cec..9eac16afb2e 100644 --- a/vendor/github.com/go-openapi/swag/util.go +++ b/vendor/github.com/go-openapi/swag/util.go @@ -31,7 +31,7 @@ var isInitialism func(string) bool // GoNamePrefixFunc sets an optional rule to prefix go names // which do not start with a letter. // -// e.g. to help convert "123" into "{prefix}123" +// e.g. to help converting "123" into "{prefix}123" // // The default is to prefix with "X" var GoNamePrefixFunc func(string) string @@ -91,7 +91,7 @@ func init() { } const ( - // collectionFormatComma = "csv" + //collectionFormatComma = "csv" collectionFormatSpace = "ssv" collectionFormatTab = "tsv" collectionFormatPipe = "pipes" @@ -370,7 +370,7 @@ func IsZero(data interface{}) bool { // AddInitialisms add additional initialisms func AddInitialisms(words ...string) { for _, word := range words { - // commonInitialisms[upper(word)] = true + //commonInitialisms[upper(word)] = true commonInitialisms.add(upper(word)) } // sort again diff --git a/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml index 3e27d0e9b5a..e27fa52f7a2 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml @@ -112,7 +112,7 @@ spec: - versionHash properties: availableUpdates: - description: availableUpdates contains updates recommended for this cluster. Updates which appear in conditionalUpdates but not in availableUpdates may expose this cluster to known issues. This list may be empty if no updates are recommended, if the update service is unavailable, or if an invalid channel has been specified. + description: availableUpdates contains the list of updates that are appropriate for this cluster. This list may be empty if no updates are recommended, if the update service is unavailable, or if an invalid channel has been specified. type: array items: description: Release represents an OpenShift release image and associated metadata. @@ -133,137 +133,6 @@ spec: description: version is a semantic versioning identifying the update version. When this field is part of spec, version is optional if image is specified. type: string nullable: true - conditionalUpdates: - description: conditionalUpdates contains the list of updates that may be recommended for this cluster if it meets specific required conditions. Consumers interested in the set of updates that are actually recommended for this cluster should use availableUpdates. This list may be empty if no updates are recommended, if the update service is unavailable, or if an empty or invalid channel has been specified. - type: array - items: - description: ConditionalUpdate represents an update which is recommended to some clusters on the version the current cluster is reconciling, but which may not be recommended for the current cluster. - type: object - required: - - release - - risks - properties: - conditions: - description: 'conditions represents the observations of the conditional update''s current status. Known types are: * Evaluating, for whether the cluster-version operator will attempt to evaluate any risks[].matchingRules. * Recommended, for whether the update is recommended for the current cluster.' - type: array - items: - description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - type: object - required: - - lastTransitionTime - - message - - reason - - status - - type - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - type: string - format: date-time - message: - description: message is a human readable message indicating details about the transition. This may be an empty string. - type: string - maxLength: 32768 - observedGeneration: - description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - type: integer - format: int64 - minimum: 0 - reason: - description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - type: string - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - status: - description: status of the condition, one of True, False, Unknown. - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - type: string - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - release: - description: release is the target of the update. - type: object - properties: - channels: - description: channels is the set of Cincinnati channels to which the release currently belongs. - type: array - items: - type: string - image: - description: image is a container image location that contains the update. When this field is part of spec, image is optional if version is specified and the availableUpdates field contains a matching version. - type: string - url: - description: url contains information about this release. This URL is set by the 'url' metadata property on a release or the metadata returned by the update API and should be displayed as a link in user interfaces. The URL field may not be set for test or nightly releases. - type: string - version: - description: version is a semantic versioning identifying the update version. When this field is part of spec, version is optional if image is specified. - type: string - risks: - description: risks represents the range of issues associated with updating to the target release. The cluster-version operator will evaluate all entries, and only recommend the update if there is at least one entry and all entries recommend the update. - type: array - minItems: 1 - items: - description: ConditionalUpdateRisk represents a reason and cluster-state for not recommending a conditional update. - type: object - required: - - matchingRules - - message - - name - - url - properties: - matchingRules: - description: matchingRules is a slice of conditions for deciding which clusters match the risk and which do not. The slice is ordered by decreasing precedence. The cluster-version operator will walk the slice in order, and stop after the first it can successfully evaluate. If no condition can be successfully evaluated, the update will not be recommended. - type: array - minItems: 1 - items: - description: ClusterCondition is a union of typed cluster conditions. The 'type' property determines which of the type-specific properties are relevant. When evaluated on a cluster, the condition may match, not match, or fail to evaluate. - type: object - required: - - type - properties: - promql: - description: promQL represents a cluster condition based on PromQL. - type: object - required: - - promql - properties: - promql: - description: PromQL is a PromQL query classifying clusters. This query query should return a 1 in the match case and a 0 in the does-not-match case case. Queries which return no time series, or which return values besides 0 or 1, are evaluation failures. - type: string - type: - description: type represents the cluster-condition type. This defines the members and semantics of any additional properties. - type: string - enum: - - Always - - PromQL - x-kubernetes-list-type: atomic - message: - description: message provides additional information about the risk of updating, in the event that matchingRules match the cluster state. This is only to be consumed by humans. It may contain Line Feed characters (U+000A), which should be rendered as new lines. - type: string - minLength: 1 - name: - description: name is the CamelCase reason for not recommending a conditional update, in the event that matchingRules match the cluster state. - type: string - minLength: 1 - url: - description: url contains information about this risk. - type: string - format: uri - minLength: 1 - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - x-kubernetes-list-type: atomic conditions: description: conditions provides information about the cluster version. The condition "Available" is set to true if the desiredUpdate has been reached. The condition "Progressing" is set to true if an update is being applied. The condition "Degraded" is set to true if an update is currently blocked by a temporary or permanent error. Conditions are only valid for the current desiredUpdate when metadata.generation is equal to status.generation. type: array @@ -322,9 +191,6 @@ spec: - state - verified properties: - acceptedRisks: - description: acceptedRisks records risks which were accepted to initiate the update. For example, it may menition an Upgradeable=False or missing signature that was overriden via desiredUpdate.force, or an update that was initiated despite not being in the availableUpdates set of recommended update targets. - type: string completionTime: description: completionTime, if set, is when the update was fully applied. The update that is currently being applied will have a null completion time. Completion time will always be set for entries that are not the current update (usually to the started time of the next update). type: string diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver.crd.yaml index 3ff78377a3d..609ee198708 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver.crd.yaml @@ -73,7 +73,7 @@ spec: - group x-kubernetes-list-type: map profile: - description: "profile specifies the name of the desired top-level audit profile to be applied to all requests sent to any of the OpenShift-provided API servers in the cluster (kube-apiserver, openshift-apiserver and oauth-apiserver), with the exception of those requests that match one or more of the customRules. \n The following profiles are provided: - Default: default policy which means MetaData level logging with the exception of events (not logged at all), oauthaccesstokens and oauthauthorizetokens (both logged at RequestBody level). - WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for write requests (create, update, patch). - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response HTTP payloads for read requests (get, list). - None: no requests are logged at all, not even oauthaccesstokens and oauthauthorizetokens. \n Warning: It is not recommended to disable audit logging by using the `None` profile unless you are fully aware of the risks of not logging data that can be beneficial when troubleshooting issues. If you disable audit logging and a support situation arises, you might need to enable audit logging and reproduce the issue in order to troubleshoot properly. \n If unset, the 'Default' profile is used as the default." + description: "profile specifies the name of the desired top-level audit profile to be applied to all requests sent to any of the OpenShift-provided API servers in the cluster (kube-apiserver, openshift-apiserver and oauth-apiserver), with the exception of those requests that match one or more of the customRules. \n The following profiles are provided: - Default: default policy which means MetaData level logging with the exception of events (not logged at all), oauthaccesstokens and oauthauthorizetokens (both logged at RequestBody level). - WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for write requests (create, update, patch). - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response HTTP payloads for read requests (get, list). - None: no requests are logged at all, not even oauthaccesstokens and oauthauthorizetokens. \n Warning: to raise a Red Hat support request, it is required to set this to Default, WriteRequestBodies, or AllRequestBodies to generate audit log events that can be analyzed by support. \n If unset, the 'Default' profile is used as the default." type: string default: Default enum: diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml index 442d39a6526..d4fdb9dcd3c 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml @@ -90,7 +90,7 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: 'Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagecontentpolicy.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagecontentpolicy.crd.yaml deleted file mode 100644 index 147c73c44df..00000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagecontentpolicy.crd.yaml +++ /dev/null @@ -1,68 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/874 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: imagecontentpolicies.config.openshift.io -spec: - group: config.openshift.io - names: - kind: ImageContentPolicy - listKind: ImageContentPolicyList - plural: imagecontentpolicies - singular: imagecontentpolicy - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "ImageContentPolicy holds cluster-wide information about how to handle registry mirror rules. When multiple policies are defined, the outcome of the behavior is defined on each field. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - repositoryDigestMirrors: - description: "repositoryDigestMirrors allows images referenced by image digests in pods to be pulled from alternative mirrored repository locations. The image pull specification provided to the pod will be compared to the source locations described in RepositoryDigestMirrors and the image may be pulled down from any of the mirrors in the list instead of the specified repository allowing administrators to choose a potentially faster mirror. To pull image from mirrors by tags, should set the \"allowMirrorByTags\". \n Each “source” repository is treated independently; configurations for different “source” repositories don’t interact. \n If the \"mirrors\" is not specified, the image will continue to be pulled from the specified repository in the pull spec. \n When multiple policies are defined for the same “source” repository, the sets of defined mirrors will be merged together, preserving the relative order of the mirrors, if possible. For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified." - type: array - items: - description: RepositoryDigestMirrors holds cluster-wide information about how to handle mirrors in the registries config. - type: object - required: - - source - properties: - allowMirrorByTags: - description: allowMirrorByTags if true, the mirrors can be used to pull the images that are referenced by their tags. Default is false, the mirrors only work when pulling the images that are referenced by their digests. Pulling images by tag can potentially yield different images, depending on which endpoint we pull from. Forcing digest-pulls for mirrors avoids that issue. - type: boolean - mirrors: - description: mirrors is zero or more repositories that may also contain the same images. If the "mirrors" is not specified, the image will continue to be pulled from the specified repository in the pull spec. No mirror will be configured. The order of mirrors in this list is treated as the user's desired priority, while source is by default considered lower priority than all mirrors. Other cluster configuration, including (but not limited to) other repositoryDigestMirrors objects, may impact the exact order mirrors are contacted in, or some mirrors may be contacted in parallel, so this should be considered a preference rather than a guarantee of ordering. - type: array - items: - type: string - pattern: ^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])(:[0-9]+)?(\/[^\/:\n]+)*(\/[^\/:\n]+((:[^\/:\n]+)|(@[^\n]+)))?$ - x-kubernetes-list-type: set - source: - description: source is the repository that users refer to, e.g. in image pull specifications. - type: string - pattern: ^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])(:[0-9]+)?(\/[^\/:\n]+)*(\/[^\/:\n]+((:[^\/:\n]+)|(@[^\n]+)))?$ - x-kubernetes-list-map-keys: - - source - x-kubernetes-list-type: map - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml index 43549229033..7ca40a5e4d2 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml @@ -49,9 +49,6 @@ spec: description: platformSpec holds desired information specific to the underlying infrastructure provider. type: object properties: - alibabaCloud: - description: AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. - type: object aws: description: AWS contains settings specific to the Amazon Web Services infrastructure provider. type: object @@ -96,10 +93,10 @@ spec: description: Ovirt contains settings specific to the oVirt infrastructure provider. type: object powervs: - description: PowerVS contains settings specific to the IBM Power Systems Virtual Servers infrastructure provider. + description: PowerVS contains settings specific to the IBM Power Virtual Systems offering (colo with IBM Cloud) type: object type: - description: type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", "PowerVS", "AlibabaCloud" and "None". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform. + description: type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", "PowerVS", and "None". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform. type: string enum: - "" @@ -116,7 +113,6 @@ spec: - KubeVirt - EquinixMetal - PowerVS - - AlibabaCloud vsphere: description: VSphere contains settings specific to the VSphere infrastructure provider. type: object @@ -169,50 +165,10 @@ spec: - KubeVirt - EquinixMetal - PowerVS - - AlibabaCloud platformStatus: description: platformStatus holds status information specific to the underlying infrastructure provider. type: object properties: - alibabaCloud: - description: AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. - type: object - required: - - region - - resourceGroupID - properties: - region: - description: region specifies the region for Alibaba Cloud resources created for the cluster. - type: string - pattern: ^[0-9A-Za-z-]+$ - resourceGroupID: - description: resourceGroupID is the ID of the resource group for the cluster. - type: string - pattern: ^rg-[0-9A-Za-z]+$ - resourceTags: - description: resourceTags is a list of additional tags to apply to Alibaba Cloud resources created for the cluster. - type: array - maxItems: 20 - items: - description: AlibabaCloudResourceTag is the set of tags to add to apply to resources. - type: object - required: - - key - - value - properties: - key: - description: key is the key of the tag. - type: string - maxLength: 128 - minLength: 1 - value: - description: value is the value of the tag. - type: string - maxLength: 128 - minLength: 1 - x-kubernetes-list-map-keys: - - key - x-kubernetes-list-type: map aws: description: AWS contains settings specific to the Amazon Web Services infrastructure provider. type: object @@ -370,39 +326,32 @@ spec: description: 'deprecated: as of 4.6, this field is no longer set or honored. It will be removed in a future release.' type: string powervs: - description: PowerVS contains settings specific to the Power Systems Virtual Servers infrastructure provider. + description: PowerVS contains settings specific to the IBM Power Systems Virtual Server infrastructure. type: object properties: - cisInstanceCRN: - description: CISInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain - type: string region: - description: region holds the default Power VS region for new Power VS resources created by the cluster. + description: Region holds the default Power VS region for new Power VS resources created by the cluster. type: string serviceEndpoints: - description: serviceEndpoints is a list of custom endpoints which will override the default service endpoints of a Power VS service. + description: ServiceEndpoints list contains custom endpoints which will override default service endpoint of Power VS Services. type: array items: - description: PowervsServiceEndpoint stores the configuration of a custom url to override existing defaults of PowerVS Services. + description: PowervsServiceEndpoint store the configuration of a custom url to override existing defaults of PowerVS Services. type: object - required: - - name - - url properties: name: - description: name is the name of the Power VS service. + description: Name is the name of the Power VS services. Note that not all locations incude Power VS. type: string pattern: ^[a-z0-9-]+$ url: description: url is fully qualified URI with scheme https, that overrides the default generated endpoint for a client. This must be provided and cannot be empty. type: string - format: uri pattern: ^https:// zone: - description: 'zone holds the default zone for the new Power VS resources created by the cluster. Note: Currently only single-zone OCP clusters are supported' + description: 'Zone holds the default colo zone for the new Power VS resources created by the cluster. Note: Currently only single-zone OCP clusters are supported' type: string type: - description: "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"EquinixMetal\", \"PowerVS\", \"AlibabaCloud\" and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform. \n This value will be synced with to the `status.platform` and `status.platformStatus.type`. Currently this value cannot be changed once set." + description: "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"EquinixMetal\", \"PowerVS\", and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform. \n This value will be synced with to the `status.platform` and `status.platformStatus.type`. Currently this value cannot be changed once set." type: string enum: - "" @@ -419,7 +368,6 @@ spec: - KubeVirt - EquinixMetal - PowerVS - - AlibabaCloud vsphere: description: VSphere contains settings specific to the VSphere infrastructure provider. type: object diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml index 95fe8dfd995..8c60875d89f 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml @@ -82,13 +82,10 @@ spec: type: array items: type: object - required: - - domainPatterns properties: domainPatterns: - description: "domainPatterns is a list of domains for which the desired HSTS annotations are required. If domainPatterns is specified and a route is created with a spec.host matching one of the domains, the route must specify the HSTS Policy components described in the matching RequiredHSTSPolicy. \n The use of wildcards is allowed like this: *.foo.com matches everything under foo.com. foo.com only matches foo.com, so to cover foo.com and everything under it, you must specify *both*." + description: "domainPatterns is a list of domains for which the desired HSTS annotations are required. If domainPatterns is specified and a route is created with a spec.host matching one of the domains, the route must specify the HSTS Policy components described in the matching RequiredHSTSPolicy. \n The use of wildcards is allowed like this: *.foo.com matches everything under foo.com. foo.com only matches foo.com, so to cover foo.com and everything under it, you must specify *both*. kubebuilder:validation:MinLength=1" type: array - minItems: 1 items: type: string includeSubDomainsPolicy: @@ -103,17 +100,13 @@ spec: type: object properties: largestMaxAge: - description: The largest allowed value (in seconds) of the RequiredHSTSPolicy max-age This value can be left unspecified, in which case no upper limit is enforced. + description: The largest allowed value (in seconds) of the RequiredHSTSPolicy max-age This value can be left unspecified, in which case no upper limit is enforced. kubebuilder:validation:minimum=0:maximum=2147483647 type: integer format: int32 - maximum: 2147483647 - minimum: 0 smallestMaxAge: - description: The smallest allowed value (in seconds) of the RequiredHSTSPolicy max-age Setting max-age=0 allows the deletion of an existing HSTS header from a host. This is a necessary tool for administrators to quickly correct mistakes. This value can be left unspecified, in which case no lower limit is enforced. + description: The smallest allowed value (in seconds) of the RequiredHSTSPolicy max-age Setting max-age=0 allows the deletion of an existing HSTS header from a host. This is a necessary tool for administrators to quickly correct mistakes. This value can be left unspecified, in which case no lower limit is enforced. kubebuilder:validation:minimum=0:maximum=2147483647 type: integer format: int32 - maximum: 2147483647 - minimum: 0 namespaceSelector: description: namespaceSelector specifies a label selector such that the policy applies only to those routes that are in namespaces with labels that match the selector, and are in one of the DomainPatterns. Defaults to the empty LabelSelector, which matches everything. type: object diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml index 51acbff468e..1f75769db48 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml @@ -413,7 +413,7 @@ spec: type: object properties: accessTokenInactivityTimeout: - description: "accessTokenInactivityTimeout defines the token inactivity timeout for tokens granted by any client. The value represents the maximum amount of time that can occur between consecutive uses of the token. Tokens become invalid if they are not used within this temporal window. The user will need to acquire a new token to regain access once a token times out. Takes valid time duration string such as \"5m\", \"1.5h\" or \"2h45m\". The minimum allowed value for duration is 300s (5 minutes). If the timeout is configured per client, then that value takes precedence. If the timeout value is not specified and the client does not override the value, then tokens are valid until their lifetime. \n WARNING: existing tokens' timeout will not be affected (lowered) by changing this value" + description: accessTokenInactivityTimeout defines the token inactivity timeout for tokens granted by any client. The value represents the maximum amount of time that can occur between consecutive uses of the token. Tokens become invalid if they are not used within this temporal window. The user will need to acquire a new token to regain access once a token times out. Takes valid time duration string such as "5m", "1.5h" or "2h45m". The minimum allowed value for duration is 300s (5 minutes). If the timeout is configured per client, then that value takes precedence. If the timeout value is not specified and the client does not override the value, then tokens are valid until their lifetime. type: string accessTokenInactivityTimeoutSeconds: description: 'accessTokenInactivityTimeoutSeconds - DEPRECATED: setting this field has no effect.' diff --git a/vendor/github.com/openshift/api/config/v1/register.go b/vendor/github.com/openshift/api/config/v1/register.go index 284d06f9a2b..35eace3701c 100644 --- a/vendor/github.com/openshift/api/config/v1/register.go +++ b/vendor/github.com/openshift/api/config/v1/register.go @@ -64,8 +64,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ProxyList{}, &Scheduler{}, &SchedulerList{}, - &ImageContentPolicy{}, - &ImageContentPolicyList{}, ) metav1.AddToGroupVersion(scheme, GroupVersion) return nil diff --git a/vendor/github.com/openshift/api/config/v1/types.go b/vendor/github.com/openshift/api/config/v1/types.go index 56d00648ee0..4986c44eef3 100644 --- a/vendor/github.com/openshift/api/config/v1/types.go +++ b/vendor/github.com/openshift/api/config/v1/types.go @@ -323,8 +323,7 @@ type RequiredHSTSPolicy struct { // // The use of wildcards is allowed like this: *.foo.com matches everything under foo.com. // foo.com only matches foo.com, so to cover foo.com and everything under it, you must specify *both*. - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:Required + // kubebuilder:validation:MinLength=1 // +required DomainPatterns []string `json:"domainPatterns"` @@ -333,6 +332,7 @@ type RequiredHSTSPolicy struct { // If set to 0 and includeSubdomains is specified, all subdomains of the host are also removed as HSTS hosts. // maxAge is a time-to-live value, and if this policy is not refreshed on a client, the HSTS // policy will eventually expire on that client. + // +required MaxAge MaxAgePolicy `json:"maxAge"` // preloadPolicy directs the client to include hosts in its host preload list so that @@ -355,16 +355,14 @@ type RequiredHSTSPolicy struct { type MaxAgePolicy struct { // The largest allowed value (in seconds) of the RequiredHSTSPolicy max-age // This value can be left unspecified, in which case no upper limit is enforced. - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Maximum=2147483647 + // kubebuilder:validation:minimum=0:maximum=2147483647 LargestMaxAge *int32 `json:"largestMaxAge,omitempty"` // The smallest allowed value (in seconds) of the RequiredHSTSPolicy max-age // Setting max-age=0 allows the deletion of an existing HSTS header from a host. This is a necessary // tool for administrators to quickly correct mistakes. // This value can be left unspecified, in which case no lower limit is enforced. - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Maximum=2147483647 + // kubebuilder:validation:minimum=0:maximum=2147483647 SmallestMaxAge *int32 `json:"smallestMaxAge,omitempty"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_apiserver.go b/vendor/github.com/openshift/api/config/v1/types_apiserver.go index 31801aacf0b..12c00906919 100644 --- a/vendor/github.com/openshift/api/config/v1/types_apiserver.go +++ b/vendor/github.com/openshift/api/config/v1/types_apiserver.go @@ -97,10 +97,9 @@ type Audit struct { // HTTP payloads for read requests (get, list). // - None: no requests are logged at all, not even oauthaccesstokens and oauthauthorizetokens. // - // Warning: It is not recommended to disable audit logging by using the `None` profile unless you - // are fully aware of the risks of not logging data that can be beneficial when troubleshooting issues. - // If you disable audit logging and a support situation arises, you might need to enable audit logging - // and reproduce the issue in order to troubleshoot properly. + // Warning: to raise a Red Hat support request, it is required to set this to Default, + // WriteRequestBodies, or AllRequestBodies to generate audit log events that can be + // analyzed by support. // // If unset, the 'Default' profile is used as the default. // diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go b/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go index bbe3596793d..ba681e65811 100644 --- a/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go +++ b/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go @@ -143,50 +143,43 @@ type ClusterOperatorStatusCondition struct { type ClusterStatusConditionType string const ( - // Available indicates that the component (operator and all configured operands) - // is functional and available in the cluster. Available=False means at least - // part of the component is non-functional, and that the condition requires - // immediate administrator intervention. + // Available indicates that the operand (eg: openshift-apiserver for the + // openshift-apiserver-operator), is functional and available in the cluster. + // Available=False means at least part of the component is non-functional, + // and that the condition requires immediate administrator intervention. OperatorAvailable ClusterStatusConditionType = "Available" - // Progressing indicates that the component (operator and all configured operands) - // is actively rolling out new code, propagating config changes, or otherwise - // moving from one steady state to another. Operators should not report - // progressing when they are reconciling (without action) a previously known - // state. If the observed cluster state has changed and the component is - // reacting to it (scaling up for instance), Progressing should become true - // since it is moving from one steady state to another. + // Progressing indicates that the operator is actively rolling out new code, + // propagating config changes, or otherwise moving from one steady state to + // another. Operators should not report progressing when they are reconciling + // (without action) a previously known state. If the observed cluster state + // has changed and the operator/operand is reacting to it (scaling up for instance), + // Progressing should become true since it is moving from one steady state to + // another. OperatorProgressing ClusterStatusConditionType = "Progressing" - // Degraded indicates that the component (operator and all configured operands) - // does not match its desired state over a period of time resulting in a lower - // quality of service. The period of time may vary by component, but a Degraded - // state represents persistent observation of a condition. As a result, a - // component should not oscillate in and out of Degraded state. A component may - // be Available even if its degraded. For example, a component may desire 3 - // running pods, but 1 pod is crash-looping. The component is Available but - // Degraded because it may have a lower quality of service. A component may be - // Progressing but not Degraded because the transition from one state to - // another does not persist over a long enough period to report Degraded. A - // component should not report Degraded during the course of a normal upgrade. - // A component may report Degraded in response to a persistent infrastructure - // failure that requires eventual administrator intervention. For example, if - // a control plane host is unhealthy and must be replaced. A component should - // report Degraded if unexpected errors occur over a period, but the - // expectation is that all unexpected errors are handled as operators mature. + // Degraded indicates that the operator's current state does not match its + // desired state over a period of time resulting in a lower quality of service. + // The period of time may vary by component, but a Degraded state represents + // persistent observation of a condition. As a result, a component should not + // oscillate in and out of Degraded state. A service may be Available even + // if its degraded. For example, your service may desire 3 running pods, but 1 + // pod is crash-looping. The service is Available but Degraded because it + // may have a lower quality of service. A component may be Progressing but + // not Degraded because the transition from one state to another does not + // persist over a long enough period to report Degraded. A service should not + // report Degraded during the course of a normal upgrade. A service may report + // Degraded in response to a persistent infrastructure failure that requires + // eventual administrator intervention. For example, if a control plane host + // is unhealthy and must be replaced. An operator should report Degraded if + // unexpected errors occur over a period, but the expectation is that all + // unexpected errors are handled as operators mature. OperatorDegraded ClusterStatusConditionType = "Degraded" - // Upgradeable indicates whether the component (operator and all configured - // operands) is safe to upgrade based on the current cluster state. When - // Upgradeable is False, the cluster-version operator will prevent the - // cluster from performing impacted updates unless forced. When set on - // ClusterVersion, the message will explain which updates (minor or patch) - // are impacted. When set on ClusterOperator, False will block minor - // OpenShift updates. The message field should contain a human readable - // description of what the administrator should do to allow the cluster or - // component to successfully update. The cluster-version operator will - // allow updates when this condition is not False, including when it is - // missing, True, or Unknown. + // Upgradeable indicates whether the operator safe to upgrade based on the current cluster state. When status is `False` + // administrators should not upgrade their cluster and the message field should contain a human readable description + // of what the administrator should do to allow the operator to successfully update. A missing condition, True, + // and Unknown are all treated by the CVO as allowing an upgrade. OperatorUpgradeable ClusterStatusConditionType = "Upgradeable" ) diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go index 1e8049ea308..634efaa3e23 100644 --- a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go +++ b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go @@ -123,26 +123,14 @@ type ClusterVersionStatus struct { // +optional Conditions []ClusterOperatorStatusCondition `json:"conditions,omitempty"` - // availableUpdates contains updates recommended for this - // cluster. Updates which appear in conditionalUpdates but not in - // availableUpdates may expose this cluster to known issues. This list - // may be empty if no updates are recommended, if the update service - // is unavailable, or if an invalid channel has been specified. + // availableUpdates contains the list of updates that are appropriate + // for this cluster. This list may be empty if no updates are recommended, + // if the update service is unavailable, or if an invalid channel has + // been specified. // +nullable // +kubebuilder:validation:Required // +required AvailableUpdates []Release `json:"availableUpdates"` - - // conditionalUpdates contains the list of updates that may be - // recommended for this cluster if it meets specific required - // conditions. Consumers interested in the set of updates that are - // actually recommended for this cluster should use - // availableUpdates. This list may be empty if no updates are - // recommended, if the update service is unavailable, or if an empty - // or invalid channel has been specified. - // +listType=atomic - // +optional - ConditionalUpdates []ConditionalUpdate `json:"conditionalUpdates,omitempty"` } // UpdateState is a constant representing whether an update was successfully @@ -202,14 +190,6 @@ type UpdateHistory struct { // +kubebuilder:validation:Required // +required Verified bool `json:"verified"` - - // acceptedRisks records risks which were accepted to initiate the update. - // For example, it may menition an Upgradeable=False or missing signature - // that was overriden via desiredUpdate.force, or an update that was - // initiated despite not being in the availableUpdates set of recommended - // update targets. - // +optional - AcceptedRisks string `json:"acceptedRisks,omitempty"` } // ClusterID is string RFC4122 uuid. @@ -310,112 +290,6 @@ type Release struct { // availableUpdates field is accurate and recent. const RetrievedUpdates ClusterStatusConditionType = "RetrievedUpdates" -// ConditionalUpdate represents an update which is recommended to some -// clusters on the version the current cluster is reconciling, but which -// may not be recommended for the current cluster. -type ConditionalUpdate struct { - // release is the target of the update. - // +kubebuilder:validation:Required - // +required - Release Release `json:"release"` - - // risks represents the range of issues associated with - // updating to the target release. The cluster-version - // operator will evaluate all entries, and only recommend the - // update if there is at least one entry and all entries - // recommend the update. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinItems=1 - // +patchMergeKey=name - // +patchStrategy=merge - // +listType=map - // +listMapKey=name - // +required - Risks []ConditionalUpdateRisk `json:"risks"` - - // conditions represents the observations of the conditional update's - // current status. Known types are: - // * Evaluating, for whether the cluster-version operator will attempt to evaluate any risks[].matchingRules. - // * Recommended, for whether the update is recommended for the current cluster. - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -} - -// ConditionalUpdateRisk represents a reason and cluster-state -// for not recommending a conditional update. -// +k8s:deepcopy-gen=true -type ConditionalUpdateRisk struct { - // url contains information about this risk. - // +kubebuilder:validation:Required - // +kubebuilder:validation:Format=uri - // +kubebuilder:validation:MinLength=1 - // +required - URL string `json:"url"` - - // name is the CamelCase reason for not recommending a - // conditional update, in the event that matchingRules match the - // cluster state. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +required - Name string `json:"name"` - - // message provides additional information about the risk of - // updating, in the event that matchingRules match the cluster - // state. This is only to be consumed by humans. It may - // contain Line Feed characters (U+000A), which should be - // rendered as new lines. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +required - Message string `json:"message"` - - // matchingRules is a slice of conditions for deciding which - // clusters match the risk and which do not. The slice is - // ordered by decreasing precedence. The cluster-version - // operator will walk the slice in order, and stop after the - // first it can successfully evaluate. If no condition can be - // successfully evaluated, the update will not be recommended. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinItems=1 - // +listType=atomic - // +required - MatchingRules []ClusterCondition `json:"matchingRules"` -} - -// ClusterCondition is a union of typed cluster conditions. The 'type' -// property determines which of the type-specific properties are relevant. -// When evaluated on a cluster, the condition may match, not match, or -// fail to evaluate. -// +k8s:deepcopy-gen=true -type ClusterCondition struct { - // type represents the cluster-condition type. This defines - // the members and semantics of any additional properties. - // +kubebuilder:validation:Required - // +kubebuilder:validation:Enum={"Always","PromQL"} - // +required - Type string `json:"type"` - - // promQL represents a cluster condition based on PromQL. - // +optional - PromQL *PromQLClusterCondition `json:"promql,omitempty"` -} - -// PromQLClusterCondition represents a cluster condition based on PromQL. -type PromQLClusterCondition struct { - // PromQL is a PromQL query classifying clusters. This query - // query should return a 1 in the match case and a 0 in the - // does-not-match case case. Queries which return no time - // series, or which return values besides 0 or 1, are - // evaluation failures. - // +kubebuilder:validation:Required - // +required - PromQL string `json:"promql"` -} - // ClusterVersionList is a list of ClusterVersion resources. // // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). diff --git a/vendor/github.com/openshift/api/config/v1/types_feature.go b/vendor/github.com/openshift/api/config/v1/types_feature.go index 51e5877641c..2f0dce3b50b 100644 --- a/vendor/github.com/openshift/api/config/v1/types_feature.go +++ b/vendor/github.com/openshift/api/config/v1/types_feature.go @@ -111,18 +111,13 @@ var FeatureSets = map[FeatureSet]*FeatureGateEnabledDisabled{ Disabled: []string{}, }, TechPreviewNoUpgrade: newDefaultFeatures(). - with("CSIDriverAzureDisk"). // sig-storage, jsafrane, OCP specific - with("CSIDriverVSphere"). // sig-storage, jsafrane, OCP specific - with("CSIMigrationAWS"). // sig-storage, jsafrane, Kubernetes feature gate - with("CSIMigrationOpenStack"). // sig-storage, jsafrane, Kubernetes feature gate - with("CSIMigrationGCE"). // sig-storage, fbertina, Kubernetes feature gate - with("CSIMigrationAzureDisk"). // sig-storage, fbertina, Kubernetes feature gate - with("CSIMigrationAzureFile"). // sig-storage, fbertina, Kubernetes feature gate - with("CSIMigrationVSphere"). // sig-storage, fbertina, Kubernetes feature gate - with("ExternalCloudProvider"). // sig-cloud-provider, jspeed, OCP specific - with("InsightsOperatorPullingSCA"). // insights-operator/ccx, tremes, OCP specific - with("CSIDriverSharedResource"). // sig-build, adkaplan, OCP specific - with("BuildCSIVolumes"). // sig-build, adkaplan, OCP specific + with("CSIDriverAzureDisk"). // sig-storage, jsafrane, OCP specific + with("CSIDriverVSphere"). // sig-storage, jsafrane, OCP specific + with("CSIMigrationAWS"). // sig-storage, jsafrane, Kubernetes feature gate + with("CSIMigrationOpenStack"). // sig-storage, jsafrane, Kubernetes feature gate + with("CSIMigrationGCE"). // sig-storage, fbertina, Kubernetes feature gate + with("CSIMigrationAzureDisk"). // sig-storage, fbertina, Kubernetes feature gate + with("ExternalCloudProvider"). // sig-cloud-provider, jspeed, OCP specific toFeatures(), LatencySensitive: newDefaultFeatures(). with( @@ -144,7 +139,6 @@ var defaultFeatures = &FeatureGateEnabledDisabled{ "NodeDisruptionExclusion", // sig-scheduling, ccoleman "ServiceNodeExclusion", // sig-scheduling, ccoleman "DownwardAPIHugePages", // sig-node, rphillips - "PodSecurity", // sig-auth, s-urbaniak }, Disabled: []string{ "LegacyNodeRoleBehavior", // sig-scheduling, ccoleman diff --git a/vendor/github.com/openshift/api/config/v1/types_image_content_policy.go b/vendor/github.com/openshift/api/config/v1/types_image_content_policy.go deleted file mode 100644 index 8ccad9c53e3..00000000000 --- a/vendor/github.com/openshift/api/config/v1/types_image_content_policy.go +++ /dev/null @@ -1,89 +0,0 @@ -package v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageContentPolicy holds cluster-wide information about how to handle registry mirror rules. -// When multiple policies are defined, the outcome of the behavior is defined on each field. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageContentPolicy struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec ImageContentPolicySpec `json:"spec"` -} - -// ImageContentPolicySpec is the specification of the ImageContentPolicy CRD. -type ImageContentPolicySpec struct { - // repositoryDigestMirrors allows images referenced by image digests in pods to be - // pulled from alternative mirrored repository locations. The image pull specification - // provided to the pod will be compared to the source locations described in RepositoryDigestMirrors - // and the image may be pulled down from any of the mirrors in the list instead of the - // specified repository allowing administrators to choose a potentially faster mirror. - // To pull image from mirrors by tags, should set the "allowMirrorByTags". - // - // Each “source” repository is treated independently; configurations for different “source” - // repositories don’t interact. - // - // If the "mirrors" is not specified, the image will continue to be pulled from the specified - // repository in the pull spec. - // - // When multiple policies are defined for the same “source” repository, the sets of defined - // mirrors will be merged together, preserving the relative order of the mirrors, if possible. - // For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the - // mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict - // (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified. - // +optional - // +listType=map - // +listMapKey=source - RepositoryDigestMirrors []RepositoryDigestMirrors `json:"repositoryDigestMirrors"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageContentPolicyList lists the items in the ImageContentPolicy CRD. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageContentPolicyList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []ImageContentPolicy `json:"items"` -} - -// RepositoryDigestMirrors holds cluster-wide information about how to handle mirrors in the registries config. -type RepositoryDigestMirrors struct { - // source is the repository that users refer to, e.g. in image pull specifications. - // +required - // +kubebuilder:validation:Required - // +kubebuilder:validation:Pattern=`^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])(:[0-9]+)?(\/[^\/:\n]+)*(\/[^\/:\n]+((:[^\/:\n]+)|(@[^\n]+)))?$` - Source string `json:"source"` - // allowMirrorByTags if true, the mirrors can be used to pull the images that are referenced by their tags. Default is false, the mirrors only work when pulling the images that are referenced by their digests. - // Pulling images by tag can potentially yield different images, depending on which endpoint - // we pull from. Forcing digest-pulls for mirrors avoids that issue. - // +optional - AllowMirrorByTags bool `json:"allowMirrorByTags,omitempty"` - // mirrors is zero or more repositories that may also contain the same images. - // If the "mirrors" is not specified, the image will continue to be pulled from the specified - // repository in the pull spec. No mirror will be configured. - // The order of mirrors in this list is treated as the user's desired priority, while source - // is by default considered lower priority than all mirrors. Other cluster configuration, - // including (but not limited to) other repositoryDigestMirrors objects, - // may impact the exact order mirrors are contacted in, or some mirrors may be contacted - // in parallel, so this should be considered a preference rather than a guarantee of ordering. - // +optional - // +listType=set - Mirrors []Mirror `json:"mirrors,omitempty"` -} - -// +kubebuilder:validation:Pattern=`^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])(:[0-9]+)?(\/[^\/:\n]+)*(\/[^\/:\n]+((:[^\/:\n]+)|(@[^\n]+)))?$` -type Mirror string diff --git a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go index 4863a98e70b..42cd3750964 100644 --- a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go +++ b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go @@ -124,7 +124,7 @@ const ( ) // PlatformType is a specific supported infrastructure provider. -// +kubebuilder:validation:Enum="";AWS;Azure;BareMetal;GCP;Libvirt;OpenStack;None;VSphere;oVirt;IBMCloud;KubeVirt;EquinixMetal;PowerVS;AlibabaCloud +// +kubebuilder:validation:Enum="";AWS;Azure;BareMetal;GCP;Libvirt;OpenStack;None;VSphere;oVirt;IBMCloud;KubeVirt;EquinixMetal;PowerVS type PlatformType string const ( @@ -164,11 +164,8 @@ const ( // EquinixMetalPlatformType represents Equinix Metal infrastructure. EquinixMetalPlatformType PlatformType = "EquinixMetal" - // PowerVSPlatformType represents IBM Power Systems Virtual Servers infrastructure. + // PowerVSPlatformType represents the IBM Power Virtual Systems offering (colo with IBM Cloud) PowerVSPlatformType PlatformType = "PowerVS" - - // AlibabaCloudPlatformType represents Alibaba Cloud infrastructure. - AlibabaCloudPlatformType PlatformType = "AlibabaCloud" ) // IBMCloudProviderType is a specific supported IBM Cloud provider cluster type @@ -191,9 +188,9 @@ type PlatformSpec struct { // balancers, dynamic volume provisioning, machine creation and deletion, and // other integrations are enabled. If None, no infrastructure automation is // enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", - // "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", "PowerVS", - // "AlibabaCloud" and "None". Individual components may not support all platforms, - // and must handle unrecognized platforms as None if they do not support that platform. + // "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", "PowerVS", and "None". + // Individual components may not support all platforms, and must handle unrecognized + // platforms as None if they do not support that platform. // // +unionDiscriminator Type PlatformType `json:"type"` @@ -238,13 +235,8 @@ type PlatformSpec struct { // +optional EquinixMetal *EquinixMetalPlatformSpec `json:"equinixMetal,omitempty"` - // PowerVS contains settings specific to the IBM Power Systems Virtual Servers infrastructure provider. - // +optional + // PowerVS contains settings specific to the IBM Power Virtual Systems offering (colo with IBM Cloud) PowerVS *PowerVSPlatformSpec `json:"powervs,omitempty"` - - // AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. - // +optional - AlibabaCloud *AlibabaCloudPlatformSpec `json:"alibabaCloud,omitempty"` } // PlatformStatus holds the current status specific to the underlying infrastructure provider @@ -256,9 +248,9 @@ type PlatformStatus struct { // balancers, dynamic volume provisioning, machine creation and deletion, and // other integrations are enabled. If None, no infrastructure automation is // enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", - // "OpenStack", "VSphere", "oVirt", "EquinixMetal", "PowerVS", "AlibabaCloud" and "None". - // Individual components may not support all platforms, and must handle - // unrecognized platforms as None if they do not support that platform. + // "OpenStack", "VSphere", "oVirt", "EquinixMetal", "PowerVS", and "None". + // Individual components may not support all platforms, and must handle unrecognized + // platforms as None if they do not support that platform. // // This value will be synced with to the `status.platform` and `status.platformStatus.type`. // Currently this value cannot be changed once set. @@ -288,6 +280,10 @@ type PlatformStatus struct { // +optional Ovirt *OvirtPlatformStatus `json:"ovirt,omitempty"` + // PowerVS contains settings specific to the IBM Power Systems Virtual Server infrastructure. + // +optional + PowerVS *PowerVSPlatformStatus `json:"powervs,omitempty"` + // VSphere contains settings specific to the VSphere infrastructure provider. // +optional VSphere *VSpherePlatformStatus `json:"vsphere,omitempty"` @@ -303,14 +299,6 @@ type PlatformStatus struct { // EquinixMetal contains settings specific to the Equinix Metal infrastructure provider. // +optional EquinixMetal *EquinixMetalPlatformStatus `json:"equinixMetal,omitempty"` - - // PowerVS contains settings specific to the Power Systems Virtual Servers infrastructure provider. - // +optional - PowerVS *PowerVSPlatformStatus `json:"powervs,omitempty"` - - // AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. - // +optional - AlibabaCloud *AlibabaCloudPlatformStatus `json:"alibabaCloud,omitempty"` } // AWSServiceEndpoint store the configuration of a custom url to @@ -595,12 +583,12 @@ type EquinixMetalPlatformStatus struct { IngressIP string `json:"ingressIP,omitempty"` } -// PowervsServiceEndpoint stores the configuration of a custom url to +// PowervsServiceEndpoint store the configuration of a custom url to // override existing defaults of PowerVS Services. type PowerVSServiceEndpoint struct { - // name is the name of the Power VS service. + // Name is the name of the Power VS services. + // Note that not all locations incude Power VS. // - // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern=`^[a-z0-9-]+$` Name string `json:"name"` @@ -608,74 +596,27 @@ type PowerVSServiceEndpoint struct { // endpoint for a client. // This must be provided and cannot be empty. // - // +kubebuilder:validation:Required - // +kubebuilder:validation:Type=string - // +kubebuilder:validation:Format=uri // +kubebuilder:validation:Pattern=`^https://` URL string `json:"url"` } -// PowerVSPlatformSpec holds the desired state of the IBM Power Systems Virtual Servers infrastructure provider. +// PowerVSPlatformSpec holds the desired state of the Power Systems Virtual Servers infrastructure provider. // This only includes fields that can be modified in the cluster. type PowerVSPlatformSpec struct{} -// PowerVSPlatformStatus holds the current status of the IBM Power Systems Virtual Servers infrastrucutre provider. +// PowerVSPlatformStatus holds the current status of the Power VS infrastructure provider. type PowerVSPlatformStatus struct { - // region holds the default Power VS region for new Power VS resources created by the cluster. + // Region holds the default Power VS region for new Power VS resources created by the cluster. Region string `json:"region"` - // zone holds the default zone for the new Power VS resources created by the cluster. + // Zone holds the default colo zone for the new Power VS resources created by the cluster. // Note: Currently only single-zone OCP clusters are supported Zone string `json:"zone"` - // serviceEndpoints is a list of custom endpoints which will override the default - // service endpoints of a Power VS service. + // ServiceEndpoints list contains custom endpoints which will override default + // service endpoint of Power VS Services. // +optional ServiceEndpoints []PowerVSServiceEndpoint `json:"serviceEndpoints,omitempty"` - - // CISInstanceCRN is the CRN of the Cloud Internet Services instance managing - // the DNS zone for the cluster's base domain - CISInstanceCRN string `json:"cisInstanceCRN,omitempty"` -} - -// AlibabaCloudPlatformSpec holds the desired state of the Alibaba Cloud infrastructure provider. -// This only includes fields that can be modified in the cluster. -type AlibabaCloudPlatformSpec struct{} - -// AlibabaCloudPlatformStatus holds the current status of the Alibaba Cloud infrastructure provider. -type AlibabaCloudPlatformStatus struct { - // region specifies the region for Alibaba Cloud resources created for the cluster. - // +kubebuilder:validation:Required - // +kubebuilder:validation:Pattern=`^[0-9A-Za-z-]+$` - // +required - Region string `json:"region"` - // resourceGroupID is the ID of the resource group for the cluster. - // +kubebuilder:validation:Required - // +kubebuilder:validation:Pattern=`^rg-[0-9A-Za-z]+$` - // +required - ResourceGroupID string `json:"resourceGroupID"` - // resourceTags is a list of additional tags to apply to Alibaba Cloud resources created for the cluster. - // +kubebuilder:validation:MaxItems=20 - // +listType=map - // +listMapKey=key - // +optional - ResourceTags []AlibabaCloudResourceTag `json:"resourceTags,omitempty"` -} - -// AlibabaCloudResourceTag is the set of tags to add to apply to resources. -type AlibabaCloudResourceTag struct { - // key is the key of the tag. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - // +required - Key string `json:"key"` - // value is the value of the tag. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - // +required - Value string `json:"value"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/github.com/openshift/api/config/v1/types_oauth.go b/vendor/github.com/openshift/api/config/v1/types_oauth.go index 2bd5accb89c..5b5849b65c4 100644 --- a/vendor/github.com/openshift/api/config/v1/types_oauth.go +++ b/vendor/github.com/openshift/api/config/v1/types_oauth.go @@ -66,8 +66,6 @@ type TokenConfig struct { // per client, then that value takes precedence. If the timeout value is // not specified and the client does not override the value, then tokens // are valid until their lifetime. - // - // WARNING: existing tokens' timeout will not be affected (lowered) by changing this value // +optional AccessTokenInactivityTimeout *metav1.Duration `json:"accessTokenInactivityTimeout,omitempty"` } diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go index 51fd21930df..18b47a79d1d 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go @@ -307,59 +307,6 @@ func (in *AdmissionPluginConfig) DeepCopy() *AdmissionPluginConfig { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlibabaCloudPlatformSpec) DeepCopyInto(out *AlibabaCloudPlatformSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaCloudPlatformSpec. -func (in *AlibabaCloudPlatformSpec) DeepCopy() *AlibabaCloudPlatformSpec { - if in == nil { - return nil - } - out := new(AlibabaCloudPlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlibabaCloudPlatformStatus) DeepCopyInto(out *AlibabaCloudPlatformStatus) { - *out = *in - if in.ResourceTags != nil { - in, out := &in.ResourceTags, &out.ResourceTags - *out = make([]AlibabaCloudResourceTag, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaCloudPlatformStatus. -func (in *AlibabaCloudPlatformStatus) DeepCopy() *AlibabaCloudPlatformStatus { - if in == nil { - return nil - } - out := new(AlibabaCloudPlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlibabaCloudResourceTag) DeepCopyInto(out *AlibabaCloudResourceTag) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaCloudResourceTag. -func (in *AlibabaCloudResourceTag) DeepCopy() *AlibabaCloudResourceTag { - if in == nil { - return nil - } - out := new(AlibabaCloudResourceTag) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Audit) DeepCopyInto(out *Audit) { *out = *in @@ -790,27 +737,6 @@ func (in *ClientConnectionOverrides) DeepCopy() *ClientConnectionOverrides { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition) { - *out = *in - if in.PromQL != nil { - in, out := &in.PromQL, &out.PromQL - *out = new(PromQLClusterCondition) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCondition. -func (in *ClusterCondition) DeepCopy() *ClusterCondition { - if in == nil { - return nil - } - out := new(ClusterCondition) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterNetworkEntry) DeepCopyInto(out *ClusterNetworkEntry) { *out = *in @@ -1067,13 +993,6 @@ func (in *ClusterVersionStatus) DeepCopyInto(out *ClusterVersionStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.ConditionalUpdates != nil { - in, out := &in.ConditionalUpdates, &out.ConditionalUpdates - *out = make([]ConditionalUpdate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } return } @@ -1158,60 +1077,6 @@ func (in *ComponentRouteStatus) DeepCopy() *ComponentRouteStatus { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConditionalUpdate) DeepCopyInto(out *ConditionalUpdate) { - *out = *in - in.Release.DeepCopyInto(&out.Release) - if in.Risks != nil { - in, out := &in.Risks, &out.Risks - *out = make([]ConditionalUpdateRisk, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionalUpdate. -func (in *ConditionalUpdate) DeepCopy() *ConditionalUpdate { - if in == nil { - return nil - } - out := new(ConditionalUpdate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConditionalUpdateRisk) DeepCopyInto(out *ConditionalUpdateRisk) { - *out = *in - if in.MatchingRules != nil { - in, out := &in.MatchingRules, &out.MatchingRules - *out = make([]ClusterCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionalUpdateRisk. -func (in *ConditionalUpdateRisk) DeepCopy() *ConditionalUpdateRisk { - if in == nil { - return nil - } - out := new(ConditionalUpdateRisk) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConfigMapFileReference) DeepCopyInto(out *ConfigMapFileReference) { *out = *in @@ -2182,89 +2047,6 @@ func (in *Image) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageContentPolicy) DeepCopyInto(out *ImageContentPolicy) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentPolicy. -func (in *ImageContentPolicy) DeepCopy() *ImageContentPolicy { - if in == nil { - return nil - } - out := new(ImageContentPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageContentPolicy) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageContentPolicyList) DeepCopyInto(out *ImageContentPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ImageContentPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentPolicyList. -func (in *ImageContentPolicyList) DeepCopy() *ImageContentPolicyList { - if in == nil { - return nil - } - out := new(ImageContentPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageContentPolicyList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageContentPolicySpec) DeepCopyInto(out *ImageContentPolicySpec) { - *out = *in - if in.RepositoryDigestMirrors != nil { - in, out := &in.RepositoryDigestMirrors, &out.RepositoryDigestMirrors - *out = make([]RepositoryDigestMirrors, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentPolicySpec. -func (in *ImageContentPolicySpec) DeepCopy() *ImageContentPolicySpec { - if in == nil { - return nil - } - out := new(ImageContentPolicySpec) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ImageLabel) DeepCopyInto(out *ImageLabel) { *out = *in @@ -3409,11 +3191,6 @@ func (in *PlatformSpec) DeepCopyInto(out *PlatformSpec) { *out = new(PowerVSPlatformSpec) **out = **in } - if in.AlibabaCloud != nil { - in, out := &in.AlibabaCloud, &out.AlibabaCloud - *out = new(AlibabaCloudPlatformSpec) - **out = **in - } return } @@ -3460,6 +3237,11 @@ func (in *PlatformStatus) DeepCopyInto(out *PlatformStatus) { *out = new(OvirtPlatformStatus) **out = **in } + if in.PowerVS != nil { + in, out := &in.PowerVS, &out.PowerVS + *out = new(PowerVSPlatformStatus) + (*in).DeepCopyInto(*out) + } if in.VSphere != nil { in, out := &in.VSphere, &out.VSphere *out = new(VSpherePlatformStatus) @@ -3480,16 +3262,6 @@ func (in *PlatformStatus) DeepCopyInto(out *PlatformStatus) { *out = new(EquinixMetalPlatformStatus) **out = **in } - if in.PowerVS != nil { - in, out := &in.PowerVS, &out.PowerVS - *out = new(PowerVSPlatformStatus) - (*in).DeepCopyInto(*out) - } - if in.AlibabaCloud != nil { - in, out := &in.AlibabaCloud, &out.AlibabaCloud - *out = new(AlibabaCloudPlatformStatus) - (*in).DeepCopyInto(*out) - } return } @@ -3650,22 +3422,6 @@ func (in *ProjectStatus) DeepCopy() *ProjectStatus { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PromQLClusterCondition) DeepCopyInto(out *PromQLClusterCondition) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PromQLClusterCondition. -func (in *PromQLClusterCondition) DeepCopy() *PromQLClusterCondition { - if in == nil { - return nil - } - out := new(PromQLClusterCondition) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Proxy) DeepCopyInto(out *Proxy) { *out = *in @@ -3855,27 +3611,6 @@ func (in *RemoteConnectionInfo) DeepCopy() *RemoteConnectionInfo { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RepositoryDigestMirrors) DeepCopyInto(out *RepositoryDigestMirrors) { - *out = *in - if in.Mirrors != nil { - in, out := &in.Mirrors, &out.Mirrors - *out = make([]Mirror, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryDigestMirrors. -func (in *RepositoryDigestMirrors) DeepCopy() *RepositoryDigestMirrors { - if in == nil { - return nil - } - out := new(RepositoryDigestMirrors) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RequestHeaderIdentityProvider) DeepCopyInto(out *RequestHeaderIdentityProvider) { *out = *in diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go index 28ac40830b9..d80b3552cd2 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go @@ -183,8 +183,8 @@ func (LeaderElection) SwaggerDoc() map[string]string { var map_MaxAgePolicy = map[string]string{ "": "MaxAgePolicy contains a numeric range for specifying a compliant HSTS max-age for the enclosing RequiredHSTSPolicy", - "largestMaxAge": "The largest allowed value (in seconds) of the RequiredHSTSPolicy max-age This value can be left unspecified, in which case no upper limit is enforced.", - "smallestMaxAge": "The smallest allowed value (in seconds) of the RequiredHSTSPolicy max-age Setting max-age=0 allows the deletion of an existing HSTS header from a host. This is a necessary tool for administrators to quickly correct mistakes. This value can be left unspecified, in which case no lower limit is enforced.", + "largestMaxAge": "The largest allowed value (in seconds) of the RequiredHSTSPolicy max-age This value can be left unspecified, in which case no upper limit is enforced. kubebuilder:validation:minimum=0:maximum=2147483647", + "smallestMaxAge": "The smallest allowed value (in seconds) of the RequiredHSTSPolicy max-age Setting max-age=0 allows the deletion of an existing HSTS header from a host. This is a necessary tool for administrators to quickly correct mistakes. This value can be left unspecified, in which case no lower limit is enforced. kubebuilder:validation:minimum=0:maximum=2147483647", } func (MaxAgePolicy) SwaggerDoc() map[string]string { @@ -212,7 +212,7 @@ func (RemoteConnectionInfo) SwaggerDoc() map[string]string { var map_RequiredHSTSPolicy = map[string]string{ "namespaceSelector": "namespaceSelector specifies a label selector such that the policy applies only to those routes that are in namespaces with labels that match the selector, and are in one of the DomainPatterns. Defaults to the empty LabelSelector, which matches everything.", - "domainPatterns": "domainPatterns is a list of domains for which the desired HSTS annotations are required. If domainPatterns is specified and a route is created with a spec.host matching one of the domains, the route must specify the HSTS Policy components described in the matching RequiredHSTSPolicy.\n\nThe use of wildcards is allowed like this: *.foo.com matches everything under foo.com. foo.com only matches foo.com, so to cover foo.com and everything under it, you must specify *both*.", + "domainPatterns": "domainPatterns is a list of domains for which the desired HSTS annotations are required. If domainPatterns is specified and a route is created with a spec.host matching one of the domains, the route must specify the HSTS Policy components described in the matching RequiredHSTSPolicy.\n\nThe use of wildcards is allowed like this: *.foo.com matches everything under foo.com. foo.com only matches foo.com, so to cover foo.com and everything under it, you must specify *both*. kubebuilder:validation:MinLength=1", "maxAge": "maxAge is the delta time range in seconds during which hosts are regarded as HSTS hosts. If set to 0, it negates the effect, and hosts are removed as HSTS hosts. If set to 0 and includeSubdomains is specified, all subdomains of the host are also removed as HSTS hosts. maxAge is a time-to-live value, and if this policy is not refreshed on a client, the HSTS policy will eventually expire on that client.", "preloadPolicy": "preloadPolicy directs the client to include hosts in its host preload list so that it never needs to do an initial load to get the HSTS header (note that this is not defined in RFC 6797 and is therefore client implementation-dependent).", "includeSubDomainsPolicy": "includeSubDomainsPolicy means the HSTS Policy should apply to any subdomains of the host's domain name. Thus, for the host bar.foo.com, if includeSubDomainsPolicy was set to RequireIncludeSubDomains: - the host app.bar.foo.com would inherit the HSTS Policy of bar.foo.com - the host bar.foo.com would inherit the HSTS Policy of bar.foo.com - the host foo.com would NOT inherit the HSTS Policy of bar.foo.com - the host def.foo.com would NOT inherit the HSTS Policy of bar.foo.com", @@ -323,7 +323,7 @@ func (APIServerSpec) SwaggerDoc() map[string]string { } var map_Audit = map[string]string{ - "profile": "profile specifies the name of the desired top-level audit profile to be applied to all requests sent to any of the OpenShift-provided API servers in the cluster (kube-apiserver, openshift-apiserver and oauth-apiserver), with the exception of those requests that match one or more of the customRules.\n\nThe following profiles are provided: - Default: default policy which means MetaData level logging with the exception of events\n (not logged at all), oauthaccesstokens and oauthauthorizetokens (both logged at RequestBody\n level).\n- WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for write requests (create, update, patch). - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response HTTP payloads for read requests (get, list). - None: no requests are logged at all, not even oauthaccesstokens and oauthauthorizetokens.\n\nWarning: It is not recommended to disable audit logging by using the `None` profile unless you are fully aware of the risks of not logging data that can be beneficial when troubleshooting issues. If you disable audit logging and a support situation arises, you might need to enable audit logging and reproduce the issue in order to troubleshoot properly.\n\nIf unset, the 'Default' profile is used as the default.", + "profile": "profile specifies the name of the desired top-level audit profile to be applied to all requests sent to any of the OpenShift-provided API servers in the cluster (kube-apiserver, openshift-apiserver and oauth-apiserver), with the exception of those requests that match one or more of the customRules.\n\nThe following profiles are provided: - Default: default policy which means MetaData level logging with the exception of events\n (not logged at all), oauthaccesstokens and oauthauthorizetokens (both logged at RequestBody\n level).\n- WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for write requests (create, update, patch). - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response HTTP payloads for read requests (get, list). - None: no requests are logged at all, not even oauthaccesstokens and oauthauthorizetokens.\n\nWarning: to raise a Red Hat support request, it is required to set this to Default, WriteRequestBodies, or AllRequestBodies to generate audit log events that can be analyzed by support.\n\nIf unset, the 'Default' profile is used as the default.", "customRules": "customRules specify profiles per group. These profile take precedence over the top-level profile field if they apply. They are evaluation from top to bottom and the first one that matches, applies.", } @@ -528,16 +528,6 @@ func (OperandVersion) SwaggerDoc() map[string]string { return map_OperandVersion } -var map_ClusterCondition = map[string]string{ - "": "ClusterCondition is a union of typed cluster conditions. The 'type' property determines which of the type-specific properties are relevant. When evaluated on a cluster, the condition may match, not match, or fail to evaluate.", - "type": "type represents the cluster-condition type. This defines the members and semantics of any additional properties.", - "promql": "promQL represents a cluster condition based on PromQL.", -} - -func (ClusterCondition) SwaggerDoc() map[string]string { - return map_ClusterCondition -} - var map_ClusterVersion = map[string]string{ "": "ClusterVersion is the configuration for the ClusterVersionOperator. This is where parameters related to automatic updates can be set.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "spec": "spec is the desired state of the cluster version - the operator will work to ensure that the desired version is applied to the cluster.", @@ -576,8 +566,7 @@ var map_ClusterVersionStatus = map[string]string{ "observedGeneration": "observedGeneration reports which version of the spec is being synced. If this value is not equal to metadata.generation, then the desired and conditions fields may represent a previous version.", "versionHash": "versionHash is a fingerprint of the content that the cluster will be updated with. It is used by the operator to avoid unnecessary work and is for internal use only.", "conditions": "conditions provides information about the cluster version. The condition \"Available\" is set to true if the desiredUpdate has been reached. The condition \"Progressing\" is set to true if an update is being applied. The condition \"Degraded\" is set to true if an update is currently blocked by a temporary or permanent error. Conditions are only valid for the current desiredUpdate when metadata.generation is equal to status.generation.", - "availableUpdates": "availableUpdates contains updates recommended for this cluster. Updates which appear in conditionalUpdates but not in availableUpdates may expose this cluster to known issues. This list may be empty if no updates are recommended, if the update service is unavailable, or if an invalid channel has been specified.", - "conditionalUpdates": "conditionalUpdates contains the list of updates that may be recommended for this cluster if it meets specific required conditions. Consumers interested in the set of updates that are actually recommended for this cluster should use availableUpdates. This list may be empty if no updates are recommended, if the update service is unavailable, or if an empty or invalid channel has been specified.", + "availableUpdates": "availableUpdates contains the list of updates that are appropriate for this cluster. This list may be empty if no updates are recommended, if the update service is unavailable, or if an invalid channel has been specified.", } func (ClusterVersionStatus) SwaggerDoc() map[string]string { @@ -597,38 +586,6 @@ func (ComponentOverride) SwaggerDoc() map[string]string { return map_ComponentOverride } -var map_ConditionalUpdate = map[string]string{ - "": "ConditionalUpdate represents an update which is recommended to some clusters on the version the current cluster is reconciling, but which may not be recommended for the current cluster.", - "release": "release is the target of the update.", - "risks": "risks represents the range of issues associated with updating to the target release. The cluster-version operator will evaluate all entries, and only recommend the update if there is at least one entry and all entries recommend the update.", - "conditions": "conditions represents the observations of the conditional update's current status. Known types are: * Evaluating, for whether the cluster-version operator will attempt to evaluate any risks[].matchingRules. * Recommended, for whether the update is recommended for the current cluster.", -} - -func (ConditionalUpdate) SwaggerDoc() map[string]string { - return map_ConditionalUpdate -} - -var map_ConditionalUpdateRisk = map[string]string{ - "": "ConditionalUpdateRisk represents a reason and cluster-state for not recommending a conditional update.", - "url": "url contains information about this risk.", - "name": "name is the CamelCase reason for not recommending a conditional update, in the event that matchingRules match the cluster state.", - "message": "message provides additional information about the risk of updating, in the event that matchingRules match the cluster state. This is only to be consumed by humans. It may contain Line Feed characters (U+000A), which should be rendered as new lines.", - "matchingRules": "matchingRules is a slice of conditions for deciding which clusters match the risk and which do not. The slice is ordered by decreasing precedence. The cluster-version operator will walk the slice in order, and stop after the first it can successfully evaluate. If no condition can be successfully evaluated, the update will not be recommended.", -} - -func (ConditionalUpdateRisk) SwaggerDoc() map[string]string { - return map_ConditionalUpdateRisk -} - -var map_PromQLClusterCondition = map[string]string{ - "": "PromQLClusterCondition represents a cluster condition based on PromQL.", - "promql": "PromQL is a PromQL query classifying clusters. This query query should return a 1 in the match case and a 0 in the does-not-match case case. Queries which return no time series, or which return values besides 0 or 1, are evaluation failures.", -} - -func (PromQLClusterCondition) SwaggerDoc() map[string]string { - return map_PromQLClusterCondition -} - var map_Release = map[string]string{ "": "Release represents an OpenShift release image and associated metadata.", "version": "version is a semantic versioning identifying the update version. When this field is part of spec, version is optional if image is specified.", @@ -660,7 +617,6 @@ var map_UpdateHistory = map[string]string{ "version": "version is a semantic versioning identifying the update version. If the requested image does not define a version, or if a failure occurs retrieving the image, this value may be empty.", "image": "image is a container image location that contains the update. This value is always populated.", "verified": "verified indicates whether the provided update was properly verified before it was installed. If this is false the cluster may not be trusted. Verified does not cover upgradeable checks that depend on the cluster state at the time when the update target was accepted.", - "acceptedRisks": "acceptedRisks records risks which were accepted to initiate the update. For example, it may menition an Upgradeable=False or missing signature that was overriden via desiredUpdate.force, or an update that was initiated despite not being in the availableUpdates set of recommended update targets.", } func (UpdateHistory) SwaggerDoc() map[string]string { @@ -845,43 +801,6 @@ func (RegistrySources) SwaggerDoc() map[string]string { return map_RegistrySources } -var map_ImageContentPolicy = map[string]string{ - "": "ImageContentPolicy holds cluster-wide information about how to handle registry mirror rules. When multiple policies are defined, the outcome of the behavior is defined on each field.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "spec": "spec holds user settable values for configuration", -} - -func (ImageContentPolicy) SwaggerDoc() map[string]string { - return map_ImageContentPolicy -} - -var map_ImageContentPolicyList = map[string]string{ - "": "ImageContentPolicyList lists the items in the ImageContentPolicy CRD.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", -} - -func (ImageContentPolicyList) SwaggerDoc() map[string]string { - return map_ImageContentPolicyList -} - -var map_ImageContentPolicySpec = map[string]string{ - "": "ImageContentPolicySpec is the specification of the ImageContentPolicy CRD.", - "repositoryDigestMirrors": "repositoryDigestMirrors allows images referenced by image digests in pods to be pulled from alternative mirrored repository locations. The image pull specification provided to the pod will be compared to the source locations described in RepositoryDigestMirrors and the image may be pulled down from any of the mirrors in the list instead of the specified repository allowing administrators to choose a potentially faster mirror. To pull image from mirrors by tags, should set the \"allowMirrorByTags\".\n\nEach “source” repository is treated independently; configurations for different “source” repositories don’t interact.\n\nIf the \"mirrors\" is not specified, the image will continue to be pulled from the specified repository in the pull spec.\n\nWhen multiple policies are defined for the same “source” repository, the sets of defined mirrors will be merged together, preserving the relative order of the mirrors, if possible. For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified.", -} - -func (ImageContentPolicySpec) SwaggerDoc() map[string]string { - return map_ImageContentPolicySpec -} - -var map_RepositoryDigestMirrors = map[string]string{ - "": "RepositoryDigestMirrors holds cluster-wide information about how to handle mirrors in the registries config.", - "source": "source is the repository that users refer to, e.g. in image pull specifications.", - "allowMirrorByTags": "allowMirrorByTags if true, the mirrors can be used to pull the images that are referenced by their tags. Default is false, the mirrors only work when pulling the images that are referenced by their digests. Pulling images by tag can potentially yield different images, depending on which endpoint we pull from. Forcing digest-pulls for mirrors avoids that issue.", - "mirrors": "mirrors is zero or more repositories that may also contain the same images. If the \"mirrors\" is not specified, the image will continue to be pulled from the specified repository in the pull spec. No mirror will be configured. The order of mirrors in this list is treated as the user's desired priority, while source is by default considered lower priority than all mirrors. Other cluster configuration, including (but not limited to) other repositoryDigestMirrors objects, may impact the exact order mirrors are contacted in, or some mirrors may be contacted in parallel, so this should be considered a preference rather than a guarantee of ordering.", -} - -func (RepositoryDigestMirrors) SwaggerDoc() map[string]string { - return map_RepositoryDigestMirrors -} - var map_AWSPlatformSpec = map[string]string{ "": "AWSPlatformSpec holds the desired state of the Amazon Web Services infrastructure provider. This only includes fields that can be modified in the cluster.", "serviceEndpoints": "serviceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service.", @@ -922,35 +841,6 @@ func (AWSServiceEndpoint) SwaggerDoc() map[string]string { return map_AWSServiceEndpoint } -var map_AlibabaCloudPlatformSpec = map[string]string{ - "": "AlibabaCloudPlatformSpec holds the desired state of the Alibaba Cloud infrastructure provider. This only includes fields that can be modified in the cluster.", -} - -func (AlibabaCloudPlatformSpec) SwaggerDoc() map[string]string { - return map_AlibabaCloudPlatformSpec -} - -var map_AlibabaCloudPlatformStatus = map[string]string{ - "": "AlibabaCloudPlatformStatus holds the current status of the Alibaba Cloud infrastructure provider.", - "region": "region specifies the region for Alibaba Cloud resources created for the cluster.", - "resourceGroupID": "resourceGroupID is the ID of the resource group for the cluster.", - "resourceTags": "resourceTags is a list of additional tags to apply to Alibaba Cloud resources created for the cluster.", -} - -func (AlibabaCloudPlatformStatus) SwaggerDoc() map[string]string { - return map_AlibabaCloudPlatformStatus -} - -var map_AlibabaCloudResourceTag = map[string]string{ - "": "AlibabaCloudResourceTag is the set of tags to add to apply to resources.", - "key": "key is the key of the tag.", - "value": "value is the value of the tag.", -} - -func (AlibabaCloudResourceTag) SwaggerDoc() map[string]string { - return map_AlibabaCloudResourceTag -} - var map_AzurePlatformSpec = map[string]string{ "": "AzurePlatformSpec holds the desired state of the Azure infrastructure provider. This only includes fields that can be modified in the cluster.", } @@ -1149,7 +1039,7 @@ func (OvirtPlatformStatus) SwaggerDoc() map[string]string { var map_PlatformSpec = map[string]string{ "": "PlatformSpec holds the desired state specific to the underlying infrastructure provider of the current cluster. Since these are used at spec-level for the underlying cluster, it is supposed that only one of the spec structs is set.", - "type": "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"KubeVirt\", \"EquinixMetal\", \"PowerVS\", \"AlibabaCloud\" and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.", + "type": "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"KubeVirt\", \"EquinixMetal\", \"PowerVS\", and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.", "aws": "AWS contains settings specific to the Amazon Web Services infrastructure provider.", "azure": "Azure contains settings specific to the Azure infrastructure provider.", "gcp": "GCP contains settings specific to the Google Cloud Platform infrastructure provider.", @@ -1160,8 +1050,7 @@ var map_PlatformSpec = map[string]string{ "ibmcloud": "IBMCloud contains settings specific to the IBMCloud infrastructure provider.", "kubevirt": "Kubevirt contains settings specific to the kubevirt infrastructure provider.", "equinixMetal": "EquinixMetal contains settings specific to the Equinix Metal infrastructure provider.", - "powervs": "PowerVS contains settings specific to the IBM Power Systems Virtual Servers infrastructure provider.", - "alibabaCloud": "AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider.", + "powervs": "PowerVS contains settings specific to the IBM Power Virtual Systems offering (colo with IBM Cloud)", } func (PlatformSpec) SwaggerDoc() map[string]string { @@ -1170,19 +1059,18 @@ func (PlatformSpec) SwaggerDoc() map[string]string { var map_PlatformStatus = map[string]string{ "": "PlatformStatus holds the current status specific to the underlying infrastructure provider of the current cluster. Since these are used at status-level for the underlying cluster, it is supposed that only one of the status structs is set.", - "type": "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"EquinixMetal\", \"PowerVS\", \"AlibabaCloud\" and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.\n\nThis value will be synced with to the `status.platform` and `status.platformStatus.type`. Currently this value cannot be changed once set.", + "type": "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"EquinixMetal\", \"PowerVS\", and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.\n\nThis value will be synced with to the `status.platform` and `status.platformStatus.type`. Currently this value cannot be changed once set.", "aws": "AWS contains settings specific to the Amazon Web Services infrastructure provider.", "azure": "Azure contains settings specific to the Azure infrastructure provider.", "gcp": "GCP contains settings specific to the Google Cloud Platform infrastructure provider.", "baremetal": "BareMetal contains settings specific to the BareMetal platform.", "openstack": "OpenStack contains settings specific to the OpenStack infrastructure provider.", "ovirt": "Ovirt contains settings specific to the oVirt infrastructure provider.", + "powervs": "PowerVS contains settings specific to the IBM Power Systems Virtual Server infrastructure.", "vsphere": "VSphere contains settings specific to the VSphere infrastructure provider.", "ibmcloud": "IBMCloud contains settings specific to the IBMCloud infrastructure provider.", "kubevirt": "Kubevirt contains settings specific to the kubevirt infrastructure provider.", "equinixMetal": "EquinixMetal contains settings specific to the Equinix Metal infrastructure provider.", - "powervs": "PowerVS contains settings specific to the Power Systems Virtual Servers infrastructure provider.", - "alibabaCloud": "AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider.", } func (PlatformStatus) SwaggerDoc() map[string]string { @@ -1190,7 +1078,7 @@ func (PlatformStatus) SwaggerDoc() map[string]string { } var map_PowerVSPlatformSpec = map[string]string{ - "": "PowerVSPlatformSpec holds the desired state of the IBM Power Systems Virtual Servers infrastructure provider. This only includes fields that can be modified in the cluster.", + "": "PowerVSPlatformSpec holds the desired state of the Power Systems Virtual Servers infrastructure provider. This only includes fields that can be modified in the cluster.", } func (PowerVSPlatformSpec) SwaggerDoc() map[string]string { @@ -1198,11 +1086,10 @@ func (PowerVSPlatformSpec) SwaggerDoc() map[string]string { } var map_PowerVSPlatformStatus = map[string]string{ - "": "PowerVSPlatformStatus holds the current status of the IBM Power Systems Virtual Servers infrastrucutre provider.", - "region": "region holds the default Power VS region for new Power VS resources created by the cluster.", - "zone": "zone holds the default zone for the new Power VS resources created by the cluster. Note: Currently only single-zone OCP clusters are supported", - "serviceEndpoints": "serviceEndpoints is a list of custom endpoints which will override the default service endpoints of a Power VS service.", - "cisInstanceCRN": "CISInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain", + "": "PowerVSPlatformStatus holds the current status of the Power VS infrastructure provider.", + "region": "Region holds the default Power VS region for new Power VS resources created by the cluster.", + "zone": "Zone holds the default colo zone for the new Power VS resources created by the cluster. Note: Currently only single-zone OCP clusters are supported", + "serviceEndpoints": "ServiceEndpoints list contains custom endpoints which will override default service endpoint of Power VS Services.", } func (PowerVSPlatformStatus) SwaggerDoc() map[string]string { @@ -1210,8 +1097,8 @@ func (PowerVSPlatformStatus) SwaggerDoc() map[string]string { } var map_PowerVSServiceEndpoint = map[string]string{ - "": "PowervsServiceEndpoint stores the configuration of a custom url to override existing defaults of PowerVS Services.", - "name": "name is the name of the Power VS service.", + "": "PowervsServiceEndpoint store the configuration of a custom url to override existing defaults of PowerVS Services.", + "name": "Name is the name of the Power VS services. Note that not all locations incude Power VS.", "url": "url is fully qualified URI with scheme https, that overrides the default generated endpoint for a client. This must be provided and cannot be empty.", } @@ -1608,7 +1495,7 @@ var map_TokenConfig = map[string]string{ "": "TokenConfig holds the necessary configuration options for authorization and access tokens", "accessTokenMaxAgeSeconds": "accessTokenMaxAgeSeconds defines the maximum age of access tokens", "accessTokenInactivityTimeoutSeconds": "accessTokenInactivityTimeoutSeconds - DEPRECATED: setting this field has no effect.", - "accessTokenInactivityTimeout": "accessTokenInactivityTimeout defines the token inactivity timeout for tokens granted by any client. The value represents the maximum amount of time that can occur between consecutive uses of the token. Tokens become invalid if they are not used within this temporal window. The user will need to acquire a new token to regain access once a token times out. Takes valid time duration string such as \"5m\", \"1.5h\" or \"2h45m\". The minimum allowed value for duration is 300s (5 minutes). If the timeout is configured per client, then that value takes precedence. If the timeout value is not specified and the client does not override the value, then tokens are valid until their lifetime.\n\nWARNING: existing tokens' timeout will not be affected (lowered) by changing this value", + "accessTokenInactivityTimeout": "accessTokenInactivityTimeout defines the token inactivity timeout for tokens granted by any client. The value represents the maximum amount of time that can occur between consecutive uses of the token. Tokens become invalid if they are not used within this temporal window. The user will need to acquire a new token to regain access once a token times out. Takes valid time duration string such as \"5m\", \"1.5h\" or \"2h45m\". The minimum allowed value for duration is 300s (5 minutes). If the timeout is configured per client, then that value takes precedence. If the timeout value is not specified and the client does not override the value, then tokens are valid until their lifetime.", } func (TokenConfig) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml index 8accde4e710..330dff7bf01 100644 --- a/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml +++ b/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml @@ -132,11 +132,10 @@ spec: description: "endpointPublishingStrategy is used to publish the ingress controller endpoints to other networks, enable load balancer integrations, etc. \n If unset, the default is based on infrastructure.config.openshift.io/cluster - .status.platform: \n AWS: LoadBalancerService (with External - scope) Azure: LoadBalancerService (with External scope) - \ GCP: LoadBalancerService (with External scope) IBMCloud: - \ LoadBalancerService (with External scope) AlibabaCloud: LoadBalancerService - (with External scope) Libvirt: HostNetwork \n Any other platform + .status.platform: \n AWS: LoadBalancerService (with External + scope) Azure: LoadBalancerService (with External scope) GCP: + \ LoadBalancerService (with External scope) IBMCloud: LoadBalancerService + (with External scope) Libvirt: HostNetwork \n Any other platform types (including None) default to HostNetwork. \n endpointPublishingStrategy cannot be updated." properties: diff --git a/vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01.crd.yaml deleted file mode 100644 index ab52d00b174..00000000000 --- a/vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01.crd.yaml +++ /dev/null @@ -1,631 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/475 - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: networks.operator.openshift.io -spec: - group: operator.openshift.io - names: - kind: Network - listKind: NetworkList - plural: networks - singular: network - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "Network describes the cluster's desired network configuration. - It is consumed by the cluster-network-operator. \n Compatibility level 1: - Stable within a major release for a minimum of 12 months or 3 minor releases - (whichever is longer)." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: NetworkSpec is the top-level network configuration object. - properties: - additionalNetworks: - description: additionalNetworks is a list of extra networks to make - available to pods when multiple networks are enabled. - items: - description: AdditionalNetworkDefinition configures an extra network - that is available but not created by default. Instead, pods must - request them by name. type must be specified, along with exactly - one "Config" that matches the type. - properties: - name: - description: name is the name of the network. This will be populated - in the resulting CRD This must be unique. - type: string - namespace: - description: namespace is the namespace of the network. This - will be populated in the resulting CRD If not given the network - will be created in the default namespace. - type: string - rawCNIConfig: - description: rawCNIConfig is the raw CNI configuration json - to create in the NetworkAttachmentDefinition CRD - type: string - simpleMacvlanConfig: - description: SimpleMacvlanConfig configures the macvlan interface - in case of type:NetworkTypeSimpleMacvlan - properties: - ipamConfig: - description: IPAMConfig configures IPAM module will be used - for IP Address Management (IPAM). - properties: - staticIPAMConfig: - description: StaticIPAMConfig configures the static - IP address in case of type:IPAMTypeStatic - properties: - addresses: - description: Addresses configures IP address for - the interface - items: - description: StaticIPAMAddresses provides IP address - and Gateway for static IPAM addresses - properties: - address: - description: Address is the IP address in - CIDR format - type: string - gateway: - description: Gateway is IP inside of subnet - to designate as the gateway - type: string - type: object - type: array - dns: - description: DNS configures DNS for the interface - properties: - domain: - description: Domain configures the domainname - the local domain used for short hostname lookups - type: string - nameservers: - description: Nameservers points DNS servers - for IP lookup - items: - type: string - type: array - search: - description: Search configures priority ordered - search domains for short hostname lookups - items: - type: string - type: array - type: object - routes: - description: Routes configures IP routes for the - interface - items: - description: StaticIPAMRoutes provides Destination/Gateway - pairs for static IPAM routes - properties: - destination: - description: Destination points the IP route - destination - type: string - gateway: - description: Gateway is the route's next-hop - IP address If unset, a default gateway is - assumed (as determined by the CNI plugin). - type: string - type: object - type: array - type: object - type: - description: Type is the type of IPAM module will be - used for IP Address Management(IPAM). The supported - values are IPAMTypeDHCP, IPAMTypeStatic - type: string - type: object - master: - description: master is the host interface to create the - macvlan interface from. If not specified, it will be default - route interface - type: string - mode: - description: 'mode is the macvlan mode: bridge, private, - vepa, passthru. The default is bridge' - type: string - mtu: - description: mtu is the mtu to use for the macvlan interface. - if unset, host's kernel will select the value. - format: int32 - minimum: 0 - type: integer - type: object - type: - description: type is the type of network The supported values - are NetworkTypeRaw, NetworkTypeSimpleMacvlan - type: string - type: object - type: array - clusterNetwork: - description: clusterNetwork is the IP address pool to use for pod - IPs. Some network providers, e.g. OpenShift SDN, support multiple - ClusterNetworks. Others only support one. This is equivalent to - the cluster-cidr. - items: - description: ClusterNetworkEntry is a subnet from which to allocate - PodIPs. A network of size HostPrefix (in CIDR notation) will be - allocated when nodes join the cluster. If the HostPrefix field - is not used by the plugin, it can be left unset. Not all network - providers support multiple ClusterNetworks - properties: - cidr: - type: string - hostPrefix: - format: int32 - minimum: 0 - type: integer - type: object - type: array - defaultNetwork: - description: defaultNetwork is the "default" network that all pods - will receive - properties: - kuryrConfig: - description: KuryrConfig configures the kuryr plugin - properties: - controllerProbesPort: - description: The port kuryr-controller will listen for readiness - and liveness requests. - format: int32 - minimum: 0 - type: integer - daemonProbesPort: - description: The port kuryr-daemon will listen for readiness - and liveness requests. - format: int32 - minimum: 0 - type: integer - enablePortPoolsPrepopulation: - description: enablePortPoolsPrepopulation when true will make - Kuryr prepopulate each newly created port pool with a minimum - number of ports. Kuryr uses Neutron port pooling to fight - the fact that it takes a significant amount of time to create - one. Instead of creating it when pod is being deployed, - Kuryr keeps a number of ports ready to be attached to pods. - By default port prepopulation is disabled. - type: boolean - mtu: - description: mtu is the MTU that Kuryr should use when creating - pod networks in Neutron. The value has to be lower or equal - to the MTU of the nodes network and Neutron has to allow - creation of tenant networks with such MTU. If unset Pod - networks will be created with the same MTU as the nodes - network has. - format: int32 - minimum: 0 - type: integer - openStackServiceNetwork: - description: openStackServiceNetwork contains the CIDR of - network from which to allocate IPs for OpenStack Octavia's - Amphora VMs. Please note that with Amphora driver Octavia - uses two IPs from that network for each loadbalancer - one - given by OpenShift and second for VRRP connections. As the - first one is managed by OpenShift's and second by Neutron's - IPAMs, those need to come from different pools. Therefore - `openStackServiceNetwork` needs to be at least twice the - size of `serviceNetwork`, and whole `serviceNetwork` must - be overlapping with `openStackServiceNetwork`. cluster-network-operator - will then make sure VRRP IPs are taken from the ranges inside - `openStackServiceNetwork` that are not overlapping with - `serviceNetwork`, effectivly preventing conflicts. If not - set cluster-network-operator will use `serviceNetwork` expanded - by decrementing the prefix size by 1. - type: string - poolBatchPorts: - description: poolBatchPorts sets a number of ports that should - be created in a single batch request to extend the port - pool. The default is 3. For more information about port - pools see enablePortPoolsPrepopulation setting. - minimum: 0 - type: integer - poolMaxPorts: - description: poolMaxPorts sets a maximum number of free ports - that are being kept in a port pool. If the number of ports - exceeds this setting, free ports will get deleted. Setting - 0 will disable this upper bound, effectively preventing - pools from shrinking and this is the default value. For - more information about port pools see enablePortPoolsPrepopulation - setting. - minimum: 0 - type: integer - poolMinPorts: - description: poolMinPorts sets a minimum number of free ports - that should be kept in a port pool. If the number of ports - is lower than this setting, new ports will get created and - added to pool. The default is 1. For more information about - port pools see enablePortPoolsPrepopulation setting. - minimum: 1 - type: integer - type: object - openshiftSDNConfig: - description: openShiftSDNConfig configures the openshift-sdn plugin - properties: - enableUnidling: - description: enableUnidling controls whether or not the service - proxy will support idling and unidling of services. By default, - unidling is enabled. - type: boolean - mode: - description: mode is one of "Multitenant", "Subnet", or "NetworkPolicy" - type: string - mtu: - description: mtu is the mtu to use for the tunnel interface. - Defaults to 1450 if unset. This must be 50 bytes smaller - than the machine's uplink. - format: int32 - minimum: 0 - type: integer - useExternalOpenvswitch: - description: 'useExternalOpenvswitch used to control whether - the operator would deploy an OVS DaemonSet itself or expect - someone else to start OVS. As of 4.6, OVS is always run - as a system service, and this flag is ignored. DEPRECATED: - non-functional as of 4.6' - type: boolean - vxlanPort: - description: vxlanPort is the port to use for all vxlan packets. - The default is 4789. - format: int32 - minimum: 0 - type: integer - type: object - ovnKubernetesConfig: - description: oVNKubernetesConfig configures the ovn-kubernetes - plugin. This is currently not implemented. - properties: - genevePort: - description: geneve port is the UDP port to be used by geneve - encapulation. Default is 6081 - format: int32 - minimum: 1 - type: integer - hybridOverlayConfig: - description: HybridOverlayConfig configures an additional - overlay network for peers that are not using OVN. - properties: - hybridClusterNetwork: - description: HybridClusterNetwork defines a network space - given to nodes on an additional overlay network. - items: - description: ClusterNetworkEntry is a subnet from which - to allocate PodIPs. A network of size HostPrefix (in - CIDR notation) will be allocated when nodes join the - cluster. If the HostPrefix field is not used by the - plugin, it can be left unset. Not all network providers - support multiple ClusterNetworks - properties: - cidr: - type: string - hostPrefix: - format: int32 - minimum: 0 - type: integer - type: object - type: array - hybridOverlayVXLANPort: - description: HybridOverlayVXLANPort defines the VXLAN - port number to be used by the additional overlay network. - Default is 4789 - format: int32 - type: integer - type: object - ipsecConfig: - description: ipsecConfig enables and configures IPsec for - pods on the pod network within the cluster. - type: object - mtu: - description: mtu is the MTU to use for the tunnel interface. - This must be 100 bytes smaller than the uplink mtu. Default - is 1400 - format: int32 - minimum: 0 - type: integer - policyAuditConfig: - default: {} - description: policyAuditConfig is the configuration for network - policy audit events. If unset, reported defaults are used. - properties: - destination: - default: "null" - description: 'destination is the location for policy log - messages. Regardless of this config, persistent logs - will always be dumped to the host at /var/log/ovn/ however - Additionally syslog output may be configured as follows. - Valid values are: - "libc" -> to use the libc syslog() - function of the host node''s journdald process - "udp:host:port" - -> for sending syslog over UDP - "unix:file" -> for - using the UNIX domain socket directly - "null" -> to - discard all messages logged to syslog The default is - "null"' - type: string - maxFileSize: - default: 50 - description: maxFilesSize is the max size an ACL_audit - log file is allowed to reach before rotation occurs - Units are in MB and the Default is 50MB - format: int32 - minimum: 1 - type: integer - rateLimit: - default: 20 - description: rateLimit is the approximate maximum number - of messages to generate per-second per-node. If unset - the default of 20 msg/sec is used. - format: int32 - minimum: 1 - type: integer - syslogFacility: - default: local0 - description: syslogFacility the RFC5424 facility for generated - messages, e.g. "kern". Default is "local0" - type: string - type: object - type: object - type: - description: type is the type of network All NetworkTypes are - supported except for NetworkTypeRaw - type: string - type: object - deployKubeProxy: - description: deployKubeProxy specifies whether or not a standalone - kube-proxy should be deployed by the operator. Some network providers - include kube-proxy or similar functionality. If unset, the plugin - will attempt to select the correct value, which is false when OpenShift - SDN and ovn-kubernetes are used and true otherwise. - type: boolean - disableMultiNetwork: - description: disableMultiNetwork specifies whether or not multiple - pod network support should be disabled. If unset, this property - defaults to 'false' and multiple network support is enabled. - type: boolean - disableNetworkDiagnostics: - default: false - description: disableNetworkDiagnostics specifies whether or not PodNetworkConnectivityCheck - CRs from a test pod to every node, apiserver and LB should be disabled - or not. If unset, this property defaults to 'false' and network - diagnostics is enabled. Setting this to 'true' would reduce the - additional load of the pods performing the checks. - type: boolean - exportNetworkFlows: - description: exportNetworkFlows enables and configures the export - of network flow metadata from the pod network by using protocols - NetFlow, SFlow or IPFIX. Currently only supported on OVN-Kubernetes - plugin. If unset, flows will not be exported to any collector. - properties: - ipfix: - description: ipfix defines IPFIX configuration. - properties: - collectors: - description: ipfixCollectors is list of strings formatted - as ip:port with a maximum of ten items - items: - pattern: ^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$ - type: string - maxItems: 10 - minItems: 1 - type: array - type: object - netFlow: - description: netFlow defines the NetFlow configuration. - properties: - collectors: - description: netFlow defines the NetFlow collectors that will - consume the flow data exported from OVS. It is a list of - strings formatted as ip:port with a maximum of ten items - items: - pattern: ^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$ - type: string - maxItems: 10 - minItems: 1 - type: array - type: object - sFlow: - description: sFlow defines the SFlow configuration. - properties: - collectors: - description: sFlowCollectors is list of strings formatted - as ip:port with a maximum of ten items - items: - pattern: ^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$ - type: string - maxItems: 10 - minItems: 1 - type: array - type: object - type: object - kubeProxyConfig: - description: kubeProxyConfig lets us configure desired proxy configuration. - If not specified, sensible defaults will be chosen by OpenShift - directly. Not consumed by all network providers - currently only - openshift-sdn. - properties: - bindAddress: - description: The address to "bind" on Defaults to 0.0.0.0 - type: string - iptablesSyncPeriod: - description: 'An internal kube-proxy parameter. In older releases - of OCP, this sometimes needed to be adjusted in large clusters - for performance reasons, but this is no longer necessary, and - there is no reason to change this from the default value. Default: - 30s' - type: string - proxyArguments: - additionalProperties: - description: ProxyArgumentList is a list of arguments to pass - to the kubeproxy process - items: - type: string - type: array - description: Any additional arguments to pass to the kubeproxy - process - type: object - type: object - logLevel: - default: Normal - description: "logLevel is an intent based logging for an overall component. - \ It does not give fine grained control, but it is a simple way - to manage coarse grained logging choices that operators have to - interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", - \"Trace\", \"TraceAll\". Defaults to \"Normal\"." - enum: - - "" - - Normal - - Debug - - Trace - - TraceAll - type: string - managementState: - description: managementState indicates whether and how the operator - should manage the component - pattern: ^(Managed|Unmanaged|Force|Removed)$ - type: string - migration: - description: migration enables and configures the cluster network - migration. Setting this to the target network type to allow changing - the default network. If unset, the operation of changing cluster - default network plugin will be rejected. - properties: - networkType: - description: networkType is the target type of network migration - The supported values are OpenShiftSDN, OVNKubernetes - type: string - type: object - observedConfig: - description: observedConfig holds a sparse config that controller - has observed from the cluster state. It exists in spec because - it is an input to the level for the operator - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - operatorLogLevel: - default: Normal - description: "operatorLogLevel is an intent based logging for the - operator itself. It does not give fine grained control, but it - is a simple way to manage coarse grained logging choices that operators - have to interpret for themselves. \n Valid values are: \"Normal\", - \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"." - enum: - - "" - - Normal - - Debug - - Trace - - TraceAll - type: string - serviceNetwork: - description: serviceNetwork is the ip address pool to use for Service - IPs Currently, all existing network providers only support a single - value here, but this is an array to allow for growth. - items: - type: string - type: array - unsupportedConfigOverrides: - description: 'unsupportedConfigOverrides holds a sparse config that - will override any previously set options. It only needs to be the - fields to override it will end up overlaying in the following order: - 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides' - nullable: true - type: object - x-kubernetes-preserve-unknown-fields: true - useMultiNetworkPolicy: - description: useMultiNetworkPolicy enables a controller which allows - for MultiNetworkPolicy objects to be used on additional networks - as created by Multus CNI. MultiNetworkPolicy are similar to NetworkPolicy - objects, but NetworkPolicy objects only apply to the primary interface. - With MultiNetworkPolicy, you can control the traffic that a pod - can receive over the secondary interfaces. If unset, this property - defaults to 'false' and MultiNetworkPolicy objects are ignored. - If 'disableMultiNetwork' is 'true' then the value of this field - is ignored. - type: boolean - type: object - status: - description: NetworkStatus is detailed operator status, which is distilled - up to the Network clusteroperator object. - properties: - conditions: - description: conditions is a list of conditions and their status - items: - description: OperatorCondition is just the standard condition fields. - properties: - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - type: object - type: array - generations: - description: generations are used to determine when an item needs - to be reconciled or has changed in a way that needs a reaction. - items: - description: GenerationStatus keeps track of the generation for - a given resource so that decisions about forced updates can be - made. - properties: - group: - description: group is the group of the thing you're tracking - type: string - hash: - description: hash is an optional field set for resources without - generation that are content sensitive like secrets and configmaps - type: string - lastGeneration: - description: lastGeneration is the last generation of the workload - controller involved - format: int64 - type: integer - name: - description: name is the name of the thing you're tracking - type: string - namespace: - description: namespace is where the thing you're tracking is - type: string - resource: - description: resource is the resource type of the thing you're - tracking - type: string - type: object - type: array - observedGeneration: - description: observedGeneration is the last generation change you've - dealt with - format: int64 - type: integer - readyReplicas: - description: readyReplicas indicates how many replicas are ready and - at the desired state - format: int32 - type: integer - version: - description: version is the level this availability applies to - type: string - type: object - type: object - served: true - storage: true diff --git a/vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01.crd.yaml-patch b/vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01.crd.yaml-patch deleted file mode 100644 index 094f526ecbf..00000000000 --- a/vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01.crd.yaml-patch +++ /dev/null @@ -1,3 +0,0 @@ -- op: add - path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/defaultNetwork/properties/ovnKubernetesConfig/properties/policyAuditConfig/default - value: {} diff --git a/vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01_crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01_crd.yaml new file mode 100644 index 00000000000..c0dcce7dfe5 --- /dev/null +++ b/vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01_crd.yaml @@ -0,0 +1,443 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/475 + include.release.openshift.io/self-managed-high-availability: "true" + include.release.openshift.io/single-node-developer: "true" + name: networks.operator.openshift.io +spec: + group: operator.openshift.io + names: + kind: Network + listKind: NetworkList + plural: networks + singular: network + scope: Cluster + versions: + - name: v1 + schema: + openAPIV3Schema: + description: "Network describes the cluster's desired network configuration. It is consumed by the cluster-network-operator. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." + type: object + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: NetworkSpec is the top-level network configuration object. + type: object + properties: + additionalNetworks: + description: additionalNetworks is a list of extra networks to make available to pods when multiple networks are enabled. + type: array + items: + description: AdditionalNetworkDefinition configures an extra network that is available but not created by default. Instead, pods must request them by name. type must be specified, along with exactly one "Config" that matches the type. + type: object + properties: + name: + description: name is the name of the network. This will be populated in the resulting CRD This must be unique. + type: string + namespace: + description: namespace is the namespace of the network. This will be populated in the resulting CRD If not given the network will be created in the default namespace. + type: string + rawCNIConfig: + description: rawCNIConfig is the raw CNI configuration json to create in the NetworkAttachmentDefinition CRD + type: string + simpleMacvlanConfig: + description: SimpleMacvlanConfig configures the macvlan interface in case of type:NetworkTypeSimpleMacvlan + type: object + properties: + ipamConfig: + description: IPAMConfig configures IPAM module will be used for IP Address Management (IPAM). + type: object + properties: + staticIPAMConfig: + description: StaticIPAMConfig configures the static IP address in case of type:IPAMTypeStatic + type: object + properties: + addresses: + description: Addresses configures IP address for the interface + type: array + items: + description: StaticIPAMAddresses provides IP address and Gateway for static IPAM addresses + type: object + properties: + address: + description: Address is the IP address in CIDR format + type: string + gateway: + description: Gateway is IP inside of subnet to designate as the gateway + type: string + dns: + description: DNS configures DNS for the interface + type: object + properties: + domain: + description: Domain configures the domainname the local domain used for short hostname lookups + type: string + nameservers: + description: Nameservers points DNS servers for IP lookup + type: array + items: + type: string + search: + description: Search configures priority ordered search domains for short hostname lookups + type: array + items: + type: string + routes: + description: Routes configures IP routes for the interface + type: array + items: + description: StaticIPAMRoutes provides Destination/Gateway pairs for static IPAM routes + type: object + properties: + destination: + description: Destination points the IP route destination + type: string + gateway: + description: Gateway is the route's next-hop IP address If unset, a default gateway is assumed (as determined by the CNI plugin). + type: string + type: + description: Type is the type of IPAM module will be used for IP Address Management(IPAM). The supported values are IPAMTypeDHCP, IPAMTypeStatic + type: string + master: + description: master is the host interface to create the macvlan interface from. If not specified, it will be default route interface + type: string + mode: + description: 'mode is the macvlan mode: bridge, private, vepa, passthru. The default is bridge' + type: string + mtu: + description: mtu is the mtu to use for the macvlan interface. if unset, host's kernel will select the value. + type: integer + format: int32 + minimum: 0 + type: + description: type is the type of network The supported values are NetworkTypeRaw, NetworkTypeSimpleMacvlan + type: string + clusterNetwork: + description: clusterNetwork is the IP address pool to use for pod IPs. Some network providers, e.g. OpenShift SDN, support multiple ClusterNetworks. Others only support one. This is equivalent to the cluster-cidr. + type: array + items: + description: ClusterNetworkEntry is a subnet from which to allocate PodIPs. A network of size HostPrefix (in CIDR notation) will be allocated when nodes join the cluster. If the HostPrefix field is not used by the plugin, it can be left unset. Not all network providers support multiple ClusterNetworks + type: object + properties: + cidr: + type: string + hostPrefix: + type: integer + format: int32 + minimum: 0 + defaultNetwork: + description: defaultNetwork is the "default" network that all pods will receive + type: object + properties: + kuryrConfig: + description: KuryrConfig configures the kuryr plugin + type: object + properties: + controllerProbesPort: + description: The port kuryr-controller will listen for readiness and liveness requests. + type: integer + format: int32 + minimum: 0 + daemonProbesPort: + description: The port kuryr-daemon will listen for readiness and liveness requests. + type: integer + format: int32 + minimum: 0 + enablePortPoolsPrepopulation: + description: enablePortPoolsPrepopulation when true will make Kuryr prepopulate each newly created port pool with a minimum number of ports. Kuryr uses Neutron port pooling to fight the fact that it takes a significant amount of time to create one. Instead of creating it when pod is being deployed, Kuryr keeps a number of ports ready to be attached to pods. By default port prepopulation is disabled. + type: boolean + mtu: + description: mtu is the MTU that Kuryr should use when creating pod networks in Neutron. The value has to be lower or equal to the MTU of the nodes network and Neutron has to allow creation of tenant networks with such MTU. If unset Pod networks will be created with the same MTU as the nodes network has. + type: integer + format: int32 + minimum: 0 + openStackServiceNetwork: + description: openStackServiceNetwork contains the CIDR of network from which to allocate IPs for OpenStack Octavia's Amphora VMs. Please note that with Amphora driver Octavia uses two IPs from that network for each loadbalancer - one given by OpenShift and second for VRRP connections. As the first one is managed by OpenShift's and second by Neutron's IPAMs, those need to come from different pools. Therefore `openStackServiceNetwork` needs to be at least twice the size of `serviceNetwork`, and whole `serviceNetwork` must be overlapping with `openStackServiceNetwork`. cluster-network-operator will then make sure VRRP IPs are taken from the ranges inside `openStackServiceNetwork` that are not overlapping with `serviceNetwork`, effectivly preventing conflicts. If not set cluster-network-operator will use `serviceNetwork` expanded by decrementing the prefix size by 1. + type: string + poolBatchPorts: + description: poolBatchPorts sets a number of ports that should be created in a single batch request to extend the port pool. The default is 3. For more information about port pools see enablePortPoolsPrepopulation setting. + type: integer + minimum: 0 + poolMaxPorts: + description: poolMaxPorts sets a maximum number of free ports that are being kept in a port pool. If the number of ports exceeds this setting, free ports will get deleted. Setting 0 will disable this upper bound, effectively preventing pools from shrinking and this is the default value. For more information about port pools see enablePortPoolsPrepopulation setting. + type: integer + minimum: 0 + poolMinPorts: + description: poolMinPorts sets a minimum number of free ports that should be kept in a port pool. If the number of ports is lower than this setting, new ports will get created and added to pool. The default is 1. For more information about port pools see enablePortPoolsPrepopulation setting. + type: integer + minimum: 1 + openshiftSDNConfig: + description: openShiftSDNConfig configures the openshift-sdn plugin + type: object + properties: + enableUnidling: + description: enableUnidling controls whether or not the service proxy will support idling and unidling of services. By default, unidling is enabled. + type: boolean + mode: + description: mode is one of "Multitenant", "Subnet", or "NetworkPolicy" + type: string + mtu: + description: mtu is the mtu to use for the tunnel interface. Defaults to 1450 if unset. This must be 50 bytes smaller than the machine's uplink. + type: integer + format: int32 + minimum: 0 + useExternalOpenvswitch: + description: 'useExternalOpenvswitch used to control whether the operator would deploy an OVS DaemonSet itself or expect someone else to start OVS. As of 4.6, OVS is always run as a system service, and this flag is ignored. DEPRECATED: non-functional as of 4.6' + type: boolean + vxlanPort: + description: vxlanPort is the port to use for all vxlan packets. The default is 4789. + type: integer + format: int32 + minimum: 0 + ovnKubernetesConfig: + description: oVNKubernetesConfig configures the ovn-kubernetes plugin. This is currently not implemented. + type: object + properties: + genevePort: + description: geneve port is the UDP port to be used by geneve encapulation. Default is 6081 + type: integer + format: int32 + minimum: 1 + hybridOverlayConfig: + description: HybridOverlayConfig configures an additional overlay network for peers that are not using OVN. + type: object + properties: + hybridClusterNetwork: + description: HybridClusterNetwork defines a network space given to nodes on an additional overlay network. + type: array + items: + description: ClusterNetworkEntry is a subnet from which to allocate PodIPs. A network of size HostPrefix (in CIDR notation) will be allocated when nodes join the cluster. If the HostPrefix field is not used by the plugin, it can be left unset. Not all network providers support multiple ClusterNetworks + type: object + properties: + cidr: + type: string + hostPrefix: + type: integer + format: int32 + minimum: 0 + hybridOverlayVXLANPort: + description: HybridOverlayVXLANPort defines the VXLAN port number to be used by the additional overlay network. Default is 4789 + type: integer + format: int32 + ipsecConfig: + description: ipsecConfig enables and configures IPsec for pods on the pod network within the cluster. + type: object + mtu: + description: mtu is the MTU to use for the tunnel interface. This must be 100 bytes smaller than the uplink mtu. Default is 1400 + type: integer + format: int32 + minimum: 0 + policyAuditConfig: + description: policyAuditConfig is the configuration for network policy audit events. If unset, reported defaults are used. + type: object + properties: + destination: + description: 'destination is the location for policy log messages. Regardless of this config, persistent logs will always be dumped to the host at /var/log/ovn/ however Additionally syslog output may be configured as follows. Valid values are: - "libc" -> to use the libc syslog() function of the host node''s journdald process - "udp:host:port" -> for sending syslog over UDP - "unix:file" -> for using the UNIX domain socket directly - "null" -> to discard all messages logged to syslog The default is "null"' + type: string + default: "null" + maxFileSize: + description: maxFilesSize is the max size an ACL_audit log file is allowed to reach before rotation occurs Units are in MB and the Default is 50MB + type: integer + format: int32 + default: 50 + minimum: 1 + rateLimit: + description: rateLimit is the approximate maximum number of messages to generate per-second per-node. If unset the default of 20 msg/sec is used. + type: integer + format: int32 + default: 20 + minimum: 1 + syslogFacility: + description: syslogFacility the RFC5424 facility for generated messages, e.g. "kern". Default is "local0" + type: string + default: local0 + type: + description: type is the type of network All NetworkTypes are supported except for NetworkTypeRaw + type: string + deployKubeProxy: + description: deployKubeProxy specifies whether or not a standalone kube-proxy should be deployed by the operator. Some network providers include kube-proxy or similar functionality. If unset, the plugin will attempt to select the correct value, which is false when OpenShift SDN and ovn-kubernetes are used and true otherwise. + type: boolean + disableMultiNetwork: + description: disableMultiNetwork specifies whether or not multiple pod network support should be disabled. If unset, this property defaults to 'false' and multiple network support is enabled. + type: boolean + disableNetworkDiagnostics: + description: disableNetworkDiagnostics specifies whether or not PodNetworkConnectivityCheck CRs from a test pod to every node, apiserver and LB should be disabled or not. If unset, this property defaults to 'false' and network diagnostics is enabled. Setting this to 'true' would reduce the additional load of the pods performing the checks. + type: boolean + default: false + exportNetworkFlows: + description: exportNetworkFlows enables and configures the export of network flow metadata from the pod network by using protocols NetFlow, SFlow or IPFIX. Currently only supported on OVN-Kubernetes plugin. If unset, flows will not be exported to any collector. + type: object + properties: + ipfix: + description: ipfix defines IPFIX configuration. + type: object + properties: + collectors: + description: ipfixCollectors is list of strings formatted as ip:port with a maximum of ten items + type: array + maxItems: 10 + minItems: 1 + items: + type: string + pattern: ^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$ + netFlow: + description: netFlow defines the NetFlow configuration. + type: object + properties: + collectors: + description: netFlow defines the NetFlow collectors that will consume the flow data exported from OVS. It is a list of strings formatted as ip:port with a maximum of ten items + type: array + maxItems: 10 + minItems: 1 + items: + type: string + pattern: ^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$ + sFlow: + description: sFlow defines the SFlow configuration. + type: object + properties: + collectors: + description: sFlowCollectors is list of strings formatted as ip:port with a maximum of ten items + type: array + maxItems: 10 + minItems: 1 + items: + type: string + pattern: ^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$ + kubeProxyConfig: + description: kubeProxyConfig lets us configure desired proxy configuration. If not specified, sensible defaults will be chosen by OpenShift directly. Not consumed by all network providers - currently only openshift-sdn. + type: object + properties: + bindAddress: + description: The address to "bind" on Defaults to 0.0.0.0 + type: string + iptablesSyncPeriod: + description: 'An internal kube-proxy parameter. In older releases of OCP, this sometimes needed to be adjusted in large clusters for performance reasons, but this is no longer necessary, and there is no reason to change this from the default value. Default: 30s' + type: string + proxyArguments: + description: Any additional arguments to pass to the kubeproxy process + type: object + additionalProperties: + description: ProxyArgumentList is a list of arguments to pass to the kubeproxy process + type: array + items: + type: string + logLevel: + description: "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"." + type: string + default: Normal + enum: + - "" + - Normal + - Debug + - Trace + - TraceAll + managementState: + description: managementState indicates whether and how the operator should manage the component + type: string + pattern: ^(Managed|Unmanaged|Force|Removed)$ + migration: + description: migration enables and configures the cluster network migration. Setting this to the target network type to allow changing the default network. If unset, the operation of changing cluster default network plugin will be rejected. + type: object + properties: + networkType: + description: networkType is the target type of network migration The supported values are OpenShiftSDN, OVNKubernetes + type: string + observedConfig: + description: observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator + type: object + nullable: true + x-kubernetes-preserve-unknown-fields: true + operatorLogLevel: + description: "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"." + type: string + default: Normal + enum: + - "" + - Normal + - Debug + - Trace + - TraceAll + serviceNetwork: + description: serviceNetwork is the ip address pool to use for Service IPs Currently, all existing network providers only support a single value here, but this is an array to allow for growth. + type: array + items: + type: string + unsupportedConfigOverrides: + description: 'unsupportedConfigOverrides holds a sparse config that will override any previously set options. It only needs to be the fields to override it will end up overlaying in the following order: 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides' + type: object + nullable: true + x-kubernetes-preserve-unknown-fields: true + useMultiNetworkPolicy: + description: useMultiNetworkPolicy enables a controller which allows for MultiNetworkPolicy objects to be used on additional networks as created by Multus CNI. MultiNetworkPolicy are similar to NetworkPolicy objects, but NetworkPolicy objects only apply to the primary interface. With MultiNetworkPolicy, you can control the traffic that a pod can receive over the secondary interfaces. If unset, this property defaults to 'false' and MultiNetworkPolicy objects are ignored. If 'disableMultiNetwork' is 'true' then the value of this field is ignored. + type: boolean + status: + description: NetworkStatus is detailed operator status, which is distilled up to the Network clusteroperator object. + type: object + properties: + conditions: + description: conditions is a list of conditions and their status + type: array + items: + description: OperatorCondition is just the standard condition fields. + type: object + properties: + lastTransitionTime: + type: string + format: date-time + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + generations: + description: generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction. + type: array + items: + description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made. + type: object + properties: + group: + description: group is the group of the thing you're tracking + type: string + hash: + description: hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps + type: string + lastGeneration: + description: lastGeneration is the last generation of the workload controller involved + type: integer + format: int64 + name: + description: name is the name of the thing you're tracking + type: string + namespace: + description: namespace is where the thing you're tracking is + type: string + resource: + description: resource is the resource type of the thing you're tracking + type: string + observedGeneration: + description: observedGeneration is the last generation change you've dealt with + type: integer + format: int64 + readyReplicas: + description: readyReplicas indicates how many replicas are ready and at the desired state + type: integer + format: int32 + version: + description: version is the level this availability applies to + type: string + served: true + storage: true diff --git a/vendor/github.com/openshift/api/operator/v1/0000_90_cluster_csi_driver_01_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_90_cluster_csi_driver_01_config.crd.yaml index cf39bc8682e..78451b2fa9a 100644 --- a/vendor/github.com/openshift/api/operator/v1/0000_90_cluster_csi_driver_01_config.crd.yaml +++ b/vendor/github.com/openshift/api/operator/v1/0000_90_cluster_csi_driver_01_config.crd.yaml @@ -41,7 +41,6 @@ spec: - ebs.csi.aws.com - efs.csi.aws.com - disk.csi.azure.com - - file.csi.azure.com - pd.csi.storage.gke.io - cinder.csi.openstack.org - csi.vsphere.vmware.com @@ -49,8 +48,6 @@ spec: - csi.ovirt.org - csi.kubevirt.io - csi.shared-resources.openshift.io - - diskplugin.csi.alibabacloud.com - - vpc.block.csi.ibm.io type: string type: object spec: diff --git a/vendor/github.com/openshift/api/operator/v1/0000_90_cluster_csi_driver_01_config.crd.yaml-patch b/vendor/github.com/openshift/api/operator/v1/0000_90_cluster_csi_driver_01_config.crd.yaml-patch index 7cd663b6e6f..508903a8ca7 100644 --- a/vendor/github.com/openshift/api/operator/v1/0000_90_cluster_csi_driver_01_config.crd.yaml-patch +++ b/vendor/github.com/openshift/api/operator/v1/0000_90_cluster_csi_driver_01_config.crd.yaml-patch @@ -7,7 +7,6 @@ - ebs.csi.aws.com - efs.csi.aws.com - disk.csi.azure.com - - file.csi.azure.com - pd.csi.storage.gke.io - cinder.csi.openstack.org - csi.vsphere.vmware.com @@ -15,5 +14,3 @@ - csi.ovirt.org - csi.kubevirt.io - csi.shared-resources.openshift.io - - diskplugin.csi.alibabacloud.com - - vpc.block.csi.ibm.io diff --git a/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go b/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go index beff5e93b74..1460d15e3ae 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go +++ b/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go @@ -45,7 +45,6 @@ const ( AWSEBSCSIDriver CSIDriverName = "ebs.csi.aws.com" AWSEFSCSIDriver CSIDriverName = "efs.csi.aws.com" AzureDiskCSIDriver CSIDriverName = "disk.csi.azure.com" - AzureFileCSIDriver CSIDriverName = "file.csi.azure.com" GCPPDCSIDriver CSIDriverName = "pd.csi.storage.gke.io" CinderCSIDriver CSIDriverName = "cinder.csi.openstack.org" VSphereCSIDriver CSIDriverName = "csi.vsphere.vmware.com" @@ -53,8 +52,6 @@ const ( OvirtCSIDriver CSIDriverName = "csi.ovirt.org" KubevirtCSIDriver CSIDriverName = "csi.kubevirt.io" SharedResourcesCSIDriver CSIDriverName = "csi.shared-resources.openshift.io" - AlibabaDiskCSIDriver CSIDriverName = "diskplugin.csi.alibabacloud.com" - IBMVPCBlockCSIDriver CSIDriverName = "vpc.block.csi.ibm.io" ) // ClusterCSIDriverSpec is the desired behavior of CSI driver operator diff --git a/vendor/github.com/openshift/api/operator/v1/types_ingress.go b/vendor/github.com/openshift/api/operator/v1/types_ingress.go index ea1ec794d9e..44c02d6ec6d 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_ingress.go +++ b/vendor/github.com/openshift/api/operator/v1/types_ingress.go @@ -87,12 +87,11 @@ type IngressControllerSpec struct { // If unset, the default is based on // infrastructure.config.openshift.io/cluster .status.platform: // - // AWS: LoadBalancerService (with External scope) - // Azure: LoadBalancerService (with External scope) - // GCP: LoadBalancerService (with External scope) - // IBMCloud: LoadBalancerService (with External scope) - // AlibabaCloud: LoadBalancerService (with External scope) - // Libvirt: HostNetwork + // AWS: LoadBalancerService (with External scope) + // Azure: LoadBalancerService (with External scope) + // GCP: LoadBalancerService (with External scope) + // IBMCloud: LoadBalancerService (with External scope) + // Libvirt: HostNetwork // // Any other platform types (including None) default to HostNetwork. // @@ -357,14 +356,13 @@ type ProviderLoadBalancerParameters struct { type LoadBalancerProviderType string const ( - AWSLoadBalancerProvider LoadBalancerProviderType = "AWS" - AzureLoadBalancerProvider LoadBalancerProviderType = "Azure" - GCPLoadBalancerProvider LoadBalancerProviderType = "GCP" - OpenStackLoadBalancerProvider LoadBalancerProviderType = "OpenStack" - VSphereLoadBalancerProvider LoadBalancerProviderType = "VSphere" - IBMLoadBalancerProvider LoadBalancerProviderType = "IBM" - BareMetalLoadBalancerProvider LoadBalancerProviderType = "BareMetal" - AlibabaCloudLoadBalancerProvider LoadBalancerProviderType = "AlibabaCloud" + AWSLoadBalancerProvider LoadBalancerProviderType = "AWS" + AzureLoadBalancerProvider LoadBalancerProviderType = "Azure" + GCPLoadBalancerProvider LoadBalancerProviderType = "GCP" + OpenStackLoadBalancerProvider LoadBalancerProviderType = "OpenStack" + VSphereLoadBalancerProvider LoadBalancerProviderType = "VSphere" + IBMLoadBalancerProvider LoadBalancerProviderType = "IBM" + BareMetalLoadBalancerProvider LoadBalancerProviderType = "BareMetal" ) // AWSLoadBalancerParameters provides configuration settings that are diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go index 96c92100f8d..bb411038924 100644 --- a/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go @@ -663,7 +663,7 @@ var map_IngressControllerSpec = map[string]string{ "domain": "domain is a DNS name serviced by the ingress controller and is used to configure multiple features:\n\n* For the LoadBalancerService endpoint publishing strategy, domain is\n used to configure DNS records. See endpointPublishingStrategy.\n\n* When using a generated default certificate, the certificate will be valid\n for domain and its subdomains. See defaultCertificate.\n\n* The value is published to individual Route statuses so that end-users\n know where to target external DNS records.\n\ndomain must be unique among all IngressControllers, and cannot be updated.\n\nIf empty, defaults to ingress.config.openshift.io/cluster .spec.domain.", "httpErrorCodePages": "httpErrorCodePages specifies a configmap with custom error pages. The administrator must create this configmap in the openshift-config namespace. This configmap should have keys in the format \"error-page-.http\", where is an HTTP error code. For example, \"error-page-503.http\" defines an error page for HTTP 503 responses. Currently only error pages for 503 and 404 responses can be customized. Each value in the configmap should be the full response, including HTTP headers. Eg- https://raw.githubusercontent.com/openshift/router/fadab45747a9b30cc3f0a4b41ad2871f95827a93/images/router/haproxy/conf/error-page-503.http If this field is empty, the ingress controller uses the default error pages.", "replicas": "replicas is the desired number of ingress controller replicas. If unset, defaults to 2.", - "endpointPublishingStrategy": "endpointPublishingStrategy is used to publish the ingress controller endpoints to other networks, enable load balancer integrations, etc.\n\nIf unset, the default is based on infrastructure.config.openshift.io/cluster .status.platform:\n\n AWS: LoadBalancerService (with External scope)\n Azure: LoadBalancerService (with External scope)\n GCP: LoadBalancerService (with External scope)\n IBMCloud: LoadBalancerService (with External scope)\n AlibabaCloud: LoadBalancerService (with External scope)\n Libvirt: HostNetwork\n\nAny other platform types (including None) default to HostNetwork.\n\nendpointPublishingStrategy cannot be updated.", + "endpointPublishingStrategy": "endpointPublishingStrategy is used to publish the ingress controller endpoints to other networks, enable load balancer integrations, etc.\n\nIf unset, the default is based on infrastructure.config.openshift.io/cluster .status.platform:\n\n AWS: LoadBalancerService (with External scope)\n Azure: LoadBalancerService (with External scope)\n GCP: LoadBalancerService (with External scope)\n IBMCloud: LoadBalancerService (with External scope)\n Libvirt: HostNetwork\n\nAny other platform types (including None) default to HostNetwork.\n\nendpointPublishingStrategy cannot be updated.", "defaultCertificate": "defaultCertificate is a reference to a secret containing the default certificate served by the ingress controller. When Routes don't specify their own certificate, defaultCertificate is used.\n\nThe secret must contain the following keys and data:\n\n tls.crt: certificate file contents\n tls.key: key file contents\n\nIf unset, a wildcard certificate is automatically generated and used. The certificate is valid for the ingress controller domain (and subdomains) and the generated certificate's CA will be automatically integrated with the cluster's trust store.\n\nIf a wildcard certificate is used and shared by multiple HTTP/2 enabled routes (which implies ALPN) then clients (i.e., notably browsers) are at liberty to reuse open connections. This means a client can reuse a connection to another route and that is likely to fail. This behaviour is generally known as connection coalescing.\n\nThe in-use certificate (whether generated or user-specified) will be automatically integrated with OpenShift's built-in OAuth server.", "namespaceSelector": "namespaceSelector is used to filter the set of namespaces serviced by the ingress controller. This is useful for implementing shards.\n\nIf unset, the default is no filtering.", "routeSelector": "routeSelector is used to filter the set of Routes serviced by the ingress controller. This is useful for implementing shards.\n\nIf unset, the default is no filtering.", diff --git a/vendor/github.com/openshift/cluster-api-provider-powervs/LICENSE b/vendor/github.com/openshift/cluster-api-provider-powervs/LICENSE new file mode 100644 index 00000000000..261eeb9e9f8 --- /dev/null +++ b/vendor/github.com/openshift/cluster-api-provider-powervs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/addtoscheme_openshiftpowervsprovider_v1alpha1.go b/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/addtoscheme_openshiftpowervsprovider_v1alpha1.go new file mode 100644 index 00000000000..e6fd85db9e5 --- /dev/null +++ b/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/addtoscheme_openshiftpowervsprovider_v1alpha1.go @@ -0,0 +1,26 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package apis + +import ( + "github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1" +) + +func init() { + // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back + AddToSchemes = append(AddToSchemes, v1alpha1.AddToScheme) +} diff --git a/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/apis.go b/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/apis.go new file mode 100644 index 00000000000..d4163edd967 --- /dev/null +++ b/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/apis.go @@ -0,0 +1,33 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Generate deepcopy for apis +//go:generate go run ../../vendor/sigs.k8s.io/controller-tools/cmd/controller-gen paths=./... object:headerFile=../../hack/boilerplate/boilerplate.go.txt,year=2021 + +// Package apis contains Kubernetes API groups. +package apis + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +// AddToSchemes may be used to add all resources defined in the project to a Scheme +var AddToSchemes runtime.SchemeBuilder + +// AddToScheme adds all Resources to the Scheme +func AddToScheme(s *runtime.Scheme) error { + return AddToSchemes.AddToScheme(s) +} diff --git a/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/groupversion_info.go b/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/groupversion_info.go new file mode 100644 index 00000000000..6feea851175 --- /dev/null +++ b/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/groupversion_info.go @@ -0,0 +1,106 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1alpha1 contains API Schema definitions for the powervsproviderconfig v1alpha1 API group +//+kubebuilder:object:generate=true +//+groupName=powervsproviderconfig.openshift.io +package v1alpha1 + +import ( + "encoding/json" + "fmt" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/klog/v2" + "sigs.k8s.io/controller-runtime/pkg/scheme" + "sigs.k8s.io/yaml" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "powervsproviderconfig.openshift.io", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) + +// RawExtensionFromProviderSpec marshals the machine provider spec. +func RawExtensionFromProviderSpec(spec *PowerVSMachineProviderConfig) (*runtime.RawExtension, error) { + if spec == nil { + return &runtime.RawExtension{}, nil + } + + var rawBytes []byte + var err error + if rawBytes, err = json.Marshal(spec); err != nil { + return nil, fmt.Errorf("error marshalling providerSpec: %v", err) + } + + return &runtime.RawExtension{ + Raw: rawBytes, + }, nil +} + +// RawExtensionFromProviderStatus marshals the machine provider status +func RawExtensionFromProviderStatus(status *PowerVSMachineProviderStatus) (*runtime.RawExtension, error) { + if status == nil { + return &runtime.RawExtension{}, nil + } + + var rawBytes []byte + var err error + if rawBytes, err = json.Marshal(status); err != nil { + return nil, fmt.Errorf("error marshalling providerStatus: %v", err) + } + + return &runtime.RawExtension{ + Raw: rawBytes, + }, nil +} + +// ProviderSpecFromRawExtension unmarshals a raw extension into an PowerVSMachineProviderConfig type +func ProviderSpecFromRawExtension(rawExtension *runtime.RawExtension) (*PowerVSMachineProviderConfig, error) { + if rawExtension == nil { + return &PowerVSMachineProviderConfig{}, nil + } + + spec := new(PowerVSMachineProviderConfig) + if err := yaml.Unmarshal(rawExtension.Raw, &spec); err != nil { + return nil, fmt.Errorf("error unmarshalling providerSpec: %v", err) + } + + klog.V(5).Infof("Got provider Spec from raw extension: %+v", spec) + return spec, nil +} + +// ProviderStatusFromRawExtension unmarshals a raw extension into an PowerVSMachineProviderStatus type +func ProviderStatusFromRawExtension(rawExtension *runtime.RawExtension) (*PowerVSMachineProviderStatus, error) { + if rawExtension == nil { + return &PowerVSMachineProviderStatus{}, nil + } + + providerStatus := new(PowerVSMachineProviderStatus) + if err := yaml.Unmarshal(rawExtension.Raw, providerStatus); err != nil { + return nil, fmt.Errorf("error unmarshalling providerStatus: %v", err) + } + + klog.V(5).Infof("Got provider Status from raw extension: %+v", providerStatus) + return providerStatus, nil +} diff --git a/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/powervsmachineproviderconfig_types.go b/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/powervsmachineproviderconfig_types.go new file mode 100644 index 00000000000..66597780fa3 --- /dev/null +++ b/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/powervsmachineproviderconfig_types.go @@ -0,0 +1,90 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status + +// PowerVSMachineProviderConfig is the Schema for the powervsmachineproviderconfigs API +type PowerVSMachineProviderConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // ServiceInstanceID is the PowerVS service ID + ServiceInstanceID string `json:"serviceInstanceID"` + + // Image is the reference to the Image from which to create the machine instance. + Image PowerVSResourceReference `json:"image"` + + // UserDataSecret is the k8s secret contains the user data script + UserDataSecret *corev1.LocalObjectReference `json:"userDataSecret,omitempty"` + + // CredentialsSecret is the k8s secret contains the API Key for IBM Cloud authentication + CredentialsSecret *corev1.LocalObjectReference `json:"credentialsSecret,omitempty"` + + // SysType is the System type used to host the vsi + SysType string `json:"sysType"` + + // ProcessorType is the processor type, e.g: dedicated, shared, capped + ProcType string `json:"procType"` + + // Processors is Number of processors allocated + Processors string `json:"processors"` + + // Memory is Amount of memory allocated (in GB) + Memory string `json:"memory"` + + // Network is the reference to the Network to use for this instance. + Network PowerVSResourceReference `json:"network"` + + // KeyPairName is the name of the SSH key pair provided to the server for authenticating users + KeyPairName string `json:"keyPairName,omitempty"` +} + +// PowerVSResourceReference is a reference to a specific PowerVS resource by ID or Name +// Only one of ID or Name may be specified. Specifying more than one will result in +// a validation error. +type PowerVSResourceReference struct { + // ID of resource + // +optional + ID *string `json:"id,omitempty"` + + // Name of resource + // +optional + Name *string `json:"name,omitempty"` +} + +//+kubebuilder:object:root=true + +// PowerVSMachineProviderConfigList contains a list of PowerVSMachineProviderConfig +type PowerVSMachineProviderConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []PowerVSMachineProviderConfig `json:"items"` +} + +func init() { + SchemeBuilder.Register(&PowerVSMachineProviderConfig{}, &PowerVSMachineProviderConfigList{}, &PowerVSMachineProviderStatus{}) +} diff --git a/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/powervsmachineproviderstatus_types.go b/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/powervsmachineproviderstatus_types.go new file mode 100644 index 00000000000..cf7a1a5cb39 --- /dev/null +++ b/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/powervsmachineproviderstatus_types.go @@ -0,0 +1,81 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// PowerVSMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. +// It contains PowerVS-specific status information. +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type PowerVSMachineProviderStatus struct { + metav1.TypeMeta `json:",inline"` + + // InstanceID is the instance ID of the machine created in PowerVS + // +optional + InstanceID *string `json:"instanceId,omitempty"` + + // InstanceState is the state of the PowerVS instance for this machine + // +optional + InstanceState *string `json:"instanceState,omitempty"` + + // Conditions is a set of conditions associated with the Machine to indicate + // errors or other status + Conditions []PowerVSMachineProviderCondition `json:"conditions,omitempty"` +} + +// PowerVSMachineProviderConditionType is a valid value for PowerVSMachineProviderCondition.Type +type PowerVSMachineProviderConditionType string + +// Valid conditions for an PowerVS machine instance. +const ( + // MachineCreation indicates whether the machine has been created or not. If not, + // it should include a reason and message for the failure. + MachineCreation PowerVSMachineProviderConditionType = "MachineCreation" +) + +// PowerVSMachineProviderConditionReason is reason for the condition's last transition. +type PowerVSMachineProviderConditionReason string + +const ( + // MachineCreationSucceeded indicates machine creation success. + MachineCreationSucceeded PowerVSMachineProviderConditionReason = "MachineCreationSucceeded" + // MachineCreationFailed indicates machine creation failure. + MachineCreationFailed PowerVSMachineProviderConditionReason = "MachineCreationFailed" +) + +// PowerVSMachineProviderCondition is a condition in a PowerVSMachineProviderStatus. +type PowerVSMachineProviderCondition struct { + // Type is the type of the condition. + Type PowerVSMachineProviderConditionType `json:"type"` + // Status is the status of the condition. + Status corev1.ConditionStatus `json:"status"` + // LastProbeTime is the last time we probed the condition. + // +optional + LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"` + // LastTransitionTime is the last time the condition transitioned from one status to another. + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` + // Reason is a unique, one-word, CamelCase reason for the condition's last transition. + // +optional + Reason PowerVSMachineProviderConditionReason `json:"reason,omitempty"` + // Message is a human-readable message indicating details about last transition. + // +optional + Message string `json:"message,omitempty"` +} diff --git a/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000000..c78e4a58557 --- /dev/null +++ b/vendor/github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,178 @@ +// +build !ignore_autogenerated + +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PowerVSMachineProviderCondition) DeepCopyInto(out *PowerVSMachineProviderCondition) { + *out = *in + in.LastProbeTime.DeepCopyInto(&out.LastProbeTime) + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSMachineProviderCondition. +func (in *PowerVSMachineProviderCondition) DeepCopy() *PowerVSMachineProviderCondition { + if in == nil { + return nil + } + out := new(PowerVSMachineProviderCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PowerVSMachineProviderConfig) DeepCopyInto(out *PowerVSMachineProviderConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Image.DeepCopyInto(&out.Image) + if in.UserDataSecret != nil { + in, out := &in.UserDataSecret, &out.UserDataSecret + *out = new(v1.LocalObjectReference) + **out = **in + } + if in.CredentialsSecret != nil { + in, out := &in.CredentialsSecret, &out.CredentialsSecret + *out = new(v1.LocalObjectReference) + **out = **in + } + in.Network.DeepCopyInto(&out.Network) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSMachineProviderConfig. +func (in *PowerVSMachineProviderConfig) DeepCopy() *PowerVSMachineProviderConfig { + if in == nil { + return nil + } + out := new(PowerVSMachineProviderConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PowerVSMachineProviderConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PowerVSMachineProviderConfigList) DeepCopyInto(out *PowerVSMachineProviderConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PowerVSMachineProviderConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSMachineProviderConfigList. +func (in *PowerVSMachineProviderConfigList) DeepCopy() *PowerVSMachineProviderConfigList { + if in == nil { + return nil + } + out := new(PowerVSMachineProviderConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PowerVSMachineProviderConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PowerVSMachineProviderStatus) DeepCopyInto(out *PowerVSMachineProviderStatus) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.InstanceID != nil { + in, out := &in.InstanceID, &out.InstanceID + *out = new(string) + **out = **in + } + if in.InstanceState != nil { + in, out := &in.InstanceState, &out.InstanceState + *out = new(string) + **out = **in + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]PowerVSMachineProviderCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSMachineProviderStatus. +func (in *PowerVSMachineProviderStatus) DeepCopy() *PowerVSMachineProviderStatus { + if in == nil { + return nil + } + out := new(PowerVSMachineProviderStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PowerVSMachineProviderStatus) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PowerVSResourceReference) DeepCopyInto(out *PowerVSResourceReference) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSResourceReference. +func (in *PowerVSResourceReference) DeepCopy() *PowerVSResourceReference { + if in == nil { + return nil + } + out := new(PowerVSResourceReference) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/consts.go b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/consts.go index 982cfa2280f..26a7ea27361 100644 --- a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/consts.go +++ b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/consts.go @@ -16,6 +16,12 @@ limitations under the License. package v1beta1 +const ( + // PausedAnnotation is an annotation that can be applied to MachineHealthCheck objects to prevent the MHC controller + // from processing it. + PausedAnnotation = "cluster.x-k8s.io/paused" +) + // Constants aren't automatically generated for unversioned packages. // Instead share the same constant for all versioned packages type MachineStatusError string diff --git a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machine_webhook.go b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machine_webhook.go index 4257b9cecc4..bea369f5a44 100644 --- a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machine_webhook.go +++ b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machine_webhook.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "net/http" + "runtime" "strings" osconfigv1 "github.com/openshift/api/config/v1" @@ -16,7 +17,7 @@ import ( corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" + kruntime "k8s.io/apimachinery/pkg/runtime" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation/field" @@ -79,7 +80,8 @@ const ( // AWS Defaults defaultAWSCredentialsSecret = "aws-cloud-credentials" - defaultAWSInstanceType = "m4.large" + defaultAWSX86InstanceType = "m5.large" + defaultAWSARMInstanceType = "m6g.large" // Azure Defaults defaultAzureVMSize = "Standard_D4s_V3" @@ -296,7 +298,8 @@ func getMachineDefaulterOperation(platformStatus *osconfigv1.PlatformStatus) mac if platformStatus.AWS != nil { region = platformStatus.AWS.Region } - return awsDefaulter{region: region}.defaultAWS + arch := runtime.GOARCH + return awsDefaulter{region: region, arch: arch}.defaultAWS case osconfigv1.AzurePlatformType: return defaultAzure case osconfigv1.GCPPlatformType: @@ -532,6 +535,7 @@ func (h *machineDefaulterHandler) Handle(ctx context.Context, req admission.Requ type awsDefaulter struct { region string + arch string } func (a awsDefaulter) defaultAWS(m *Machine, config *admissionConfig) (bool, []string, utilerrors.Aggregate) { @@ -546,7 +550,11 @@ func (a awsDefaulter) defaultAWS(m *Machine, config *admissionConfig) (bool, []s } if providerSpec.InstanceType == "" { - providerSpec.InstanceType = defaultAWSInstanceType + if a.arch == "arm64" { + providerSpec.InstanceType = defaultAWSARMInstanceType + } else { + providerSpec.InstanceType = defaultAWSX86InstanceType + } } if providerSpec.Placement.Region == "" { @@ -570,7 +578,7 @@ func (a awsDefaulter) defaultAWS(m *Machine, config *admissionConfig) (bool, []s return false, warnings, utilerrors.NewAggregate(errs) } - m.Spec.ProviderSpec.Value = &runtime.RawExtension{Raw: rawBytes} + m.Spec.ProviderSpec.Value = &kruntime.RawExtension{Raw: rawBytes} return true, warnings, nil } @@ -734,7 +742,7 @@ func defaultAzure(m *Machine, config *admissionConfig) (bool, []string, utilerro return false, warnings, utilerrors.NewAggregate(errs) } - m.Spec.ProviderSpec.Value = &runtime.RawExtension{Raw: rawBytes} + m.Spec.ProviderSpec.Value = &kruntime.RawExtension{Raw: rawBytes} return true, warnings, nil } @@ -877,7 +885,7 @@ func defaultGCP(m *Machine, config *admissionConfig) (bool, []string, utilerrors return false, warnings, utilerrors.NewAggregate(errs) } - m.Spec.ProviderSpec.Value = &runtime.RawExtension{Raw: rawBytes} + m.Spec.ProviderSpec.Value = &kruntime.RawExtension{Raw: rawBytes} return true, warnings, nil } @@ -1060,7 +1068,7 @@ func defaultVSphere(m *Machine, config *admissionConfig) (bool, []string, utiler return false, warnings, utilerrors.NewAggregate(errs) } - m.Spec.ProviderSpec.Value = &runtime.RawExtension{Raw: rawBytes} + m.Spec.ProviderSpec.Value = &kruntime.RawExtension{Raw: rawBytes} return true, warnings, nil } diff --git a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machinehealthcheck_types.go b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machinehealthcheck_types.go index 28bfe29c35f..4dd2b7a5689 100644 --- a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machinehealthcheck_types.go +++ b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machinehealthcheck_types.go @@ -72,14 +72,16 @@ type MachineHealthCheckSpec struct { // Machines older than this duration without a node will be considered to have // failed and will be remediated. + // To prevent Machines without Nodes from being removed, disable startup checks + // by setting this value explicitly to "0". // Expects an unsigned duration string of decimal numbers each with optional // fraction and a unit suffix, eg "300ms", "1.5h" or "2h45m". // Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". // +optional // +kubebuilder:default:="10m" - // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$" + // +kubebuilder:validation:Pattern="^0|([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$" // +kubebuilder:validation:Type:=string - NodeStartupTimeout metav1.Duration `json:"nodeStartupTimeout,omitempty"` + NodeStartupTimeout *metav1.Duration `json:"nodeStartupTimeout,omitempty"` // RemediationTemplate is a reference to a remediation template // provided by an infrastructure provider. diff --git a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/zz_generated.deepcopy.go index 7b85b787509..abbd90b22b0 100644 --- a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/zz_generated.deepcopy.go @@ -199,7 +199,11 @@ func (in *MachineHealthCheckSpec) DeepCopyInto(out *MachineHealthCheckSpec) { *out = new(intstr.IntOrString) **out = **in } - out.NodeStartupTimeout = in.NodeStartupTimeout + if in.NodeStartupTimeout != nil { + in, out := &in.NodeStartupTimeout, &out.NodeStartupTimeout + *out = new(v1.Duration) + **out = **in + } if in.RemediationTemplate != nil { in, out := &in.RemediationTemplate, &out.RemediationTemplate *out = new(corev1.ObjectReference) diff --git a/vendor/modules.txt b/vendor/modules.txt index 66441a837ce..c970899d7cc 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -236,8 +236,10 @@ github.com/IBM-Cloud/bluemix-go/rest github.com/IBM-Cloud/bluemix-go/session github.com/IBM-Cloud/bluemix-go/trace github.com/IBM-Cloud/bluemix-go/utils -# github.com/IBM-Cloud/power-go-client v1.0.55 +# github.com/IBM-Cloud/power-go-client v1.0.72 +## explicit github.com/IBM-Cloud/power-go-client/clients/instance +github.com/IBM-Cloud/power-go-client/errors github.com/IBM-Cloud/power-go-client/helpers github.com/IBM-Cloud/power-go-client/ibmpisession github.com/IBM-Cloud/power-go-client/power/client @@ -253,6 +255,7 @@ github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances +github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity @@ -732,9 +735,9 @@ github.com/go-openapi/analysis github.com/go-openapi/analysis/internal # github.com/go-openapi/errors v0.19.8 => github.com/go-openapi/errors v0.19.2 github.com/go-openapi/errors -# github.com/go-openapi/jsonpointer v0.19.5 +# github.com/go-openapi/jsonpointer v0.19.3 github.com/go-openapi/jsonpointer -# github.com/go-openapi/jsonreference v0.19.5 +# github.com/go-openapi/jsonreference v0.19.4 github.com/go-openapi/jsonreference # github.com/go-openapi/loads v0.19.4 github.com/go-openapi/loads @@ -751,7 +754,7 @@ github.com/go-openapi/runtime/security github.com/go-openapi/spec # github.com/go-openapi/strfmt v0.20.1 github.com/go-openapi/strfmt -# github.com/go-openapi/swag v0.19.14 +# github.com/go-openapi/swag v0.19.9 github.com/go-openapi/swag # github.com/go-openapi/validate v0.20.1 => github.com/go-openapi/validate v0.19.8 github.com/go-openapi/validate @@ -1391,7 +1394,7 @@ github.com/opencontainers/image-spec/specs-go/v1 # github.com/openshift-metal3/terraform-provider-ironic v0.2.6 ## explicit github.com/openshift-metal3/terraform-provider-ironic/ironic -# github.com/openshift/api v0.0.0-20210924154557-a4f696157341 +# github.com/openshift/api v0.0.0-20210924154557-a4f696157341 => github.com/openshift-powervs/api v0.0.0-20210729234416-b883aff9d9db ## explicit github.com/openshift/api/config/v1 github.com/openshift/api/operator/v1 @@ -1434,13 +1437,17 @@ github.com/openshift/cluster-api-provider-libvirt/pkg/apis/libvirtproviderconfig ## explicit github.com/openshift/cluster-api-provider-ovirt/pkg/apis github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1 +# github.com/openshift/cluster-api-provider-powervs v0.0.2-0.20210928133618-8eb5ebcb07a1 +## explicit +github.com/openshift/cluster-api-provider-powervs/pkg/apis +github.com/openshift/cluster-api-provider-powervs/pkg/apis/powervsprovider/v1alpha1 # github.com/openshift/custom-resource-status v0.0.0-20190822192428-e62f2f3b79f3 github.com/openshift/custom-resource-status/conditions/v1 # github.com/openshift/library-go v0.0.0-20210408164723-7a65fdb398e2 ## explicit github.com/openshift/library-go/pkg/config/clusteroperator/v1helpers github.com/openshift/library-go/pkg/route/routeapihelpers -# github.com/openshift/machine-api-operator v0.2.1-0.20210505133115-b7ef098180db +# github.com/openshift/machine-api-operator v0.2.1-0.20210505133115-b7ef098180db => github.com/openshift-powervs/machine-api-operator v0.2.1-0.20210809115935-a9fd8f5d2767 ## explicit github.com/openshift/machine-api-operator/pkg/apis/machine github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1 @@ -2938,6 +2945,7 @@ sigs.k8s.io/yaml # github.com/metal3-io/baremetal-operator => github.com/openshift/baremetal-operator v0.0.0-20210706141527-5240e42f012a # github.com/metal3-io/baremetal-operator/apis => github.com/openshift/baremetal-operator/apis v0.0.0-20210706141527-5240e42f012a # github.com/metal3-io/cluster-api-provider-baremetal => github.com/openshift/cluster-api-provider-baremetal v0.0.0-20190821174549-a2a477909c1d +# github.com/openshift/api => github.com/openshift-powervs/api v0.0.0-20210729234416-b883aff9d9db # github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20200929181438-91d71ef2122c # github.com/openshift/machine-config-operator => github.com/openshift/machine-config-operator v0.0.1-0.20201009041932-4fe8559913b8 # github.com/terraform-providers/terraform-provider-aws => github.com/openshift/terraform-provider-aws v1.60.1-0.20210622193531-7d13cfbb1a8c @@ -2964,3 +2972,4 @@ sigs.k8s.io/yaml # google.golang.org/api => google.golang.org/api v0.25.0 # google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 # google.golang.org/grpc => google.golang.org/grpc v1.29.1 +# github.com/openshift/machine-api-operator => github.com/openshift-powervs/machine-api-operator v0.2.1-0.20210809115935-a9fd8f5d2767