From 6d663077102e3d7eb2fb4e1a1624647a6d19430f Mon Sep 17 00:00:00 2001 From: Yashwant Gohokar Date: Sun, 16 Apr 2023 21:59:58 +0530 Subject: [PATCH] OKE OSS Release v1.26.1 --- Dockerfile | 7 + Dockerfile_arm_all | 7 + README.md | 7 +- THIRD_PARTY_LICENSES.txt | 5 +- container-storage-interface.md | 17 +- go.mod | 7 +- go.sum | 12 +- hack/test-canary.sh | 2 - hack/validate-canary.sh | 2 - .../oci-cloud-controller-manager-rbac.yaml | 4 + .../oci-cloud-controller-manager.yaml | 3 +- .../oci-csi-controller-driver.yaml | 6 +- .../oci-csi-node-driver.yaml | 7 +- .../oci-flexvolume-driver.yaml | 4 +- .../oci-volume-provisioner-fss.yaml | 2 +- .../oci-volume-provisioner.yaml | 2 +- pkg/cloudprovider/providers/oci/ccm.go | 14 + .../providers/oci/fake_service_account.go | 186 +++++ .../providers/oci/instances_test.go | 97 ++- .../providers/oci/load_balancer.go | 155 +++- .../oci/load_balancer_security_lists.go | 2 +- .../providers/oci/load_balancer_spec.go | 4 + .../providers/oci/load_balancer_test.go | 133 ++++ .../providers/oci/load_balancer_util.go | 2 +- pkg/cloudprovider/providers/oci/util.go | 29 + pkg/csi-util/utils.go | 9 +- pkg/csi/driver/bv_controller.go | 285 ++++--- pkg/csi/driver/bv_controller_test.go | 10 +- pkg/csi/driver/bv_node.go | 15 +- pkg/csi/driver/fss_controller.go | 144 ++-- pkg/csi/driver/fss_controller_test.go | 3 +- pkg/csi/driver/fss_node.go | 53 +- pkg/metrics/constants.go | 8 + pkg/oci/client/block_storage.go | 47 +- pkg/oci/client/client.go | 68 +- .../instance/metadata/instance_metadata.go | 19 +- .../metadata/instance_metadata_test.go | 40 +- pkg/util/commons.go | 21 +- pkg/util/commons_test.go | 18 +- pkg/util/disk/iscsi.go | 25 +- pkg/util/disk/mount_helper.go | 218 ++++++ pkg/util/disk/mount_helper_test.go | 49 ++ pkg/util/disk/paravirtualized.go | 6 +- pkg/util/disk/unmount_helper.go | 100 --- pkg/volume/provisioner/block/block_test.go | 12 +- pkg/volume/provisioner/fss/fss_test.go | 16 +- scripts/encrypt-mount | 2 + scripts/encrypt-umount | 2 + scripts/rpm-host | 2 + .../cloud-provider-oci/csi_volume_cloning.go | 232 ++++++ .../cloud-provider-oci/csi_volume_creation.go | 3 +- test/e2e/cloud-provider-oci/fss_dynamic.go | 2 +- test/e2e/cloud-provider-oci/load_balancer.go | 16 +- test/e2e/framework/framework.go | 1 + test/e2e/framework/pvc_util.go | 149 +++- test/e2e/framework/service_account_util.go | 57 ++ test/e2e/framework/service_util.go | 12 +- ...federation_client_oke_workload_identity.go | 43 +- .../auth/instance_principal_key_provider.go | 19 +- ...uce_principal_delegation_token_provider.go | 90 +++ .../auth/resouce_principal_key_provider.go | 35 +- .../resource_principal_token_path_provider.go | 82 ++ .../oci-go-sdk/v65/common/circuit_breaker.go | 4 +- .../oracle/oci-go-sdk/v65/common/client.go | 17 +- .../oracle/oci-go-sdk/v65/common/common.go | 230 +++++- .../oci-go-sdk/v65/common/configuration.go | 112 ++- .../oracle/oci-go-sdk/v65/common/errors.go | 13 +- .../oracle/oci-go-sdk/v65/common/helpers.go | 2 +- .../oracle/oci-go-sdk/v65/common/http.go | 5 +- .../oci-go-sdk/v65/common/http_signer.go | 2 +- .../oracle/oci-go-sdk/v65/common/regions.go | 10 +- .../oracle/oci-go-sdk/v65/common/regions.json | 12 + .../oracle/oci-go-sdk/v65/common/retry.go | 10 +- .../v65/common/utils/opc_request_id.go | 3 +- .../oracle/oci-go-sdk/v65/common/version.go | 4 +- ...rg_route_distribution_statement_details.go | 1 - .../v65/core/add_drg_route_rule_details.go | 2 +- .../add_ipv6_subnet_cidr_request_response.go | 2 +- .../v65/core/add_subnet_ipv6_cidr_details.go | 4 +- ..._bm_gpu_launch_instance_platform_config.go | 14 +- .../core/amd_milan_bm_gpu_platform_config.go | 15 +- ...ilan_bm_launch_instance_platform_config.go | 11 +- .../v65/core/amd_milan_bm_platform_config.go | 11 +- ..._bm_gpu_launch_instance_platform_config.go | 11 +- .../core/amd_rome_bm_gpu_platform_config.go | 11 +- ...rome_bm_launch_instance_platform_config.go | 11 +- .../v65/core/amd_rome_bm_platform_config.go | 11 +- .../amd_vm_launch_instance_platform_config.go | 8 +- .../v65/core/amd_vm_platform_config.go | 8 +- .../core/attach_emulated_volume_details.go | 12 +- .../v65/core/attach_i_scsi_volume_details.go | 12 +- .../attach_paravirtualized_volume_details.go | 12 +- ...ttach_service_determined_volume_details.go | 12 +- .../v65/core/attach_volume_details.go | 32 +- ...lean_image_capability_schema_descriptor.go | 2 +- .../oracle/oci-go-sdk/v65/core/boot_volume.go | 6 +- .../oracle/oci-go-sdk/v65/core/byoip_range.go | 2 +- .../v65/core/byoip_range_summary.go | 2 +- ...byoip_range_vcn_ipv6_allocation_summary.go | 4 +- .../v65/core/byoipv6_cidr_details.go | 12 +- .../oci-go-sdk/v65/core/capture_filter.go | 5 +- ...ange_capture_filter_compartment_details.go | 2 +- ...nge_compute_cluster_compartment_details.go | 2 +- ...te_cluster_compartment_request_response.go | 4 +- .../v65/core/cluster_config_details.go | 4 +- .../v65/core/cluster_configuration_details.go | 52 ++ .../oci-go-sdk/v65/core/cluster_network.go | 13 +- ...network_placement_configuration_details.go | 60 +- .../v65/core/cluster_network_summary.go | 2 +- .../oci-go-sdk/v65/core/compute_cluster.go | 15 +- .../v65/core/compute_cluster_collection.go | 3 +- .../v65/core/compute_cluster_summary.go | 7 +- .../v65/core/compute_instance_options.go | 60 ++ .../v65/core/core_blockstorage_client.go | 139 ++-- .../v65/core/core_compute_client.go | 220 +++--- .../v65/core/core_computemanagement_client.go | 95 ++- .../v65/core/core_virtualnetwork_client.go | 651 ++++++++-------- .../oracle/oci-go-sdk/v65/core/cpe.go | 3 + .../core/create_boot_volume_backup_details.go | 6 + .../v65/core/create_boot_volume_details.go | 6 +- .../v65/core/create_byoip_range_details.go | 2 +- .../v65/core/create_capture_filter_details.go | 2 +- .../core/create_cluster_network_details.go | 9 +- .../core/create_compute_cluster_details.go | 14 +- ...create_compute_cluster_request_response.go | 14 +- .../oci-go-sdk/v65/core/create_cpe_details.go | 3 + .../v65/core/create_dhcp_details.go | 1 - .../create_instance_configuration_base.go | 18 +- .../create_instance_configuration_details.go | 8 +- ...nce_configuration_from_instance_details.go | 8 +- .../v65/core/create_instance_pool_details.go | 8 + ...ce_pool_placement_configuration_details.go | 10 +- ...create_ip_sec_connection_tunnel_details.go | 10 + .../v65/core/create_ipv6_details.go | 2 +- .../v65/core/create_macsec_properties.go | 3 + .../v65/core/create_subnet_details.go | 10 +- .../oci-go-sdk/v65/core/create_vcn_details.go | 8 +- .../core/create_virtual_circuit_details.go | 3 + .../v65/core/create_vnic_details.go | 13 + .../v65/core/create_volume_backup_details.go | 6 + .../v65/core/create_volume_details.go | 6 +- .../v65/core/create_volume_group_details.go | 5 +- ...delete_compute_cluster_request_response.go | 4 +- .../oci-go-sdk/v65/core/dhcp_options.go | 1 - .../drg_attachment_network_create_details.go | 4 +- .../core/drg_attachment_network_details.go | 8 +- .../core/drg_route_distribution_statement.go | 1 - .../v65/core/emulated_volume_attachment.go | 28 +- ...num_integer_image_capability_descriptor.go | 2 +- ...ring_image_capability_schema_descriptor.go | 2 +- .../v65/core/export_image_details.go | 2 +- ..._image_via_object_storage_tuple_details.go | 2 +- ...rt_image_via_object_storage_uri_details.go | 2 +- ...eric_bm_launch_instance_platform_config.go | 175 +++++ .../v65/core/generic_bm_platform_config.go | 175 +++++ .../get_compute_cluster_request_response.go | 4 +- .../v65/core/i_scsi_volume_attachment.go | 28 +- .../image_capability_schema_descriptor.go | 2 +- .../v65/core/image_source_details.go | 6 +- ...source_via_object_storage_tuple_details.go | 6 +- ...e_source_via_object_storage_uri_details.go | 6 +- .../oracle/oci-go-sdk/v65/core/instance.go | 10 +- .../v65/core/instance_configuration.go | 5 +- ..._bm_gpu_launch_instance_platform_config.go | 14 +- ...ilan_bm_launch_instance_platform_config.go | 11 +- ..._bm_gpu_launch_instance_platform_config.go | 11 +- ...rome_bm_launch_instance_platform_config.go | 11 +- ..._amd_vm_launch_instance_platform_config.go | 8 +- ...nce_configuration_attach_volume_details.go | 8 +- ...tance_configuration_create_vnic_details.go | 13 + ...nce_configuration_create_volume_details.go | 6 +- ...eric_bm_launch_instance_platform_config.go | 175 +++++ ...instance_configuration_instance_details.go | 4 + ...on_instance_source_image_filter_details.go | 57 ++ ...ation_instance_source_via_image_details.go | 2 + ...lake_bm_launch_instance_platform_config.go | 11 +- ...lake_bm_launch_instance_platform_config.go | 78 +- ...ntel_vm_launch_instance_platform_config.go | 8 +- ...6_address_ipv6_subnet_cidr_pair_details.go | 48 ++ ...nfiguration_iscsi_attach_volume_details.go | 8 +- ...uration_launch_instance_platform_config.go | 16 +- ...on_launch_instance_shape_config_details.go | 5 + ...n_paravirtualized_attach_volume_details.go | 8 +- .../oci-go-sdk/v65/core/instance_pool.go | 8 + .../instance_pool_placement_configuration.go | 7 +- ...t_ipv6_address_ipv6_subnet_cidr_details.go | 45 ++ .../instance_pool_placement_primary_subnet.go | 58 ++ ...ce_pool_placement_secondary_vnic_subnet.go | 13 + .../instance_pool_placement_subnet_details.go | 58 ++ .../v65/core/instance_shape_config.go | 5 + .../instance_source_image_filter_details.go | 57 ++ .../core/instance_source_via_image_details.go | 8 +- ...lake_bm_launch_instance_platform_config.go | 11 +- .../core/intel_icelake_bm_platform_config.go | 11 +- ...lake_bm_launch_instance_platform_config.go | 78 +- .../core/intel_skylake_bm_platform_config.go | 78 +- ...ntel_vm_launch_instance_platform_config.go | 8 +- .../v65/core/intel_vm_platform_config.go | 8 +- .../oci-go-sdk/v65/core/ip_sec_connection.go | 48 ++ .../core/ip_sec_connection_device_config.go | 4 +- .../v65/core/ip_sec_connection_tunnel.go | 3 + ...c_tunnel_drg_attachment_network_details.go | 7 +- .../oracle/oci-go-sdk/v65/core/ipv6.go | 2 +- ...6_address_ipv6_subnet_cidr_pair_details.go | 51 ++ .../v65/core/launch_instance_details.go | 29 +- .../core/launch_instance_platform_config.go | 16 +- .../launch_instance_shape_config_details.go | 5 + .../core/list_instances_request_response.go | 4 +- ...uit_associated_tunnels_request_response.go | 110 +++ ...oop_back_drg_attachment_network_details.go | 68 ++ .../oci-go-sdk/v65/core/macsec_properties.go | 3 + .../v65/core/network_security_group.go | 12 +- .../v65/core/networking_topology.go | 33 +- .../core/paravirtualized_volume_attachment.go | 28 +- .../oci-go-sdk/v65/core/platform_config.go | 16 +- ...nnection_drg_attachment_network_details.go | 4 +- ...emove_ipv6_subnet_cidr_request_response.go | 2 +- .../remove_ipv6_vcn_cidr_request_response.go | 2 +- .../core/remove_subnet_ipv6_cidr_details.go | 4 +- .../oracle/oci-go-sdk/v65/core/route_rule.go | 6 +- .../v65/core/shape_platform_config_options.go | 4 + .../oracle/oci-go-sdk/v65/core/subnet.go | 4 +- .../oci-go-sdk/v65/core/subnet_topology.go | 35 +- .../oracle/oci-go-sdk/v65/core/topology.go | 28 +- ...ogy_associated_with_entity_relationship.go | 4 +- .../topology_contains_entity_relationship.go | 4 +- .../v65/core/topology_entity_relationship.go | 4 +- .../topology_routes_to_entity_relationship.go | 4 +- .../oci-go-sdk/v65/core/tunnel_config.go | 4 +- .../v65/core/tunnel_cpe_device_config.go | 8 +- .../core/update_boot_volume_backup_details.go | 6 + .../v65/core/update_boot_volume_details.go | 6 +- .../v65/core/update_capture_filter_details.go | 2 +- .../core/update_cluster_network_details.go | 2 +- .../core/update_compute_cluster_details.go | 3 +- ...update_compute_cluster_request_response.go | 4 +- .../v65/core/update_dhcp_details.go | 1 - ...rg_route_distribution_statement_details.go | 1 - .../v65/core/update_drg_route_rule_details.go | 2 +- .../v65/core/update_instance_pool_details.go | 8 + ...ce_pool_placement_configuration_details.go | 12 +- .../update_instance_shape_config_details.go | 5 + .../v65/core/update_macsec_properties.go | 3 + .../v65/core/update_subnet_details.go | 16 +- .../core/update_virtual_circuit_details.go | 3 + .../v65/core/update_volume_backup_details.go | 6 + .../v65/core/update_volume_details.go | 6 +- .../oracle/oci-go-sdk/v65/core/vcn.go | 8 +- ...n_drg_attachment_network_create_details.go | 4 +- .../vcn_drg_attachment_network_details.go | 4 +- .../oci-go-sdk/v65/core/vcn_topology.go | 35 +- .../oci-go-sdk/v65/core/virtual_circuit.go | 3 + ...rtual_circuit_associated_tunnel_details.go | 92 +++ ..._circuit_drg_attachment_network_details.go | 8 +- .../oracle/oci-go-sdk/v65/core/vnic.go | 4 + .../oracle/oci-go-sdk/v65/core/volume.go | 6 +- .../oci-go-sdk/v65/core/volume_attachment.go | 98 +-- .../oci-go-sdk/v65/core/volume_group.go | 10 +- ..._outbound_connector_compartment_details.go | 41 + ..._connector_compartment_request_response.go | 97 +++ .../v65/filestorage/client_options.go | 63 ++ .../v65/filestorage/create_export_details.go | 3 + .../filestorage/create_kerberos_details.go | 52 ++ .../create_ldap_bind_account_details.go | 113 +++ .../filestorage/create_ldap_idmap_details.go | 104 +++ .../create_mount_target_details.go | 10 + .../create_outbound_connector_details.go | 137 ++++ ...ate_outbound_connector_request_response.go | 102 +++ ...ete_outbound_connector_request_response.go | 96 +++ .../oci-go-sdk/v65/filestorage/endpoint.go | 43 ++ .../oci-go-sdk/v65/filestorage/export.go | 15 +- .../v65/filestorage/export_summary.go | 3 + .../oci-go-sdk/v65/filestorage/file_system.go | 2 +- .../v65/filestorage/filestorage_client.go | 535 ++++++++++++-- ...get_outbound_connector_request_response.go | 95 +++ .../oci-go-sdk/v65/filestorage/kerberos.go | 52 ++ .../v65/filestorage/kerberos_keytab_entry.go | 103 +++ .../v65/filestorage/key_tab_secret_details.go | 46 ++ .../v65/filestorage/ldap_bind_account.go | 142 ++++ .../filestorage/ldap_bind_account_summary.go | 136 ++++ .../oci-go-sdk/v65/filestorage/ldap_idmap.go | 104 +++ ...st_outbound_connectors_request_response.go | 286 +++++++ .../v65/filestorage/mount_target.go | 52 ++ .../v65/filestorage/outbound_connector.go | 261 +++++++ .../filestorage/outbound_connector_summary.go | 222 ++++++ .../v65/filestorage/update_export_details.go | 3 + .../filestorage/update_kerberos_details.go | 52 ++ .../filestorage/update_ldap_idmap_details.go | 104 +++ .../update_mount_target_details.go | 10 + .../update_outbound_connector_details.go | 53 ++ ...ate_outbound_connector_request_response.go | 105 +++ .../filestorage/validate_key_tabs_details.go | 42 ++ .../validate_key_tabs_request_response.go | 90 +++ .../validate_key_tabs_response_details.go | 43 ++ .../v65/identity/add_lock_details.go | 2 +- .../v65/identity/add_user_to_group_details.go | 2 +- .../allowed_domain_license_type_summary.go | 2 +- .../oracle/oci-go-sdk/v65/identity/api_key.go | 2 +- .../oci-go-sdk/v65/identity/auth_token.go | 2 +- .../v65/identity/authentication_policy.go | 2 +- .../v65/identity/availability_domain.go | 2 +- .../identity/base_tag_definition_validator.go | 2 +- .../v65/identity/bulk_action_resource.go | 2 +- .../v65/identity/bulk_action_resource_type.go | 2 +- .../bulk_action_resource_type_collection.go | 2 +- .../identity/bulk_delete_resources_details.go | 2 +- .../v65/identity/bulk_delete_tags_details.go | 2 +- .../identity/bulk_edit_operation_details.go | 2 +- .../v65/identity/bulk_edit_resource.go | 2 +- .../v65/identity/bulk_edit_tags_details.go | 2 +- .../identity/bulk_edit_tags_resource_type.go | 2 +- ...bulk_edit_tags_resource_type_collection.go | 2 +- .../identity/bulk_move_resources_details.go | 2 +- .../change_domain_compartment_details.go | 2 +- .../change_domain_license_type_details.go | 2 +- ...change_tag_namespace_compartment_detail.go | 2 +- .../change_tas_domain_license_type_details.go | 2 +- .../oci-go-sdk/v65/identity/compartment.go | 2 +- .../v65/identity/create_api_key_details.go | 2 +- .../v65/identity/create_auth_token_details.go | 2 +- .../identity/create_compartment_details.go | 2 +- .../create_customer_secret_key_details.go | 2 +- .../identity/create_db_credential_details.go | 2 +- .../v65/identity/create_domain_details.go | 2 +- .../identity/create_dynamic_group_details.go | 2 +- .../v65/identity/create_group_details.go | 2 +- .../create_identity_provider_details.go | 34 +- .../create_idp_group_mapping_details.go | 2 +- .../identity/create_network_source_details.go | 2 +- ...reate_o_auth2_client_credential_details.go | 2 +- .../v65/identity/create_policy_details.go | 2 +- .../create_region_subscription_details.go | 2 +- .../create_saml2_identity_provider_details.go | 14 +- .../create_smtp_credential_details.go | 2 +- .../identity/create_swift_password_details.go | 2 +- .../identity/create_tag_default_details.go | 2 +- .../v65/identity/create_tag_details.go | 2 +- .../identity/create_tag_namespace_details.go | 2 +- .../v65/identity/create_user_details.go | 2 +- .../v65/identity/customer_secret_key.go | 2 +- .../identity/customer_secret_key_summary.go | 2 +- .../oci-go-sdk/v65/identity/db_credential.go | 2 +- .../v65/identity/db_credential_summary.go | 2 +- .../default_tag_definition_validator.go | 2 +- .../oracle/oci-go-sdk/v65/identity/domain.go | 2 +- .../v65/identity/domain_replication.go | 2 +- .../v65/identity/domain_replication_states.go | 2 +- .../oci-go-sdk/v65/identity/domain_summary.go | 2 +- .../oci-go-sdk/v65/identity/dynamic_group.go | 2 +- .../enable_replication_to_region_details.go | 2 +- .../identity/enum_tag_definition_validator.go | 2 +- .../oci-go-sdk/v65/identity/fault_domain.go | 2 +- .../v65/identity/fully_qualified_scope.go | 2 +- .../oracle/oci-go-sdk/v65/identity/group.go | 2 +- .../v65/identity/iam_work_request.go | 2 +- .../iam_work_request_error_summary.go | 2 +- .../identity/iam_work_request_log_summary.go | 2 +- .../v65/identity/iam_work_request_resource.go | 2 +- .../v65/identity/iam_work_request_summary.go | 2 +- .../v65/identity/identity_client.go | 332 +++++---- .../v65/identity/identity_provider.go | 52 +- .../identity_provider_group_summary.go | 2 +- .../v65/identity/idp_group_mapping.go | 2 +- .../identity/import_standard_tags_details.go | 2 +- .../v65/identity/mfa_totp_device.go | 2 +- .../v65/identity/mfa_totp_device_summary.go | 2 +- .../oci-go-sdk/v65/identity/mfa_totp_token.go | 2 +- .../v65/identity/move_compartment_details.go | 2 +- .../oci-go-sdk/v65/identity/network_policy.go | 2 +- .../v65/identity/network_sources.go | 4 +- .../v65/identity/network_sources_summary.go | 25 +- .../network_sources_virtual_source_list.go | 2 +- .../v65/identity/o_auth2_client_credential.go | 2 +- .../o_auth2_client_credential_summary.go | 2 +- .../v65/identity/password_policy.go | 2 +- .../oracle/oci-go-sdk/v65/identity/policy.go | 9 +- .../oracle/oci-go-sdk/v65/identity/region.go | 2 +- .../v65/identity/region_subscription.go | 2 +- .../v65/identity/remove_lock_details.go | 2 +- .../v65/identity/replicated_region_details.go | 5 +- .../oci-go-sdk/v65/identity/resource_lock.go | 2 +- .../v65/identity/saml2_identity_provider.go | 22 +- .../v65/identity/scim_client_credentials.go | 2 +- .../v65/identity/smtp_credential.go | 2 +- .../v65/identity/smtp_credential_summary.go | 2 +- .../standard_tag_definition_template.go | 2 +- .../standard_tag_namespace_template.go | 2 +- ...standard_tag_namespace_template_summary.go | 2 +- .../oci-go-sdk/v65/identity/swift_password.go | 2 +- .../oracle/oci-go-sdk/v65/identity/tag.go | 2 +- .../oci-go-sdk/v65/identity/tag_default.go | 2 +- .../v65/identity/tag_default_summary.go | 2 +- .../oci-go-sdk/v65/identity/tag_namespace.go | 2 +- .../v65/identity/tag_namespace_summary.go | 2 +- .../oci-go-sdk/v65/identity/tag_summary.go | 2 +- .../v65/identity/tagging_work_request.go | 2 +- .../tagging_work_request_error_summary.go | 2 +- .../tagging_work_request_log_summary.go | 2 +- .../identity/tagging_work_request_summary.go | 2 +- .../oracle/oci-go-sdk/v65/identity/tenancy.go | 2 +- .../oci-go-sdk/v65/identity/ui_password.go | 2 +- .../v65/identity/ui_password_information.go | 2 +- .../v65/identity/update_auth_token_details.go | 2 +- .../update_authentication_policy_details.go | 2 +- .../identity/update_compartment_details.go | 2 +- .../update_customer_secret_key_details.go | 2 +- .../v65/identity/update_domain_details.go | 2 +- .../identity/update_dynamic_group_details.go | 2 +- .../v65/identity/update_group_details.go | 2 +- .../update_identity_provider_details.go | 8 +- .../update_idp_group_mapping_details.go | 2 +- .../identity/update_network_source_details.go | 2 +- ...pdate_o_auth2_client_credential_details.go | 2 +- .../v65/identity/update_policy_details.go | 2 +- .../update_saml2_identity_provider_details.go | 8 +- .../update_smtp_credential_details.go | 2 +- .../v65/identity/update_state_details.go | 2 +- .../identity/update_swift_password_details.go | 2 +- .../identity/update_tag_default_details.go | 2 +- .../v65/identity/update_tag_details.go | 2 +- .../identity/update_tag_namespace_details.go | 2 +- .../update_user_capabilities_details.go | 2 +- .../v65/identity/update_user_details.go | 2 +- .../oracle/oci-go-sdk/v65/identity/user.go | 2 +- .../v65/identity/user_capabilities.go | 2 +- .../v65/identity/user_group_membership.go | 2 +- .../oci-go-sdk/v65/identity/work_request.go | 2 +- .../v65/identity/work_request_error.go | 2 +- .../v65/identity/work_request_log_entry.go | 2 +- .../v65/identity/work_request_resource.go | 2 +- .../v65/identity/work_request_summary.go | 2 +- .../add_http_request_header_rule.go | 10 +- .../add_http_response_header_rule.go | 10 +- .../oci-go-sdk/v65/loadbalancer/allow_rule.go | 7 +- .../loadbalancer/create_rule_set_details.go | 1 - .../create_ssl_cipher_suite_details.go | 290 ++++---- .../extend_http_request_header_value_rule.go | 12 +- .../extend_http_response_header_value_rule.go | 12 +- .../v65/loadbalancer/loadbalancer_client.go | 127 ++-- .../v65/loadbalancer/redirect_rule.go | 13 +- .../v65/loadbalancer/routing_rule.go | 1 - .../oci-go-sdk/v65/loadbalancer/rule_set.go | 1 - .../v65/loadbalancer/rule_set_details.go | 1 - .../v65/loadbalancer/ssl_cipher_suite.go | 290 ++++---- .../loadbalancer/ssl_cipher_suite_details.go | 290 ++++---- .../loadbalancer/update_rule_set_details.go | 1 - .../v65/monitoring/monitoring_client.go | 41 +- .../networkloadbalancer_client.go | 73 +- .../golang.org/x/sync/semaphore/semaphore.go | 136 ++++ vendor/golang.org/x/sys/unix/ioctl_signed.go | 70 ++ .../sys/unix/{ioctl.go => ioctl_unsigned.go} | 4 +- vendor/golang.org/x/sys/unix/ioctl_zos.go | 12 +- vendor/golang.org/x/sys/unix/mkerrors.sh | 5 +- vendor/golang.org/x/sys/unix/syscall_aix.go | 4 +- .../golang.org/x/sys/unix/syscall_aix_ppc.go | 1 - .../x/sys/unix/syscall_aix_ppc64.go | 1 - .../golang.org/x/sys/unix/syscall_darwin.go | 3 +- .../x/sys/unix/syscall_dragonfly.go | 1 - .../golang.org/x/sys/unix/syscall_freebsd.go | 1 - vendor/golang.org/x/sys/unix/syscall_linux.go | 10 +- .../x/sys/unix/syscall_linux_386.go | 27 - .../x/sys/unix/syscall_linux_amd64.go | 1 - .../x/sys/unix/syscall_linux_arm.go | 27 - .../x/sys/unix/syscall_linux_arm64.go | 10 - .../x/sys/unix/syscall_linux_loong64.go | 5 - .../x/sys/unix/syscall_linux_mips64x.go | 1 - .../x/sys/unix/syscall_linux_mipsx.go | 27 - .../x/sys/unix/syscall_linux_ppc.go | 27 - .../x/sys/unix/syscall_linux_ppc64x.go | 1 - .../x/sys/unix/syscall_linux_riscv64.go | 1 - .../x/sys/unix/syscall_linux_s390x.go | 1 - .../x/sys/unix/syscall_linux_sparc64.go | 1 - .../golang.org/x/sys/unix/syscall_netbsd.go | 2 - .../golang.org/x/sys/unix/syscall_openbsd.go | 1 - .../golang.org/x/sys/unix/syscall_solaris.go | 21 +- vendor/golang.org/x/sys/unix/syscall_unix.go | 7 + .../x/sys/unix/syscall_zos_s390x.go | 4 +- .../x/sys/unix/zerrors_darwin_amd64.go | 19 + .../x/sys/unix/zerrors_darwin_arm64.go | 19 + vendor/golang.org/x/sys/unix/zerrors_linux.go | 14 + .../golang.org/x/sys/unix/zsyscall_aix_ppc.go | 15 +- .../x/sys/unix/zsyscall_aix_ppc64.go | 18 +- .../x/sys/unix/zsyscall_aix_ppc64_gc.go | 10 - .../x/sys/unix/zsyscall_aix_ppc64_gccgo.go | 10 +- .../x/sys/unix/zsyscall_darwin_amd64.go | 39 +- .../x/sys/unix/zsyscall_darwin_amd64.s | 11 +- .../x/sys/unix/zsyscall_darwin_arm64.go | 39 +- .../x/sys/unix/zsyscall_darwin_arm64.s | 11 +- .../x/sys/unix/zsyscall_dragonfly_amd64.go | 10 - .../x/sys/unix/zsyscall_freebsd_386.go | 10 - .../x/sys/unix/zsyscall_freebsd_amd64.go | 10 - .../x/sys/unix/zsyscall_freebsd_arm.go | 10 - .../x/sys/unix/zsyscall_freebsd_arm64.go | 10 - .../x/sys/unix/zsyscall_freebsd_riscv64.go | 10 - .../golang.org/x/sys/unix/zsyscall_linux.go | 10 - .../x/sys/unix/zsyscall_linux_386.go | 10 - .../x/sys/unix/zsyscall_linux_amd64.go | 10 - .../x/sys/unix/zsyscall_linux_arm.go | 10 - .../x/sys/unix/zsyscall_linux_arm64.go | 10 - .../x/sys/unix/zsyscall_linux_mips.go | 10 - .../x/sys/unix/zsyscall_linux_mips64.go | 10 - .../x/sys/unix/zsyscall_linux_mips64le.go | 10 - .../x/sys/unix/zsyscall_linux_mipsle.go | 10 - .../x/sys/unix/zsyscall_linux_ppc.go | 10 - .../x/sys/unix/zsyscall_linux_ppc64.go | 10 - .../x/sys/unix/zsyscall_linux_ppc64le.go | 10 - .../x/sys/unix/zsyscall_linux_riscv64.go | 10 - .../x/sys/unix/zsyscall_linux_s390x.go | 10 - .../x/sys/unix/zsyscall_linux_sparc64.go | 10 - .../x/sys/unix/zsyscall_netbsd_386.go | 10 - .../x/sys/unix/zsyscall_netbsd_amd64.go | 10 - .../x/sys/unix/zsyscall_netbsd_arm.go | 10 - .../x/sys/unix/zsyscall_netbsd_arm64.go | 10 - .../x/sys/unix/zsyscall_openbsd_386.go | 14 - .../x/sys/unix/zsyscall_openbsd_386.s | 5 - .../x/sys/unix/zsyscall_openbsd_amd64.go | 14 - .../x/sys/unix/zsyscall_openbsd_amd64.s | 5 - .../x/sys/unix/zsyscall_openbsd_arm.go | 14 - .../x/sys/unix/zsyscall_openbsd_arm.s | 5 - .../x/sys/unix/zsyscall_openbsd_arm64.go | 14 - .../x/sys/unix/zsyscall_openbsd_arm64.s | 5 - .../x/sys/unix/zsyscall_openbsd_mips64.go | 14 - .../x/sys/unix/zsyscall_openbsd_mips64.s | 5 - .../x/sys/unix/zsyscall_openbsd_ppc64.go | 14 - .../x/sys/unix/zsyscall_openbsd_ppc64.s | 6 - .../x/sys/unix/zsyscall_openbsd_riscv64.go | 14 - .../x/sys/unix/zsyscall_openbsd_riscv64.s | 5 - .../x/sys/unix/zsyscall_solaris_amd64.go | 17 +- .../x/sys/unix/zsyscall_zos_s390x.go | 4 +- .../x/sys/unix/ztypes_darwin_amd64.go | 11 + .../x/sys/unix/ztypes_darwin_arm64.go | 11 + .../golang.org/x/sys/windows/env_windows.go | 6 +- .../golang.org/x/sys/windows/exec_windows.go | 7 +- vendor/golang.org/x/sys/windows/service.go | 7 + .../golang.org/x/sys/windows/types_windows.go | 10 +- .../x/sys/windows/zsyscall_windows.go | 9 + .../client-go/discovery/fake/discovery.go | 171 +++++ .../kubernetes/fake/clientset_generated.go | 428 +++++++++++ .../k8s.io/client-go/kubernetes/fake/doc.go | 20 + .../client-go/kubernetes/fake/register.go | 154 ++++ .../admissionregistration/v1/fake/doc.go | 20 + .../fake/fake_admissionregistration_client.go | 44 ++ .../fake/fake_mutatingwebhookconfiguration.go | 146 ++++ .../fake_validatingwebhookconfiguration.go | 146 ++++ .../v1alpha1/fake/doc.go | 20 + .../fake/fake_admissionregistration_client.go | 44 ++ .../fake/fake_validatingadmissionpolicy.go | 146 ++++ .../fake_validatingadmissionpolicybinding.go | 146 ++++ .../admissionregistration/v1beta1/fake/doc.go | 20 + .../fake/fake_admissionregistration_client.go | 44 ++ .../fake/fake_mutatingwebhookconfiguration.go | 146 ++++ .../fake_validatingwebhookconfiguration.go | 146 ++++ .../apiserverinternal/v1alpha1/fake/doc.go | 20 + .../fake/fake_apiserverinternal_client.go | 40 + .../v1alpha1/fake/fake_storageversion.go | 179 +++++ .../kubernetes/typed/apps/v1/fake/doc.go | 20 + .../typed/apps/v1/fake/fake_apps_client.go | 56 ++ .../apps/v1/fake/fake_controllerrevision.go | 155 ++++ .../typed/apps/v1/fake/fake_daemonset.go | 190 +++++ .../typed/apps/v1/fake/fake_deployment.go | 233 ++++++ .../typed/apps/v1/fake/fake_replicaset.go | 233 ++++++ .../typed/apps/v1/fake/fake_statefulset.go | 233 ++++++ .../kubernetes/typed/apps/v1beta1/fake/doc.go | 20 + .../apps/v1beta1/fake/fake_apps_client.go | 48 ++ .../v1beta1/fake/fake_controllerrevision.go | 155 ++++ .../apps/v1beta1/fake/fake_deployment.go | 190 +++++ .../apps/v1beta1/fake/fake_statefulset.go | 190 +++++ .../kubernetes/typed/apps/v1beta2/fake/doc.go | 20 + .../apps/v1beta2/fake/fake_apps_client.go | 56 ++ .../v1beta2/fake/fake_controllerrevision.go | 155 ++++ .../typed/apps/v1beta2/fake/fake_daemonset.go | 190 +++++ .../apps/v1beta2/fake/fake_deployment.go | 190 +++++ .../apps/v1beta2/fake/fake_replicaset.go | 190 +++++ .../apps/v1beta2/fake/fake_statefulset.go | 231 ++++++ .../typed/authentication/v1/fake/doc.go | 20 + .../v1/fake/fake_authentication_client.go | 40 + .../v1/fake/fake_tokenreview.go | 47 ++ .../typed/authentication/v1alpha1/fake/doc.go | 20 + .../fake/fake_authentication_client.go | 40 + .../v1alpha1/fake/fake_selfsubjectreview.go | 47 ++ .../typed/authentication/v1beta1/fake/doc.go | 20 + .../fake/fake_authentication_client.go | 40 + .../v1beta1/fake/fake_tokenreview.go | 47 ++ .../typed/authorization/v1/fake/doc.go | 20 + .../v1/fake/fake_authorization_client.go | 52 ++ .../v1/fake/fake_localsubjectaccessreview.go | 49 ++ .../v1/fake/fake_selfsubjectaccessreview.go | 47 ++ .../v1/fake/fake_selfsubjectrulesreview.go | 47 ++ .../v1/fake/fake_subjectaccessreview.go | 47 ++ .../typed/authorization/v1beta1/fake/doc.go | 20 + .../v1beta1/fake/fake_authorization_client.go | 52 ++ .../fake/fake_localsubjectaccessreview.go | 49 ++ .../fake/fake_selfsubjectaccessreview.go | 47 ++ .../fake/fake_selfsubjectrulesreview.go | 47 ++ .../v1beta1/fake/fake_subjectaccessreview.go | 47 ++ .../typed/autoscaling/v1/fake/doc.go | 20 + .../v1/fake/fake_autoscaling_client.go | 40 + .../v1/fake/fake_horizontalpodautoscaler.go | 190 +++++ .../typed/autoscaling/v2/fake/doc.go | 20 + .../v2/fake/fake_autoscaling_client.go | 40 + .../v2/fake/fake_horizontalpodautoscaler.go | 190 +++++ .../typed/autoscaling/v2beta1/fake/doc.go | 20 + .../v2beta1/fake/fake_autoscaling_client.go | 40 + .../fake/fake_horizontalpodautoscaler.go | 190 +++++ .../typed/autoscaling/v2beta2/fake/doc.go | 20 + .../v2beta2/fake/fake_autoscaling_client.go | 40 + .../fake/fake_horizontalpodautoscaler.go | 190 +++++ .../kubernetes/typed/batch/v1/fake/doc.go | 20 + .../typed/batch/v1/fake/fake_batch_client.go | 44 ++ .../typed/batch/v1/fake/fake_cronjob.go | 190 +++++ .../typed/batch/v1/fake/fake_job.go | 190 +++++ .../typed/batch/v1beta1/fake/doc.go | 20 + .../batch/v1beta1/fake/fake_batch_client.go | 40 + .../typed/batch/v1beta1/fake/fake_cronjob.go | 190 +++++ .../typed/certificates/v1/fake/doc.go | 20 + .../v1/fake/fake_certificates_client.go | 40 + .../v1/fake/fake_certificatesigningrequest.go | 189 +++++ .../typed/certificates/v1beta1/fake/doc.go | 20 + .../v1beta1/fake/fake_certificates_client.go | 40 + .../fake/fake_certificatesigningrequest.go | 179 +++++ ...ake_certificatesigningrequest_expansion.go | 34 + .../typed/coordination/v1/fake/doc.go | 20 + .../v1/fake/fake_coordination_client.go | 40 + .../typed/coordination/v1/fake/fake_lease.go | 155 ++++ .../typed/coordination/v1beta1/fake/doc.go | 20 + .../v1beta1/fake/fake_coordination_client.go | 40 + .../coordination/v1beta1/fake/fake_lease.go | 155 ++++ .../kubernetes/typed/core/v1/fake/doc.go | 20 + .../core/v1/fake/fake_componentstatus.go | 146 ++++ .../typed/core/v1/fake/fake_configmap.go | 155 ++++ .../typed/core/v1/fake/fake_core_client.go | 100 +++ .../typed/core/v1/fake/fake_endpoints.go | 155 ++++ .../typed/core/v1/fake/fake_event.go | 155 ++++ .../core/v1/fake/fake_event_expansion.go | 101 +++ .../typed/core/v1/fake/fake_limitrange.go | 155 ++++ .../typed/core/v1/fake/fake_namespace.go | 171 +++++ .../core/v1/fake/fake_namespace_expansion.go | 40 + .../typed/core/v1/fake/fake_node.go | 179 +++++ .../typed/core/v1/fake/fake_node_expansion.go | 38 + .../core/v1/fake/fake_persistentvolume.go | 179 +++++ .../v1/fake/fake_persistentvolumeclaim.go | 190 +++++ .../kubernetes/typed/core/v1/fake/fake_pod.go | 201 +++++ .../typed/core/v1/fake/fake_pod_expansion.go | 112 +++ .../typed/core/v1/fake/fake_podtemplate.go | 155 ++++ .../v1/fake/fake_replicationcontroller.go | 213 ++++++ .../typed/core/v1/fake/fake_resourcequota.go | 190 +++++ .../typed/core/v1/fake/fake_secret.go | 155 ++++ .../typed/core/v1/fake/fake_service.go | 182 +++++ .../core/v1/fake/fake_service_expansion.go | 26 + .../typed/core/v1/fake/fake_serviceaccount.go | 167 +++++ .../kubernetes/typed/discovery/v1/fake/doc.go | 20 + .../v1/fake/fake_discovery_client.go | 40 + .../discovery/v1/fake/fake_endpointslice.go | 155 ++++ .../typed/discovery/v1beta1/fake/doc.go | 20 + .../v1beta1/fake/fake_discovery_client.go | 40 + .../v1beta1/fake/fake_endpointslice.go | 155 ++++ .../kubernetes/typed/events/v1/fake/doc.go | 20 + .../typed/events/v1/fake/fake_event.go | 155 ++++ .../events/v1/fake/fake_events_client.go | 40 + .../typed/events/v1beta1/fake/doc.go | 20 + .../typed/events/v1beta1/fake/fake_event.go | 155 ++++ .../v1beta1/fake/fake_event_expansion.go | 66 ++ .../events/v1beta1/fake/fake_events_client.go | 40 + .../typed/extensions/v1beta1/fake/doc.go | 20 + .../extensions/v1beta1/fake/fake_daemonset.go | 190 +++++ .../v1beta1/fake/fake_deployment.go | 231 ++++++ .../v1beta1/fake/fake_deployment_expansion.go | 36 + .../v1beta1/fake/fake_extensions_client.go | 60 ++ .../extensions/v1beta1/fake/fake_ingress.go | 190 +++++ .../v1beta1/fake/fake_networkpolicy.go | 190 +++++ .../v1beta1/fake/fake_podsecuritypolicy.go | 146 ++++ .../v1beta1/fake/fake_replicaset.go | 231 ++++++ .../typed/flowcontrol/v1alpha1/fake/doc.go | 20 + .../v1alpha1/fake/fake_flowcontrol_client.go | 44 ++ .../v1alpha1/fake/fake_flowschema.go | 179 +++++ .../fake/fake_prioritylevelconfiguration.go | 179 +++++ .../typed/flowcontrol/v1beta1/fake/doc.go | 20 + .../v1beta1/fake/fake_flowcontrol_client.go | 44 ++ .../v1beta1/fake/fake_flowschema.go | 179 +++++ .../fake/fake_prioritylevelconfiguration.go | 179 +++++ .../typed/flowcontrol/v1beta2/fake/doc.go | 20 + .../v1beta2/fake/fake_flowcontrol_client.go | 44 ++ .../v1beta2/fake/fake_flowschema.go | 179 +++++ .../fake/fake_prioritylevelconfiguration.go | 179 +++++ .../typed/flowcontrol/v1beta3/fake/doc.go | 20 + .../v1beta3/fake/fake_flowcontrol_client.go | 44 ++ .../v1beta3/fake/fake_flowschema.go | 179 +++++ .../fake/fake_prioritylevelconfiguration.go | 179 +++++ .../typed/networking/v1/fake/doc.go | 20 + .../typed/networking/v1/fake/fake_ingress.go | 190 +++++ .../networking/v1/fake/fake_ingressclass.go | 146 ++++ .../v1/fake/fake_networking_client.go | 48 ++ .../networking/v1/fake/fake_networkpolicy.go | 190 +++++ .../typed/networking/v1alpha1/fake/doc.go | 20 + .../v1alpha1/fake/fake_clustercidr.go | 146 ++++ .../v1alpha1/fake/fake_networking_client.go | 40 + .../typed/networking/v1beta1/fake/doc.go | 20 + .../networking/v1beta1/fake/fake_ingress.go | 190 +++++ .../v1beta1/fake/fake_ingressclass.go | 146 ++++ .../v1beta1/fake/fake_networking_client.go | 44 ++ .../kubernetes/typed/node/v1/fake/doc.go | 20 + .../typed/node/v1/fake/fake_node_client.go | 40 + .../typed/node/v1/fake/fake_runtimeclass.go | 146 ++++ .../typed/node/v1alpha1/fake/doc.go | 20 + .../node/v1alpha1/fake/fake_node_client.go | 40 + .../node/v1alpha1/fake/fake_runtimeclass.go | 146 ++++ .../kubernetes/typed/node/v1beta1/fake/doc.go | 20 + .../node/v1beta1/fake/fake_node_client.go | 40 + .../node/v1beta1/fake/fake_runtimeclass.go | 146 ++++ .../kubernetes/typed/policy/v1/fake/doc.go | 20 + .../typed/policy/v1/fake/fake_eviction.go | 25 + .../policy/v1/fake/fake_eviction_expansion.go | 37 + .../v1/fake/fake_poddisruptionbudget.go | 190 +++++ .../policy/v1/fake/fake_policy_client.go | 44 ++ .../typed/policy/v1beta1/fake/doc.go | 20 + .../policy/v1beta1/fake/fake_eviction.go | 25 + .../v1beta1/fake/fake_eviction_expansion.go | 37 + .../v1beta1/fake/fake_poddisruptionbudget.go | 190 +++++ .../v1beta1/fake/fake_podsecuritypolicy.go | 146 ++++ .../policy/v1beta1/fake/fake_policy_client.go | 48 ++ .../kubernetes/typed/rbac/v1/fake/doc.go | 20 + .../typed/rbac/v1/fake/fake_clusterrole.go | 146 ++++ .../rbac/v1/fake/fake_clusterrolebinding.go | 146 ++++ .../typed/rbac/v1/fake/fake_rbac_client.go | 52 ++ .../typed/rbac/v1/fake/fake_role.go | 155 ++++ .../typed/rbac/v1/fake/fake_rolebinding.go | 155 ++++ .../typed/rbac/v1alpha1/fake/doc.go | 20 + .../rbac/v1alpha1/fake/fake_clusterrole.go | 146 ++++ .../v1alpha1/fake/fake_clusterrolebinding.go | 146 ++++ .../rbac/v1alpha1/fake/fake_rbac_client.go | 52 ++ .../typed/rbac/v1alpha1/fake/fake_role.go | 155 ++++ .../rbac/v1alpha1/fake/fake_rolebinding.go | 155 ++++ .../kubernetes/typed/rbac/v1beta1/fake/doc.go | 20 + .../rbac/v1beta1/fake/fake_clusterrole.go | 146 ++++ .../v1beta1/fake/fake_clusterrolebinding.go | 146 ++++ .../rbac/v1beta1/fake/fake_rbac_client.go | 52 ++ .../typed/rbac/v1beta1/fake/fake_role.go | 155 ++++ .../rbac/v1beta1/fake/fake_rolebinding.go | 155 ++++ .../typed/resource/v1alpha1/fake/doc.go | 20 + .../v1alpha1/fake/fake_podscheduling.go | 190 +++++ .../v1alpha1/fake/fake_resource_client.go | 52 ++ .../v1alpha1/fake/fake_resourceclaim.go | 190 +++++ .../fake/fake_resourceclaimtemplate.go | 155 ++++ .../v1alpha1/fake/fake_resourceclass.go | 146 ++++ .../typed/scheduling/v1/fake/doc.go | 20 + .../scheduling/v1/fake/fake_priorityclass.go | 146 ++++ .../v1/fake/fake_scheduling_client.go | 40 + .../typed/scheduling/v1alpha1/fake/doc.go | 20 + .../v1alpha1/fake/fake_priorityclass.go | 146 ++++ .../v1alpha1/fake/fake_scheduling_client.go | 40 + .../typed/scheduling/v1beta1/fake/doc.go | 20 + .../v1beta1/fake/fake_priorityclass.go | 146 ++++ .../v1beta1/fake/fake_scheduling_client.go | 40 + .../kubernetes/typed/storage/v1/fake/doc.go | 20 + .../typed/storage/v1/fake/fake_csidriver.go | 146 ++++ .../typed/storage/v1/fake/fake_csinode.go | 146 ++++ .../v1/fake/fake_csistoragecapacity.go | 155 ++++ .../storage/v1/fake/fake_storage_client.go | 56 ++ .../storage/v1/fake/fake_storageclass.go | 146 ++++ .../storage/v1/fake/fake_volumeattachment.go | 179 +++++ .../typed/storage/v1alpha1/fake/doc.go | 20 + .../v1alpha1/fake/fake_csistoragecapacity.go | 155 ++++ .../v1alpha1/fake/fake_storage_client.go | 44 ++ .../v1alpha1/fake/fake_volumeattachment.go | 179 +++++ .../typed/storage/v1beta1/fake/doc.go | 20 + .../storage/v1beta1/fake/fake_csidriver.go | 146 ++++ .../storage/v1beta1/fake/fake_csinode.go | 146 ++++ .../v1beta1/fake/fake_csistoragecapacity.go | 155 ++++ .../v1beta1/fake/fake_storage_client.go | 56 ++ .../storage/v1beta1/fake/fake_storageclass.go | 146 ++++ .../v1beta1/fake/fake_volumeattachment.go | 179 +++++ vendor/k8s.io/client-go/rest/fake/fake.go | 118 +++ vendor/k8s.io/client-go/testing/actions.go | 698 ++++++++++++++++++ vendor/k8s.io/client-go/testing/fake.go | 220 ++++++ vendor/k8s.io/client-go/testing/fixture.go | 581 +++++++++++++++ vendor/k8s.io/client-go/testing/interface.go | 66 ++ vendor/modules.txt | 61 +- 777 files changed, 35580 insertions(+), 3250 deletions(-) create mode 100644 pkg/cloudprovider/providers/oci/fake_service_account.go create mode 100644 pkg/util/disk/mount_helper.go create mode 100644 pkg/util/disk/mount_helper_test.go delete mode 100644 pkg/util/disk/unmount_helper.go create mode 100644 scripts/encrypt-mount create mode 100644 scripts/encrypt-umount create mode 100644 scripts/rpm-host create mode 100644 test/e2e/cloud-provider-oci/csi_volume_cloning.go create mode 100644 test/e2e/framework/service_account_util.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resouce_principal_delegation_token_provider.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_configuration_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/compute_instance_options.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/generic_bm_launch_instance_platform_config.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/generic_bm_platform_config.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_generic_bm_launch_instance_platform_config.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_image_filter_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_ipv6_address_ipv6_subnet_cidr_pair_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_ipv6_address_ipv6_subnet_cidr_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_primary_subnet.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_subnet_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_image_filter_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6_address_ipv6_subnet_cidr_pair_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuit_associated_tunnels_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/loop_back_drg_attachment_network_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_associated_tunnel_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_outbound_connector_compartment_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_outbound_connector_compartment_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_kerberos_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_ldap_bind_account_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_ldap_idmap_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_outbound_connector_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_outbound_connector_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_outbound_connector_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/endpoint.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/get_outbound_connector_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/kerberos.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/kerberos_keytab_entry.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/key_tab_secret_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_idmap.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/list_outbound_connectors_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_kerberos_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_ldap_idmap_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_outbound_connector_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_outbound_connector_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/validate_key_tabs_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/validate_key_tabs_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/validate_key_tabs_response_details.go create mode 100644 vendor/golang.org/x/sync/semaphore/semaphore.go create mode 100644 vendor/golang.org/x/sys/unix/ioctl_signed.go rename vendor/golang.org/x/sys/unix/{ioctl.go => ioctl_unsigned.go} (92%) create mode 100644 vendor/k8s.io/client-go/discovery/fake/discovery.go create mode 100644 vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go create mode 100644 vendor/k8s.io/client-go/kubernetes/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/fake/register.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_admissionregistration_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_mutatingwebhookconfiguration.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingwebhookconfiguration.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_validatingadmissionpolicy.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_validatingadmissionpolicybinding.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_admissionregistration_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake/fake_apiserverinternal_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake/fake_storageversion.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_apps_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_apps_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_apps_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_authentication_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authentication/v1alpha1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authentication/v1alpha1/fake/fake_authentication_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authentication/v1alpha1/fake/fake_selfsubjectreview.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_authentication_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_authorization_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_authorization_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_autoscaling_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/fake_autoscaling_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/fake_horizontalpodautoscaler.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_autoscaling_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_autoscaling_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_horizontalpodautoscaler.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_batch_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_cronjob.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_batch_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/fake_certificates_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/fake_certificatesigningrequest.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificates_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest_expansion.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_coordination_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_lease.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_coordination_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_core_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event_expansion.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace_expansion.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node_expansion.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service_expansion.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake/fake_discovery_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake/fake_endpointslice.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_discovery_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_endpointslice.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_event.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_events_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event_expansion.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_events_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment_expansion.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_extensions_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowcontrol_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/fake_flowcontrol_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/fake_flowschema.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/fake_prioritylevelconfiguration.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/fake_flowcontrol_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/fake_flowschema.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/fake_prioritylevelconfiguration.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/fake_flowcontrol_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/fake_flowschema.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/fake_prioritylevelconfiguration.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingress.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingressclass.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networking_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake/fake_clustercidr.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake/fake_networking_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingress.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingressclass.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_networking_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake/fake_node_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake/fake_runtimeclass.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_node_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_runtimeclass.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_node_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_runtimeclass.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_eviction.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_eviction_expansion.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_poddisruptionbudget.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_policy_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction_expansion.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_policy_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rbac_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rbac_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rbac_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_podscheduling.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resource_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resourceclaim.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resourceclaimtemplate.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resourceclass.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_priorityclass.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_scheduling_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_scheduling_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_scheduling_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csidriver.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csinode.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csistoragecapacity.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_volumeattachment.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_csistoragecapacity.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_storage_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csidriver.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csinode.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csistoragecapacity.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storage_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go create mode 100644 vendor/k8s.io/client-go/rest/fake/fake.go create mode 100644 vendor/k8s.io/client-go/testing/actions.go create mode 100644 vendor/k8s.io/client-go/testing/fake.go create mode 100644 vendor/k8s.io/client-go/testing/fixture.go create mode 100644 vendor/k8s.io/client-go/testing/interface.go diff --git a/Dockerfile b/Dockerfile index 74a0fd2558..b2c5778f97 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,4 +37,11 @@ RUN yum install -y util-linux \ && yum install -y xfsprogs \ && yum clean all +COPY scripts/encrypt-mount /sbin/encrypt-mount +COPY scripts/encrypt-umount /sbin/encrypt-umount +COPY scripts/rpm-host /sbin/rpm-host +RUN chmod 755 /sbin/encrypt-mount +RUN chmod 755 /sbin/encrypt-umount +RUN chmod 755 /sbin/rpm-host + COPY --from=0 /go/src/github.com/oracle/oci-cloud-controller-manager/dist/* /usr/local/bin/ diff --git a/Dockerfile_arm_all b/Dockerfile_arm_all index 8cf6fba711..541e646b88 100644 --- a/Dockerfile_arm_all +++ b/Dockerfile_arm_all @@ -21,4 +21,11 @@ RUN yum install -y util-linux \ && yum clean all \ +COPY scripts/encrypt-mount /sbin/encrypt-mount +COPY scripts/encrypt-umount /sbin/encrypt-umount +COPY scripts/rpm-host /sbin/rpm-host +RUN chmod 755 /sbin/encrypt-mount +RUN chmod 755 /sbin/encrypt-umount +RUN chmod 755 /sbin/rpm-host + COPY --from=0 /go/src/github.com/oracle/oci-cloud-controller-manager/dist/arm/* /usr/local/bin/ diff --git a/README.md b/README.md index 465f39c623..f5a9d4fce9 100644 --- a/README.md +++ b/README.md @@ -31,14 +31,15 @@ cloud-provider specific code out of the Kubernetes codebase. | v1.22.0 | v1.22 | - | | v1.23.0 | v1.23 | - | | v1.24.2 | v1.24 | - | -| v1.25.1 | v1.25 | - | -| v1.26.0 | v1.26 | - | +| v1.25.2 | v1.25 | - | +| v1.26.1 | v1.26 | - | +| v1.27.0 | v1.27 | - | Note: -Versions older than v1.24.2 are no longer supported, new features / bug fixes will be available in v1.24.1 and later. +Versions older than v1.25.2 are no longer supported, new features / bug fixes will be available in v1.25.2 and later. ## Implementation Currently `oci-cloud-controller-manager` implements: diff --git a/THIRD_PARTY_LICENSES.txt b/THIRD_PARTY_LICENSES.txt index 99df64b522..e68ab47b76 100644 --- a/THIRD_PARTY_LICENSES.txt +++ b/THIRD_PARTY_LICENSES.txt @@ -6,12 +6,15 @@ SPDX:Apache-2.0 ---------------------------------- Copyright ----------------------------------- Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. Copyright 2014 The Kubernetes Authors. +Copyright 2016 The Kubernetes Authors. Copyright 2017 Oracle and/or its affiliates. All rights reserved. Copyright 2017 The Kubernetes Authors. Copyright 2018 Oracle and/or its affiliates. All rights reserved. Copyright 2019 Oracle and/or its affiliates. All rights reserved. Copyright 2020 Oracle and/or its affiliates. All rights reserved. Copyright 2021 Oracle and/or its affiliates. All rights reserved. +Copyright 2022 Oracle and/or its affiliates. All rights reserved. +Copyright 2023 Oracle and/or its affiliates. All rights reserved. -------------------------- Fourth Party Dependencies --------------------------- @@ -3902,4 +3905,4 @@ the Mozilla Public License, v. 2.0. === ATTRIBUTION-HELPER-GENERATED: === Attribution helper version: {Major:0 Minor:11 GitVersion: GitCommit: GitTreeState:dirty BuildDate:1970-01-01T00:00:00Z GoVersion:go1.19.3 Compiler:gc Platform:darwin/arm64} -=== License file based on go.mod with md5 sum: 44a3b09805c5f60c83e1b48d2c1b752f +=== License file based on go.mod with md5 sum: e957b8b0f5b20080cd769d0650a881eb diff --git a/container-storage-interface.md b/container-storage-interface.md index c2eb22474e..b3a76ba5d2 100644 --- a/container-storage-interface.md +++ b/container-storage-interface.md @@ -130,7 +130,7 @@ $ kubectl describe pvc/oci-bv-claim # Troubleshoot -### FsGroup policy not propagated from pod security context +## FsGroup policy not propagated from pod security context If your fsGroup is not being applied on the files in your volume. @@ -183,6 +183,21 @@ spec: ``` `File` - Indicates that the CSI volume driver supports volume ownership and permission change via fsGroup, and Kubernetes may use fsGroup to change permissions and ownership of the volume to match user requested fsGroup in the pod's SecurityPolicy regardless of fstype or access mode. +## Calico-node pods fail readiness health checks when oci-fss-utils is installed on node + +If you are using Calico CNI, the following error is thrown by the Calico daemonset pods that are scheduled on the node which has oci-fss-utils package installed: +``` +Readiness probe failed: 2023-10-12 08:51:08.172 [INFO][346] confd/health.go 180: Number of node(s) with BGP peering established = 0 calico/node is not ready: BIRD is not ready: BGP not established with 10.0.0.5,10.0.76.88,10.0.66.239 +``` + +### Solution: + +Add the following env setting to the calico-node container in the calico-node daemonset manifest. +```yaml +- name: IP_AUTODETECTION_METHOD + value: 'skip-interface=v-eth.*' +``` + [1]: https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/overview.htm [2]: https://kubernetes.io/blog/2019/01/15/container-storage-interface-ga/ [3]: https://kubernetes.io/docs/admin/authorization/rbac/ diff --git a/go.mod b/go.mod index a4f9588914..a3111385e1 100644 --- a/go.mod +++ b/go.mod @@ -44,16 +44,15 @@ require ( github.com/kubernetes-csi/external-snapshotter/client/v6 v6.2.0 github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.24.1 - github.com/oracle/oci-go-sdk/v65 v65.40.1 + github.com/oracle/oci-go-sdk/v65 v65.49.2 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.14.0 github.com/spf13/cobra v1.6.1 // indirect github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.8.1 - github.com/stretchr/testify v1.8.1 // indirect go.uber.org/zap v1.24.0 golang.org/x/net v0.7.0 - golang.org/x/sys v0.6.0 // indirect + golang.org/x/sys v0.8.0 // indirect google.golang.org/grpc v1.52.3 gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/yaml.v2 v2.4.0 @@ -75,6 +74,7 @@ require ( ) require ( + golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 google.golang.org/protobuf v1.28.1 k8s.io/apiextensions-apiserver v0.26.2 ) @@ -160,7 +160,6 @@ require ( golang.org/x/crypto v0.1.0 // indirect golang.org/x/mod v0.6.0 // indirect golang.org/x/oauth2 v0.2.0 // indirect - golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect golang.org/x/term v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.3.0 // indirect diff --git a/go.sum b/go.sum index a1c2fc3aec..2fe270142b 100644 --- a/go.sum +++ b/go.sum @@ -365,8 +365,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/selinux v1.10.0 h1:rAiKF8hTcgLI3w0DHm6i0ylVVcOrlgR1kK99DRLDhyU= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= -github.com/oracle/oci-go-sdk/v65 v65.40.1 h1:nukjC4GfrpOxOEoGvqg8y31/11VtaeSnejF7icyMKJg= -github.com/oracle/oci-go-sdk/v65 v65.40.1/go.mod h1:MXMLMzHnnd9wlpgadPkdlkZ9YrwQmCOmbX5kjVEJodw= +github.com/oracle/oci-go-sdk/v65 v65.49.2 h1:optOfjGIVmZZMT3a/8ri/CVV1loDG0ab1p2tEpNW5ro= +github.com/oracle/oci-go-sdk/v65 v65.49.2/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= @@ -429,8 +429,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA= @@ -682,8 +682,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= diff --git a/hack/test-canary.sh b/hack/test-canary.sh index 1c3ef8455d..baad279c91 100755 --- a/hack/test-canary.sh +++ b/hack/test-canary.sh @@ -16,8 +16,6 @@ # A small script to run the CCM ginkgo 'Canary' e2e tests, and, generate the # defined canary test response file. -# -# https://confluence.oci.oraclecorp.com/display/BRISTOL/OKE+Canary+Test+Image+Contract # Functions ******************************************************************* # diff --git a/hack/validate-canary.sh b/hack/validate-canary.sh index d2b8877bf6..58ee0d062f 100755 --- a/hack/validate-canary.sh +++ b/hack/validate-canary.sh @@ -16,8 +16,6 @@ # A small script to validate the CCM 'Canary' test image works as expected. -# -# https://confluence.oci.oraclecorp.com/display/BRISTOL/OKE+Canary+Test+Image+Contract # Helper Functions ************************************************************ diff --git a/manifests/cloud-controller-manager/oci-cloud-controller-manager-rbac.yaml b/manifests/cloud-controller-manager/oci-cloud-controller-manager-rbac.yaml index f7e77a55e6..e7ab8cab01 100644 --- a/manifests/cloud-controller-manager/oci-cloud-controller-manager-rbac.yaml +++ b/manifests/cloud-controller-manager/oci-cloud-controller-manager-rbac.yaml @@ -34,6 +34,7 @@ rules: - list - watch - patch + - get - apiGroups: - "" @@ -130,6 +131,9 @@ rules: - serviceaccounts verbs: - create + - list + - get + - watch - apiGroups: - "" resources: diff --git a/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml b/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml index d5b11b2a69..b91af87089 100644 --- a/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml +++ b/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml @@ -42,12 +42,13 @@ spec: path: /etc/kubernetes containers: - name: oci-cloud-controller-manager - image: ghcr.io/oracle/cloud-provider-oci:latest + image: ghcr.io/oracle/cloud-provider-oci:v1.26.1 command: ["/usr/local/bin/oci-cloud-controller-manager"] args: - --cloud-config=/etc/oci/cloud-provider.yaml - --cloud-provider=oci - --leader-elect-resource-lock=configmapsleases + - --concurrent-service-syncs=3 - --v=2 volumeMounts: - name: cfg diff --git a/manifests/container-storage-interface/oci-csi-controller-driver.yaml b/manifests/container-storage-interface/oci-csi-controller-driver.yaml index c30fca946c..9a837b00f3 100644 --- a/manifests/container-storage-interface/oci-csi-controller-driver.yaml +++ b/manifests/container-storage-interface/oci-csi-controller-driver.yaml @@ -52,7 +52,7 @@ spec: - mountPath: /var/run/shared-tmpfs name: shared-tmpfs - name: csi-attacher - image: k8s.gcr.io/sig-storage/csi-attacher:v4.2.0 + image: registry.k8s.io/sig-storage/csi-attacher:v4.2.0 args: - --csi-address=/var/run/shared-tmpfs/csi.sock - --timeout=120s @@ -65,7 +65,7 @@ spec: - mountPath: /var/run/shared-tmpfs name: shared-tmpfs - name: csi-resizer - image: k8s.gcr.io/sig-storage/csi-resizer:v1.7.0 + image: registry.k8s.io/sig-storage/csi-resizer:v1.7.0 args: - --csi-address=/var/run/shared-tmpfs/csi.sock - --leader-election @@ -96,7 +96,7 @@ spec: - --fss-csi-endpoint=unix://var/run/shared-tmpfs/csi-fss.sock command: - /usr/local/bin/oci-csi-controller-driver - image: ghcr.io/oracle/cloud-provider-oci:latest + image: ghcr.io/oracle/cloud-provider-oci:v1.26.1 imagePullPolicy: IfNotPresent volumeMounts: - name: config diff --git a/manifests/container-storage-interface/oci-csi-node-driver.yaml b/manifests/container-storage-interface/oci-csi-node-driver.yaml index 6361df0bbf..adf889f0ff 100644 --- a/manifests/container-storage-interface/oci-csi-node-driver.yaml +++ b/manifests/container-storage-interface/oci-csi-node-driver.yaml @@ -117,7 +117,7 @@ spec: fieldPath: spec.nodeName - name: PATH value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/host/usr/bin:/host/sbin - image: ghcr.io/oracle/cloud-provider-oci:latest + image: ghcr.io/oracle/cloud-provider-oci:v1.26.1 securityContext: privileged: true volumeMounts: @@ -131,6 +131,7 @@ spec: - mountPath: /dev name: device-dir - mountPath: /host + mountPropagation: HostToContainer name: host-root - mountPath: /sbin/iscsiadm name: chroot-iscsiadm @@ -151,7 +152,7 @@ spec: args: - --csi-address=/csi/csi.sock - --kubelet-registration-path=/var/lib/kubelet/plugins/blockvolume.csi.oraclecloud.com/csi.sock - image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.1 + image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.5.1 securityContext: privileged: true lifecycle: @@ -170,7 +171,7 @@ spec: args: - --csi-address=/fss/csi.sock - --kubelet-registration-path=/var/lib/kubelet/plugins/fss.csi.oraclecloud.com/csi.sock - image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.0 + image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.5.0 securityContext: privileged: true lifecycle: diff --git a/manifests/flexvolume-driver/oci-flexvolume-driver.yaml b/manifests/flexvolume-driver/oci-flexvolume-driver.yaml index 9555accb52..5b249f7bf0 100644 --- a/manifests/flexvolume-driver/oci-flexvolume-driver.yaml +++ b/manifests/flexvolume-driver/oci-flexvolume-driver.yaml @@ -40,7 +40,7 @@ spec: secretName: oci-flexvolume-driver containers: - name: oci-flexvolume-driver - image: ghcr.io/oracle/cloud-provider-oci:latest + image: ghcr.io/oracle/cloud-provider-oci:v1.26.1 command: ["/usr/local/bin/install.py", "-c", "/tmp/config.yaml"] securityContext: privileged: true @@ -76,7 +76,7 @@ spec: type: DirectoryOrCreate containers: - name: oci-flexvolume-driver - image: ghcr.io/oracle/cloud-provider-oci:latest + image: ghcr.io/oracle/cloud-provider-oci:v1.26.1 command: ["/usr/local/bin/install.py"] securityContext: privileged: true diff --git a/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml b/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml index a43c44bca9..cc4688d618 100644 --- a/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml +++ b/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml @@ -35,7 +35,7 @@ spec: secretName: oci-volume-provisioner containers: - name: oci-volume-provisioner - image: ghcr.io/oracle/cloud-provider-oci:latest + image: ghcr.io/oracle/cloud-provider-oci:v1.26.1 command: ["/usr/local/bin/oci-volume-provisioner"] env: - name: NODE_NAME diff --git a/manifests/volume-provisioner/oci-volume-provisioner.yaml b/manifests/volume-provisioner/oci-volume-provisioner.yaml index a24efdb376..d9294a8521 100644 --- a/manifests/volume-provisioner/oci-volume-provisioner.yaml +++ b/manifests/volume-provisioner/oci-volume-provisioner.yaml @@ -35,7 +35,7 @@ spec: secretName: oci-volume-provisioner containers: - name: oci-volume-provisioner - image: ghcr.io/oracle/cloud-provider-oci:latest + image: ghcr.io/oracle/cloud-provider-oci:v1.26.1 command: ["/usr/local/bin/oci-volume-provisioner"] env: - name: NODE_NAME diff --git a/pkg/cloudprovider/providers/oci/ccm.go b/pkg/cloudprovider/providers/oci/ccm.go index da2f02221b..225c072e57 100644 --- a/pkg/cloudprovider/providers/oci/ccm.go +++ b/pkg/cloudprovider/providers/oci/ccm.go @@ -60,6 +60,10 @@ type CloudProvider struct { // we use the node lister to go from IP -> node / provider id -> ... -> subnet NodeLister listersv1.NodeLister + // ServiceAccountLister provides a cache to lookup Service Accounts to exchange + // with Worker Identity which then can be used to communicate with OCI services. + ServiceAccountLister listersv1.ServiceAccountLister + client client.Interface kubeclient clientset.Interface @@ -69,6 +73,8 @@ type CloudProvider struct { logger *zap.SugaredLogger instanceCache cache.Store metricPusher *metrics.MetricPusher + + lbLocks *loadBalancerLocks } func (cp *CloudProvider) InstancesV2() (cloudprovider.InstancesV2, bool) { @@ -136,6 +142,7 @@ func NewCloudProvider(config *providercfg.Config) (cloudprovider.Interface, erro logger: logger.Sugar(), instanceCache: cache.NewTTLStore(instanceCacheKeyFn, time.Duration(24)*time.Hour), metricPusher: metricPusher, + lbLocks: NewLoadBalancerLocks(), }, nil } @@ -175,8 +182,13 @@ func (cp *CloudProvider) Initialize(clientBuilder cloudprovider.ControllerClient nodeInformer := factory.Core().V1().Nodes() go nodeInformer.Informer().Run(wait.NeverStop) + serviceInformer := factory.Core().V1().Services() go serviceInformer.Informer().Run(wait.NeverStop) + + serviceAccountInformer := factory.Core().V1().ServiceAccounts() + go serviceAccountInformer.Informer().Run(wait.NeverStop) + go nodeInfoController.Run(wait.NeverStop) cp.logger.Info("Waiting for node informer cache to sync") @@ -185,6 +197,8 @@ func (cp *CloudProvider) Initialize(clientBuilder cloudprovider.ControllerClient } cp.NodeLister = nodeInformer.Lister() + cp.ServiceAccountLister = serviceAccountInformer.Lister() + cp.securityListManagerFactory = func(mode string) securityListManager { if cp.config.LoadBalancer.Disabled { return newSecurityListManagerNOOP() diff --git a/pkg/cloudprovider/providers/oci/fake_service_account.go b/pkg/cloudprovider/providers/oci/fake_service_account.go new file mode 100644 index 0000000000..2ee428e668 --- /dev/null +++ b/pkg/cloudprovider/providers/oci/fake_service_account.go @@ -0,0 +1,186 @@ +package oci + +import ( + "context" + "encoding/json" + "fmt" + + apiauthenticationv1 "k8s.io/api/authentication/v1" + apicorev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + fakediscovery "k8s.io/client-go/discovery/fake" + clientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/fake" + corev1 "k8s.io/client-go/kubernetes/typed/core/v1" + fakecorev1 "k8s.io/client-go/kubernetes/typed/core/v1/fake" + "k8s.io/client-go/testing" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + return &Clientset{Clientset: fake.NewSimpleClientset(objects...)} +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + *fake.Clientset + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +var ( + _ clientset.Interface = &fake.Clientset{} + _ testing.FakeClient = &fake.Clientset{} +) + +// CoreV1 retrieves the CoreV1Client +func (c *Clientset) CoreV1() corev1.CoreV1Interface { + return &FakeCoreV1{Fake: &c.Fake} +} + +type FakeCoreV1 struct { + *fakecorev1.FakeCoreV1 + *testing.Fake +} + +func (c *FakeCoreV1) ServiceAccounts(namespace string) corev1.ServiceAccountInterface { + return &FakeServiceAccounts{Fake: c, ns: namespace} +} + +// FakeServiceAccounts implements ServiceAccountInterface +type FakeServiceAccounts struct { + Fake *FakeCoreV1 + ns string +} + +var serviceaccountsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "serviceaccounts"} + +var serviceaccountsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ServiceAccount"} + +// Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any. +func (c *FakeServiceAccounts) Get(ctx context.Context, name string, options v1.GetOptions) (result *apicorev1.ServiceAccount, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(serviceaccountsResource, c.ns, name), &apicorev1.ServiceAccount{}) + + if obj == nil { + return nil, err + } + return obj.(*apicorev1.ServiceAccount), err +} + +// List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors. +func (c *FakeServiceAccounts) List(ctx context.Context, opts v1.ListOptions) (result *apicorev1.ServiceAccountList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(serviceaccountsResource, serviceaccountsKind, c.ns, opts), &apicorev1.ServiceAccountList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &apicorev1.ServiceAccountList{ListMeta: obj.(*apicorev1.ServiceAccountList).ListMeta} + for _, item := range obj.(*apicorev1.ServiceAccountList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested serviceAccounts. +func (c *FakeServiceAccounts) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(serviceaccountsResource, c.ns, opts)) + +} + +// Create takes the representation of a serviceAccount and creates it. Returns the server's representation of the serviceAccount, and an error, if there is any. +func (c *FakeServiceAccounts) Create(ctx context.Context, serviceAccount *apicorev1.ServiceAccount, opts v1.CreateOptions) (result *apicorev1.ServiceAccount, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(serviceaccountsResource, c.ns, serviceAccount), &apicorev1.ServiceAccount{}) + + if obj == nil { + return nil, err + } + return obj.(*apicorev1.ServiceAccount), err +} + +// Update takes the representation of a serviceAccount and updates it. Returns the server's representation of the serviceAccount, and an error, if there is any. +func (c *FakeServiceAccounts) Update(ctx context.Context, serviceAccount *apicorev1.ServiceAccount, opts v1.UpdateOptions) (result *apicorev1.ServiceAccount, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(serviceaccountsResource, c.ns, serviceAccount), &apicorev1.ServiceAccount{}) + + if obj == nil { + return nil, err + } + return obj.(*apicorev1.ServiceAccount), err +} + +// Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs. +func (c *FakeServiceAccounts) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(serviceaccountsResource, c.ns, name, opts), &apicorev1.ServiceAccount{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeServiceAccounts) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &apicorev1.ServiceAccountList{}) + return err +} + +// Patch applies the patch and returns the patched serviceAccount. +func (c *FakeServiceAccounts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *apicorev1.ServiceAccount, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, pt, data, subresources...), &apicorev1.ServiceAccount{}) + + if obj == nil { + return nil, err + } + return obj.(*apicorev1.ServiceAccount), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied serviceAccount. +func (c *FakeServiceAccounts) Apply(ctx context.Context, serviceAccount *applyconfigurationscorev1.ServiceAccountApplyConfiguration, opts v1.ApplyOptions) (result *apicorev1.ServiceAccount, err error) { + if serviceAccount == nil { + return nil, fmt.Errorf("serviceAccount provided to Apply must not be nil") + } + data, err := json.Marshal(serviceAccount) + if err != nil { + return nil, err + } + name := serviceAccount.Name + if name == nil { + return nil, fmt.Errorf("serviceAccount.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(serviceaccountsResource, c.ns, *name, types.ApplyPatchType, data), &apicorev1.ServiceAccount{}) + + if obj == nil { + return nil, err + } + return obj.(*apicorev1.ServiceAccount), err +} + +// CreateToken takes the representation of a tokenRequest and creates it. Returns the server's representation of the tokenRequest, and an error, if there is any. +func (c *FakeServiceAccounts) CreateToken(ctx context.Context, serviceAccountName string, tokenRequest *apiauthenticationv1.TokenRequest, opts v1.CreateOptions) (result *apiauthenticationv1.TokenRequest, err error) { + tokenRequest.Status.Token = "abc" + return tokenRequest, nil +} diff --git a/pkg/cloudprovider/providers/oci/instances_test.go b/pkg/cloudprovider/providers/oci/instances_test.go index 63d76f9a00..44161976c4 100644 --- a/pkg/cloudprovider/providers/oci/instances_test.go +++ b/pkg/cloudprovider/providers/oci/instances_test.go @@ -21,6 +21,7 @@ import ( "testing" "go.uber.org/zap" + authv1 "k8s.io/api/authentication/v1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" @@ -283,7 +284,10 @@ func (MockOCIClient) Compute() client.ComputeInterface { return &MockComputeClient{} } -func (MockOCIClient) LoadBalancer(string) client.GenericLoadBalancerInterface { +func (MockOCIClient) LoadBalancer(logger *zap.SugaredLogger, lbType string, tenancy string, token *authv1.TokenRequest) client.GenericLoadBalancerInterface { + if lbType == "nlb" { + return &MockNetworkLoadBalancerClient{} + } return &MockLoadBalancerClient{} } @@ -371,7 +375,7 @@ func (c *MockBlockStorageClient) AwaitVolumeBackupAvailableOrTimeout(ctx context func (c *MockBlockStorageClient) CreateVolumeBackup(ctx context.Context, details core.CreateVolumeBackupDetails) (*core.VolumeBackup, error) { id := "oc1.volumebackup1.xxxx" return &core.VolumeBackup{ - Id: &id, + Id: &id, }, nil } @@ -381,7 +385,7 @@ func (c *MockBlockStorageClient) DeleteVolumeBackup(ctx context.Context, id stri func (c *MockBlockStorageClient) GetVolumeBackup(ctx context.Context, id string) (*core.VolumeBackup, error) { return &core.VolumeBackup{ - Id: &id, + Id: &id, }, nil } @@ -522,9 +526,96 @@ func (c *MockLoadBalancerClient) UpdateNetworkSecurityGroups(ctx context.Context return "", nil } +// MockNetworkLoadBalancerClient mocks NetworkLoadBalancer client implementation. +type MockNetworkLoadBalancerClient struct{} + +func (c *MockNetworkLoadBalancerClient) ListWorkRequests(ctx context.Context, compartmentId, lbId string) ([]*client.GenericWorkRequest, error) { + return nil, nil +} + +func (c *MockNetworkLoadBalancerClient) CreateLoadBalancer(ctx context.Context, details *client.GenericCreateLoadBalancerDetails) (string, error) { + return "", nil +} + +func (c *MockNetworkLoadBalancerClient) GetLoadBalancer(ctx context.Context, id string) (*client.GenericLoadBalancer, error) { + return nil, nil +} + +func (c *MockNetworkLoadBalancerClient) GetLoadBalancerByName(ctx context.Context, compartmentID string, name string) (*client.GenericLoadBalancer, error) { + if lb, ok := loadBalancers[name]; ok { + return lb, nil + } + return nil, nil +} + +func (c *MockNetworkLoadBalancerClient) DeleteLoadBalancer(ctx context.Context, id string) (string, error) { + if id == "test-uid-delete-err" { + return "workReqId", errors.New("error") + } + return "", nil +} + +func (c *MockNetworkLoadBalancerClient) GetCertificateByName(ctx context.Context, lbID string, name string) (*client.GenericCertificate, error) { + return nil, nil +} + +func (c *MockNetworkLoadBalancerClient) CreateCertificate(ctx context.Context, lbID string, cert *client.GenericCertificate) (string, error) { + return "", nil +} + +func (c *MockNetworkLoadBalancerClient) CreateBackendSet(ctx context.Context, lbID string, name string, details *client.GenericBackendSetDetails) (string, error) { + return "", nil +} + +func (c *MockNetworkLoadBalancerClient) UpdateBackendSet(ctx context.Context, lbID string, name string, details *client.GenericBackendSetDetails) (string, error) { + return "", nil +} + +func (c *MockNetworkLoadBalancerClient) DeleteBackendSet(ctx context.Context, lbID, name string) (string, error) { + return "", nil +} + +func (c *MockNetworkLoadBalancerClient) UpdateListener(ctx context.Context, lbID string, name string, details *client.GenericListener) (string, error) { + return "", nil +} + +func (c *MockNetworkLoadBalancerClient) CreateListener(ctx context.Context, lbID string, name string, details *client.GenericListener) (string, error) { + return "", nil +} + +func (c *MockNetworkLoadBalancerClient) DeleteListener(ctx context.Context, lbID, name string) (string, error) { + return "", nil +} + +func (c *MockNetworkLoadBalancerClient) AwaitWorkRequest(ctx context.Context, id string) (*client.GenericWorkRequest, error) { + if err, ok := awaitLoadbalancerWorkrequestMap[id]; ok { + return nil, err + } + return nil, nil +} + +func (c *MockNetworkLoadBalancerClient) UpdateLoadBalancerShape(context.Context, string, *client.GenericUpdateLoadBalancerShapeDetails) (string, error) { + return "", nil +} + +func (c *MockNetworkLoadBalancerClient) UpdateNetworkSecurityGroups(ctx context.Context, lbId string, nsgIds []string) (string, error) { + if err, ok := updateNetworkSecurityGroupsLBsFailures[lbId]; ok { + return "", err + } + if wrID, ok := updateNetworkSecurityGroupsLBsWorkRequests[lbId]; ok { + return wrID, nil + } + return "", nil +} + // MockBlockStorageClient mocks BlockStorage client implementation type MockBlockStorageClient struct{} +// AwaitVolumeCloneAvailableOrTimeout implements client.BlockStorageInterface. +func (*MockBlockStorageClient) AwaitVolumeCloneAvailableOrTimeout(ctx context.Context, id string) (*core.Volume, error) { + return nil, nil +} + func (MockBlockStorageClient) AwaitVolumeAvailableORTimeout(ctx context.Context, id string) (*core.Volume, error) { return nil, nil } diff --git a/pkg/cloudprovider/providers/oci/load_balancer.go b/pkg/cloudprovider/providers/oci/load_balancer.go index 132e84d91f..10d7ee74da 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer.go +++ b/pkg/cloudprovider/providers/oci/load_balancer.go @@ -16,11 +16,15 @@ package oci import ( "context" + "fmt" "strconv" + "sync" "time" "go.uber.org/zap" + authv1 "k8s.io/api/authentication/v1" v1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/sets" @@ -46,6 +50,7 @@ const ( NetworkLoadBalancingPolicyTwoTuple = "TWO_TUPLE" NetworkLoadBalancingPolicyThreeTuple = "THREE_TUPLE" NetworkLoadBalancingPolicyFiveTuple = "FIVE_TUPLE" + LbOperationAlreadyExistsFmt = "An operation for the %s: %s already exists." ) // DefaultLoadBalancerBEProtocol defines the default protocol for load @@ -72,8 +77,14 @@ const ( lbLifecycleStateActive = "ACTIVE" lbMaximumNetworkSecurityGroupIds = 5 excludeBackendFromLBLabel = "node.kubernetes.io/exclude-from-external-load-balancers" + + // Service Account Token expiration in seconds + serviceAccountTokenExpiry = 21600 // 6 Hours ) +// Protects Security Lists against update by multiple LBs in parallel +var securityListMutex sync.Mutex + // CloudLoadBalancerProvider is an implementation of the cloud-provider struct type CloudLoadBalancerProvider struct { client client.Interface @@ -83,16 +94,70 @@ type CloudLoadBalancerProvider struct { config *providercfg.Config } -// TODO write a UT for this (prasrira) -func (cp *CloudProvider) getLoadBalancerProvider(svc *v1.Service) CloudLoadBalancerProvider { +func (cp *CloudProvider) getLoadBalancerProvider(ctx context.Context, svc *v1.Service) (CloudLoadBalancerProvider, error) { lbType := getLoadBalancerType(svc) + name := GetLoadBalancerName(svc) + var serviceAccountToken *authv1.TokenRequest + var err error + + logger := cp.logger.With("loadBalancerName", name, "loadBalancerType", lbType) + logger.Debug("Getting load balancer provider") + + if sa, useWI := svc.Annotations[ServiceAnnotationServiceAccountName]; useWI && sa == "" { // When using Workload Identity + return CloudLoadBalancerProvider{}, errors.New("Error fetching service account, empty string provided via " + ServiceAnnotationServiceAccountName) + } else if useWI { + serviceAccountToken, err = cp.getServiceAccountTokenIfSet(ctx, svc) + if err != nil { + return CloudLoadBalancerProvider{}, errors.New("Unable to get service account token. Error:" + err.Error()) + } + } + + lbClient := cp.client.LoadBalancer(logger, lbType, cp.config.Auth.TenancyID, serviceAccountToken) + if lbClient == nil { + return CloudLoadBalancerProvider{}, errors.New(fmt.Sprintf("Error creating Workload Identity based %s Client. Perhaps you are using an OKE BASIC_CLUSTER?", lbType)) + } return CloudLoadBalancerProvider{ client: cp.client, - lbClient: cp.client.LoadBalancer(lbType), + lbClient: lbClient, logger: cp.logger, metricPusher: cp.metricPusher, config: cp.config, + }, nil +} + +// serviceNotExistsOrDeleted returns true if service has stopped existing or has been marked as Deleted +func (cp *CloudProvider) serviceDeletedOrDoesNotExist(ctx context.Context, svc *v1.Service) (bool, error) { + service, err := cp.kubeclient.CoreV1().Services(svc.Namespace).Get(ctx, svc.Name, metav1.GetOptions{}) + if err != nil && apierrors.IsNotFound(err) { + return true, nil + } + if err != nil { + return true, errors.New("Unable to check if service still exists. Error:" + err.Error()) + } + if service.DeletionTimestamp != nil { + return true, nil } + return false, nil +} + +var ServiceAccountTokenExpiry = int64(serviceAccountTokenExpiry) + +// Use Worker Identity RP based Client based on annotation: "oke.oci.oraclecloud.com/use-service-account" +// if found. +func (cp *CloudProvider) getServiceAccountTokenIfSet(ctx context.Context, svc *v1.Service) (*authv1.TokenRequest, error) { + _, err := cp.ServiceAccountLister.ServiceAccounts(svc.Namespace).Get(svc.Annotations[ServiceAnnotationServiceAccountName]) + if err != nil { + return nil, err + } + + tokenRequest := authv1.TokenRequest{Spec: authv1.TokenRequestSpec{ExpirationSeconds: &ServiceAccountTokenExpiry}} + + serviceAccountTokenRequest, err := cp.kubeclient.CoreV1().ServiceAccounts(svc.Namespace).CreateToken(ctx, svc.Annotations[ServiceAnnotationServiceAccountName], &tokenRequest, metav1.CreateOptions{}) + if err != nil { + return nil, err + } + + return serviceAccountTokenRequest, nil } // GetLoadBalancerName returns the name of the loadbalancer @@ -105,9 +170,15 @@ func (cp *CloudProvider) GetLoadBalancerName(ctx context.Context, clusterName st func (cp *CloudProvider) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (*v1.LoadBalancerStatus, bool, error) { name := cp.GetLoadBalancerName(ctx, clusterName, service) logger := cp.logger.With("loadBalancerName", name, "loadBalancerType", getLoadBalancerType(service)) + if sa, useWI := service.Annotations[ServiceAnnotationServiceAccountName]; useWI { // When using Workload Identity + logger = logger.With("serviceAccount", sa, "nameSpace", service.Namespace) + } logger.Debug("Getting load balancer") - lbProvider := cp.getLoadBalancerProvider(service) + lbProvider, err := cp.getLoadBalancerProvider(ctx, service) + if err != nil { + return nil, false, errors.Wrap(err, "Unable to get Load Balancer Client.") + } lb, err := lbProvider.lbClient.GetLoadBalancerByName(ctx, cp.config.CompartmentID, name) if err != nil { if client.IsNotFound(err) { @@ -338,20 +409,18 @@ func (clb *CloudLoadBalancerProvider) createLoadBalancer(ctx context.Context, sp logger.With("loadBalancerID", *lb.Id).Info("Load balancer created") status, err := loadBalancerToStatus(lb) + if status != nil && len(status.Ingress) > 0 { // If the LB is successfully provisioned then open lb/node subnet seclists egress/ingress. - for _, ports := range spec.Ports { - if err = spec.securityListManager.Update(ctx, lbSubnets, nodeSubnets, spec.SourceCIDRs, nil, ports, *spec.IsPreserveSource); err != nil { - return nil, "", err - } + // Security List Updates take place in a Global Critical Section + if err = updateSecurityListsInCriticalSection(ctx, spec, lbSubnets, nodeSubnets); err != nil { + return nil, "", err } } - if lb.Id != nil { lbOCID = *lb.Id } return status, lbOCID, err - } // getNodeFilter extracts the node filter based on load balancer type. @@ -401,6 +470,24 @@ func (cp *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName str lbName := GetLoadBalancerName(service) loadBalancerType := getLoadBalancerType(service) logger := cp.logger.With("loadBalancerName", lbName, "serviceName", service.Name, "loadBalancerType", loadBalancerType) + if sa, useWI := service.Annotations[ServiceAnnotationServiceAccountName]; useWI { // When using Workload Identity + logger = logger.With("serviceAccount", sa, "nameSpace", service.Namespace) + } + + if deleted, err := cp.serviceDeletedOrDoesNotExist(ctx, service); deleted { + if err != nil { + logger.With(zap.Error(err)).Error("Failed to check if service exists") + return nil, errors.Wrap(err, "Failed to check service status") + } + logger.Info("Service already deleted or no more exists") + return nil, errors.New("Service already deleted or no more exists") + } + loadBalancerService := fmt.Sprintf("%s/%s", service.Namespace, service.Name) + if acquired := cp.lbLocks.TryAcquire(loadBalancerService); !acquired { + logger.Error("Could not acquire lock for Ensuring Load Balancer") + return nil, errors.Errorf(LbOperationAlreadyExistsFmt, loadBalancerType, loadBalancerService) + } + defer cp.lbLocks.Release(loadBalancerService) nodes, err := filterNodes(service, clusterNodes) if err != nil { @@ -415,7 +502,10 @@ func (cp *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName str var errorType string var lbMetricDimension string - lbProvider := cp.getLoadBalancerProvider(service) + lbProvider, err := cp.getLoadBalancerProvider(ctx, service) + if err != nil { + return nil, errors.Wrap(err, "Unable to get Load Balancer Client.") + } lb, err := lbProvider.lbClient.GetLoadBalancerByName(ctx, cp.config.CompartmentID, lbName) if err != nil && !client.IsNotFound(err) { logger.With(zap.Error(err)).Error("Failed to get loadbalancer by name") @@ -518,8 +608,8 @@ func (cp *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName str metrics.SendMetricData(cp.metricPusher, getMetric(loadBalancerType, Create), time.Since(startTime).Seconds(), dimensionsMap) } else { - logger = cp.logger.With("loadBalancerName", lbName, "serviceName", service.Name, "loadBalancerID", newLBOCID, "loadBalancerType", getLoadBalancerType(service)) - logger.Info("Successfully provisioned loadbalancer") + logger.With("loadBalancerID", newLBOCID). + Info("Successfully provisioned loadbalancer") lbMetricDimension = util.GetMetricDimensionForComponent(util.Success, util.LoadBalancerType) dimensionsMap[metrics.ComponentDimension] = lbMetricDimension dimensionsMap[metrics.ResourceOCIDDimension] = newLBOCID @@ -745,13 +835,11 @@ func (clb *CloudLoadBalancerProvider) updateLoadBalancer(ctx context.Context, lb // seclist update when the load balancer was created // We try to update the seclist this way to prevent replication // of seclist reconciliation logic - for _, ports := range spec.Ports { - if err = spec.securityListManager.Update(ctx, lbSubnets, nodeSubnets, spec.SourceCIDRs, nil, ports, *spec.IsPreserveSource); err != nil { - return err - } + // Security List Updates happen in a Global Critical Section + if err = updateSecurityListsInCriticalSection(ctx, spec, lbSubnets, nodeSubnets); err != nil { + return err } } - actions := sortAndCombineActions(logger, backendSetActions, listenerActions) for _, action := range actions { switch a := action.(type) { @@ -782,6 +870,18 @@ func (clb *CloudLoadBalancerProvider) updateLoadBalancer(ctx context.Context, lb return nil } +func updateSecurityListsInCriticalSection(ctx context.Context, spec *LBSpec, lbSubnets, nodeSubnets []*core.Subnet) (err error) { + securityListMutex.Lock() + defer securityListMutex.Unlock() + + for _, ports := range spec.Ports { + if err = spec.securityListManager.Update(ctx, lbSubnets, nodeSubnets, spec.SourceCIDRs, nil, ports, *spec.IsPreserveSource); err != nil { + return err + } + } + return nil +} + func (clb *CloudLoadBalancerProvider) updateBackendSet(ctx context.Context, lbID string, action *BackendSetAction, lbSubnets, nodeSubnets []*core.Subnet, secListManager securityListManager, spec *LBSpec) error { var ( sourceCIDRs = []string{} @@ -930,13 +1030,26 @@ func (cp *CloudProvider) EnsureLoadBalancerDeleted(ctx context.Context, clusterN name := cp.GetLoadBalancerName(ctx, clusterName, service) loadBalancerType := getLoadBalancerType(service) logger := cp.logger.With("loadBalancerName", name, "loadBalancerType", loadBalancerType) + if sa, useWI := service.Annotations[ServiceAnnotationServiceAccountName]; useWI { // When using Workload Identity + logger = logger.With("serviceAccount", sa, "nameSpace", service.Namespace) + } logger.Debug("Attempting to delete load balancer") + loadBalancerService := fmt.Sprintf("%s/%s", service.Namespace, service.Name) + if acquired := cp.lbLocks.TryAcquire(loadBalancerService); !acquired { + logger.Error("Could not acquire lock for Deleting Load Balancer") + return errors.Errorf(LbOperationAlreadyExistsFmt, loadBalancerType, loadBalancerService) + } + defer cp.lbLocks.Release(loadBalancerService) + var errorType string var lbMetricDimension string dimensionsMap := make(map[string]string) - lbProvider := cp.getLoadBalancerProvider(service) + lbProvider, err := cp.getLoadBalancerProvider(ctx, service) + if err != nil { + return errors.Wrap(err, "Unable to get Load Balancer Client.") + } lb, err := lbProvider.lbClient.GetLoadBalancerByName(ctx, cp.config.CompartmentID, name) if err != nil { if client.IsNotFound(err) { @@ -1001,7 +1114,11 @@ func (cp *CloudProvider) EnsureLoadBalancerDeleted(ctx context.Context, clusterN return nil } +// Critical Section for Security List Updates func (cp *CloudProvider) cleanupSecListForLoadBalancerDelete(lb *client.GenericLoadBalancer, logger *zap.SugaredLogger, ctx context.Context, service *v1.Service, name string) error { + securityListMutex.Lock() + defer securityListMutex.Unlock() + id := *lb.Id nodeIPs := sets.NewString() for _, backendSet := range lb.BackendSets { diff --git a/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go b/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go index d106117ed8..711c479bca 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go @@ -612,7 +612,7 @@ func getLoadBalancerEgressRules( "destination", *rule.Destination, "destinationPortRangeMin", *rule.TcpOptions.DestinationPortRange.Min, "destinationPortRangeMax", *rule.TcpOptions.DestinationPortRange.Max, - ).Debug("Deleting load balancer egress security rule") + ).Debug("Adding load balancer egress security rule") egressRules = append(egressRules, rule) } diff --git a/pkg/cloudprovider/providers/oci/load_balancer_spec.go b/pkg/cloudprovider/providers/oci/load_balancer_spec.go index 2d267437ca..35812048d1 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_spec.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_spec.go @@ -145,6 +145,10 @@ const ( // ServiceAnnotationLoadBalancerNodeFilter is a service annotation to select specific nodes as your backend in the LB // based on label selector. ServiceAnnotationLoadBalancerNodeFilter = "oci.oraclecloud.com/node-label-selector" + + // ServiceAnnotationServiceAccountName is a service annotation to select Service Account to be used to + // exchange for Workload Identity Token which can then be used for LB/NLB Client to communicate to OCI LB/NLB API. + ServiceAnnotationServiceAccountName = "oci.oraclecloud.com/workload-service-account" ) // NLB specific annotations diff --git a/pkg/cloudprovider/providers/oci/load_balancer_test.go b/pkg/cloudprovider/providers/oci/load_balancer_test.go index a72cabf69b..6eef506b2b 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_test.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_test.go @@ -17,12 +17,17 @@ package oci import ( "context" "errors" + "fmt" "reflect" "testing" + "time" "go.uber.org/zap" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/informers" + testclient "k8s.io/client-go/kubernetes/fake" providercfg "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci/config" "github.com/oracle/oci-cloud-controller-manager/pkg/oci/client" @@ -732,6 +737,127 @@ func TestCloudProvider_GetLoadBalancer(t *testing.T) { } } +func TestCloudProvider_getLoadBalancerProvider(t *testing.T) { + + kc := NewSimpleClientset( + &v1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: "sa", Namespace: "ns", + }, + }) + + factory := informers.NewSharedInformerFactoryWithOptions(kc, time.Second, informers.WithNamespace("ns")) + serviceAccountInformer := factory.Core().V1().ServiceAccounts() + go serviceAccountInformer.Informer().Run(wait.NeverStop) + + time.Sleep(time.Second) + + cp := &CloudProvider{ + client: MockOCIClient{}, + kubeclient: kc, + ServiceAccountLister: serviceAccountInformer.Lister(), + config: &providercfg.Config{CompartmentID: "testCompartment"}, + logger: zap.S(), + } + + tests := map[string]struct { + service *v1.Service + wantErr bool + wantLbType string + cp *CloudProvider + }{ + "Get Load Balancer Provider type LB with Workload Identity RP": { + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "ns", + Name: "testservice-lb", + UID: "test-uid", + Annotations: map[string]string{ + ServiceAnnotationServiceAccountName: `sa`, + }, + }, + }, + wantErr: false, + wantLbType: "*oci.MockLoadBalancerClient", + cp: cp, + }, + "Get Load Balancer Provider type NLB with Workload Identity RP": { + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "ns", + Name: "testservice-nlb", + UID: "test-uid", + Annotations: map[string]string{ + ServiceAnnotationLoadBalancerType: "nlb", + ServiceAnnotationServiceAccountName: `sa`, + }, + }, + }, + wantErr: false, + wantLbType: "*oci.MockNetworkLoadBalancerClient", + cp: cp, + }, + "Fail to Get Load Balancer Provider type LB with Workload Identity RP when SA does not exist": { + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "ns", + Name: "testservice-get-sa-error", + UID: "test-uid", + Annotations: map[string]string{ + ServiceAnnotationServiceAccountName: `sa-does-not-exist`, + }, + }, + }, + wantErr: true, + cp: cp, + }, + "Get Load Balancer Provider type LB": { + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "ns", + Name: "testservice-lb-2", + UID: "test-uid", + }, + }, + wantErr: false, + wantLbType: "*oci.MockLoadBalancerClient", + cp: cp, + }, + "Get Load Balancer Provider type NLB": { + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "ns", + Name: "testservice-nlb-2", + UID: "test-uid", + Annotations: map[string]string{ + ServiceAnnotationLoadBalancerType: "nlb", + }, + }, + }, + wantErr: false, + wantLbType: "*oci.MockNetworkLoadBalancerClient", + cp: cp, + }, + } + + t.Parallel() + for name, tt := range tests { + name, tt := name, tt + t.Run(name, func(t *testing.T) { + got, _ := tt.cp.getLoadBalancerProvider(context.Background(), tt.service) + + if !tt.wantErr { + if reflect.DeepEqual(got, CloudLoadBalancerProvider{}) { + t.Errorf("GetLoadBalancerProvider() didn't expect an empty provider") + } + if fmt.Sprintf("%T", got.lbClient) != tt.wantLbType { + t.Errorf("GetLoadBalancerProvider() got LB of type = %T, want %T", got.lbClient, tt.wantLbType) + } + } + }) + } +} + func TestUpdateLoadBalancerNetworkSecurityGroups(t *testing.T) { var tests = map[string]struct { spec *LBSpec @@ -901,6 +1027,13 @@ func TestCloudProvider_EnsureLoadBalancerDeleted(t *testing.T) { logger: zap.S(), instanceCache: &mockInstanceCache{}, metricPusher: nil, + kubeclient: testclient.NewSimpleClientset( + &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "testservice", Namespace: "kube-system", + }, + }), + lbLocks: NewLoadBalancerLocks(), } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/pkg/cloudprovider/providers/oci/load_balancer_util.go b/pkg/cloudprovider/providers/oci/load_balancer_util.go index 9e18bc162a..8d29594df8 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_util.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_util.go @@ -471,7 +471,7 @@ func getListenerChanges(logger *zap.SugaredLogger, actual map[string]client.Gene //sanitizedDesiredListeners convert the listener name HTTP-xxxx to TCP-xxx such that in sortAndCombineAction can //place BackendSet create before Listener Create and Listener delete before BackendSet delete. Also it would help //not to delete and create Listener if customer edit the service and add oci-load-balancer-backend-protocol: "HTTP" - // and vice versa. It would help to only update the listener in case of protocol change. Refer OKE-10793 for details. + // and vice versa. It would help to only update the listener in case of protocol change. sanitizedDesiredListeners := make(map[string]client.GenericListener) for name, desiredListener := range desired { sanitizedDesiredListeners[getSanitizedName(name)] = desiredListener diff --git a/pkg/cloudprovider/providers/oci/util.go b/pkg/cloudprovider/providers/oci/util.go index e8f9fee3aa..6e865e85f3 100644 --- a/pkg/cloudprovider/providers/oci/util.go +++ b/pkg/cloudprovider/providers/oci/util.go @@ -17,11 +17,40 @@ package oci import ( "k8s.io/apimachinery/pkg/util/sets" "strings" + "sync" "github.com/pkg/errors" api "k8s.io/api/core/v1" ) +// Protects Load Balancers against multiple updates in parallel +type loadBalancerLocks struct { + locks sets.String + mux sync.Mutex +} + +func NewLoadBalancerLocks() *loadBalancerLocks { + return &loadBalancerLocks{ + locks: sets.NewString(), + } +} + +func (lbl *loadBalancerLocks) TryAcquire(lbname string) bool { + lbl.mux.Lock() + defer lbl.mux.Unlock() + if lbl.locks.Has(lbname) { + return false + } + lbl.locks.Insert(lbname) + return true +} + +func (lbl *loadBalancerLocks) Release(lbname string) { + lbl.mux.Lock() + defer lbl.mux.Unlock() + lbl.locks.Delete(lbname) +} + // MapProviderIDToInstanceID parses the provider id and returns the instance ocid. func MapProviderIDToInstanceID(providerID string) (string, error) { if providerID == "" { diff --git a/pkg/csi-util/utils.go b/pkg/csi-util/utils.go index 5cbfa21ac5..2ad8677911 100644 --- a/pkg/csi-util/utils.go +++ b/pkg/csi-util/utils.go @@ -68,7 +68,7 @@ const ( FIPS_ENABLED_FILE_PATH = "/host/proc/sys/crypto/fips_enabled" FINDMNT_COMMAND = "findmnt" CAT_COMMAND = "cat" - RPM_COMMAND = "rpm" + RPM_COMMAND = "rpm-host" ) // Util interface @@ -386,9 +386,8 @@ func IsFipsEnabled() (string, error) { return string(output), nil } - func IsInTransitEncryptionPackageInstalled() (bool, error) { - args := []string{"-q", "-a", "--root=/host"} + args := []string{"-q", InTransitEncryptionPackageName} command := exec.Command(RPM_COMMAND, args...) output, err := command.CombinedOutput() if err != nil { @@ -396,8 +395,8 @@ func IsInTransitEncryptionPackageInstalled() (bool, error) { } if len(output) > 0 { - list := string(output) - if strings.Contains(list, InTransitEncryptionPackageName) { + rpmSearchOutput := string(output) + if strings.Contains(rpmSearchOutput, InTransitEncryptionPackageName) && !strings.Contains(rpmSearchOutput, "not installed") { return true, nil } return false, nil diff --git a/pkg/csi/driver/bv_controller.go b/pkg/csi/driver/bv_controller.go index 118df153a2..af69dd492a 100644 --- a/pkg/csi/driver/bv_controller.go +++ b/pkg/csi/driver/bv_controller.go @@ -18,12 +18,13 @@ import ( "context" "encoding/json" "fmt" - "github.com/pkg/errors" - "google.golang.org/protobuf/types/known/timestamppb" "strconv" "strings" "time" + "github.com/pkg/errors" + "google.golang.org/protobuf/types/known/timestamppb" + "github.com/container-storage-interface/spec/lib/go/csi" "go.uber.org/zap" "google.golang.org/grpc/codes" @@ -209,7 +210,7 @@ func extractSnapshotParameters(parameters map[string]string) (SnapshotParameters // idempotent. func (d *BlockVolumeControllerDriver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) { startTime := time.Now() - log := d.logger.With("volumeName", req.Name) + log := d.logger.With("volumeName", req.Name, "csiOperation", "create") var errorType string var metricDimension string volumeContext := map[string]string{ @@ -235,7 +236,80 @@ func (d *BlockVolumeControllerDriver) CreateVolume(ctx context.Context, req *csi } availableDomainShortName := "" - if req.AccessibilityRequirements != nil && req.AccessibilityRequirements.Preferred != nil { + volumeName := req.Name + + dimensionsMap := make(map[string]string) + dimensionsMap[metrics.ResourceOCIDDimension] = volumeName + + srcSnapshotId := "" + srcVolumeId := "" + volumeContentSource := req.GetVolumeContentSource() + if volumeContentSource != nil { + _, isVolumeContentSource_Snapshot := volumeContentSource.GetType().(*csi.VolumeContentSource_Snapshot) + _, isVolumeContentSource_Volume := volumeContentSource.GetType().(*csi.VolumeContentSource_Volume) + + if !isVolumeContentSource_Snapshot && !isVolumeContentSource_Volume { + log.Error("Unsupported volumeContentSource") + return nil, status.Error(codes.InvalidArgument, "Unsupported volumeContentSource") + } + + if isVolumeContentSource_Snapshot { + srcSnapshot := volumeContentSource.GetSnapshot() + if srcSnapshot == nil { + log.With("volumeSourceType", "snapshot").Error("Error fetching snapshot from the volumeContentSource") + return nil, status.Error(codes.InvalidArgument, "Error fetching snapshot from the volumeContentSource") + } + + id := srcSnapshot.GetSnapshotId() + volumeBackup, err := d.client.BlockStorage().GetVolumeBackup(ctx, id) + if err != nil { + if k8sapierrors.IsNotFound(err) { + log.With("service", "blockstorage", "verb", "get", "resource", "volumeBackup", "statusCode", util.GetHttpStatusCode(err)).Errorf("Failed to get snapshot with ID %v", id) + return nil, status.Errorf(codes.NotFound, "Failed to get snapshot with ID %v", id) + } + log.With("service", "blockstorage", "verb", "get", "resource", "volumeBackup", "statusCode", util.GetHttpStatusCode(err)).Errorf("Failed to fetch snapshot with ID %v with error %v", id, err) + return nil, status.Errorf(codes.Internal, "Failed to fetch snapshot with ID %v with error %v", id, err) + } + + volumeBackupSize := *volumeBackup.SizeInMBs * client.MiB + if volumeBackupSize < size { + volumeContext[needResize] = "true" + volumeContext[newSize] = strconv.FormatInt(size, 10) + } + + srcSnapshotId = id + } else { + srcVolume := volumeContentSource.GetVolume() + if srcVolume == nil { + log.With("volumeSourceType", "pvc").Error("Error fetching volume from the volumeContentSource") + return nil, status.Error(codes.InvalidArgument, "Error fetching volume from the volumeContentSource") + } + + id := srcVolume.GetVolumeId() + srcBlockVolume, err := d.client.BlockStorage().GetVolume(ctx, id) + if err != nil { + if client.IsNotFound(err) { + log.With("service", "blockstorage", "verb", "get", "resource", "blockVolume", "statusCode", util.GetHttpStatusCode(err)).Errorf("Failed to get volume with ID %v", id) + return nil, status.Errorf(codes.NotFound, "Failed to get volume with ID %v", id) + } + log.With("service", "blockstorage", "verb", "get", "resource", "blockVolume", "statusCode", util.GetHttpStatusCode(err)).Errorf("Failed to fetch volume with ID %v with error %v", id, err) + return nil, status.Errorf(codes.Internal, "Failed to fetch volume with ID %v with error %v", id, err) + } + + availableDomainShortName = *srcBlockVolume.AvailabilityDomain + log.With("AD", availableDomainShortName).Info("Using availability domain of source volume to provision clone volume.") + + srcBlockVolumeSize := *srcBlockVolume.SizeInMBs * client.MiB + if srcBlockVolumeSize < size { + volumeContext["needResize"] = "true" + volumeContext["newSize"] = strconv.FormatInt(size, 10) + } + + srcVolumeId = id + } + } + + if req.AccessibilityRequirements != nil && req.AccessibilityRequirements.Preferred != nil && availableDomainShortName == "" { for _, t := range req.AccessibilityRequirements.Preferred { availableDomainShortName, _ = t.Segments[kubeAPI.LabelZoneFailureDomain] log.With("AD", availableDomainShortName).Info("Using preferred topology for AD.") @@ -257,49 +331,15 @@ func (d *BlockVolumeControllerDriver) CreateVolume(ctx context.Context, req *csi } } - volumeName := req.Name - - dimensionsMap := make(map[string]string) - dimensionsMap[metrics.ResourceOCIDDimension] = volumeName - - srcSnapshotId := "" - volumeContentSource := req.GetVolumeContentSource() - if volumeContentSource != nil { - if _, ok := volumeContentSource.GetType().(*csi.VolumeContentSource_Snapshot); !ok { - log.Error("Unsupported volumeContentSource") - return nil, status.Error(codes.InvalidArgument, "Unsupported volumeContentSource") - } - srcSnapshot := volumeContentSource.GetSnapshot() - if srcSnapshot == nil { - log.Error("Error fetching snapshot from the volumeContentSource") - return nil, status.Error(codes.InvalidArgument, "Error fetching snapshot from the volumeContentSource") - } - - id := srcSnapshot.GetSnapshotId() - volumeBackup, err := d.client.BlockStorage().GetVolumeBackup(ctx, id) - if err != nil { - if k8sapierrors.IsNotFound(err) { - log.Errorf("Failed to get snapshot with ID %v", id) - return nil, status.Errorf(codes.NotFound, "Failed to get snapshot with ID %v", id) - } - log.Errorf("Failed to fetch snapshot with ID %v with error %v", id, err) - return nil, status.Errorf(codes.Internal, "Failed to fetch snapshot with ID %v with error %v", id, err) - } - - volumeBackupSize := *volumeBackup.SizeInMBs * client.MiB - if volumeBackupSize < size { - volumeContext[needResize] = "true" - volumeContext[newSize] = strconv.FormatInt(size, 10) - } - - srcSnapshotId = id - } - metric := metrics.PVProvision metricType := util.CSIStorageType if srcSnapshotId != "" { metric = metrics.BlockSnapshotRestore - metricType = util.CSIBVSnapshot + metricType = util.CSIStorageType + } + if srcVolumeId != "" { + metric = metrics.PVClone + metricType = util.CSIStorageType } if availableDomainShortName == "" { @@ -313,7 +353,8 @@ func (d *BlockVolumeControllerDriver) CreateVolume(ctx context.Context, req *csi //make sure this method is idempotent by checking existence of volume with same name. volumes, err := d.client.BlockStorage().GetVolumesByName(context.Background(), volumeName, d.config.CompartmentID) if err != nil { - log.With(zap.Error(err)).Error("Failed to find existence of volume.") + log.With("service", "blockstorage", "verb", "get", "resource", "volume", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("Failed to find existence of volume.") errorType = util.GetError(err) metricDimension = util.GetMetricDimensionForComponent(errorType, metricType) dimensionsMap[metrics.ComponentDimension] = metricDimension @@ -350,7 +391,8 @@ func (d *BlockVolumeControllerDriver) CreateVolume(ctx context.Context, req *csi // Creating new volume ad, err := d.client.Identity().GetAvailabilityDomainByName(context.Background(), d.config.CompartmentID, availableDomainShortName) if err != nil { - log.With("Compartment Id", d.config.CompartmentID).With(zap.Error(err)).Error("Failed to get available domain.") + log.With("Compartment Id", d.config.CompartmentID, "service", "identity", "verb", "get", "resource", "AD", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("Failed to get available domain.") errorType = util.GetError(err) metricDimension = util.GetMetricDimensionForComponent(errorType, metricType) dimensionsMap[metrics.ComponentDimension] = metricDimension @@ -375,7 +417,7 @@ func (d *BlockVolumeControllerDriver) CreateVolume(ctx context.Context, req *csi bvTags = scTags } - provisionedVolume, err = provision(log, d.client, volumeName, size, *ad.Name, d.config.CompartmentID, srcSnapshotId, + provisionedVolume, err = provision(log, d.client, volumeName, size, *ad.Name, d.config.CompartmentID, srcSnapshotId, srcVolumeId, volumeParams.diskEncryptionKey, volumeParams.vpusPerGB, timeout, bvTags) if err != nil { log.With("Ad name", *ad.Name, "Compartment Id", d.config.CompartmentID).With(zap.Error(err)).Error("New volume creation failed.") @@ -389,9 +431,15 @@ func (d *BlockVolumeControllerDriver) CreateVolume(ctx context.Context, req *csi ctx, cancel := context.WithTimeout(ctx, timeout) defer cancel() log.Info("Waiting for volume to become available.") - _, err = d.client.BlockStorage().AwaitVolumeAvailableORTimeout(ctx, *provisionedVolume.Id) + + if srcVolumeId != "" { + _, err = d.client.BlockStorage().AwaitVolumeCloneAvailableOrTimeout(ctx, *provisionedVolume.Id) + } else { + _, err = d.client.BlockStorage().AwaitVolumeAvailableORTimeout(ctx, *provisionedVolume.Id) + } if err != nil { - log.With("volumeName", volumeName).Error("Create volume failed with time out") + log.With("service", "blockstorage", "verb", "get", "resource", "volume", "statusCode", util.GetHttpStatusCode(err)). + With("volumeName", volumeName).Error("Create volume failed with time out") errorType = util.GetError(err) metricDimension = util.GetMetricDimensionForComponent(errorType, metricType) dimensionsMap[metrics.ComponentDimension] = metricDimension @@ -433,7 +481,7 @@ func (d *BlockVolumeControllerDriver) CreateVolume(ctx context.Context, req *csi // DeleteVolume deletes the given volume. The function is idempotent. func (d *BlockVolumeControllerDriver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error) { startTime := time.Now() - log := d.logger.With("volumeID", req.VolumeId) + log := d.logger.With("volumeID", req.VolumeId, "csiOperation", "delete") var errorType string var csiMetricDimension string dimensionsMap := make(map[string]string) @@ -454,15 +502,15 @@ func (d *BlockVolumeControllerDriver) DeleteVolume(ctx context.Context, req *csi err := d.client.BlockStorage().DeleteVolume(ctx, req.VolumeId) if err != nil { if !client.IsNotFound(err) { - log.With(zap.Error(err)).Error("Failed to delete volume.") + log.With("service", "blockstorage", "verb", "delete", "resource", "volume", "statusCode", util.GetHttpStatusCode(err)).With(zap.Error(err)).Error("Failed to delete volume.") errorType = util.GetError(err) csiMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension metrics.SendMetricData(d.metricPusher, metrics.PVDelete, time.Since(startTime).Seconds(), dimensionsMap) return nil, fmt.Errorf("failed to delete volume, volumeId: %s, error: %v", req.VolumeId, err) } - log.With(zap.Error(err)).Error("Unable to find volume " + - "to delete. Volume is possibly already deleted. No Delete Operation required.") + log.With("service", "blockstorage", "verb", "delete", "resource", "volume", "statusCode", util.GetHttpStatusCode(err)).With(zap.Error(err)). + Error("Unable to find volume to delete. Volume is possibly already deleted. No Delete Operation required.") } else { log.Info("Volume is deleted.") } @@ -493,7 +541,7 @@ func (d *BlockVolumeControllerDriver) ControllerPublishVolume(ctx context.Contex dimensionsMap := make(map[string]string) dimensionsMap[metrics.ResourceOCIDDimension] = req.VolumeId - log := d.logger.With("volumeID", req.VolumeId, "nodeId", req.NodeId) + log := d.logger.With("volumeID", req.VolumeId, "nodeId", req.NodeId, "csiOperation", "attach") id, err := d.util.LookupNodeID(d.KubeClient, req.NodeId) if err != nil { @@ -513,7 +561,8 @@ func (d *BlockVolumeControllerDriver) ControllerPublishVolume(ctx context.Contex } volumeAttachmentOptions, err := getAttachmentOptions(context.Background(), d.client.Compute(), attachType, id) if err != nil { - log.With(zap.Error(err)).With("attachmentType", attachType, "instanceID", id).Error("failed to get the attachment options") + log.With("service", "compute", "verb", "get", "resource", "instance", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).With("attachmentType", attachType, "instanceID", id).Error("failed to get the attachment options") errorType = util.GetError(err) csiMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension @@ -542,7 +591,8 @@ func (d *BlockVolumeControllerDriver) ControllerPublishVolume(ctx context.Contex volumeAttached, err := d.client.Compute().FindActiveVolumeAttachment(context.Background(), compartmentID, req.VolumeId) if err != nil && !client.IsNotFound(err) { - log.With(zap.Error(err)).Error("Got error in finding volume attachment.") + log.With("service", "compute", "verb", "get", "resource", "volumeAttachment", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("Got error in finding volume attachment.") errorType = util.GetError(err) csiMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension @@ -563,7 +613,8 @@ func (d *BlockVolumeControllerDriver) ControllerPublishVolume(ctx context.Contex log.With("instanceID", *volumeAttached.GetInstanceId()).Info("Waiting for volume to get detached before attaching.") err = d.client.Compute().WaitForVolumeDetached(ctx, *volumeAttached.GetId()) if err != nil { - log.With("instanceID", *volumeAttached.GetInstanceId()).With(zap.Error(err)).Error("Error while waiting for volume to get detached before attaching.") + log.With("service", "compute", "verb", "get", "resource", "volumeAttachment", "statusCode", util.GetHttpStatusCode(err)). + With("instanceID", *volumeAttached.GetInstanceId()).With(zap.Error(err)).Error("Error while waiting for volume to get detached before attaching.") errorType = util.GetError(err) csiMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension @@ -583,7 +634,8 @@ func (d *BlockVolumeControllerDriver) ControllerPublishVolume(ctx context.Contex log.With("instanceID", id).Info("Volume is in ATTACHING state. Waiting for Volume to attach to the Node.") volumeAttached, err = d.client.Compute().WaitForVolumeAttached(ctx, *volumeAttached.GetId()) if err != nil { - log.With("instanceID", id).With(zap.Error(err)).Error("Error while waiting: failed to attach volume to the node.") + log.With("service", "compute", "verb", "get", "resource", "volumeAttachment", "statusCode", util.GetHttpStatusCode(err)). + With("instanceID", id).With(zap.Error(err)).Error("Error while waiting: failed to attach volume to the node.") errorType = util.GetError(err) csiMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension @@ -593,7 +645,7 @@ func (d *BlockVolumeControllerDriver) ControllerPublishVolume(ctx context.Contex } //Checking if Volume state is already Attached or Attachment (from above condition) is completed if volumeAttached.GetLifecycleState() == core.VolumeAttachmentLifecycleStateAttached { - log.With("instanceID", id).Info("Volume is ATTACHED to the Node.") + log.With("instanceID", id).Info("Volume is already ATTACHED to the Node.") return generatePublishContext(volumeAttachmentOptions, log, volumeAttached, vpusPerGB, req.VolumeContext[needResize], req.VolumeContext[newSize]), nil } } @@ -604,7 +656,8 @@ func (d *BlockVolumeControllerDriver) ControllerPublishVolume(ctx context.Contex if volumeAttachmentOptions.useParavirtualizedAttachment { volumeAttached, err = d.client.Compute().AttachParavirtualizedVolume(context.Background(), id, req.VolumeId, volumeAttachmentOptions.enableInTransitEncryption) if err != nil { - log.With("instanceID", id).With(zap.Error(err)).Info("failed paravirtualized attachment instance to volume.") + log.With("service", "compute", "verb", "create", "resource", "volumeAttachment", "statusCode", util.GetHttpStatusCode(err)). + With("instanceID", id).With(zap.Error(err)).Info("failed paravirtualized attachment instance to volume.") errorType = util.GetError(err) csiMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension @@ -614,7 +667,8 @@ func (d *BlockVolumeControllerDriver) ControllerPublishVolume(ctx context.Contex } else { volumeAttached, err = d.client.Compute().AttachVolume(context.Background(), id, req.VolumeId) if err != nil { - log.With("instanceID", id).With(zap.Error(err)).Info("failed iscsi attachment instance to volume.") + log.With("service", "compute", "verb", "create", "resource", "volumeAttachment", "statusCode", util.GetHttpStatusCode(err)). + With("instanceID", id).With(zap.Error(err)).Info("failed iscsi attachment instance to volume.") errorType = util.GetError(err) csiMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension @@ -625,14 +679,15 @@ func (d *BlockVolumeControllerDriver) ControllerPublishVolume(ctx context.Contex volumeAttached, err = d.client.Compute().WaitForVolumeAttached(ctx, *volumeAttached.GetId()) if err != nil { - log.With("instanceID", id).With(zap.Error(err)).Error("Failed to attach volume to the node.") + log.With("service", "compute", "verb", "get", "resource", "volumeAttachment", "statusCode", util.GetHttpStatusCode(err)). + With("instanceID", id).With(zap.Error(err)).Error("Failed to attach volume to the node.") errorType = util.GetError(err) csiMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension metrics.SendMetricData(d.metricPusher, metrics.PVAttach, time.Since(startTime).Seconds(), dimensionsMap) return nil, status.Errorf(codes.Internal, "Failed to attach volume to the node %s", err) } - + log.Info("Volume is ATTACHED to Node.") csiMetricDimension = util.GetMetricDimensionForComponent(util.Success, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension metrics.SendMetricData(d.metricPusher, metrics.PVAttach, time.Since(startTime).Seconds(), dimensionsMap) @@ -673,7 +728,7 @@ func generatePublishContext(volumeAttachmentOptions VolumeAttachmentOption, log // ControllerUnpublishVolume detaches the given volume from the node func (d *BlockVolumeControllerDriver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error) { startTime := time.Now() - log := d.logger.With("volumeID", req.VolumeId, "nodeId", req.NodeId) + log := d.logger.With("volumeID", req.VolumeId, "nodeId", req.NodeId, "csiOperation", "detach") var errorType string var csiMetricDimension string @@ -707,7 +762,8 @@ func (d *BlockVolumeControllerDriver) ControllerUnpublishVolume(ctx context.Cont } if err != nil { if !client.IsNotFound(err) { - log.With(zap.Error(err)).Error("Error while fetching the Volume details. Unable to detach Volume from the node.") + log.With("service", "compute", "verb", "get", "resource", "volumeAttachment", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("Error while fetching the Volume details. Unable to detach Volume from the node.") errorType = util.GetError(err) csiMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension @@ -715,8 +771,8 @@ func (d *BlockVolumeControllerDriver) ControllerUnpublishVolume(ctx context.Cont return nil, err } if attachedVolume == nil { - log.With(zap.Error(err)).Error("Unable to find volume " + - "attachment for volume to detach. Volume is possibly already detached. Nothing to do in Un-publish Volume.") + log.With("service", "compute", "verb", "get", "resource", "volumeAttachment", "statusCode", util.GetHttpStatusCode(err)).With(zap.Error(err)). + Error("Unable to find volume attachment for volume to detach. Volume is possibly already detached. Nothing to do in Un-publish Volume.") return &csi.ControllerUnpublishVolumeResponse{}, nil } log.Info("Attached Volume is still in Detaching state") @@ -725,7 +781,8 @@ func (d *BlockVolumeControllerDriver) ControllerUnpublishVolume(ctx context.Cont log.With("instanceID", *attachedVolume.GetInstanceId()).Info("Detaching Volume") err = d.client.Compute().DetachVolume(context.Background(), *attachedVolume.GetId()) if err != nil { - log.With("instanceID", *attachedVolume.GetInstanceId()).With(zap.Error(err)).Error("Volume can not be detached") + log.With("service", "compute", "verb", "delete", "resource", "volumeAttachment", "statusCode", util.GetHttpStatusCode(err)). + With("instanceID", *attachedVolume.GetInstanceId()).With(zap.Error(err)).Error("Volume can not be detached") errorType = util.GetError(err) csiMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension @@ -736,7 +793,8 @@ func (d *BlockVolumeControllerDriver) ControllerUnpublishVolume(ctx context.Cont log.With("instanceID", *attachedVolume.GetInstanceId()).Info("Waiting for Volume to Detach") err = d.client.Compute().WaitForVolumeDetached(context.Background(), *attachedVolume.GetId()) if err != nil { - log.With("instanceID", *attachedVolume.GetInstanceId()).With(zap.Error(err)).Error("timed out waiting for volume to be detached") + log.With("service", "compute", "verb", "get", "resource", "volumeAttachment", "statusCode", util.GetHttpStatusCode(err)). + With("instanceID", *attachedVolume.GetInstanceId()).With(zap.Error(err)).Error("timed out waiting for volume to be detached") errorType = util.GetError(err) csiMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension @@ -755,7 +813,7 @@ func (d *BlockVolumeControllerDriver) ControllerUnpublishVolume(ctx context.Cont // are supported. func (d *BlockVolumeControllerDriver) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error) { - log := d.logger.With("volumeID", req.VolumeId) + log := d.logger.With("volumeID", req.VolumeId, "csiOperation", "validateVolumeCapabilities") if req.VolumeId == "" { return nil, status.Error(codes.InvalidArgument, "Volume ID must be provided") @@ -771,7 +829,8 @@ func (d *BlockVolumeControllerDriver) ValidateVolumeCapabilities(ctx context.Con volume, err := d.client.BlockStorage().GetVolume(ctx, req.VolumeId) if err != nil { - log.With(zap.Error(err)).Error("Volume ID not found.") + log.With("service", "blockstorage", "verb", "get", "resource", "volume", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("Volume ID not found.") return nil, status.Errorf(codes.NotFound, "Volume ID not found.") } @@ -817,6 +876,7 @@ func (d *BlockVolumeControllerDriver) ControllerGetCapabilities(ctx context.Cont csi.ControllerServiceCapability_RPC_PUBLISH_UNPUBLISH_VOLUME, csi.ControllerServiceCapability_RPC_EXPAND_VOLUME, csi.ControllerServiceCapability_RPC_CREATE_DELETE_SNAPSHOT, + csi.ControllerServiceCapability_RPC_CLONE_VOLUME, } { caps = append(caps, newCap(cap)) } @@ -869,11 +929,11 @@ func (d *BlockVolumeControllerDriver) CreateSnapshot(ctx context.Context, req *c dimensionsMap := make(map[string]string) dimensionsMap[metrics.ResourceOCIDDimension] = req.Name - log := d.logger.With("snapshotName", req.Name, "sourceVolumeId", req.SourceVolumeId) + log := d.logger.With("snapshotName", req.Name, "sourceVolumeId", req.SourceVolumeId, "csiOperation", "createSnapshot") if req.Name == "" { log.Error("Volume Snapshot name must be provided.") - snapshotMetricDimension = util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIBVSnapshot) + snapshotMetricDimension = util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotProvision, time.Since(startTime).Seconds(), dimensionsMap) return nil, status.Error(codes.InvalidArgument, "Volume snapshot name must be provided") @@ -882,7 +942,7 @@ func (d *BlockVolumeControllerDriver) CreateSnapshot(ctx context.Context, req *c sourceVolumeId := req.SourceVolumeId if sourceVolumeId == "" { log.Error("Volume snapshot source ID must be provided") - snapshotMetricDimension = util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIBVSnapshot) + snapshotMetricDimension = util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotProvision, time.Since(startTime).Seconds(), dimensionsMap) return nil, status.Error(codes.InvalidArgument, "Volume snapshot source ID must be provided") @@ -891,16 +951,17 @@ func (d *BlockVolumeControllerDriver) CreateSnapshot(ctx context.Context, req *c snapshots, err := d.client.BlockStorage().GetVolumeBackupsByName(ctx, req.Name, d.config.CompartmentID) if err != nil { errorType = util.GetError(err) - snapshotMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIBVSnapshot) + snapshotMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotProvision, time.Since(startTime).Seconds(), dimensionsMap) - log.Error("Failed to check the existence of the snapshot %s : %v", req.Name, err) + log.With("service", "blockstorage", "verb", "get", "resource", "volumeBackup", "statusCode", util.GetHttpStatusCode(err)). + Error("Failed to check the existence of the snapshot %s : %v", req.Name, err) return nil, status.Errorf(codes.Internal, "failed to check existence of snapshot %v", err) } if len(snapshots) > 1 { log.Error("Duplicate snapshot %q exists", req.Name) - snapshotMetricDimension = util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIBVSnapshot) + snapshotMetricDimension = util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotProvision, time.Since(startTime).Seconds(), dimensionsMap) return nil, fmt.Errorf("duplicate snapshot %q exists", req.Name) @@ -910,11 +971,14 @@ func (d *BlockVolumeControllerDriver) CreateSnapshot(ctx context.Context, req *c //Assigning existing snapshot snapshot := snapshots[0] - log.Info("Snapshot already created") + log.Info("Snapshot already created, checking if lifecycleState is Available") + + log = log.With("volumeBackupId", *snapshot.Id) + dimensionsMap[metrics.ResourceOCIDDimension] = *snapshot.Id if snapshot.VolumeId != nil && *snapshot.VolumeId != sourceVolumeId { log.Errorf("Snapshot %s exists for another volume with id %s", req.Name, *snapshot.VolumeId) - snapshotMetricDimension = util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIBVSnapshot) + snapshotMetricDimension = util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotProvision, time.Since(startTime).Seconds(), dimensionsMap) return nil, status.Errorf(codes.AlreadyExists, "Snapshot %s exists for another volume with id %s", req.Name, *snapshot.VolumeId) @@ -925,19 +989,24 @@ func (d *BlockVolumeControllerDriver) CreateSnapshot(ctx context.Context, req *c log.Infof("Checking if backup %v has become available", *snapshot.Id) blockVolumeAvailable, err := isBlockVolumeAvailable(snapshot) if err != nil { - log.Errorf("Backup did not become available %q: %v", req.Name, err) + log.Errorf("Error while waiting for backup to become available %q: %v", req.Name, err) errorType = util.GetError(err) - snapshotMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIBVSnapshot) + snapshotMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotProvision, time.Since(snapshot.TimeRequestReceived.Time).Seconds(), dimensionsMap) return nil, status.Errorf(codes.Internal, "Backup did not become available %q: %v", req.Name, err) } if blockVolumeAvailable { - log.With("snapshotName", req.Name).Info("Snapshot is created.") - snapshotMetricDimension = util.GetMetricDimensionForComponent(util.Success, util.CSIBVSnapshot) + log.Info("Snapshot is created and available.") + snapshotMetricDimension = util.GetMetricDimensionForComponent(util.Success, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotProvision, time.Since(snapshot.TimeRequestReceived.Time).Seconds(), dimensionsMap) + } else { + log.Infof("Backup has not become available yet, controller will retry") + snapshotMetricDimension = util.GetMetricDimensionForComponent(util.BackupCreating, util.CSIStorageType) + dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension + metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotProvision, time.Since(snapshot.TimeRequestReceived.Time).Seconds(), dimensionsMap) } return &csi.CreateSnapshotResponse{ @@ -954,7 +1023,7 @@ func (d *BlockVolumeControllerDriver) CreateSnapshot(ctx context.Context, req *c snapshotParams, err := extractSnapshotParameters(req.GetParameters()) if err != nil { log.With(zap.Error(err)).Error("Failed to parse volumesnapshotclass parameters.") - snapshotMetricDimension = util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIBVSnapshot) + snapshotMetricDimension = util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotProvision, time.Since(startTime).Seconds(), dimensionsMap) return nil, status.Errorf(codes.InvalidArgument, "failed to parse volumesnapshotclass parameters %v", err) @@ -974,14 +1043,18 @@ func (d *BlockVolumeControllerDriver) CreateSnapshot(ctx context.Context, req *c }) if err != nil { - log.Errorf("Could not create snapshot %q: %v", req.Name, err) + log.With("service", "blockstorage", "verb", "create", "resource", "volumeBackup", "statusCode", util.GetHttpStatusCode(err)). + Errorf("Could not create snapshot %q: %v", req.Name, err) errorType = util.GetError(err) - snapshotMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIBVSnapshot) + snapshotMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotProvision, time.Since(startTime).Seconds(), dimensionsMap) return nil, status.Errorf(codes.Internal, "Could not create snapshot %q: %v", req.Name, err) } + log = log.With("volumeBackupId", *snapshot.Id) + dimensionsMap[metrics.ResourceOCIDDimension] = *snapshot.Id + ts := timestamppb.New(snapshot.TimeCreated.Time) ctx, cancel := context.WithTimeout(ctx, newBackupAvailableTimeout) @@ -990,6 +1063,9 @@ func (d *BlockVolumeControllerDriver) CreateSnapshot(ctx context.Context, req *c if err != nil { if strings.Contains(err.Error(), "timed out") { log.Infof("Backup did not become available immediately after creation, controller will retry") + snapshotMetricDimension = util.GetMetricDimensionForComponent(util.BackupCreating, util.CSIStorageType) + dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension + metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotProvision, time.Since(startTime).Seconds(), dimensionsMap) return &csi.CreateSnapshotResponse{ Snapshot: &csi.Snapshot{ SnapshotId: *snapshot.Id, @@ -1000,9 +1076,10 @@ func (d *BlockVolumeControllerDriver) CreateSnapshot(ctx context.Context, req *c }, }, nil } else { - log.Infof("Backup did not become available %q: %v", req.Name, err) + log.With("service", "blockstorage", "verb", "get", "resource", "volumeBackup", "statusCode", util.GetHttpStatusCode(err)). + Errorf("Error while waiting for backup to become available %q: %v", req.Name, err) errorType = util.GetError(err) - snapshotMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIBVSnapshot) + snapshotMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotProvision, time.Since(startTime).Seconds(), dimensionsMap) log.Errorf("Backup did not become available %q: %v", req.Name, err) @@ -1010,8 +1087,8 @@ func (d *BlockVolumeControllerDriver) CreateSnapshot(ctx context.Context, req *c } } - log.With("snapshotName", req.Name).Info("Snapshot is created.") - snapshotMetricDimension = util.GetMetricDimensionForComponent(util.Success, util.CSIBVSnapshot) + log.Info("Snapshot is created and available.") + snapshotMetricDimension = util.GetMetricDimensionForComponent(util.Success, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotProvision, time.Since(startTime).Seconds(), dimensionsMap) @@ -1034,10 +1111,10 @@ func (d *BlockVolumeControllerDriver) DeleteSnapshot(ctx context.Context, req *c dimensionsMap := make(map[string]string) dimensionsMap[metrics.ResourceOCIDDimension] = req.SnapshotId - log := d.logger.With("SnapshotId", req.SnapshotId) + log := d.logger.With("SnapshotId", req.SnapshotId, "csiOperation", "deleteSnapshot") if req.SnapshotId == "" { - snapshotMetricDimension = util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIBVSnapshot) + snapshotMetricDimension = util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotDelete, time.Since(startTime).Seconds(), dimensionsMap) log.Errorf("SnapshotID is empty") @@ -1050,15 +1127,16 @@ func (d *BlockVolumeControllerDriver) DeleteSnapshot(ctx context.Context, req *c err := d.client.BlockStorage().DeleteVolumeBackup(ctx, req.SnapshotId) if err != nil && !k8sapierrors.IsNotFound(err) { errorType = util.GetError(err) - snapshotMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIBVSnapshot) + snapshotMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotDelete, time.Since(startTime).Seconds(), dimensionsMap) - log.Errorf("Failed to delete snapshot, snapshotId: %s, error: %v", req.SnapshotId, err) + log.With("service", "blockstorage", "verb", "delete", "resource", "volumeBackup", "statusCode", util.GetHttpStatusCode(err)). + Errorf("Failed to delete snapshot, snapshotId: %s, error: %v", req.SnapshotId, err) return nil, fmt.Errorf("failed to delete snapshot, snapshotId: %s, error: %v", req.SnapshotId, err) } log.Info("Snapshot is deleted.") - snapshotMetricDimension = util.GetMetricDimensionForComponent(util.Success, util.CSIBVSnapshot) + snapshotMetricDimension = util.GetMetricDimensionForComponent(util.Success, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = snapshotMetricDimension metrics.SendMetricData(d.metricPusher, metrics.BlockSnapshotDelete, time.Since(startTime).Seconds(), dimensionsMap) return &csi.DeleteSnapshotResponse{}, nil @@ -1076,7 +1154,7 @@ func (d *BlockVolumeControllerDriver) ControllerExpandVolume(ctx context.Context if volumeId == "" { return nil, status.Error(codes.InvalidArgument, "UpdateVolume volumeId must be provided") } - log := d.logger.With("volumeID", volumeId) + log := d.logger.With("volumeID", volumeId, "csiOperation", "expandVolume") var errorType string var csiMetricDimension string @@ -1096,7 +1174,8 @@ func (d *BlockVolumeControllerDriver) ControllerExpandVolume(ctx context.Context //make sure this method is idempotent by checking existence of volume with same name. volume, err := d.client.BlockStorage().GetVolume(context.Background(), volumeId) if err != nil { - log.With(zap.Error(err)).Error("Failed to find existence of volume") + log.With("service", "blockstorage", "verb", "get", "resource", "volume", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("Failed to find existence of volume") errorType = util.GetError(err) csiMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension @@ -1125,7 +1204,8 @@ func (d *BlockVolumeControllerDriver) ControllerExpandVolume(ctx context.Context if err != nil { message := fmt.Sprintf("Update volume failed %v", err) - log.Error(message) + log.With("service", "blockstorage", "verb", "update", "resource", "volume", "statusCode", util.GetHttpStatusCode(err)). + Error(message) errorType = util.GetError(err) csiMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension @@ -1150,7 +1230,7 @@ func (d *BlockVolumeControllerDriver) ControllerGetVolume(ctx context.Context, r } func provision(log *zap.SugaredLogger, c client.Interface, volName string, volSize int64, availDomainName, compartmentID, - backupID, kmsKeyID string, vpusPerGB int64, timeout time.Duration, bvTags *config.TagConfig) (core.Volume, error) { + backupID, srcVolumeID, kmsKeyID string, vpusPerGB int64, timeout time.Duration, bvTags *config.TagConfig) (core.Volume, error) { ctx := context.Background() @@ -1170,6 +1250,8 @@ func provision(log *zap.SugaredLogger, c client.Interface, volName string, volSi if backupID != "" { volumeDetails.SourceDetails = &core.VolumeSourceFromVolumeBackupDetails{Id: &backupID} + } else if srcVolumeID != "" { + volumeDetails.SourceDetails = &core.VolumeSourceFromVolumeDetails{Id: &srcVolumeID} } if kmsKeyID != "" { @@ -1188,7 +1270,8 @@ func provision(log *zap.SugaredLogger, c client.Interface, volName string, volSi newVolume, err := c.BlockStorage().CreateVolume(ctx, volumeDetails) if err != nil { - log.With(zap.Error(err)).With("volumeName", volName).Error("Create volume failed.") + log.With("service", "blockstorage", "verb", "create", "resource", "volume", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).With("volumeName", volName).Error("Create volume failed.") status.Errorf(codes.Unknown, "Create volume failed") return core.Volume{}, err } diff --git a/pkg/csi/driver/bv_controller_test.go b/pkg/csi/driver/bv_controller_test.go index de83084431..fceb59d458 100644 --- a/pkg/csi/driver/bv_controller_test.go +++ b/pkg/csi/driver/bv_controller_test.go @@ -24,6 +24,7 @@ import ( "github.com/container-storage-interface/spec/lib/go/csi" "github.com/pkg/errors" "go.uber.org/zap" + authv1 "k8s.io/api/authentication/v1" "k8s.io/client-go/kubernetes" providercfg "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci/config" @@ -62,7 +63,7 @@ func (MockOCIClient) Compute() client.ComputeInterface { return &MockComputeClient{} } -func (MockOCIClient) LoadBalancer() client.GenericLoadBalancerInterface { +func (MockOCIClient) LoadBalancer(logger *zap.SugaredLogger, lbType string, tenancy string, token *authv1.TokenRequest) client.GenericLoadBalancerInterface { return &MockLoadBalancerClient{} } @@ -84,6 +85,11 @@ func (MockOCIClient) Identity() client.IdentityInterface { type MockBlockStorageClient struct{} +// AwaitVolumeCloneAvailableOrTimeout implements client.BlockStorageInterface. +func (c *MockBlockStorageClient) AwaitVolumeCloneAvailableOrTimeout(ctx context.Context, id string) (*core.Volume, error) { + return &core.Volume{}, nil +} + func (c *MockBlockStorageClient) AwaitVolumeBackupAvailableOrTimeout(ctx context.Context, id string) (*core.VolumeBackup, error) { return &core.VolumeBackup{}, nil } @@ -303,7 +309,7 @@ func (c *MockLoadBalancerClient) UpdateNetworkSecurityGroups(context.Context, st } // Networking mocks client VirtualNetwork implementation. -func (p *MockProvisionerClient) LoadBalancer(string) client.GenericLoadBalancerInterface { +func (p *MockProvisionerClient) LoadBalancer(*zap.SugaredLogger, string, string, *authv1.TokenRequest) client.GenericLoadBalancerInterface { return &MockLoadBalancerClient{} } diff --git a/pkg/csi/driver/bv_node.go b/pkg/csi/driver/bv_node.go index f6b642771d..ad945d56d2 100644 --- a/pkg/csi/driver/bv_node.go +++ b/pkg/csi/driver/bv_node.go @@ -30,7 +30,7 @@ import ( "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util/hostutil" - "github.com/oracle/oci-cloud-controller-manager/pkg/csi-util" + csi_util "github.com/oracle/oci-cloud-controller-manager/pkg/csi-util" "github.com/oracle/oci-cloud-controller-manager/pkg/oci/client" "github.com/oracle/oci-cloud-controller-manager/pkg/util/disk" ) @@ -190,6 +190,17 @@ func (d BlockVolumeNodeDriver) NodeStageVolume(ctx context.Context, req *csi.Nod } } + existingFs, err := mountHandler.GetDiskFormat(devicePath) + if err != nil { + logger.With("devicePath", devicePath, zap.Error(err)).Error("GetDiskFormatFailed") + } + + if existingFs != "" && existingFs != fsType { + returnError := fmt.Sprintf("FS Type mismatch detected. The existing fs type on the volume: %q doesn't match the requested fs type: %q. Please change fs type in PV to match the existing fs type.", existingFs, fsType) + logger.Error(returnError) + return nil, status.Error(codes.Internal, returnError) + } + logger.With("devicePath", devicePath, "fsType", fsType).Info("mounting the volume to staging path.") err = mountHandler.FormatAndMount(devicePath, req.StagingTargetPath, fsType, options) @@ -394,7 +405,7 @@ func (d BlockVolumeNodeDriver) NodePublishVolume(ctx context.Context, req *csi.N } if needsResize { - logger.Info("Starting to expand volume restored from snapshot") + logger.Info("Starting to expand volume to requested size") requestedSize, err := strconv.ParseInt(req.PublishContext[newSize], 10, 64) if err != nil { diff --git a/pkg/csi/driver/fss_controller.go b/pkg/csi/driver/fss_controller.go index a2ee2f1488..da70a8eddc 100644 --- a/pkg/csi/driver/fss_controller.go +++ b/pkg/csi/driver/fss_controller.go @@ -76,7 +76,7 @@ type StorageClassParameters struct { func (d *FSSControllerDriver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) { startTime := time.Now() - var log = d.logger.With("volumeName", req.Name) + var log = d.logger.With("volumeName", req.Name, "csiOperation", "create") if req.Name == "" { return nil, status.Error(codes.InvalidArgument, "CreateVolume Name must be provided") @@ -99,11 +99,15 @@ func (d *FSSControllerDriver) CreateVolume(ctx context.Context, req *csi.CreateV log, response, storageClassParameters, err, done := extractStorageClassParameters(d, log, dimensionsMap, volumeName, req.GetParameters(), startTime) if done { + dimensionsMap[metrics.ComponentDimension] = util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIStorageType) + metrics.SendMetricData(d.metricPusher, metrics.FssAllProvision, time.Since(startTime).Seconds(), dimensionsMap) return response, err } - log, mountTargetOCID, mountTargetIp, exportSetId, response, err, done := d.getOrCreateMountTarget(ctx, *storageClassParameters, volumeName, log, dimensionsMap, startTime) + log, mountTargetOCID, mountTargetIp, exportSetId, response, err, done := d.getOrCreateMountTarget(ctx, *storageClassParameters, volumeName, log, dimensionsMap) if done { + dimensionsMap[metrics.ComponentDimension] = util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) + metrics.SendMetricData(d.metricPusher, metrics.FssAllProvision, time.Since(startTime).Seconds(), dimensionsMap) return response, err } @@ -122,18 +126,26 @@ func (d *FSSControllerDriver) CreateVolume(ctx context.Context, req *csi.CreateV freeformTags["mountTargetOCID"] = mountTargetOCID freeformTags["exportSetId"] = exportSetId - log, filesystemOCID, response, err, done := d.getOrCreateFileSystem(ctx, *storageClassParameters, volumeName, log, dimensionsMap, startTime) + log, filesystemOCID, response, err, done := d.getOrCreateFileSystem(ctx, *storageClassParameters, volumeName, log, dimensionsMap) if done { + dimensionsMap[metrics.ComponentDimension] = util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) + metrics.SendMetricData(d.metricPusher, metrics.FssAllProvision, time.Since(startTime).Seconds(), dimensionsMap) return response, err } - log, response, err, done = d.getOrCreateExport(ctx, err, *storageClassParameters, filesystemOCID, exportSetId, log, dimensionsMap, startTime) + log, response, err, done = d.getOrCreateExport(ctx, err, *storageClassParameters, filesystemOCID, exportSetId, log, dimensionsMap) if done { + dimensionsMap[metrics.ComponentDimension] = util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) + metrics.SendMetricData(d.metricPusher, metrics.FssAllProvision, time.Since(startTime).Seconds(), dimensionsMap) return response, err } fssVolumeHandle := fmt.Sprintf("%s:%s:%s", filesystemOCID, mountTargetIp, storageClassParameters.exportPath) log.With("volumeID", fssVolumeHandle).Info("All FSS resource successfully created") + csiMetricDimension := util.GetMetricDimensionForComponent(util.Success, util.CSIStorageType) + dimensionsMap[metrics.ComponentDimension] = csiMetricDimension + dimensionsMap[metrics.ResourceOCIDDimension] = fssVolumeHandle + metrics.SendMetricData(d.metricPusher, metrics.FssAllProvision, time.Since(startTime).Seconds(), dimensionsMap) return &csi.CreateVolumeResponse{ Volume: &csi.Volume{ VolumeId: fssVolumeHandle, @@ -167,7 +179,8 @@ func checkForSupportedVolumeCapabilities(volumeCaps []*csi.VolumeCapability) err return nil } -func (d *FSSControllerDriver) getOrCreateFileSystem(ctx context.Context, storageClassParameters StorageClassParameters, volumeName string, log *zap.SugaredLogger, dimensionsMap map[string]string, startTime time.Time) (*zap.SugaredLogger, string, *csi.CreateVolumeResponse, error, bool) { +func (d *FSSControllerDriver) getOrCreateFileSystem(ctx context.Context, storageClassParameters StorageClassParameters, volumeName string, log *zap.SugaredLogger, dimensionsMap map[string]string) (*zap.SugaredLogger, string, *csi.CreateVolumeResponse, error, bool) { + startTimeFileSystem := time.Now() //make sure this method is idempotent by checking existence of volume with same name. log.Info("searching for existing filesystem") foundConflictingFs, fileSystemSummaries, err := d.client.FSS().GetFileSystemSummaryByDisplayName(context.Background(), storageClassParameters.compartmentOcid, storageClassParameters.availabilityDomain, volumeName) @@ -182,10 +195,11 @@ func (d *FSSControllerDriver) getOrCreateFileSystem(ctx context.Context, storage } else { message = "failed to check existence of File System" } - log.With(zap.Error(err)).Error(message) + log.With("service", "fss", "verb", "get", "resource", "fileSystem", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error(message) csiMetricDimension := util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.FSSProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FSSProvision, time.Since(startTimeFileSystem).Seconds(), dimensionsMap) return nil, "", nil, status.Errorf(codes.Internal, "%s, error: %s", message, err.Error()), true } @@ -193,7 +207,7 @@ func (d *FSSControllerDriver) getOrCreateFileSystem(ctx context.Context, storage log.Error("Duplicate File system exists") csiMetricDimension := util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.FSSProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FSSProvision, time.Since(startTimeFileSystem).Seconds(), dimensionsMap) return nil, "", nil, fmt.Errorf("duplicate File system %q exists", volumeName), true } @@ -207,10 +221,11 @@ func (d *FSSControllerDriver) getOrCreateFileSystem(ctx context.Context, storage // Creating new file system provisionedFileSystem, err = provisionFileSystem(log, d.client, volumeName, storageClassParameters) if err != nil { - log.With(zap.Error(err)).Error("New File System creation failed") + log.With("service", "fss", "verb", "create", "resource", "fileSystem", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("New File System creation failed") csiMetricDimension := util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.FSSProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FSSProvision, time.Since(startTimeFileSystem).Seconds(), dimensionsMap) return nil, "", nil, status.Errorf(codes.Internal, "New File System creation failed, error: %s", err.Error()), true } } @@ -223,10 +238,11 @@ func (d *FSSControllerDriver) getOrCreateFileSystem(ctx context.Context, storage log = log.With("fssID", filesystemOCID) _, err = d.client.FSS().AwaitFileSystemActive(ctx, log, *provisionedFileSystem.Id) if err != nil { - log.With(zap.Error(err)).Error("Await File System failed with time out") + log.With("service", "fss", "verb", "get", "resource", "fileSystem", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("Await File System failed with time out") csiMetricDimension := util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.FSSProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FSSProvision, time.Since(startTimeFileSystem).Seconds(), dimensionsMap) return nil, "", nil, status.Errorf(codes.DeadlineExceeded, "Await File System failed with time out, error: %s", err.Error()), true } @@ -234,11 +250,12 @@ func (d *FSSControllerDriver) getOrCreateFileSystem(ctx context.Context, storage csiMetricDimension := util.GetMetricDimensionForComponent(util.Success, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension dimensionsMap[metrics.ResourceOCIDDimension] = filesystemOCID - metrics.SendMetricData(d.metricPusher, metrics.FSSProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FSSProvision, time.Since(startTimeFileSystem).Seconds(), dimensionsMap) return log, filesystemOCID, nil, nil, false } -func (d *FSSControllerDriver) getOrCreateMountTarget(ctx context.Context, storageClassParameters StorageClassParameters, volumeName string, log *zap.SugaredLogger, dimensionsMap map[string]string, startTime time.Time) (*zap.SugaredLogger, string, string, string, *csi.CreateVolumeResponse, error, bool) { +func (d *FSSControllerDriver) getOrCreateMountTarget(ctx context.Context, storageClassParameters StorageClassParameters, volumeName string, log *zap.SugaredLogger, dimensionsMap map[string]string) (*zap.SugaredLogger, string, string, string, *csi.CreateVolumeResponse, error, bool) { + startTimeMountTarget := time.Now() // Mount Target creation provisionedMountTarget := &fss.MountTarget{} isExistingMountTargetUsed := false @@ -261,10 +278,11 @@ func (d *FSSControllerDriver) getOrCreateMountTarget(ctx context.Context, storag } else { message = "failed to check existence of Mount Target" } - log.With(zap.Error(err)).Error(message) + log.With("service", "fss", "verb", "get", "resource", "mountTarget", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error(message) csiMetricDimension := util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTimeMountTarget).Seconds(), dimensionsMap) return log, "", "", "", nil, status.Errorf(codes.Internal, "%s, error: %s", message, err.Error()), true } @@ -272,7 +290,7 @@ func (d *FSSControllerDriver) getOrCreateMountTarget(ctx context.Context, storag log.Error("Duplicate Mount Target exists") csiMetricDimension := util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTimeMountTarget).Seconds(), dimensionsMap) return log, "", "", "", nil, status.Errorf(codes.Internal, "duplicate Mount Target %s exists", volumeName), true } @@ -289,10 +307,11 @@ func (d *FSSControllerDriver) getOrCreateMountTarget(ctx context.Context, storag // Creating new mount target provisionedMountTarget, err = provisionMountTarget(log, d.client, volumeName, storageClassParameters) if err != nil { - log.With(zap.Error(err)).Error("New Mount Target creation failed") + log.With("service", "fss", "verb", "create", "resource", "mountTarget", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("New Mount Target creation failed") csiMetricDimension := util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTimeMountTarget).Seconds(), dimensionsMap) return log, "", "", "", nil, status.Errorf(codes.Internal, "New Mount Target creation failed, error: %s", err.Error()), true } } @@ -306,11 +325,12 @@ func (d *FSSControllerDriver) getOrCreateMountTarget(ctx context.Context, storag log = log.With("mountTargetID", mountTargetOCID) activeMountTarget, err := d.client.FSS().AwaitMountTargetActive(ctx, log, *provisionedMountTarget.Id) if err != nil { - log.With(zap.Error(err)).Error("await mount target to be available failed with time out") + log.With("service", "fss", "verb", "get", "resource", "mountTarget", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("await mount target to be available failed with time out") if !isExistingMountTargetUsed { csiMetricDimension := util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTimeMountTarget).Seconds(), dimensionsMap) } return log, "", "", "", nil, status.Errorf(codes.DeadlineExceeded, "await mount target to be available failed with time out, error: %s", err.Error()), true } @@ -321,7 +341,7 @@ func (d *FSSControllerDriver) getOrCreateMountTarget(ctx context.Context, storag if !isExistingMountTargetUsed { csiMetricDimension := util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTimeMountTarget).Seconds(), dimensionsMap) } return log, "", "", "", nil, status.Errorf(codes.Internal, "IP not assigned to mount target"), true } @@ -329,11 +349,12 @@ func (d *FSSControllerDriver) getOrCreateMountTarget(ctx context.Context, storag log.Infof("getting private IP of mount target from mountTargetIpId %s", mountTargetIpId) privateIpObject, err := d.client.Networking().GetPrivateIP(ctx, mountTargetIpId) if err != nil { - log.With(zap.Error(err)).Error("Failed to fetch Mount Target Private IP from IP ID: %s", mountTargetIpId) + log.With("service", "vcn", "verb", "get", "resource", "privateIp", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("Failed to fetch Mount Target Private IP from IP ID: %s", mountTargetIpId) if !isExistingMountTargetUsed { csiMetricDimension := util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTimeMountTarget).Seconds(), dimensionsMap) } return log, "", "", "", nil, status.Errorf(codes.Internal, "Failed to fetch Mount Target Private IP from IP ID: %s, error: %s", mountTargetIpId, err.Error()), true } @@ -344,7 +365,7 @@ func (d *FSSControllerDriver) getOrCreateMountTarget(ctx context.Context, storag if !isExistingMountTargetUsed { csiMetricDimension := util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTimeMountTarget).Seconds(), dimensionsMap) } return log, "", "", "", nil, status.Errorf(codes.Internal, "ExportSetId not assigned to mount target"), true } @@ -355,12 +376,13 @@ func (d *FSSControllerDriver) getOrCreateMountTarget(ctx context.Context, storag csiMetricDimension := util.GetMetricDimensionForComponent(util.Success, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension dimensionsMap[metrics.ResourceOCIDDimension] = mountTargetOCID - metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTimeMountTarget).Seconds(), dimensionsMap) } return log, mountTargetOCID, mountTargetIp, exportSetId, nil, nil, false } -func (d *FSSControllerDriver) getOrCreateExport(ctx context.Context, err error, storageClassParameters StorageClassParameters, filesystemOCID string, exportSetId string, log *zap.SugaredLogger, dimensionsMap map[string]string, startTime time.Time) (*zap.SugaredLogger, *csi.CreateVolumeResponse, error, bool) { +func (d *FSSControllerDriver) getOrCreateExport(ctx context.Context, err error, storageClassParameters StorageClassParameters, filesystemOCID string, exportSetId string, log *zap.SugaredLogger, dimensionsMap map[string]string) (*zap.SugaredLogger, *csi.CreateVolumeResponse, error, bool) { + startTimeExport := time.Now() log.Info("searching for existing export") exportSummary, err := d.client.FSS().FindExport(ctx, filesystemOCID, storageClassParameters.exportPath, exportSetId) @@ -374,7 +396,7 @@ func (d *FSSControllerDriver) getOrCreateExport(ctx context.Context, err error, log.With(zap.Error(err)).Error(message) csiMetricDimension := util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.ExportProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.ExportProvision, time.Since(startTimeExport).Seconds(), dimensionsMap) return log, nil, status.Errorf(codes.Internal, "%s, error: %s", message, err.Error()), true } @@ -388,7 +410,7 @@ func (d *FSSControllerDriver) getOrCreateExport(ctx context.Context, err error, log.With(zap.Error(err)).Error("New Export creation failed") csiMetricDimension := util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.ExportProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.ExportProvision, time.Since(startTimeExport).Seconds(), dimensionsMap) return log, nil, status.Errorf(codes.Internal, "New Export creation failed, error: %s", err.Error()), true } } @@ -405,7 +427,7 @@ func (d *FSSControllerDriver) getOrCreateExport(ctx context.Context, err error, log.With(zap.Error(err)).Error("await export failed with time out") csiMetricDimension := util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.ExportProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.ExportProvision, time.Since(startTimeExport).Seconds(), dimensionsMap) return log, nil, status.Errorf(codes.DeadlineExceeded, "await export failed with time out, error: %s", err.Error()), true } @@ -413,7 +435,7 @@ func (d *FSSControllerDriver) getOrCreateExport(ctx context.Context, err error, csiMetricDimension := util.GetMetricDimensionForComponent(util.Success, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension dimensionsMap[metrics.ResourceOCIDDimension] = exportId - metrics.SendMetricData(d.metricPusher, metrics.ExportProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.ExportProvision, time.Since(startTimeExport).Seconds(), dimensionsMap) return log, nil, nil, false } @@ -435,7 +457,7 @@ func extractStorageClassParameters(d *FSSControllerDriver, log *zap.SugaredLogge if !ok { log.Errorf("AvailabilityDomain not provided in storage class") dimensionsMap[metrics.ComponentDimension] = util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIStorageType) - metrics.SendMetricData(d.metricPusher, metrics.FSSProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FssAllProvision, time.Since(startTime).Seconds(), dimensionsMap) metrics.SendMetricData(d.metricPusher, metrics.MTProvision, time.Since(startTime).Seconds(), dimensionsMap) return log, nil, nil, status.Errorf(codes.InvalidArgument, "AvailabilityDomain not provided in storage class"), true } @@ -444,7 +466,7 @@ func extractStorageClassParameters(d *FSSControllerDriver, log *zap.SugaredLogge if err != nil { log.With(zap.Error(err)).Errorf("invalid available domain: %s or compartmentID: %s", availabilityDomain, compartmentId) dimensionsMap[metrics.ComponentDimension] = util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) - metrics.SendMetricData(d.metricPusher, metrics.FSSProvision, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FssAllProvision, time.Since(startTime).Seconds(), dimensionsMap) return log, nil, nil, status.Errorf(codes.InvalidArgument, "invalid available domain: %s or compartment ID: %s, error: %s", availabilityDomain, compartmentId, err.Error()), true } availabilityDomain = *ad.Name @@ -609,7 +631,7 @@ func provisionExport(log *zap.SugaredLogger, c client.Interface, filesystemOCID func (d *FSSControllerDriver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error) { startTime := time.Now() volumeId := req.GetVolumeId() - log := d.logger.With("volumeID", volumeId) + log := d.logger.With("volumeID", volumeId, "csiOperation", "delete") dimensionsMap := make(map[string]string) dimensionsMap[metrics.ResourceOCIDDimension] = req.VolumeId volumeHandler := csi_util.ValidateFssId(volumeId) @@ -618,7 +640,7 @@ func (d *FSSControllerDriver) DeleteVolume(ctx context.Context, req *csi.DeleteV log.Error("Unable to parse Volume Id") csiMetricDimension := util.GetMetricDimensionForComponent(util.ErrValidation, util.CSIStorageType) dimensionsMap[metrics.ComponentDimension] = csiMetricDimension - metrics.SendMetricData(d.metricPusher, metrics.FSSDelete, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FssAllDelete, time.Since(startTime).Seconds(), dimensionsMap) return nil, status.Errorf(codes.InvalidArgument, "Invalid Volume ID provided %s", volumeId) } @@ -630,9 +652,11 @@ func (d *FSSControllerDriver) DeleteVolume(ctx context.Context, req *csi.DeleteV fileSystem, err := d.client.FSS().GetFileSystem(ctx, filesystemOcid) if err != nil { if !client.IsNotFound(err) { - log.With(zap.Error(err)).Error("Failed to delete filesystem.") + log.With("service", "fss", "verb", "get", "resource", "fileSystem", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("Failed to delete filesystem.") dimensionsMap[metrics.ComponentDimension] = util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) - metrics.SendMetricData(d.metricPusher, metrics.MTDelete, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FSSDelete, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FssAllDelete, time.Since(startTime).Seconds(), dimensionsMap) return nil, status.Errorf(codes.Internal, "failed to delete filesystem, volumeId: %s ERROR: %v", volumeId, err.Error()) } else { log.Info("File system does not exist.") @@ -664,22 +688,25 @@ func (d *FSSControllerDriver) DeleteVolume(ctx context.Context, req *csi.DeleteV } if isDeleteMountTarget { + startTimeMountTarget := time.Now() log = log.With("mountTargetOCID", mountTargetOCID) log.Info("filesystem tagged with mount target ocid, deleting mount target") // first delete Mount Target err = d.client.FSS().DeleteMountTarget(ctx, mountTargetOCID) if err != nil { if !client.IsNotFound(err) { - log.With(zap.Error(err)).Error("Failed to delete mount target.") + log.With("service", "fss", "verb", "delete", "resource", "mountTarget", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("Failed to delete mount target.") dimensionsMap[metrics.ComponentDimension] = util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) - metrics.SendMetricData(d.metricPusher, metrics.MTDelete, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.MTDelete, time.Since(startTimeMountTarget).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FssAllDelete, time.Since(startTime).Seconds(), dimensionsMap) return nil, status.Errorf(codes.Internal, "failed to delete mount target, mountTargetOcid: %s, error: %s", mountTargetOCID, err.Error()) } else { log.Info("Mount Target does not exist.") } } else { dimensionsMap[metrics.ComponentDimension] = util.GetMetricDimensionForComponent(util.Success, util.CSIStorageType) - metrics.SendMetricData(d.metricPusher, metrics.MTDelete, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.MTDelete, time.Since(startTimeMountTarget).Seconds(), dimensionsMap) log.Info("Mount Target is deleted.") } } else { @@ -687,6 +714,7 @@ func (d *FSSControllerDriver) DeleteVolume(ctx context.Context, req *csi.DeleteV } if exportSetId != "" { + startTimeExport := time.Now() log.Infof("searching export with tagged exportSetId %s", exportSetId) exportSummary, err := d.client.FSS().FindExport(ctx, filesystemOcid, exportPath, exportSetId) if err != nil { @@ -694,9 +722,11 @@ func (d *FSSControllerDriver) DeleteVolume(ctx context.Context, req *csi.DeleteV if exportSummary != nil { log.Infof("export %s is in state %s", *exportSummary.Id, exportSummary.LifecycleState) } else { - log.With(zap.Error(err)).Error("Failed to find export.") + log.With("service", "fss", "verb", "get", "resource", "export", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("Failed to find export.") dimensionsMap[metrics.ComponentDimension] = util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) - metrics.SendMetricData(d.metricPusher, metrics.ExportDelete, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.ExportDelete, time.Since(startTimeExport).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FssAllDelete, time.Since(startTime).Seconds(), dimensionsMap) return nil, status.Errorf(codes.Internal, "failed to find export, exportPath: %s, error: %s", exportPath, err.Error()) } } else { @@ -706,26 +736,31 @@ func (d *FSSControllerDriver) DeleteVolume(ctx context.Context, req *csi.DeleteV log.Infof("deleting export with exportId %s", *exportSummary.Id) err = d.client.FSS().DeleteExport(ctx, *exportSummary.Id) if err != nil { - log.With(zap.Error(err)).Error("failed to delete export.") + log.With("service", "fss", "verb", "delete", "resource", "export", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("failed to delete export.") dimensionsMap[metrics.ComponentDimension] = util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) - metrics.SendMetricData(d.metricPusher, metrics.ExportDelete, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.ExportDelete, time.Since(startTimeExport).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FssAllDelete, time.Since(startTime).Seconds(), dimensionsMap) return nil, status.Errorf(codes.Internal, "failed to delete export, exportId: %s, error: %s", *exportSummary.Id, err.Error()) } dimensionsMap[metrics.ComponentDimension] = util.GetMetricDimensionForComponent(util.Success, util.CSIStorageType) - metrics.SendMetricData(d.metricPusher, metrics.ExportDelete, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.ExportDelete, time.Since(startTimeExport).Seconds(), dimensionsMap) log.Info("Export is deleted.") } } else { log.Info("filesystem not tagged with exportSetId, skip deleting export") } + startTimeFileSystem := time.Now() log.Info("deleting file system") // last delete File System err = d.client.FSS().DeleteFileSystem(ctx, filesystemOcid) if err != nil { if !client.IsNotFound(err) { - log.With(zap.Error(err)).Error("Failed to delete file system.") + log.With("service", "fss", "verb", "delete", "resource", "fileSystem", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("Failed to delete file system.") dimensionsMap[metrics.ComponentDimension] = util.GetMetricDimensionForComponent(util.GetError(err), util.CSIStorageType) - metrics.SendMetricData(d.metricPusher, metrics.FSSDelete, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FSSDelete, time.Since(startTimeFileSystem).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FssAllDelete, time.Since(startTime).Seconds(), dimensionsMap) return nil, status.Errorf(codes.Internal, "failed to delete file system, volumeId: %s, error: %s", volumeId, err.Error()) } else { log.Info("File system does not exist") @@ -733,7 +768,8 @@ func (d *FSSControllerDriver) DeleteVolume(ctx context.Context, req *csi.DeleteV } else { log.Info("File system is deleted.") dimensionsMap[metrics.ComponentDimension] = util.GetMetricDimensionForComponent(util.Success, util.CSIStorageType) - metrics.SendMetricData(d.metricPusher, metrics.FSSDelete, time.Since(startTime).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FSSDelete, time.Since(startTimeFileSystem).Seconds(), dimensionsMap) + metrics.SendMetricData(d.metricPusher, metrics.FssAllDelete, time.Since(startTime).Seconds(), dimensionsMap) } return &csi.DeleteVolumeResponse{}, nil } @@ -797,7 +833,8 @@ func (d *FSSControllerDriver) ValidateVolumeCapabilities(ctx context.Context, re log.Info("Fetching filesystem") fileSystem, err := d.client.FSS().GetFileSystem(ctx, filesystemOcid) if err != nil { - log.With(zap.Error(err)).Error("File system not found.") + log.With("service", "fss", "verb", "get", "resource", "fileSystem", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("File system not found.") return nil, status.Errorf(codes.NotFound, "File system not found. error: %s", err.Error()) } @@ -824,7 +861,8 @@ func (d *FSSControllerDriver) ValidateVolumeCapabilities(ctx context.Context, re log.Info("filesystem tagged with mount target ocid, getting mount target") mountTarget, err = d.client.FSS().GetMountTarget(ctx, mountTargetOCID) if err != nil && !client.IsNotFound(err) { - log.With(zap.Error(err)).Error("failed to get mount target") + log.With("service", "fss", "verb", "get", "resource", "mountTarget", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("failed to get mount target") return nil, status.Errorf(codes.NotFound, "failed to get mount target, error: %s", err.Error()) } } @@ -834,7 +872,8 @@ func (d *FSSControllerDriver) ValidateVolumeCapabilities(ctx context.Context, re log = log.With("mountTargetIpId", mountTargetIpId) privateIpObject, err := d.client.Networking().GetPrivateIP(ctx, mountTargetIpId) if err != nil { - log.With(zap.Error(err)).Errorf("Failed to fetch Mount Target Private IP from IP ID: %s", mountTargetIpId) + log.With("service", "vcn", "verb", "get", "resource", "privateIp", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Errorf("Failed to fetch Mount Target Private IP from IP ID: %s", mountTargetIpId) return nil, status.Errorf(codes.NotFound, "Failed to fetch Mount Target Private IP from IP ID: %s, error: %s", mountTargetIpId, err.Error()) } mountTargetIp := *privateIpObject.IpAddress @@ -853,7 +892,8 @@ func (d *FSSControllerDriver) ValidateVolumeCapabilities(ctx context.Context, re log.Infof("searching export with tagged exportSetId %s", exportSetId) exportSummary, err = d.client.FSS().FindExport(ctx, filesystemOcid, exportPath, exportSetId) if err != nil { - log.With(zap.Error(err)).Error("export not found.") + log.With("service", "fss", "verb", "get", "resource", "export", "statusCode", util.GetHttpStatusCode(err)). + With(zap.Error(err)).Error("export not found.") return nil, status.Errorf(codes.NotFound, "export not found. error: %s", err.Error()) } } diff --git a/pkg/csi/driver/fss_controller_test.go b/pkg/csi/driver/fss_controller_test.go index 37ce5e051f..9ff3556b56 100644 --- a/pkg/csi/driver/fss_controller_test.go +++ b/pkg/csi/driver/fss_controller_test.go @@ -29,6 +29,7 @@ import ( "github.com/oracle/oci-go-sdk/v65/filestorage" "github.com/pkg/errors" "go.uber.org/zap" + authv1 "k8s.io/api/authentication/v1" "k8s.io/client-go/kubernetes" ) @@ -192,7 +193,7 @@ func (m MockFSSProvisionerClient) Compute() client.ComputeInterface { return &MockComputeClient{} } -func (m MockFSSProvisionerClient) LoadBalancer(s string) client.GenericLoadBalancerInterface { +func (m MockFSSProvisionerClient) LoadBalancer(*zap.SugaredLogger, string, string, *authv1.TokenRequest) client.GenericLoadBalancerInterface { return &MockLoadBalancerClient{} } diff --git a/pkg/csi/driver/fss_node.go b/pkg/csi/driver/fss_node.go index 473efb57ee..1615406175 100644 --- a/pkg/csi/driver/fss_node.go +++ b/pkg/csi/driver/fss_node.go @@ -20,8 +20,10 @@ import ( "os" "strconv" "strings" + "time" "go.uber.org/zap" + "golang.org/x/sync/semaphore" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" kubeAPI "k8s.io/api/core/v1" @@ -33,10 +35,13 @@ import ( ) const ( - mountPath = "mount" - FipsEnabled = "1" + mountPath = "mount" + FipsEnabled = "1" + fssUnmountSemaphoreTimeout = time.Second * 30 ) +var fssUnmountSemaphore = semaphore.NewWeighted(int64(4)) + // NodeStageVolume mounts the volume to a staging path on the node. func (d FSSNodeDriver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error) { if req.VolumeId == "" { @@ -111,7 +116,7 @@ func (d FSSNodeDriver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVo mountPoint, err := isMountPoint(mounter, targetPath) if err != nil { if os.IsNotExist(err) { - logger.With("StagingTargetPath", targetPath).Infof("mount point does not exist") + logger.With("StagingTargetPath", targetPath).Infof("Mount point does not pre-exist, creating now.") // k8s v1.20+ will not create the TargetPath directory // https://github.com/kubernetes/kubernetes/pull/88759 // if the path exists already (= 500 { return Err5XX } else if status >= 400 { - if strings.Contains(cause, "Service error:LimitExceeded") { + if strings.Contains(cause, "LimitExceeded") { return ErrLimitExceeded } if status == 429 { @@ -106,3 +106,16 @@ func GetMetricDimensionForComponent(err string, component string) string { } return fmt.Sprintf("%s_%s", component, err) } + +func GetHttpStatusCode(err error) int { + statusCode := 200 + err = metricErrors.Cause(err) + if err != nil { + if serviceErr, ok := err.(common.ServiceError); ok { + statusCode = serviceErr.GetHTTPStatusCode() + } else { + statusCode = 555 // ¯\_(ツ)_/¯ + } + } + return statusCode +} diff --git a/pkg/util/commons_test.go b/pkg/util/commons_test.go index 247b0cb83a..6fac818d68 100644 --- a/pkg/util/commons_test.go +++ b/pkg/util/commons_test.go @@ -74,18 +74,34 @@ func TestGetError(t *testing.T) { err: errors.New("Service error:InvalidParameter. error foo. http status code: 429. foo"), expectedError: Err429, }, + "429_UpperCase": { + err: errors.New("Service error:InvalidParameter. error foo. Http Status Code: 429. foo"), + expectedError: Err429, + }, "4xx": { err: errors.New("Service error:InvalidParameter. error foo. http status code: 400. foo"), expectedError: Err4XX, }, + "4xx_UpperCase": { + err: errors.New("Service error:InvalidParameter. error foo. Http Status Code: 400. foo"), + expectedError: Err4XX, + }, "5xx": { err: errors.New("Service error:InternalError. error bar. http status code: 500. bar"), expectedError: Err5XX, }, - "LimitError": { + "5xx_UpperCase": { + err: errors.New("Service error:InternalError. error bar. Http Status Code: 500. bar"), + expectedError: Err5XX, + }, + "LimitError_AsServiceError": { err: errors.New("Service error:LimitExceeded. error bar. http status code: 400. foo "), expectedError: ErrLimitExceeded, }, + "LimitError_AsErrorCode": { + err: errors.New("Http Status Code: 400. Error Code: LimitExceeded. Opc request id: "), + expectedError: ErrLimitExceeded, + }, "ContextTimeoutError": { err: errors2.Wrap(errors2.Wrap(errors2.WithStack(wait.ErrWaitTimeout), "Bar"), "Foo"), expectedError: ErrCtxTimeout, diff --git a/pkg/util/disk/iscsi.go b/pkg/util/disk/iscsi.go index 9f10b5661a..0f827aab33 100644 --- a/pkg/util/disk/iscsi.go +++ b/pkg/util/disk/iscsi.go @@ -23,7 +23,6 @@ import ( "strconv" "go.uber.org/zap" - "k8s.io/kubernetes/pkg/volume/util/hostutil" "k8s.io/mount-utils" "k8s.io/utils/exec" ) @@ -89,6 +88,8 @@ type Interface interface { UnmountPath(path string) error Resize(devicePath string, volumePath string) (bool, error) + + GetDiskFormat(devicePath string) (string, error) } // iSCSIMounter implements Interface. @@ -103,7 +104,7 @@ type iSCSIMounter struct { logger *zap.SugaredLogger } -//Disk interface +// Disk interface type Disk struct { IQN string IPv4 string @@ -137,7 +138,7 @@ func New(logger *zap.SugaredLogger, iqn, ipv4 string, port int) Interface { return newWithMounter(logger, mount.New(mountCommand), iqn, ipv4, port) } -//NewFromISCSIDisk creates a new iSCSI handler from ISCSIDisk. +// NewFromISCSIDisk creates a new iSCSI handler from ISCSIDisk. func NewFromISCSIDisk(logger *zap.SugaredLogger, sd *Disk) Interface { return &iSCSIMounter{ disk: sd, @@ -372,6 +373,10 @@ func formatAndMount(source string, target string, fstype string, options []strin return sm.FormatAndMount(source, target, fstype, options) } +func (c *iSCSIMounter) GetDiskFormat(disk string) (string, error) { + return getDiskFormat(c.runner, disk, c.logger) +} + func (c *iSCSIMounter) Mount(source string, target string, fstype string, options []string) error { safeMounter := &mount.SafeFormatAndMount{ Interface: c.mounter, @@ -388,20 +393,6 @@ func (c *iSCSIMounter) DeviceOpened(pathname string) (bool, error) { return deviceOpened(pathname, c.logger) } -func deviceOpened(pathname string, logger *zap.SugaredLogger) (bool, error) { - hostUtil := hostutil.NewHostUtil() - exists, err := hostUtil.PathExists(pathname) - if err != nil { - logger.With(zap.Error(err)).Errorf("Failed to find is path exists %s", pathname) - return false, err - } - if !exists { - logger.Infof("Path does not exist %s", pathname) - return false, nil - } - return hostUtil.DeviceOpened(pathname) -} - func (c *iSCSIMounter) UnmountPath(path string) error { return UnmountPath(c.logger, path, c.mounter) } diff --git a/pkg/util/disk/mount_helper.go b/pkg/util/disk/mount_helper.go new file mode 100644 index 0000000000..7dc4b512d2 --- /dev/null +++ b/pkg/util/disk/mount_helper.go @@ -0,0 +1,218 @@ +/* +Copyright 2014 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 disk + +import ( + "fmt" + "os" + "os/exec" + "strings" + "time" + + "go.uber.org/zap" + "k8s.io/kubernetes/pkg/volume/util/hostutil" + "k8s.io/mount-utils" + utilexec "k8s.io/utils/exec" +) + +const ( + directoryDeletePollInterval = 5 * time.Second + EncryptedUmountCommand = "encrypt-umount" + + EncryptionMountCommand = "encrypt-mount" +) + +func MountWithEncrypt(logger *zap.SugaredLogger, source string, target string, fstype string, options []string) error { + mountArgs, mountArgsLogStr := MakeMountArgs(source, target, fstype, options) + mountArgsLogStr = EncryptionMountCommand + " " + mountArgsLogStr + + logger.Debug("Mounting cmd (%s) with arguments (%s)", EncryptionMountCommand, mountArgsLogStr) + command := exec.Command(EncryptionMountCommand, mountArgs...) + output, err := command.CombinedOutput() + if err != nil { + if err.Error() == "wait: no child processes" { + if command.ProcessState.Success() { + // We don't consider errNoChildProcesses an error if the process itself succeeded (see - k/k issue #103753). + return nil + } + // Rewrite err with the actual exit error of the process. + err = &exec.ExitError{ProcessState: command.ProcessState} + } + logger.Errorf("Mount failed: %v\nMounting command: %s\nMounting arguments: %s\nOutput: %s\n", err, EncryptionMountCommand, mountArgsLogStr, string(output)) + return fmt.Errorf("mount failed: %v\nMounting command: %s\nMounting arguments: %s\nOutput: %s", + err, EncryptionMountCommand, mountArgsLogStr, string(output)) + } + return err +} + +func MakeMountArgs(source, target, fstype string, options []string) (mountArgs []string, mountArgsLogStr string) { + // Build mount command as follows: + // mount [$mountFlags] [-t $fstype] [-o $options] [$source] $target + mountArgs = []string{} + mountArgsLogStr = "" + + if len(fstype) > 0 { + mountArgs = append(mountArgs, "-t", fstype) + mountArgsLogStr += strings.Join(mountArgs, " ") + } + if len(options) > 0 { + mountArgs = append(mountArgs, "-o", strings.Join(options, ",")) + mountArgsLogStr += " -o " + strings.Join(options, ",") + } + if len(source) > 0 { + mountArgs = append(mountArgs, source) + mountArgsLogStr += " " + source + } + mountArgs = append(mountArgs, target) + mountArgsLogStr += " " + target + + return mountArgs, mountArgsLogStr +} + +// UnmountPath is a common unmount routine that unmounts the given path and +// deletes the remaining directory if successful. +func UnmountPath(logger *zap.SugaredLogger, mountPath string, mounter mount.Interface) error { + if pathExists, pathErr := mount.PathExists(mountPath); pathErr != nil { + return fmt.Errorf("Error checking if path exists: %v", pathErr) + } else if !pathExists { + logger.With("mount path", mountPath).Warn("Unmount skipped because path does not exist.") + return nil + } + + notMnt, err := mounter.IsLikelyNotMountPoint(mountPath) + if err != nil { + return err + } + if notMnt { + logger.With("mount path", mountPath).Warn("Mount path is not a mount point. Removing directory.") + return os.Remove(mountPath) + } + + // Unmount the mount path + if err := mounter.Unmount(mountPath); err != nil { + return err + } + notMnt, mntErr := mounter.IsLikelyNotMountPoint(mountPath) + if mntErr != nil { + return err + } + if notMnt { + logger.With("mount path", mountPath).Info("Mount path is unmounted. Removing directory.") + return WaitForDirectoryDeletion(logger, mountPath) + } + return fmt.Errorf("Failed to unmount path %v", mountPath) +} + +func WaitForDirectoryDeletion(logger *zap.SugaredLogger, mountPath string) error { + var err error + // Try removing the mount path thrice, else suppress the error + for loopCounter := 0; loopCounter < 3; loopCounter += 1 { + if err = os.Remove(mountPath); err != nil { + logger.With("mount path", mountPath, "error", err).Warn("Mount path couldn't be deleted. Trying again...") + time.Sleep(directoryDeletePollInterval) + } else { + logger.With("mount path", mountPath).Info("Mount path deleted.") + return nil + } + } + logger.With("mount path", mountPath, "error", err).Warn("Mount path couldn't be deleted.") + return nil +} + +// Unmount the target that is in-transit encryption enabled +func UnmountWithEncrypt(logger *zap.SugaredLogger, target string) error { + logger.With("target", target).Info("Unmounting.") + command := exec.Command(EncryptedUmountCommand, target) + output, err := command.CombinedOutput() + if err != nil { + logger.With( + zap.Error(err), + "command", EncryptedUmountCommand, + "target", target, + "output", string(output), + ).Error("Unmount failed.") + return fmt.Errorf("Unmount failed: %v\nUnmounting command: %s\nUnmounting arguments: %s\nOutput: %v\n", err, EncryptedUmountCommand, target, string(output)) + } + logger.Debugf("unmount output: %v", string(output)) + return nil +} + +func getDiskFormat(ex utilexec.Interface, disk string, logger *zap.SugaredLogger) (string, error) { + args := []string{"-p", "-s", "TYPE", "-s", "PTTYPE", "-o", "export", disk} + logger.With(disk).Infof("Attempting to determine if disk %q is formatted using blkid with args: %q", disk, args) + dataOut, err := ex.Command("blkid", args...).CombinedOutput() + output := string(dataOut) + logger.Infof("Output: %q", output) + + if err != nil { + if exit, ok := err.(utilexec.ExitError); ok { + if exit.ExitStatus() == 2 { + // Disk device is unformatted. + // For `blkid`, if the specified token (TYPE/PTTYPE, etc) was + // not found, or no (specified) devices could be identified, an + // exit code of 2 is returned. + return "", nil + } + } + logger.With(disk).Errorf("Could not determine if disk %q is formatted (%v)", disk, err) + return "", err + } + + var fstype, pttype string + + lines := strings.Split(output, "\n") + for _, l := range lines { + if len(l) <= 0 { + // Ignore empty line. + continue + } + cs := strings.Split(l, "=") + if len(cs) != 2 { + return "", fmt.Errorf("blkid returns invalid output: %s", output) + } + // TYPE is filesystem type, and PTTYPE is partition table type, according + // to https://www.kernel.org/pub/linux/utils/util-linux/v2.21/libblkid-docs/. + if cs[0] == "TYPE" { + fstype = cs[1] + } else if cs[0] == "PTTYPE" { + pttype = cs[1] + } + } + + if len(pttype) > 0 { + logger.With(disk).Infof("Disk %s detected partition table type: %s", disk, pttype) + // Returns a special non-empty string as filesystem type, then kubelet + // will not format it. + return "unknown data, probably partitions", nil + } + + return fstype, nil +} + +func deviceOpened(pathname string, logger *zap.SugaredLogger) (bool, error) { + hostUtil := hostutil.NewHostUtil() + exists, err := hostUtil.PathExists(pathname) + if err != nil { + logger.With(zap.Error(err)).Errorf("Failed to find is path exists %s", pathname) + return false, err + } + if !exists { + logger.Infof("Path does not exist %s", pathname) + return false, nil + } + return hostUtil.DeviceOpened(pathname) +} diff --git a/pkg/util/disk/mount_helper_test.go b/pkg/util/disk/mount_helper_test.go new file mode 100644 index 0000000000..45d8948a48 --- /dev/null +++ b/pkg/util/disk/mount_helper_test.go @@ -0,0 +1,49 @@ +package disk + +import ( + "reflect" + "testing" +) + +func TestMakeMountArgs(t *testing.T) { + testCases := []struct { + name string + source string + target string + fsType string + options []string + expected []string + }{ + { + name: "mount args for oci-fss with fips", + source: "/source", + target: "/target", + fsType: "oci-fss", + options: []string{"fips"}, + expected: []string{"-t", "oci-fss", "-o", "fips", "/source", "/target"}, + }, + { + name: "mount args for oci-fss without options", + source: "/source", + target: "/target", + fsType: "oci-fss", + expected: []string{"-t", "oci-fss", "/source", "/target"}, + }, + { + name: "mount args for non encrypted mounts", + source: "/source", + target: "/target", + expected: []string{"/source", "/target"}, + }, + } + + for _, tt := range testCases { + t.Run(tt.name, func(t *testing.T) { + + mountArgs, _ := MakeMountArgs(tt.source, tt.target, tt.fsType, tt.options) + if !reflect.DeepEqual(mountArgs, tt.expected) { + t.Errorf("%+v => Expected: %+v Actual: %+v", tt.name, mountArgs, tt.expected) + } + }) + } +} diff --git a/pkg/util/disk/paravirtualized.go b/pkg/util/disk/paravirtualized.go index dcb1a97bd5..865a33fbed 100644 --- a/pkg/util/disk/paravirtualized.go +++ b/pkg/util/disk/paravirtualized.go @@ -30,7 +30,7 @@ type pvMounter struct { logger *zap.SugaredLogger } -//NewFromPVDisk creates a new PV handler from PVDisk. +// NewFromPVDisk creates a new PV handler from PVDisk. func NewFromPVDisk(logger *zap.SugaredLogger) Interface { return &pvMounter{ runner: exec.New(), @@ -97,3 +97,7 @@ func (c *pvMounter) Resize(devicePath string, volumePath string) (bool, error) { resizefs := mount.NewResizeFs(c.runner) return resizefs.Resize(devicePath, volumePath) } + +func (c *pvMounter) GetDiskFormat(disk string) (string, error) { + return getDiskFormat(c.runner, disk, c.logger) +} diff --git a/pkg/util/disk/unmount_helper.go b/pkg/util/disk/unmount_helper.go deleted file mode 100644 index 444c2b2e73..0000000000 --- a/pkg/util/disk/unmount_helper.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -Copyright 2014 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 disk - -import ( - "fmt" - "os" - "os/exec" - "time" - - "go.uber.org/zap" - "k8s.io/mount-utils" -) - -const ( - directoryDeletePollInterval = 5 * time.Second - EncryptedUmountCommand = "umount.oci-fss" -) - -// UnmountPath is a common unmount routine that unmounts the given path and -// deletes the remaining directory if successful. -func UnmountPath(logger *zap.SugaredLogger, mountPath string, mounter mount.Interface) error { - if pathExists, pathErr := mount.PathExists(mountPath); pathErr != nil { - return fmt.Errorf("Error checking if path exists: %v", pathErr) - } else if !pathExists { - logger.With("mount path", mountPath).Warn("Unmount skipped because path does not exist.") - return nil - } - - notMnt, err := mounter.IsLikelyNotMountPoint(mountPath) - if err != nil { - return err - } - if notMnt { - logger.With("mount path", mountPath).Warn("Mount path is not a mount point. Removing directory.") - return os.Remove(mountPath) - } - - // Unmount the mount path - if err := mounter.Unmount(mountPath); err != nil { - return err - } - notMnt, mntErr := mounter.IsLikelyNotMountPoint(mountPath) - if mntErr != nil { - return err - } - if notMnt { - logger.With("mount path", mountPath).Info("Mount path is unmounted. Removing directory.") - return WaitForDirectoryDeletion(logger, mountPath) - } - return fmt.Errorf("Failed to unmount path %v", mountPath) -} - -func WaitForDirectoryDeletion(logger *zap.SugaredLogger, mountPath string) error { - var err error - // Try removing the mount path thrice, else suppress the error - for loopCounter := 0; loopCounter < 3; loopCounter += 1 { - if err = os.Remove(mountPath); err != nil { - logger.With("mount path", mountPath, "error", err).Warn("Mount path couldn't be deleted. Trying again...") - time.Sleep(directoryDeletePollInterval) - } else { - logger.With("mount path", mountPath).Info("Mount path deleted.") - return nil - } - } - logger.With("mount path", mountPath, "error", err).Warn("Mount path couldn't be deleted.") - return nil -} - -// Unmount the target that is in-transit encryption enabled -func UnmountWithEncrypt(logger *zap.SugaredLogger, target string) error { - logger.With("target", target).Info("Unmounting.") - command := exec.Command(EncryptedUmountCommand, target) - output, err := command.CombinedOutput() - if err != nil { - logger.With( - zap.Error(err), - "command", EncryptedUmountCommand, - "target", target, - "output", string(output), - ).Error("Unmount failed.") - return fmt.Errorf("Unmount failed: %v\nUnmounting command: %s\nUnmounting arguments: %s\nOutput: %v\n", err, EncryptedUmountCommand, target, string(output)) - } - logger.Debugf("unmount output: %v", string(output)) - return nil -} diff --git a/pkg/volume/provisioner/block/block_test.go b/pkg/volume/provisioner/block/block_test.go index 875f8ca0e7..6f1171478b 100644 --- a/pkg/volume/provisioner/block/block_test.go +++ b/pkg/volume/provisioner/block/block_test.go @@ -26,6 +26,7 @@ import ( "github.com/oracle/oci-go-sdk/v65/filestorage" "github.com/oracle/oci-go-sdk/v65/identity" "go.uber.org/zap" + authv1 "k8s.io/api/authentication/v1" v1 "k8s.io/api/core/v1" v12 "k8s.io/api/storage/v1" "k8s.io/apimachinery/pkg/api/resource" @@ -54,6 +55,11 @@ type MockBlockStorageClient struct { VolumeState core.VolumeLifecycleStateEnum } +// AwaitVolumeCloneAvailableOrTimeout implements client.BlockStorageInterface. +func (c *MockBlockStorageClient) AwaitVolumeCloneAvailableOrTimeout(ctx context.Context, id string) (*core.Volume, error) { + return &core.Volume{}, nil +} + func (c *MockBlockStorageClient) AwaitVolumeAvailableORTimeout(ctx context.Context, id string) (*core.Volume, error) { return &core.Volume{ Id: &id, @@ -90,7 +96,7 @@ func (c *MockBlockStorageClient) AwaitVolumeBackupAvailableOrTimeout(ctx context func (c *MockBlockStorageClient) CreateVolumeBackup(ctx context.Context, details core.CreateVolumeBackupDetails) (*core.VolumeBackup, error) { id := "oc1.volumebackup1.xxxx" return &core.VolumeBackup{ - Id: &id, + Id: &id, }, nil } @@ -100,7 +106,7 @@ func (c *MockBlockStorageClient) DeleteVolumeBackup(ctx context.Context, id stri func (c *MockBlockStorageClient) GetVolumeBackup(ctx context.Context, id string) (*core.VolumeBackup, error) { return &core.VolumeBackup{ - Id: &id, + Id: &id, }, nil } @@ -328,7 +334,7 @@ func (p *MockProvisionerClient) Networking() client.NetworkingInterface { } // Networking mocks client VirtualNetwork implementation. -func (p *MockProvisionerClient) LoadBalancer(string) client.GenericLoadBalancerInterface { +func (p *MockProvisionerClient) LoadBalancer(*zap.SugaredLogger, string, string, *authv1.TokenRequest) client.GenericLoadBalancerInterface { return &MockLoadBalancerClient{} } diff --git a/pkg/volume/provisioner/fss/fss_test.go b/pkg/volume/provisioner/fss/fss_test.go index 4a5188f57e..60444deedb 100644 --- a/pkg/volume/provisioner/fss/fss_test.go +++ b/pkg/volume/provisioner/fss/fss_test.go @@ -19,7 +19,10 @@ import ( "testing" "time" + authv1 "k8s.io/api/authentication/v1" + v1 "k8s.io/api/core/v1" v12 "k8s.io/api/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/oracle/oci-cloud-controller-manager/pkg/oci/client" "github.com/oracle/oci-go-sdk/v65/common" @@ -28,8 +31,6 @@ import ( "github.com/oracle/oci-go-sdk/v65/identity" "go.uber.org/zap" "go.uber.org/zap/zaptest" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/sig-storage-lib-external-provisioner/v8/controller" ) @@ -54,6 +55,11 @@ type MockBlockStorageClient struct { VolumeState core.VolumeLifecycleStateEnum } +// AwaitVolumeCloneAvailableOrTimeout implements client.BlockStorageInterface. +func (*MockBlockStorageClient) AwaitVolumeCloneAvailableOrTimeout(ctx context.Context, id string) (*core.Volume, error) { + return &core.Volume{}, nil +} + func (c *MockBlockStorageClient) AwaitVolumeAvailableORTimeout(ctx context.Context, id string) (*core.Volume, error) { return &core.Volume{ Id: &id, @@ -90,7 +96,7 @@ func (c *MockBlockStorageClient) AwaitVolumeBackupAvailableOrTimeout(ctx context func (c *MockBlockStorageClient) CreateVolumeBackup(ctx context.Context, details core.CreateVolumeBackupDetails) (*core.VolumeBackup, error) { id := "oc1.volumebackup1.xxxx" return &core.VolumeBackup{ - Id: &id, + Id: &id, }, nil } @@ -100,7 +106,7 @@ func (c *MockBlockStorageClient) DeleteVolumeBackup(ctx context.Context, id stri func (c *MockBlockStorageClient) GetVolumeBackup(ctx context.Context, id string) (*core.VolumeBackup, error) { return &core.VolumeBackup{ - Id: &id, + Id: &id, }, nil } @@ -327,7 +333,7 @@ func (p *MockProvisionerClient) Networking() client.NetworkingInterface { } // Networking mocks client VirtualNetwork implementation. -func (p *MockProvisionerClient) LoadBalancer(string) client.GenericLoadBalancerInterface { +func (p *MockProvisionerClient) LoadBalancer(*zap.SugaredLogger, string, string, *authv1.TokenRequest) client.GenericLoadBalancerInterface { return &MockLoadBalancerClient{} } diff --git a/scripts/encrypt-mount b/scripts/encrypt-mount new file mode 100644 index 0000000000..dda8a404aa --- /dev/null +++ b/scripts/encrypt-mount @@ -0,0 +1,2 @@ +#!/bin/sh +chroot /host /usr/bin/bash -c 'export SYSTEMCTL_FORCE_BUS=1; mount $0' "$*" diff --git a/scripts/encrypt-umount b/scripts/encrypt-umount new file mode 100644 index 0000000000..ab29ef3851 --- /dev/null +++ b/scripts/encrypt-umount @@ -0,0 +1,2 @@ +#!/bin/sh +chroot /host /usr/bin/bash -c 'export SYSTEMCTL_FORCE_BUS=1; umount.oci-fss $0' "$*" diff --git a/scripts/rpm-host b/scripts/rpm-host new file mode 100644 index 0000000000..a945b472b9 --- /dev/null +++ b/scripts/rpm-host @@ -0,0 +1,2 @@ +#!/bin/sh +chroot /host rpm "$@" diff --git a/test/e2e/cloud-provider-oci/csi_volume_cloning.go b/test/e2e/cloud-provider-oci/csi_volume_cloning.go new file mode 100644 index 0000000000..1e0ef125c4 --- /dev/null +++ b/test/e2e/cloud-provider-oci/csi_volume_cloning.go @@ -0,0 +1,232 @@ +package e2e + +import ( + "time" + + . "github.com/onsi/ginkgo" + + csi_util "github.com/oracle/oci-cloud-controller-manager/pkg/csi-util" + "github.com/oracle/oci-cloud-controller-manager/test/e2e/framework" + v1 "k8s.io/api/core/v1" +) + +var _ = Describe("CSI Volume Creation with PVC datasource", func() { + f := framework.NewDefaultFramework("csi-volume-cloning") + Context("[cloudprovider][storage][csi][cloning]", func() { + It("Create PVC with source PVC name specified in dataSource", func() { + pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-cloning-basic") + + scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + srcPvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + srcPod := pvcJig.NewPodForCSI("app1", f.Namespace.Name, srcPvc.Name, setupF.AdLabel) + + time.Sleep(60 * time.Second) // Wait for data to be written to source PV + + clonePvc := pvcJig.CreateAndAwaitClonePVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, srcPvc.Name, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + + clonePod := pvcJig.NewPodForCSIClone("app2", f.Namespace.Name, clonePvc.Name, setupF.AdLabel) + pvcJig.CheckFileExists(f.Namespace.Name, clonePod, "/data", "testdata.txt") + pvcJig.CheckFileCorruption(f.Namespace.Name, clonePod, "/data", "testdata.txt") + pvcJig.DeleteAndAwaitPod(f.Namespace.Name, srcPod) + pvcJig.DeleteAndAwaitPVC(f.Namespace.Name, srcPvc.Name) + pvcJig.DeleteAndAwaitPod(f.Namespace.Name, clonePod) + pvcJig.DeleteAndAwaitPVC(f.Namespace.Name, clonePvc.Name) + }) + }) + + Context("[cloudprovider][storage][csi][cloning][expand]", func() { + It("Create Clone PVC with size greater than the source PVC", func() { + pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-volume-size-test") + + scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + srcPvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + pvcJig.NewPodForCSI("app1", f.Namespace.Name, srcPvc.Name, setupF.AdLabel) + + time.Sleep(60 * time.Second) // Wait for data to be written to source PV + + clonePvc := pvcJig.CreateAndAwaitClonePVCOrFailCSI(f.Namespace.Name, framework.MaxVolumeBlock, scName, srcPvc.Name, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + + clonePod := pvcJig.NewPodForCSIClone("app2", f.Namespace.Name, clonePvc.Name, setupF.AdLabel) + + pvcJig.CheckFileExists(f.Namespace.Name, clonePod, "/data", "testdata.txt") + pvcJig.CheckVolumeCapacity(framework.MaxVolumeBlock, clonePvc.Name, f.Namespace.Name) + pvcJig.CheckFileCorruption(f.Namespace.Name, clonePod, "/data", "testdata.txt") + pvcJig.CheckExpandedVolumeReadWrite(f.Namespace.Name, clonePod) + pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, clonePod, "98") + }) + }) + + Context("[cloudprovider][storage][csi][cloning]", func() { + It("Should be able to create a clone volume with in-transit encryption", func() { + pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-cloning-cmek-iscsi-in-transit-e2e-tests") + scParameter := map[string]string{ + framework.KmsKey: setupF.CMEKKMSKey, + framework.AttachmentType: framework.AttachmentTypeParavirtualized, + } + scName := f.CreateStorageClassOrFail(framework.ClassOCIKMS, "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + srcPvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + srcPod := pvcJig.NewPodForCSI("app1", f.Namespace.Name, srcPvc.Name, setupF.AdLabel) + pvcJig.CheckCMEKKey(f.Client.BlockStorage(), srcPvc.Name, f.Namespace.Name, setupF.CMEKKMSKey) + pvcJig.CheckAttachmentTypeAndEncryptionType(f.Client.Compute(), srcPvc.Name, f.Namespace.Name, srcPod, framework.AttachmentTypeParavirtualized) + + time.Sleep(60 * time.Second) // Wait for data to be written to source PV + + clonePvc := pvcJig.CreateAndAwaitClonePVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, srcPvc.Name, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + clonePod := pvcJig.NewPodForCSIClone("app2", f.Namespace.Name, clonePvc.Name, setupF.AdLabel) + + pvcJig.CheckFileExists(f.Namespace.Name, clonePod, "/data", "testdata.txt") + pvcJig.CheckFileCorruption(f.Namespace.Name, clonePod, "/data", "testdata.txt") + pvcJig.CheckCMEKKey(f.Client.BlockStorage(), clonePvc.Name, f.Namespace.Name, setupF.CMEKKMSKey) + pvcJig.CheckAttachmentTypeAndEncryptionType(f.Client.Compute(), clonePvc.Name, f.Namespace.Name, clonePod, framework.AttachmentTypeParavirtualized) + + f.VolumeIds = append(f.VolumeIds, srcPvc.Spec.VolumeName, clonePvc.Spec.VolumeName) + _ = f.DeleteStorageClass(framework.ClassOCIKMS) + }) + }) + + Context("[cloudprovider][storage][csi][cloning]", func() { + It("Create PVC with source PVC name specified in dataSource - ISCSI", func() { + pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-cloning-iscsi-test") + + scParameter := map[string]string{ + framework.KmsKey: setupF.CMEKKMSKey, + framework.AttachmentType: framework.AttachmentTypeISCSI, + } + scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + srcPvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + pvcJig.NewPodForCSI("app1", f.Namespace.Name, srcPvc.Name, setupF.AdLabel) + + time.Sleep(60 * time.Second) // Wait for data to be written to source PV + + clonePvc := pvcJig.CreateAndAwaitClonePVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, srcPvc.Name, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + + clonePod := pvcJig.NewPodForCSIClone("app2", f.Namespace.Name, clonePvc.Name, setupF.AdLabel) + pvcJig.CheckFileExists(f.Namespace.Name, clonePod, "/data", "testdata.txt") + pvcJig.CheckFileCorruption(f.Namespace.Name, clonePod, "/data", "testdata.txt") + }) + }) + + Context("[cloudprovider][storage][csi][cloning]", func() { + It("Create PVC with source PVC name specified in dataSource - ParaVirtualized", func() { + pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-cloning-pv") + + scParameter := map[string]string{ + framework.KmsKey: setupF.CMEKKMSKey, + framework.AttachmentType: framework.AttachmentTypeParavirtualized, + } + scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + srcPvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + pvcJig.NewPodForCSI("app1", f.Namespace.Name, srcPvc.Name, setupF.AdLabel) + + time.Sleep(60 * time.Second) // Wait for data to be written to source PV + + clonePvc := pvcJig.CreateAndAwaitClonePVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, srcPvc.Name, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + + clonePod := pvcJig.NewPodForCSIClone("app2", f.Namespace.Name, clonePvc.Name, setupF.AdLabel) + pvcJig.CheckFileExists(f.Namespace.Name, clonePod, "/data", "testdata.txt") + pvcJig.CheckFileCorruption(f.Namespace.Name, clonePod, "/data", "testdata.txt") + }) + }) +}) + +var _ = Describe("CSI Volume Cloning with different storage classes", func() { + f := framework.NewBackupFramework("csi-cloning-sc") + Context("[cloudprovider][storage][csi][cloning]", func() { + It("Should be able to create a clone with different storage class than the source volume - different vpusPerGB", func() { + pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-volume-sc-test") + + scParameters1 := map[string]string{ + framework.AttachmentType: framework.AttachmentTypeISCSI, + csi_util.VpusPerGB: "20", + } + scName1 := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", scParameters1, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + srcPvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName1, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + pvcJig.NewPodForCSI("app1", f.Namespace.Name, srcPvc.Name, setupF.AdLabel) + + time.Sleep(60 * time.Second) // Wait for data to be written to source PV + + scParameters2 := map[string]string{ + framework.AttachmentType: framework.AttachmentTypeISCSI, + csi_util.VpusPerGB: "0", + } + scName2 := f.CreateStorageClassOrFail(framework.ClassOCILowCost, "blockvolume.csi.oraclecloud.com", scParameters2, pvcJig.Labels, "Immediate", true, "Delete", nil) + clonePvc := pvcJig.CreateAndAwaitClonePVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName2, srcPvc.Name, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + + clonePod := pvcJig.NewPodForCSIClone("app2", f.Namespace.Name, clonePvc.Name, setupF.AdLabel) + pvcJig.CheckFileExists(f.Namespace.Name, clonePod, "/data", "testdata.txt") + pvcJig.CheckFileCorruption(f.Namespace.Name, clonePod, "/data", "testdata.txt") + pvcJig.CheckAttachmentTypeAndEncryptionType(f.Client.Compute(), clonePvc.Name, f.Namespace.Name, clonePod, framework.AttachmentTypeISCSI) + pvcJig.CheckVolumePerformanceLevel(f.BlockStorageClient, clonePvc.Namespace, clonePvc.Name, csi_util.LowCostPerformanceOption) + }) + }) +}) + +var _ = Describe("CSI Volume Cloning with static source Volume", func() { + f := framework.NewBackupFramework("csi-static-cloning") + Context("[cloudprovider][storage][csi][static][cloning]", func() { + It("Create Clone PVC from a statically created source volume", func() { + pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-static-cloning-test") + + scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", + nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + + compartmentId := "" + if setupF.Compartment1 != "" { + compartmentId = setupF.Compartment1 + } else if f.CloudProviderConfig.CompartmentID != "" { + compartmentId = f.CloudProviderConfig.CompartmentID + } else if f.CloudProviderConfig.Auth.CompartmentID != "" { + compartmentId = f.CloudProviderConfig.Auth.CompartmentID + } else { + framework.Failf("Compartment Id undefined.") + } + srcPvc, volumeId := pvcJig.CreateAndAwaitStaticPVCOrFailCSI(f.BlockStorageClient, f.Namespace.Name, framework.MinVolumeBlock, 10, scName, setupF.AdLocation, compartmentId, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + f.VolumeIds = append(f.VolumeIds, srcPvc.Spec.VolumeName) + pvcJig.NewPodForCSI("app1", f.Namespace.Name, srcPvc.Name, setupF.AdLabel) + + time.Sleep(90 * time.Second) //waiting for pod to up and running + pvcJig.CheckVolumeCapacity("50Gi", srcPvc.Name, f.Namespace.Name) + + clonePvc := pvcJig.CreateAndAwaitClonePVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, srcPvc.Name, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + clonePod := pvcJig.NewPodForCSIClone("app2", f.Namespace.Name, clonePvc.Name, setupF.AdLabel) + pvcJig.CheckFileExists(f.Namespace.Name, clonePod, "/data", "testdata.txt") + pvcJig.CheckFileCorruption(f.Namespace.Name, clonePod, "/data", "testdata.txt") + + f.VolumeIds = append(f.VolumeIds, volumeId) + }) + }) +}) + +var _ = Describe("CSI Volume Cloning Performance Level", func() { + f := framework.NewBackupFramework("csi-cloning-perf") + Context("[cloudprovider][storage][csi][cloning]", func() { + It("Create high performance clone from a low performance source volume", func() { + pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-cloning-perf-test") + + scName1 := f.CreateStorageClassOrFail(framework.ClassOCILowCost, "blockvolume.csi.oraclecloud.com", + map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "0"}, + pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) + srcPvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName1, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + pvcJig.NewPodForCSI("low-cost-source-pvc-app", f.Namespace.Name, srcPvc.Name, setupF.AdLabel) + + time.Sleep(60 * time.Second) //waiting for pod to up and running + + pvcJig.CheckVolumePerformanceLevel(f.BlockStorageClient, srcPvc.Namespace, srcPvc.Name, csi_util.LowCostPerformanceOption) + + scName2 := f.CreateStorageClassOrFail(framework.ClassOCIHigh, "blockvolume.csi.oraclecloud.com", + map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "20"}, + pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) + clonePvc := pvcJig.CreateAndAwaitClonePVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName2, srcPvc.Name, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + clonePod := pvcJig.NewPodForCSIClone("high-cost-clone-pvc-app", f.Namespace.Name, clonePvc.Name, setupF.AdLabel) + + time.Sleep(60 * time.Second) //waiting for pod to up and running + + pvcJig.CheckFileExists(f.Namespace.Name, clonePod, "/data", "testdata.txt") + pvcJig.CheckFileCorruption(f.Namespace.Name, clonePod, "/data", "testdata.txt") + pvcJig.CheckVolumePerformanceLevel(f.BlockStorageClient, clonePvc.Namespace, clonePvc.Name, csi_util.HigherPerformanceOption) + + f.VolumeIds = append(f.VolumeIds, srcPvc.Spec.VolumeName) + _ = f.DeleteStorageClass(framework.ClassOCILowCost) + }) + }) +}) diff --git a/test/e2e/cloud-provider-oci/csi_volume_creation.go b/test/e2e/cloud-provider-oci/csi_volume_creation.go index 79fc8a5d76..003c016290 100644 --- a/test/e2e/cloud-provider-oci/csi_volume_creation.go +++ b/test/e2e/cloud-provider-oci/csi_volume_creation.go @@ -16,9 +16,10 @@ package e2e import ( "fmt" - v1 "k8s.io/api/core/v1" "time" + v1 "k8s.io/api/core/v1" + . "github.com/onsi/ginkgo" csi_util "github.com/oracle/oci-cloud-controller-manager/pkg/csi-util" "github.com/oracle/oci-cloud-controller-manager/test/e2e/framework" diff --git a/test/e2e/cloud-provider-oci/fss_dynamic.go b/test/e2e/cloud-provider-oci/fss_dynamic.go index 228795daa5..da2c922c35 100644 --- a/test/e2e/cloud-provider-oci/fss_dynamic.go +++ b/test/e2e/cloud-provider-oci/fss_dynamic.go @@ -463,7 +463,7 @@ var _ = Describe("Dynamic FSS test with mount options", func() { It("Basic Dynamic FSS test with mount options", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - mountOptions := []string{"hard"} // TODO : Add other mount options once OKE-22216 is Done. + mountOptions := []string{"hard"} scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", mountOptions) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) diff --git a/test/e2e/cloud-provider-oci/load_balancer.go b/test/e2e/cloud-provider-oci/load_balancer.go index f6a5a3d75c..d8d1372282 100644 --- a/test/e2e/cloud-provider-oci/load_balancer.go +++ b/test/e2e/cloud-provider-oci/load_balancer.go @@ -25,6 +25,8 @@ import ( . "github.com/onsi/gomega" cloudprovider "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci" sharedfw "github.com/oracle/oci-cloud-controller-manager/test/e2e/framework" + + "go.uber.org/zap" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" @@ -757,7 +759,7 @@ var _ = Describe("Configure preservation of source IP in NLB", func() { } else { sharedfw.Failf("Compartment Id undefined.") } - loadBalancer, err := f.Client.LoadBalancer(test.lbType).GetLoadBalancerByName(ctx, compartmentId, lbName) + loadBalancer, err := f.Client.LoadBalancer(zap.L().Sugar(), test.lbType, "", nil).GetLoadBalancerByName(ctx, compartmentId, lbName) sharedfw.ExpectNoError(err) By("Validate isPreserveSource in the backend set is as expected") @@ -883,7 +885,7 @@ var _ = Describe("LB Properties", func() { } else { sharedfw.Failf("Compartment Id undefined.") } - loadBalancer, err := f.Client.LoadBalancer(test.lbType).GetLoadBalancerByName(ctx, compartmentId, lbName) + loadBalancer, err := f.Client.LoadBalancer(zap.L().Sugar(), test.lbType, "", nil).GetLoadBalancerByName(ctx, compartmentId, lbName) sharedfw.ExpectNoError(err) err = f.VerifyHealthCheckConfig(*loadBalancer.Id, 1, 1000, test.CreateInterval, test.lbType) sharedfw.ExpectNoError(err) @@ -1033,7 +1035,7 @@ var _ = Describe("LB Properties", func() { lbName := cloudprovider.GetLoadBalancerName(tcpService) ctx := context.TODO() - loadBalancer, err := f.Client.LoadBalancer("lb").GetLoadBalancerByName(ctx, compartmentId, lbName) + loadBalancer, err := f.Client.LoadBalancer(zap.L().Sugar(), "lb", "", nil).GetLoadBalancerByName(ctx, compartmentId, lbName) sharedfw.ExpectNoError(err) sharedfw.Logf("Actual Load Balancer Shape: %s, Expected shape: %s", *loadBalancer.ShapeName, lbShapeTest.initialShape) Expect(strings.Compare(*loadBalancer.ShapeName, lbShapeTest.initialShape) == 0).To(BeTrue()) @@ -1118,7 +1120,7 @@ var _ = Describe("LB Properties", func() { } else { sharedfw.Failf("Compartment Id undefined.") } - loadBalancer, err := f.Client.LoadBalancer("lb").GetLoadBalancerByName(ctx, compartmentId, lbName) + loadBalancer, err := f.Client.LoadBalancer(zap.L().Sugar(), "lb", "", nil).GetLoadBalancerByName(ctx, compartmentId, lbName) sharedfw.ExpectNoError(err) err = f.VerifyLoadBalancerConnectionIdleTimeout(*loadBalancer.Id, 500) sharedfw.ExpectNoError(err) @@ -1245,7 +1247,7 @@ var _ = Describe("LB Properties", func() { sharedfw.Failf("Compartment Id undefined.") } - loadBalancer, err := f.Client.LoadBalancer(test.lbtype).GetLoadBalancerByName(ctx, compartmentId, lbName) + loadBalancer, err := f.Client.LoadBalancer(zap.L().Sugar(), test.lbtype, "", nil).GetLoadBalancerByName(ctx, compartmentId, lbName) sharedfw.ExpectNoError(err) By("waiting upto 5m0s to verify whether LB has been created with provided initial NSGs through config") err = f.WaitForLoadBalancerNSGChange(loadBalancer, []string{nsgIds}, test.lbtype) @@ -1360,7 +1362,7 @@ var _ = Describe("LB Properties", func() { sharedfw.Failf("Compartment Id undefined.") } - loadBalancer, err := f.Client.LoadBalancer(test.lbType).GetLoadBalancerByName(ctx, compartmentId, lbName) + loadBalancer, err := f.Client.LoadBalancer(zap.L().Sugar(), test.lbType, "", nil).GetLoadBalancerByName(ctx, compartmentId, lbName) sharedfw.ExpectNoError(err) err = f.VerifyLoadBalancerPolicy(*loadBalancer.Id, test.CreationAnnotations[test.PolicyAnnotation], test.lbType) @@ -1456,7 +1458,7 @@ var _ = Describe("LB Properties", func() { sharedfw.Failf("Compartment Id undefined.") } - loadBalancer, err := f.Client.LoadBalancer(test.lbtype).GetLoadBalancerByName(ctx, compartmentId, lbName) + loadBalancer, err := f.Client.LoadBalancer(zap.L().Sugar(), test.lbtype, "", nil).GetLoadBalancerByName(ctx, compartmentId, lbName) sharedfw.ExpectNoError(err) By("waiting upto 5m0s to verify whether LB has been created with public reservedIP") diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 8886633c4c..d2f8d8d747 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -37,6 +37,7 @@ const ( JobCompletionTimeout = 5 * time.Minute deploymentAvailableTimeout = 5 * time.Minute + CloneAvailableTimeout = 10 * time.Minute DefaultClusterKubeconfig = "/tmp/clusterkubeconfig" DefaultCloudConfig = "/tmp/cloudconfig" diff --git a/test/e2e/framework/pvc_util.go b/test/e2e/framework/pvc_util.go index 09ea2ebad2..774434b4ff 100644 --- a/test/e2e/framework/pvc_util.go +++ b/test/e2e/framework/pvc_util.go @@ -44,13 +44,14 @@ import ( ) const ( - KmsKey = "kms-key-id" - AttachmentTypeISCSI = "iscsi" - AttachmentTypeParavirtualized = "paravirtualized" - AttachmentType = "attachment-type" - FstypeKey = "csi.storage.k8s.io/fstype" - DataSourceVolumeSnapshotKind = "VolumeSnapshot" - DataSourceVolumeSnapshotAPIGroup = "snapshot.storage.k8s.io" + KmsKey = "kms-key-id" + AttachmentTypeISCSI = "iscsi" + AttachmentTypeParavirtualized = "paravirtualized" + AttachmentType = "attachment-type" + FstypeKey = "csi.storage.k8s.io/fstype" + DataSourceVolumeSnapshotKind = "VolumeSnapshot" + DataSourceVolumeSnapshotAPIGroup = "snapshot.storage.k8s.io" + DataSourceVolumePVCKind = "PersistentVolumeClaim" ) // PVCTestJig is a jig to help create PVC tests. @@ -137,14 +138,24 @@ func (j *PVCTestJig) pvcAddDataSource(pvc *v1.PersistentVolumeClaim, if pvc != nil { var apiGroupVar = DataSourceVolumeSnapshotAPIGroup pvc.Spec.DataSource = &v1.TypedLocalObjectReference{ - Name: volumeSnapshotName, - Kind: DataSourceVolumeSnapshotKind, + Name: volumeSnapshotName, + Kind: DataSourceVolumeSnapshotKind, APIGroup: &apiGroupVar, } } return pvc } +func (j *PVCTestJig) pvcAddPvcDataSource(pvc *v1.PersistentVolumeClaim, sourcePvcName string) *v1.PersistentVolumeClaim { + if pvc != nil { + pvc.Spec.DataSource = &v1.TypedLocalObjectReference{ + Name: sourcePvcName, + Kind: DataSourceVolumePVCKind, + } + } + return pvc +} + func (j *PVCTestJig) pvcAddVolumeName(pvc *v1.PersistentVolumeClaim, volumeName string) *v1.PersistentVolumeClaim { if pvc != nil { pvc.Spec.VolumeName = volumeName @@ -225,6 +236,15 @@ func (j *PVCTestJig) newPVCTemplateSnapshotSource(namespace, volumeSize, scName return pvc } +func (j *PVCTestJig) newPVCTemplatePVCSource(namespace, volumeSize, scName string, volumeMode v1.PersistentVolumeMode, accessMode v1.PersistentVolumeAccessMode, sourcePvc string) *v1.PersistentVolumeClaim { + pvc := j.CreatePVCTemplate(namespace, volumeSize) + pvc = j.pvcAddAccessMode(pvc, accessMode) + pvc = j.pvcAddStorageClassName(pvc, scName) + pvc = j.pvcAddVolumeMode(pvc, volumeMode) + pvc = j.pvcAddPvcDataSource(pvc, sourcePvc) + return pvc +} + func (j *PVCTestJig) CheckPVCorFail(pvc *v1.PersistentVolumeClaim, tweak func(pvc *v1.PersistentVolumeClaim), namespace, volumeSize string) *v1.PersistentVolumeClaim { if tweak != nil { @@ -278,6 +298,12 @@ func (j *PVCTestJig) CreatePVCorFailCSI(namespace string, volumeSize string, scN return j.CheckPVCorFail(pvc, tweak, namespace, volumeSize) } +func (j *PVCTestJig) CreateClonePVCorFailCSI(namespace, volumeSize, scName, sourcePvc string, + tweak func(pvc *v1.PersistentVolumeClaim), volumeMode v1.PersistentVolumeMode, accessMode v1.PersistentVolumeAccessMode) *v1.PersistentVolumeClaim { + pvc := j.newPVCTemplatePVCSource(namespace, volumeSize, scName, volumeMode, accessMode, sourcePvc) + return j.CheckPVCorFail(pvc, tweak, namespace, volumeSize) +} + // CreatePVCorFailStaticFSS creates a new claim based on the jig's // defaults. Callers can provide a function to tweak the claim object // before it is created. @@ -361,6 +387,12 @@ func (j *PVCTestJig) CreateAndAwaitPVCOrFailCSI(namespace, volumeSize, scName st return j.CheckAndAwaitPVCOrFail(pvc, namespace, expectedPVCPhase) } +func (j *PVCTestJig) CreateAndAwaitClonePVCOrFailCSI(namespace, volumeSize, scName, sourcePvc string, + tweak func(pvc *v1.PersistentVolumeClaim), volumeMode v1.PersistentVolumeMode, accessMode v1.PersistentVolumeAccessMode, expectedPVCPhase v1.PersistentVolumeClaimPhase) *v1.PersistentVolumeClaim { + pvc := j.CreateClonePVCorFailCSI(namespace, volumeSize, scName, sourcePvc, tweak, volumeMode, accessMode) + return j.CheckAndAwaitPVCOrFail(pvc, namespace, expectedPVCPhase) +} + // CreateAndAwaitPVCOrFailDynamicFSS creates a new PVC based on the // jig's defaults, waits for it to become ready, and then sanity checks it and // its dependant resources. Callers can provide a function to tweak the @@ -654,6 +686,59 @@ func (j *PVCTestJig) NewPodForCSI(name string, namespace string, claimName strin return pod.Name } +func (j *PVCTestJig) NewPodForCSIClone(name string, namespace string, claimName string, adLabel string) string { + By("Creating a pod with the claiming PVC created by CSI") + + pod, err := j.KubeClient.CoreV1().Pods(namespace).Create(context.Background(), &v1.Pod{ + TypeMeta: metav1.TypeMeta{ + Kind: "Pod", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + GenerateName: j.Name, + Namespace: namespace, + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + { + Name: name, + Image: nginx, + VolumeMounts: []v1.VolumeMount{ + { + Name: "persistent-storage", + MountPath: "/data", + }, + }, + }, + }, + Volumes: []v1.Volume{ + { + Name: "persistent-storage", + VolumeSource: v1.VolumeSource{ + PersistentVolumeClaim: &v1.PersistentVolumeClaimVolumeSource{ + ClaimName: claimName, + }, + }, + }, + }, + NodeSelector: map[string]string{ + plugin.LabelZoneFailureDomain: adLabel, + }, + }, + }, metav1.CreateOptions{}) + if err != nil { + Failf("Pod %q Create API error: %v", pod.Name, err) + } + + // Waiting for pod to be running + err = j.waitTimeoutForPodRunningInNamespace(pod.Name, namespace, slowPodStartTimeout) + if err != nil { + Failf("Pod %q is not Running: %v", pod.Name, err) + } + zap.S().With(pod.Namespace).With(pod.Name).Info("CSI POD is created.") + return pod.Name +} + func (j *PVCTestJig) NewPodForCSIWithoutWait(name string, namespace string, claimName string, adLabel string) string { By("Creating a pod with the claiming PVC created by CSI") @@ -1333,6 +1418,34 @@ func (j *PVCTestJig) CheckISCSIQueueDepthOnNode(namespace, podName string) { Expect(strings.TrimSpace(output)).To(Equal("node.session.queue_depth = 128")) } +func (j *PVCTestJig) DeleteAndAwaitPVC(namespace, pvcName string) error { + err := j.KubeClient.CoreV1().PersistentVolumeClaims(namespace).Delete(context.Background(), pvcName, metav1.DeleteOptions{}) + if err != nil { + Failf("Error deleting PVC %s: %v", pvcName, err) + } + + return wait.PollImmediate(Poll, 5*time.Minute, j.pvcDeleted(namespace, pvcName)) +} + +func (j *PVCTestJig) DeleteAndAwaitPod(namespace, podName string) error { + err := j.KubeClient.CoreV1().Pods(namespace).Delete(context.Background(), podName, metav1.DeleteOptions{}) + if err != nil { + Failf("Error deleting Pod %s: %v", podName, err) + } + + return wait.PollImmediate(Poll, 5*time.Minute, func() (done bool, err error) { + _, err = j.KubeClient.CoreV1().Pods(namespace).Get(context.Background(), podName, metav1.GetOptions{}) + + if apierrors.IsNotFound(err) { + return true, nil + } + if err != nil { + return true, err + } + return false, nil + }) +} + // WaitTimeoutForPVNotFound waits default amount of time for the specified Persistent Volume to be terminated. // If the PV Get api returns IsNotFound then the wait stops and nil is returned. If the Get api returns // an error other than "not found" then that error is returned and the wait stops. @@ -1358,12 +1471,26 @@ func (j *PVCTestJig) CheckPVExists(pvName string) bool { func (j *PVCTestJig) ChangePVReclaimPolicy(pvName string, newReclaimPolicy string) error { Logf("Changing ReclaimPolicy for PV %s to %s.", pvName, newReclaimPolicy) - pvPatchBytes := []byte(fmt.Sprintf("{\"spec\": {\"persistentVolumeReclaimPolicy\": \"%s\"}}",newReclaimPolicy)) - pv, err := j.KubeClient.CoreV1().PersistentVolumes().Patch(context.Background(), pvName,types.StrategicMergePatchType, pvPatchBytes, metav1.PatchOptions{}) + pvPatchBytes := []byte(fmt.Sprintf("{\"spec\": {\"persistentVolumeReclaimPolicy\": \"%s\"}}", newReclaimPolicy)) + pv, err := j.KubeClient.CoreV1().PersistentVolumes().Patch(context.Background(), pvName, types.StrategicMergePatchType, pvPatchBytes, metav1.PatchOptions{}) Logf("ReclaimPolicy for PV %s Updated to %s.", pvName, pv.Spec.PersistentVolumeReclaimPolicy) return err } +func (j *PVCTestJig) pvcDeleted(namespace, pvcName string) wait.ConditionFunc { + return func() (bool, error) { + _, err := j.KubeClient.CoreV1().PersistentVolumeClaims(namespace).Get(context.Background(), pvcName, metav1.GetOptions{}) + + if apierrors.IsNotFound(err) { + return true, nil // done + } + if err != nil { + return true, err // stop wait with error + } + return false, nil + } +} + func (j *PVCTestJig) pvNotFound(pvName string) wait.ConditionFunc { return func() (bool, error) { _, err := j.KubeClient.CoreV1().PersistentVolumes().Get(context.Background(), pvName, metav1.GetOptions{}) diff --git a/test/e2e/framework/service_account_util.go b/test/e2e/framework/service_account_util.go new file mode 100644 index 0000000000..f92cd7c4d7 --- /dev/null +++ b/test/e2e/framework/service_account_util.go @@ -0,0 +1,57 @@ +/* +Copyright 2016 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 framework + +import ( + "context" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// newServiceAccountTemplate returns the default v1.ServiceAccount template for this jig, but +// does not actually create the ServiceAccount. The default ServiceAccount has the same name +// as the jig. +func (j *ServiceTestJig) newServiceAccountTemplate(namespace, name string) *v1.ServiceAccount { + serviceAccount := &v1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: name, + Labels: j.Labels, + }, + } + return serviceAccount +} + +// CreateServiceAccountOrFail creates a new Service Account based on the default SA template +// in the namespace and with a name provided by the caller. +// Callers can provide a function to tweak the Service object before it is created. +func (j *ServiceTestJig) CreateServiceAccountOrFail(namespace, name string, tweak func(svc *v1.ServiceAccount)) *v1.ServiceAccount { + sa := j.newServiceAccountTemplate(namespace, name) + if tweak != nil { + tweak(sa) + } + result, err := j.Client.CoreV1().ServiceAccounts(namespace).Get(context.Background(), name, metav1.GetOptions{}) + if err == nil { + return result + } + + result, err = j.Client.CoreV1().ServiceAccounts(namespace).Create(context.Background(), sa, metav1.CreateOptions{}) + if err != nil { + Failf("Failed to create Service Account %q: %v", sa.Name, err) + } + return result +} diff --git a/test/e2e/framework/service_util.go b/test/e2e/framework/service_util.go index 085efdde3a..2cfcc363df 100644 --- a/test/e2e/framework/service_util.go +++ b/test/e2e/framework/service_util.go @@ -27,6 +27,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" gerrors "github.com/pkg/errors" + + "go.uber.org/zap" v1 "k8s.io/api/core/v1" policyv1beta1 "k8s.io/api/policy/v1beta1" "k8s.io/apimachinery/pkg/api/errors" @@ -848,7 +850,7 @@ func (j *ServiceTestJig) TestHTTPHealthCheckNodePort(host string, port int, requ func (f *CloudProviderFramework) VerifyHealthCheckConfig(loadBalancerId string, retries, timeout, interval int, lbtype string) error { for start := time.Now(); time.Since(start) < 5*time.Minute; time.Sleep(5 * time.Second) { - loadBalancer, err := f.Client.LoadBalancer(lbtype).GetLoadBalancer(context.TODO(), loadBalancerId) + loadBalancer, err := f.Client.LoadBalancer(zap.L().Sugar(), lbtype, "", nil).GetLoadBalancer(context.TODO(), loadBalancerId) if err != nil { return err } @@ -869,7 +871,7 @@ func (f *CloudProviderFramework) VerifyHealthCheckConfig(loadBalancerId string, // to be the same as the spec func (f *CloudProviderFramework) WaitForLoadBalancerNSGChange(lb *client.GenericLoadBalancer, nsgIds []string, lbtype string) error { condition := func() (bool, error) { - updatedLB, err := f.Client.LoadBalancer(lbtype).GetLoadBalancer(context.TODO(), *lb.Id) + updatedLB, err := f.Client.LoadBalancer(zap.L().Sugar(), lbtype, "", nil).GetLoadBalancer(context.TODO(), *lb.Id) if err != nil { return false, err } @@ -889,7 +891,7 @@ func (f *CloudProviderFramework) WaitForLoadBalancerNSGChange(lb *client.Generic func (f *CloudProviderFramework) WaitForLoadBalancerShapeChange(lb *client.GenericLoadBalancer, shape, fMin, fMax string) error { condition := func() (bool, error) { - updatedLB, err := f.Client.LoadBalancer("lb").GetLoadBalancer(context.TODO(), *lb.Id) + updatedLB, err := f.Client.LoadBalancer(zap.L().Sugar(), "lb", "", nil).GetLoadBalancer(context.TODO(), *lb.Id) if err != nil { return false, err } @@ -932,7 +934,7 @@ func testHealthCheckConfig(loadBalancer *client.GenericLoadBalancer, retries int func (f *CloudProviderFramework) VerifyLoadBalancerConnectionIdleTimeout(loadBalancerId string, connectionIdleTimeout int) error { for start := time.Now(); time.Since(start) < 5*time.Minute; time.Sleep(2 * time.Second) { - loadBalancer, err := f.Client.LoadBalancer("lb").GetLoadBalancer(context.TODO(), loadBalancerId) + loadBalancer, err := f.Client.LoadBalancer(zap.L().Sugar(), "lb", "", nil).GetLoadBalancer(context.TODO(), loadBalancerId) if err != nil { return err } @@ -1217,7 +1219,7 @@ func EnableAndDisableInternalLB() (enable func(svc *v1.Service), disable func(sv func (f *CloudProviderFramework) VerifyLoadBalancerPolicy(loadBalancerId string, loadbalancerPolicy string, lbtype string) error { pollFunc := func() (done bool, err error) { - loadBalancer, err := f.Client.LoadBalancer(lbtype).GetLoadBalancer(context.TODO(), loadBalancerId) + loadBalancer, err := f.Client.LoadBalancer(zap.L().Sugar(), lbtype, "", nil).GetLoadBalancer(context.TODO(), loadBalancerId) if err != nil { return false, err } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/federation_client_oke_workload_identity.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/federation_client_oke_workload_identity.go index e63d5b4f6f..6cd55860cf 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/federation_client_oke_workload_identity.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/federation_client_oke_workload_identity.go @@ -11,12 +11,13 @@ import ( "encoding/base64" "encoding/json" "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "github.com/oracle/oci-go-sdk/v65/common/utils" "io" "net/http" "sync" "time" + + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/utils" ) const ( @@ -26,22 +27,22 @@ const ( // Workload RPST Issuance Service (WRIS) // x509FederationClientForOkeWorkloadIdentity retrieves a security token from Auth service. type x509FederationClientForOkeWorkloadIdentity struct { - tenancyID string - sessionKeySupplier sessionKeySupplier - securityToken securityToken - authClient *common.BaseClient - mux sync.Mutex - proxymuxEndpoint string - kubernetesServiceAccountToken string // jwt - kubernetesServiceAccountCert *x509.CertPool + tenancyID string + sessionKeySupplier sessionKeySupplier + securityToken securityToken + authClient *common.BaseClient + mux sync.Mutex + proxymuxEndpoint string + saTokenProvider ServiceAccountTokenProvider + kubernetesServiceAccountCert *x509.CertPool } -func newX509FederationClientForOkeWorkloadIdentity(endpoint string, kubernetesServiceAccountToken string, +func newX509FederationClientForOkeWorkloadIdentity(endpoint string, saTokenProvider ServiceAccountTokenProvider, kubernetesServiceAccountCert *x509.CertPool) (federationClient, error) { client := &x509FederationClientForOkeWorkloadIdentity{ - proxymuxEndpoint: endpoint, - kubernetesServiceAccountToken: kubernetesServiceAccountToken, - kubernetesServiceAccountCert: kubernetesServiceAccountCert, + proxymuxEndpoint: endpoint, + saTokenProvider: saTokenProvider, + kubernetesServiceAccountCert: kubernetesServiceAccountCert, } client.sessionKeySupplier = newSessionKeySupplier() @@ -82,19 +83,29 @@ func (c *x509FederationClientForOkeWorkloadIdentity) getSecurityToken() (securit } publicKey := string(c.sessionKeySupplier.PublicKeyPemRaw()) + common.Logf("Public Key for OKE Workload Identity is:", publicKey) rawPayload := workloadIdentityRequestPayload{Podkey: publicKey} payload, err := json.Marshal(rawPayload) if err != nil { return nil, fmt.Errorf("error getting security token%s", err) } + common.Logf("Payload for OKE Workload Identity is:", string(payload)) request, err := http.NewRequest(http.MethodPost, c.proxymuxEndpoint, bytes.NewBuffer(payload)) if err != nil { common.Logf("error %s", err) return nil, fmt.Errorf("error getting security token %s", err) } - request.Header.Add("Authorization", "Bearer "+c.kubernetesServiceAccountToken) + + kubernetesServiceAccountToken, err := c.saTokenProvider.ServiceAccountToken() + if err != nil { + common.Logf("error %s", err) + return nil, fmt.Errorf("error getting service account token %s", err) + } + + common.Logf("Service Account Token for OKE Workload Identity is: ", kubernetesServiceAccountToken) + request.Header.Add("Authorization", "Bearer "+kubernetesServiceAccountToken) request.Header.Set("Content-Type", "application/json") opcRequestID := utils.GenerateOpcRequestID() request.Header.Set("opc-request-id", opcRequestID) @@ -136,7 +147,7 @@ func (c *x509FederationClientForOkeWorkloadIdentity) getSecurityToken() (securit } token := parsedBody.Token - if &token == nil || len(token) == 0 { + if len(token) == 0 { return nil, fmt.Errorf("invalid (empty) token received from Proxymux") } if len(token) < 3 { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/instance_principal_key_provider.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/instance_principal_key_provider.go index d4a4f97a96..fc871211ab 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/instance_principal_key_provider.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/instance_principal_key_provider.go @@ -8,6 +8,7 @@ import ( "crypto/rsa" "fmt" "net/http" + "os" "strings" "time" @@ -15,7 +16,8 @@ import ( ) const ( - metadataBaseURL = `http://169.254.169.254/opc/v2` + defaultMetadataBaseURL = `http://169.254.169.254/opc/v2` + metadataBaseURLEnvVar = `OCI_METADATA_BASE_URL` metadataFallbackURL = `http://169.254.169.254/opc/v1` regionPath = `/instance/region` leafCertificatePath = `/identity/cert.pem` @@ -59,7 +61,7 @@ func (ipe instancePrincipalError) Error() string { // KeyID that is not expired at the moment, the PrivateRSAKey that the client acquires at a next moment could be // invalid because the KeyID could be already expired. func newInstancePrincipalKeyProvider(modifier func(common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, error)) (provider *instancePrincipalKeyProvider, err error) { - updateX509CertRetrieverURLParas(metadataBaseURL) + updateX509CertRetrieverURLParas(getMetadataBaseURL()) clientModifier := newDispatcherModifier(modifier) client, err := clientModifier.Modify(&http.Client{}) @@ -111,8 +113,8 @@ func getRegionForFederationClient(dispatcher common.HTTPRequestDispatcher, url s return common.StringToRegion(body.String()), nil } common.Logf("Error in getting region from url: %s, Status code: %v, Error: %s", url, statusCode, err.Error()) - if statusCode == 404 && strings.Compare(url, metadataBaseURL+regionPath) == 0 { - common.Logf("Falling back to http://169.254.169.254/opc/v1 to try again...") + if statusCode == 404 && strings.Compare(url, getMetadataBaseURL()+regionPath) == 0 { + common.Logf("Falling back to http://169.254.169.254/opc/v1 to try again...\n") updateX509CertRetrieverURLParas(metadataFallbackURL) url = regionURL } @@ -157,3 +159,12 @@ func (p *instancePrincipalKeyProvider) TenancyOCID() (string, error) { func (p *instancePrincipalKeyProvider) Refreshable() bool { return true } + +// Gets the Meta Data Base url from the Environment variable SNTL_METADATA_BASE_URL +// If it is not present, returns default value instead +func getMetadataBaseURL() string { + if baseURL := os.Getenv(metadataBaseURLEnvVar); baseURL != "" { + return baseURL + } + return defaultMetadataBaseURL +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resouce_principal_delegation_token_provider.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resouce_principal_delegation_token_provider.go new file mode 100644 index 0000000000..ee993ca352 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resouce_principal_delegation_token_provider.go @@ -0,0 +1,90 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "crypto/rsa" + "fmt" + + "github.com/oracle/oci-go-sdk/v65/common" +) + +type resourcePrincipalDelegationTokenConfigurationProvider struct { + resourcePrincipalKeyProvider ConfigurationProviderWithClaimAccess + delegationToken string + region *common.Region +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) PrivateRSAKey() (*rsa.PrivateKey, error) { + return r.resourcePrincipalKeyProvider.PrivateRSAKey() +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) KeyID() (string, error) { + return r.resourcePrincipalKeyProvider.KeyID() +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) TenancyOCID() (string, error) { + return r.resourcePrincipalKeyProvider.TenancyOCID() +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) UserOCID() (string, error) { + return "", nil +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) KeyFingerprint() (string, error) { + return "", nil +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) Region() (string, error) { + if r.region == nil { + common.Debugf("Region in resource principal delegation token configuration provider is nil. Returning configuration provider region: %s", r.region) + return r.resourcePrincipalKeyProvider.Region() + } + return string(*r.region), nil +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) AuthType() (common.AuthConfig, error) { + token := r.delegationToken + return common.AuthConfig{AuthType: common.ResourcePrincipalDelegationToken, OboToken: &token}, nil +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) GetClaim(key string) (interface{}, error) { + return r.resourcePrincipalKeyProvider.GetClaim(key) +} + +type resourcePrincipalDelegationTokenError struct { + err error +} + +func (rpe resourcePrincipalDelegationTokenError) Error() string { + return fmt.Sprintf("%s\nResource principals delegation token authentication can only be used on specific OCI services. Please confirm this code is running on the correct environment", rpe.err.Error()) +} + +// ResourcePrincipalDelegationTokenConfigurationProvider returns a configuration for obo token resource principals +func ResourcePrincipalDelegationTokenConfigurationProvider(delegationToken *string) (ConfigurationProviderWithClaimAccess, error) { + if delegationToken == nil || len(*delegationToken) == 0 { + return nil, resourcePrincipalDelegationTokenError{err: fmt.Errorf("failed to create a delagationTokenConfigurationProvider: token is a mandatory input parameter")} + } + return newResourcePrincipalDelegationTokenConfigurationProvider(delegationToken, "", nil) +} + +// ResourcePrincipalDelegationTokenConfigurationProviderForRegion returns a configuration for obo token resource principals with a given region +func ResourcePrincipalDelegationTokenConfigurationProviderForRegion(delegationToken *string, region common.Region) (ConfigurationProviderWithClaimAccess, error) { + if delegationToken == nil || len(*delegationToken) == 0 { + return nil, resourcePrincipalDelegationTokenError{err: fmt.Errorf("failed to create a delagationTokenConfigurationProvider: token is a mandatory input parameter")} + } + return newResourcePrincipalDelegationTokenConfigurationProvider(delegationToken, region, nil) +} + +func newResourcePrincipalDelegationTokenConfigurationProvider(delegationToken *string, region common.Region, modifier func(common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, error)) (ConfigurationProviderWithClaimAccess, error) { + + keyProvider, err := ResourcePrincipalConfigurationProvider() + if err != nil { + return nil, resourcePrincipalDelegationTokenError{err: fmt.Errorf("failed to create a new key provider for resource principal: %s", err.Error())} + } + if len(region) > 0 { + return resourcePrincipalDelegationTokenConfigurationProvider{keyProvider, *delegationToken, ®ion}, err + } + return resourcePrincipalDelegationTokenConfigurationProvider{keyProvider, *delegationToken, nil}, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resouce_principal_key_provider.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resouce_principal_key_provider.go index a2d4e1ba4d..f65d4ecdca 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resouce_principal_key_provider.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resouce_principal_key_provider.go @@ -37,8 +37,10 @@ const ( ResourcePrincipalTokenEndpoint = "OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT" // KubernetesServiceAccountTokenPath that contains cluster information KubernetesServiceAccountTokenPath = "/var/run/secrets/kubernetes.io/serviceaccount/token" - // KubernetesServiceAccountCertPath that contains cluster information - KubernetesServiceAccountCertPath = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" + // DefaultKubernetesServiceAccountCertPath that contains cluster information + DefaultKubernetesServiceAccountCertPath = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" + // OciKubernetesServiceAccountCertPath Environment variable for Kubernetes Service Account Cert Path + OciKubernetesServiceAccountCertPath = "OCI_KUBERNETES_SERVICE_ACCOUNT_CERT_PATH" // KubernetesServiceHostEnvVar environment var holding the kubernetes host KubernetesServiceHostEnvVar = "KUBERNETES_SERVICE_HOST" // KubernetesProxymuxServicePort environment var holding the kubernetes port @@ -96,6 +98,12 @@ func ResourcePrincipalConfigurationProvider() (ConfigurationProviderWithClaimAcc // OkeWorkloadIdentityConfigurationProvider returns a resource principal configuration provider by OKE Workload Identity func OkeWorkloadIdentityConfigurationProvider() (ConfigurationProviderWithClaimAccess, error) { + return OkeWorkloadIdentityConfigurationProviderWithServiceAccountTokenProvider(NewDefaultServiceAccountTokenProvider()) +} + +// OkeWorkloadIdentityConfigurationProviderWithServiceAccountTokenProvider returns a resource principal configuration provider by OKE Workload Identity +// with service account token provider +func OkeWorkloadIdentityConfigurationProviderWithServiceAccountTokenProvider(saTokenProvider ServiceAccountTokenProvider) (ConfigurationProviderWithClaimAccess, error) { var version string var ok bool if version, ok = os.LookupEnv(ResourcePrincipalVersionEnvVar); !ok { @@ -104,17 +112,17 @@ func OkeWorkloadIdentityConfigurationProvider() (ConfigurationProviderWithClaimA } if version == ResourcePrincipalVersion1_1 || version == ResourcePrincipalVersion2_2 { - kubernetesServiceAccountToken, err := ioutil.ReadFile(KubernetesServiceAccountTokenPath) - if err != nil { - err = fmt.Errorf("can not create resource principal, error getting Kubernetes Service Account Token at %s", - KubernetesServiceAccountTokenPath) - return nil, resourcePrincipalError{err: err} + + saCertPath := requireEnv(OciKubernetesServiceAccountCertPath) + + if saCertPath == nil { + tmp := DefaultKubernetesServiceAccountCertPath + saCertPath = &tmp } - kubernetesServiceAccountCertRaw, err := ioutil.ReadFile(KubernetesServiceAccountCertPath) + kubernetesServiceAccountCertRaw, err := ioutil.ReadFile(*saCertPath) if err != nil { - err = fmt.Errorf("can not create resource principal, error getting Kubernetes Service Account Token at %s", - KubernetesServiceAccountCertPath) + err = fmt.Errorf("can not create resource principal, error getting Kubernetes Service Account Token at %s", *saCertPath) return nil, resourcePrincipalError{err: err} } @@ -136,8 +144,7 @@ func OkeWorkloadIdentityConfigurationProvider() (ConfigurationProviderWithClaimA } proxymuxEndpoint := fmt.Sprintf("https://%s:%s/resourcePrincipalSessionTokens", *k8sServiceHost, KubernetesProxymuxServicePort) - return newOkeWorkloadIdentityProvider(proxymuxEndpoint, string(kubernetesServiceAccountToken), - kubernetesServiceAccountCert, *region) + return newOkeWorkloadIdentityProvider(proxymuxEndpoint, saTokenProvider, kubernetesServiceAccountCert, *region) } err := fmt.Errorf("can not create resource principal, environment variable: %s, must be valid", ResourcePrincipalVersionEnvVar) @@ -288,11 +295,11 @@ func newResourcePrincipalKeyProvider22(sessionTokenLocation, privatePemLocation return &rs, nil } -func newOkeWorkloadIdentityProvider(proxymuxEndpoint string, kubernetesServiceAccountToken string, +func newOkeWorkloadIdentityProvider(proxymuxEndpoint string, saTokenProvider ServiceAccountTokenProvider, kubernetesServiceAccountCert *x509.CertPool, region string) (*resourcePrincipalKeyProvider, error) { var err error var fd federationClient - fd, err = newX509FederationClientForOkeWorkloadIdentity(proxymuxEndpoint, kubernetesServiceAccountToken, kubernetesServiceAccountCert) + fd, err = newX509FederationClientForOkeWorkloadIdentity(proxymuxEndpoint, saTokenProvider, kubernetesServiceAccountCert) if err != nil { err := fmt.Errorf("can not create resource principal, due to: %s ", err.Error()) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principal_token_path_provider.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principal_token_path_provider.go index 599b5ca4da..5fb0897795 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principal_token_path_provider.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principal_token_path_provider.go @@ -5,8 +5,10 @@ package auth import ( "fmt" + "github.com/oracle/oci-go-sdk/v65/common" "io/ioutil" "net/http" + "time" ) const ( @@ -136,3 +138,83 @@ func getInstanceIDFromMetadata() (instanceID string, err error) { bodyString := string(bodyBytes) return bodyString, nil } + +// ServiceAccountTokenProvider comment +type ServiceAccountTokenProvider interface { + ServiceAccountToken() (string, error) +} + +// DefaultServiceAccountTokenProvider is supplied by user when instantiating +// OkeWorkloadIdentityConfigurationProvider +type DefaultServiceAccountTokenProvider struct { + tokenPath string `mandatory:"false"` +} + +// NewDefaultServiceAccountTokenProvider returns a new instance of defaultServiceAccountTokenProvider +func NewDefaultServiceAccountTokenProvider() DefaultServiceAccountTokenProvider { + return DefaultServiceAccountTokenProvider{ + tokenPath: KubernetesServiceAccountTokenPath, + } +} + +// WithSaTokenPath Builder method to override the to SA ken path +func (d DefaultServiceAccountTokenProvider) WithSaTokenPath(tokenPath string) DefaultServiceAccountTokenProvider { + d.tokenPath = tokenPath + return d +} + +// ServiceAccountToken returns a service account token +func (d DefaultServiceAccountTokenProvider) ServiceAccountToken() (string, error) { + saTokenString, err := ioutil.ReadFile(d.tokenPath) + if err != nil { + common.Logf("error %s", err) + return "", fmt.Errorf("error reading service account token: %s", err) + } + isSaTokenValid, err := isValidSaToken(string(saTokenString)) + if !isSaTokenValid { + common.Logf("error %s", err) + return "", fmt.Errorf("error validating service account token: %s", err) + } + return string(saTokenString), err +} + +// SuppliedServiceAccountTokenProvider is supplied by user when instantiating +// OkeWorkloadIdentityConfigurationProviderWithServiceAccountTokenProvider +type SuppliedServiceAccountTokenProvider struct { + tokenString string `mandatory:"false"` +} + +// NewSuppliedServiceAccountTokenProvider returns a new instance of defaultServiceAccountTokenProvider +func NewSuppliedServiceAccountTokenProvider(tokenString string) SuppliedServiceAccountTokenProvider { + return SuppliedServiceAccountTokenProvider{tokenString: tokenString} +} + +// ServiceAccountToken returns a service account token +func (d SuppliedServiceAccountTokenProvider) ServiceAccountToken() (string, error) { + isSaTokenValid, err := isValidSaToken(d.tokenString) + if !isSaTokenValid { + common.Logf("error %s", err) + return "", fmt.Errorf("error validating service account token %s", err) + } + return d.tokenString, nil +} + +// isValidSaToken returns true is a saTokenString provides a valid service account token +func isValidSaToken(saTokenString string) (bool, error) { + var jwtToken *jwtToken + var err error + if jwtToken, err = parseJwt(saTokenString); err != nil { + return false, fmt.Errorf("failed to parse the default service token string \"%s\": %s", saTokenString, err.Error()) + } + now := time.Now().Unix() + int64(bufferTimeBeforeTokenExpiration.Seconds()) + if jwtToken.payload["exp"] == nil { + return false, fmt.Errorf("service token doesn't have an `exp` field") + } + expiredAt := int64(jwtToken.payload["exp"].(float64)) + expired := expiredAt <= now + if expired { + return false, fmt.Errorf("service token expired at: %v", time.Unix(expiredAt, 0).Format("15:04:05.000")) + } + + return true, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/circuit_breaker.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/circuit_breaker.go index 85633f4a93..46b68b3a46 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/circuit_breaker.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/circuit_breaker.go @@ -62,7 +62,7 @@ type CircuitBreakerSetting struct { numberOfRecordedHistoryResponse int } -// Convert CircuitBreakerSetting to human-readable string representation +// String Converts CircuitBreakerSetting to human-readable string representation func (cbst CircuitBreakerSetting) String() string { return fmt.Sprintf("{name=%v, isEnabled=%v, closeStateWindow=%v, openStateWindow=%v, failureRateThreshold=%v, minimumRequests=%v, successStatCodeMap=%v, successStatErrCodeMap=%v, serviceName=%v, historyCount=%v}", cbst.name, cbst.isEnabled, cbst.closeStateWindow, cbst.openStateWindow, cbst.failureRateThreshold, cbst.minimumRequests, cbst.successStatCodeMap, cbst.successStatErrCodeMap, cbst.serviceName, cbst.numberOfRecordedHistoryResponse) @@ -77,7 +77,7 @@ type ResponseHistory struct { statusCode int } -// Convert ResponseHistory to human-readable string representation +// String Converts ResponseHistory to human-readable string representation func (rh ResponseHistory) String() string { return fmt.Sprintf("Opc-Req-id - %v\nErrorCode - %v - %v\nErrorMessage - %v\n\n", rh.opcReqID, rh.statusCode, rh.errorCode, rh.errorMessage) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/client.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/client.go index ff02e129d1..be43f8bbc8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/client.go @@ -336,6 +336,18 @@ func DefaultConfigProvider() ConfigurationProvider { return provider } +// CustomProfileSessionTokenConfigProvider returns the session token config provider of the given profile. +// This will look for the configuration in the given config file path. +func CustomProfileSessionTokenConfigProvider(customConfigPath string, profile string) ConfigurationProvider { + if customConfigPath == "" { + customConfigPath = getDefaultConfigFilePath() + } + + sessionTokenConfigurationProvider, _ := ConfigurationProviderForSessionTokenWithProfile(customConfigPath, profile, "") + Debugf("Configuration provided by: %s", sessionTokenConfigurationProvider) + return sessionTokenConfigurationProvider +} + func getDefaultConfigFilePath() string { homeFolder := getHomeFolder() defaultConfigFile := filepath.Join(homeFolder, defaultConfigDirName, defaultConfigFileName) @@ -494,10 +506,7 @@ func logResponse(response *http.Response, fn func(format string, v ...interface{ } func checkBodyLengthExceedLimit(contentLength int64) bool { - if contentLength > maxBodyLenForDebug { - return true - } - return false + return contentLength > maxBodyLenForDebug } // OCIRequest is any request made to an OCI service. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/common.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/common.go index 079ee17970..1a247ae972 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/common.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/common.go @@ -53,6 +53,26 @@ var getRegionInfoFromInstanceMetadataService = getRegionInfoFromInstanceMetadata // OciRealmSpecificServiceEndpointTemplateEnabled is the flag to enable the realm specific service endpoint template. This one has higher priority than the environment variable. var OciRealmSpecificServiceEndpointTemplateEnabled *bool = nil +// OciSdkEnabledServicesMap is a list of services that are enabled, default is an empty list which means all services are enabled +var OciSdkEnabledServicesMap map[string]bool + +// OciAlloyConfigFilePathEnvVar is the environment variable name for the OCI Alloy Config File Path +const OciAlloyConfigFilePathEnvVar = "OCI_ALLOY_CONFIG_FILE_PATH" + +// OciAlloyRegionCoexistEnvVar is the environment variable name for the OCI Alloy Region Coexist +const OciAlloyRegionCoexistEnvVar = "OCI_ALLOY_REGION_COEXIST" + +// defaultRealmForUnknownAlloyRegion is the default realm for unknown alloy region +const defaultRealmForUnknownAlloyRegion = "oraclecloud.com" + +// OciAlloyConfigFileProvider is the provider name for the OCI Alloy Config File +var OciAlloyConfigFileProvider string + +// ociAlloyRegionCoexist is the flag to enable the OCI Alloy Region Coexist. This one has lower priority than the environment variable. +var ociAlloyRegionCoexist bool + +var ociAlloyRegionSchemaList []map[string]string + // Endpoint returns a endpoint for a service func (region Region) Endpoint(service string) string { return fmt.Sprintf("%s.%s.%s", service, region, region.secondLevelDomain()) @@ -117,7 +137,7 @@ func (region Region) EndpointForTemplateDottedRegion(service string, serviceEndp return endpoint, fmt.Errorf("Endpoint service name not present in endpoint template") } } else { - return endpoint, fmt.Errorf("Invalid serviceEndpointTemplates. ServiceEndpointTemplate should start with https://") + return endpoint, fmt.Errorf("invalid serviceEndpointTemplates. ServiceEndpointTemplate should start with https://") } return endpoint, nil } @@ -134,6 +154,9 @@ func (region Region) secondLevelDomain() string { return value } Debugf("cannot find realm for region : %s, return default realm value.", region) + if _, ok := realm["oc1"]; !ok { + return defaultRealmForUnknownAlloyRegion + } return realm["oc1"] } @@ -149,6 +172,21 @@ func (region Region) RealmID() (string, error) { // StringToRegion convert a string to Region type func StringToRegion(stringRegion string) (r Region) { regionStr := strings.ToLower(stringRegion) + // check for PLC related regions + if !checkAllowOCIRegionCoexist() && (checkAlloyConfigFile() || len(ociAlloyRegionSchemaList) != 0) { + Debugf("Alloy config detected and OCI_ALLOY_REGION_COEXIST is not set to True, SDK will only use regions defined for Alloy regions") + setRegionMetadataFromAlloyCfgFile(&stringRegion) + if len(ociAlloyRegionSchemaList) != 0 { + resetRegionInfo() + bulkAddRegionSchema(ociAlloyRegionSchemaList) + } + r = Region(stringRegion) + if _, ok := regionRealm[r]; !ok { + Logf("You're using the %s Alloy configuration file, the region you're targeting is not declared in this config file. Please check if this is the correct region you're targeting or contact the %s cloud provider for help. If you want to target both OCI regions and %s regions, please set the OCI_PLC_REGION_COEXIST env var to True.", OciAlloyConfigFileProvider, OciAlloyConfigFileProvider, regionStr) + } + return r + } + // check if short region name provided if region, ok := shortNameRegion[regionStr]; ok { r = region @@ -169,7 +207,7 @@ func StringToRegion(stringRegion string) (r Region) { // canStringBeRegion test if the string can be a region, if it can, returns the string as is, otherwise it // returns an error -var blankRegex = regexp.MustCompile("\\s") +var blankRegex = regexp.MustCompile(`\s`) func canStringBeRegion(stringRegion string) (region string, err error) { if blankRegex.MatchString(stringRegion) || stringRegion == "" { @@ -202,7 +240,7 @@ func EnableInstanceMetadataServiceLookup() { // Once successfully find the expected region(region name or short code), return true, region name will be stored in // the input pointer. func setRegionMetadataFromEnvVar(region *string) bool { - if readEnvVar == false { + if !readEnvVar { Debugf("metadata region env variable had already been checked, no need to check again.") return false //no need to check it again. } @@ -232,12 +270,22 @@ func setRegionMetadataFromEnvVar(region *string) bool { return false } +func setRegionMetadataFromCfgFile(region *string) bool { + if setRegionMetadataFromAlloyCfgFile(region) { + return true + } + if setRegionMetadataFromRegionCfgFile(region) { + return true + } + return false +} + // setRegionMetadataFromCfgFile checks if region metadata config file is provided, once it's there, parse and add all // the valid regions to region map, the configuration file can only be visited once. // Once successfully find the expected region(region name or short code), return true, region name will be stored in // the input pointer. -func setRegionMetadataFromCfgFile(region *string) bool { - if readCfgFile == false { +func setRegionMetadataFromRegionCfgFile(region *string) bool { + if !readCfgFile { Debugf("metadata region config file had already been checked, no need to check again.") return false //no need to check it again. } @@ -262,8 +310,46 @@ func setRegionMetadataFromCfgFile(region *string) bool { return false } -func readAndParseConfigFile(configFileName *string) (fileContent []map[string]string, ok bool) { +// setRegionMetadataFromAlloyFile checks if alloy config file is provided, once it's there, parse and add all +// The default location of the alloy config file is ~/.oci/alloy-config.json. It will also check the environment variable +// the valid regions to region map, the configuration file can only be visited once. +// Once successfully find the expected region(region name or short code), return true, region name will be stored in +// the input pointer. +func setRegionMetadataFromAlloyCfgFile(region *string) bool { + if jsonArr, ok := readAndParseAlloyConfigFile(); ok { + added := false + if jsonArr["regions"] == nil { + return false + } + var regionJSON []map[string]string + originalJSONContent, err := json.Marshal(jsonArr["regions"]) + if err != nil { + return false + } + err = json.Unmarshal(originalJSONContent, ®ionJSON) + if err != nil { + return false + } + + if !IsEnvVarTrue(OciAlloyRegionCoexistEnvVar) { + resetRegionInfo() + } + for _, jsonItem := range regionJSON { + if checkSchemaItems(jsonItem) { + addRegionSchema(jsonItem) + if jsonItem[regionKeyPropertyName] == *region || + jsonItem[regionIdentifierPropertyName] == *region { + *region = jsonItem[regionIdentifierPropertyName] + added = true + } + } + } + return added + } + return false +} +func readAndParseConfigFile(configFileName *string) (fileContent []map[string]string, ok bool) { if content, err := ioutil.ReadFile(*configFileName); err == nil { Debugf("Raw content of region metadata config file content:", string(content[:])) if err := json.Unmarshal(content, &fileContent); err != nil { @@ -275,7 +361,37 @@ func readAndParseConfigFile(configFileName *string) (fileContent []map[string]st } Debugf("No Region Metadata Config File provided.") return +} + +func readAndParseAlloyConfigFile() (fileContent map[string]interface{}, ok bool) { + homeFolder := getHomeFolder() + configFileName := filepath.Join(homeFolder, regionMetadataCfgDirName, "alloy-config.json") + if path := os.Getenv(OciAlloyConfigFilePathEnvVar); path != "" { + configFileName = path + } + if content, err := ioutil.ReadFile(configFileName); err == nil { + Debugf("Raw content of alloy config file content:", string(content[:])) + if err := json.Unmarshal(content, &fileContent); err != nil { + Debugf("Can't unmarshal env var, the error info is", err) + return + } + ok = true + return + } + Debugf("No Alloy Config File provided.") + return +} +func checkAlloyConfigFile() bool { + homeFolder := getHomeFolder() + configFileName := filepath.Join(homeFolder, regionMetadataCfgDirName, "alloy-config.json") + if path := os.Getenv(OciAlloyConfigFilePathEnvVar); path != "" { + configFileName = path + } + if _, err := os.Stat(configFileName); err == nil { + return true + } + return false } // check map regionRealm's region name, if it's already there, no need to add it. @@ -291,6 +407,33 @@ func addRegionSchema(regionSchema map[string]string) { Debugf("Region {} has already been added, no need to add again.", regionSchema[regionIdentifierPropertyName]) } +// AddRegionSchemaForPlc add region schema to region map +func AddRegionSchemaForPlc(regionSchema map[string]string) { + ociAlloyRegionSchemaList = append(ociAlloyRegionSchemaList, regionSchema) + addRegionSchema(regionSchema) + // if !IsEnvVarTrue(OciPlcRegionExclusiveEnvVar) { + // addRegionSchema(regionSchema) + // return + // } + // Debugf("Plc region coexist is not enabled, remove exisiting OCI region schema and add PLC region schema.") + // resetRegionInfo() + // bulkAddRegionSchema(ociPlcRegionSchemaList) +} + +func resetRegionInfo() { + shortNameRegion = make(map[string]Region) + realm = make(map[string]string) + regionRealm = make(map[Region]string) +} + +func bulkAddRegionSchema(regionSchemaList []map[string]string) { + for _, regionSchema := range regionSchemaList { + if checkSchemaItems(regionSchema) { + addRegionSchema(regionSchema) + } + } +} + // check region schema content if all the required contents are provided func checkSchemaItems(regionSchema map[string]string) bool { if checkSchemaItem(regionSchema, regionIdentifierPropertyName) && @@ -330,7 +473,7 @@ func setRegionFromInstanceMetadataService(region *string) bool { // "regionIdentifier" : "ca-montreal-1" // } // Mark visitIMDS Flag as false since it has already been visited. - if visitIMDS == false { + if !visitIMDS { Debugf("check from IMDS is disabled or IMDS had already been successfully visited, no need to check again.") return false } @@ -366,7 +509,7 @@ func setRegionFromInstanceMetadataService(region *string) bool { // getRegionInfoFromInstanceMetadataServiceProd calls instance metadata service and get the region information func getRegionInfoFromInstanceMetadataServiceProd() ([]byte, error) { - request, err := http.NewRequest(http.MethodGet, instanceMetadataRegionInfoURLV2, nil) + request, _ := http.NewRequest(http.MethodGet, instanceMetadataRegionInfoURLV2, nil) request.Header.Add("Authorization", "Bearer Oracle") client := &http.Client{ @@ -374,7 +517,7 @@ func getRegionInfoFromInstanceMetadataServiceProd() ([]byte, error) { } resp, err := client.Do(request) if err != nil { - return nil, fmt.Errorf("Failed to call instance metadata service. Error: %v", err) + return nil, fmt.Errorf("failed to call instance metadata service. Error: %v", err) } statusCode := resp.StatusCode @@ -383,7 +526,7 @@ func getRegionInfoFromInstanceMetadataServiceProd() ([]byte, error) { content, err := ioutil.ReadAll(resp.Body) if err != nil { - return nil, fmt.Errorf("Failed to get region information from response body. Error: %v", err) + return nil, fmt.Errorf("failed to get region information from response body. Error: %v", err) } if statusCode != http.StatusOK { @@ -409,3 +552,70 @@ func SetMissingTemplateParams(client *BaseClient) { client.Host = strings.Replace(client.Host, template, "", -1) } } + +func getOciSdkEnabledServicesMap() map[string]bool { + var enabledMap = make(map[string]bool) + if jsonArr, ok := readAndParseAlloyConfigFile(); ok { + if jsonArr["provider"] != nil { + OciAlloyConfigFileProvider = jsonArr["provider"].(string) + } + if jsonArr["ociRegionCoexist"] != nil && jsonArr["ociRegionCoexist"] == true { + ociAlloyRegionCoexist = jsonArr["ociRegionCoexist"].(bool) + } + if jsonArr["services"] == nil { + return enabledMap + } + serviesJSON, ok := jsonArr["services"].([]interface{}) + if !ok { + return enabledMap + } + re, _ := regexp.Compile(`[^\w]`) + for _, jsonItem := range serviesJSON { + serviceName := strings.ToLower(fmt.Sprint(jsonItem)) + serviceName = re.ReplaceAllString(serviceName, "") + enabledMap[serviceName] = true + } + } + return enabledMap +} + +// AddServiceToEnabledServicesMap adds the service to the enabledServiceMap +// The service name will auto transit to lower case and remove all the non-word characters. +func AddServiceToEnabledServicesMap(serviceName string) { + if OciSdkEnabledServicesMap == nil { + OciSdkEnabledServicesMap = make(map[string]bool) + } + re, _ := regexp.Compile(`[^\w]`) + serviceName = strings.ToLower(serviceName) + serviceName = re.ReplaceAllString(serviceName, "") + OciSdkEnabledServicesMap[serviceName] = true +} + +// CheckForEnabledServices checks if the service is enabled in the enabledServiceMap. +// It will first check if the map is initialized, if not, it will initialize the map. +// If the map is empty, it means all the services are enabled. +// If the map is not empty, it means only the services in the map and value is true are enabled. +func CheckForEnabledServices(serviceName string) bool { + if OciSdkEnabledServicesMap == nil { + OciSdkEnabledServicesMap = getOciSdkEnabledServicesMap() + } + serviceName = strings.ToLower(serviceName) + if len(OciSdkEnabledServicesMap) == 0 { + return true + } + if _, ok := OciSdkEnabledServicesMap[serviceName]; !ok { + return false + } + return OciSdkEnabledServicesMap[serviceName] +} + +// CheckAllowOCIRegionCoexist checks if the OCI region coexist is allowed. +// This function will first check if the OCI_REGION_COEXIST environment variable is set. +// If it is set, it will return the value. +// If it is not set, it will return the value from the OciAlloyRegionCoexist variable. +func checkAllowOCIRegionCoexist() bool { + if val, ok := os.LookupEnv("OCI_REGION_COEXIST"); ok { + return val == "true" + } + return ociAlloyRegionCoexist +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/configuration.go index 4cd1d7edd1..4662804549 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/configuration.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/configuration.go @@ -21,10 +21,12 @@ type AuthenticationType string const ( // UserPrincipal is default auth type UserPrincipal AuthenticationType = "user_principal" - // InstancePrincipal is used for instance principle auth type + // InstancePrincipal is used for instance principal auth type InstancePrincipal AuthenticationType = "instance_principal" - // InstancePrincipalDelegationToken is used for instance principle delegation token auth type + // InstancePrincipalDelegationToken is used for instance principal delegation token auth type InstancePrincipalDelegationToken AuthenticationType = "instance_principle_delegation_token" + // ResourcePrincipalDelegationToken is used for resource principal delegation token auth type + ResourcePrincipalDelegationToken AuthenticationType = "resource_principle_delegation_token" // UnknownAuthenticationType is used for none meaningful auth type UnknownAuthenticationType AuthenticationType = "unknown_auth_type" ) @@ -51,7 +53,9 @@ type ConfigurationProvider interface { var fileMutex = sync.Mutex{} var fileCache = make(map[string][]byte) -func readFile(filename string) ([]byte, error) { +// Reads the file contents from cache if present otherwise reads the file. +// If file to be read is frequently updated/refreshed, please use readFile(filename) as readFileFromCache(filename) might return the old contents from the cache. +func readFileFromCache(filename string) ([]byte, error) { fileMutex.Lock() defer fileMutex.Unlock() val, ok := fileCache[filename] @@ -65,6 +69,14 @@ func readFile(filename string) ([]byte, error) { return val, err } +// Reads the file and returns the contents +func readFile(filename string) ([]byte, error) { + fileMutex.Lock() + defer fileMutex.Unlock() + val, err := os.ReadFile(filename) + return val, err +} + // IsConfigurationProviderValid Tests all parts of the configuration provider do not return an error, this method will // not check AuthType(), since authType() is not required to be there. func IsConfigurationProviderValid(conf ConfigurationProvider) (ok bool, err error) { @@ -179,7 +191,7 @@ func (p environmentConfigurationProvider) PrivateRSAKey() (key *rsa.PrivateKey, } expandedPath := expandPath(value) - pemFileContent, err := readFile(expandedPath) + pemFileContent, err := readFileFromCache(expandedPath) if err != nil { Debugln("Can not read PrivateKey location from environment variable: " + environmentVariable) return @@ -343,7 +355,7 @@ func parseConfigFile(data []byte, profile string) (info *configFileInfo, err err //Look for profile for i, line := range splitContent { - if match := profileRegex.FindStringSubmatch(line); match != nil && len(match) > 1 && match[1] == profile { + if match := profileRegex.FindStringSubmatch(line); len(match) > 1 && match[1] == profile { start := i + 1 return parseConfigAtLine(start, splitContent) } @@ -415,7 +427,7 @@ func expandPath(filename string) (expandedPath string) { func openConfigFile(configFilePath string) (data []byte, err error) { expandedPath := expandPath(configFilePath) - data, err = readFile(expandedPath) + data, err = readFileFromCache(expandedPath) if err != nil { err = fmt.Errorf("can not read config file: %s due to: %s", configFilePath, err.Error()) } @@ -547,7 +559,7 @@ func (p fileConfigurationProvider) PrivateRSAKey() (key *rsa.PrivateKey, err err } expandedPath := expandPath(filePath) - pemFileContent, err := readFile(expandedPath) + pemFileContent, err := readFileFromCache(expandedPath) if err != nil { err = fileConfigurationProviderError{err: fmt.Errorf("can not read PrivateKey from configuration file due to: %s", err.Error())} return @@ -589,7 +601,7 @@ func (p fileConfigurationProvider) AuthType() (AuthConfig, error) { err = fmt.Errorf("can not read tenancy configuration due to: %s", err.Error()) return AuthConfig{UnknownAuthenticationType, true, nil}, err } - val, err := presentOrError(info.AuthenticationType, hasAuthenticationType, info.PresentConfiguration, "authentication_type") + val, _ := presentOrError(info.AuthenticationType, hasAuthenticationType, info.PresentConfiguration, "authentication_type") if val == "instance_principal" { if filePath, err := presentOrError(info.DelegationTokenFilePath, hasDelegationTokenFile, info.PresentConfiguration, "delegationTokenFilePath"); err == nil { @@ -615,7 +627,7 @@ func getTokenContent(filePath string) (string, error) { err = fileConfigurationProviderError{err: fmt.Errorf("can not read token content from configuration file due to: %s", err.Error())} return "", err } - return fmt.Sprintf("%s", tokenFileContent), nil + return string(tokenFileContent), nil } // A configuration provider that look for information in multiple configuration providers @@ -720,6 +732,88 @@ func getRegionFromEnvVar() (string, error) { return "", fmt.Errorf("did not find OCI_REGION env var") } +type sessionTokenConfigurationProvider struct { + fileConfigurationProvider +} + +func (p sessionTokenConfigurationProvider) UserOCID() (value string, err error) { + info, err := p.readAndParseConfigFile() + if err != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("can not read the configuration due to: %s", err.Error())} + return + } + // In case of session token-based authentication, userOCID will not be present + // need to check if session token path is provided in the configuration + if _, stErr := presentOrError(info.SecurityTokenFilePath, hasSecurityTokenFile, info.PresentConfiguration, + "securityTokenPath"); stErr == nil { + err = nil + } + return +} + +func (p sessionTokenConfigurationProvider) KeyID() (keyID string, err error) { + _, err = p.TenancyOCID() + if err != nil { + return + } + + _, err = p.KeyFingerprint() + if err != nil { + return + } + + info, err := p.readAndParseConfigFile() + if err != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("can not read SessionTokenFilePath configuration due to: %s", err.Error())} + return + } + + filePath, pathErr := presentOrError(info.SecurityTokenFilePath, hasSecurityTokenFile, info.PresentConfiguration, "securityTokenFilePath") + if pathErr == nil { + rawString, err := getTokenContent(filePath) + if err != nil { + return "", fileConfigurationProviderError{err: err} + } + return "ST$" + rawString, nil + } + err = fileConfigurationProviderError{err: fmt.Errorf("can not read SessionTokenFilePath from configuration file due to: %s", pathErr.Error())} + return +} + +// ConfigurationProviderForSessionToken creates a session token configuration provider from a configuration file +// by reading the "DEFAULT" profile +func ConfigurationProviderForSessionToken(configFilePath, privateKeyPassword string) (ConfigurationProvider, error) { + if configFilePath == "" { + return nil, fileConfigurationProviderError{err: fmt.Errorf("config file path can not be empty")} + } + + return sessionTokenConfigurationProvider{ + fileConfigurationProvider{ + ConfigPath: configFilePath, + PrivateKeyPassword: privateKeyPassword, + Profile: "DEFAULT", + configMux: sync.Mutex{}}}, nil +} + +// ConfigurationProviderForSessionTokenWithProfile creates a session token configuration provider from a configuration file +// by reading the given profile +func ConfigurationProviderForSessionTokenWithProfile(configFilePath, profile, privateKeyPassword string) (ConfigurationProvider, error) { + if configFilePath == "" { + return nil, fileConfigurationProviderError{err: fmt.Errorf("config file path can not be empty")} + } + + return sessionTokenConfigurationProvider{ + fileConfigurationProvider{ + ConfigPath: configFilePath, + PrivateKeyPassword: privateKeyPassword, + Profile: profile, + configMux: sync.Mutex{}}}, nil +} + +func (p sessionTokenConfigurationProvider) Refreshable() bool { + return true +} + // RefreshableConfigurationProvider the interface to identity if the config provider is refreshable type RefreshableConfigurationProvider interface { Refreshable() bool diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/errors.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/errors.go index 75b59ff3f1..96d61f1c48 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/errors.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/errors.go @@ -5,11 +5,13 @@ package common import ( "encoding/json" + "errors" "fmt" "io/ioutil" "net" "net/http" "strings" + "syscall" "github.com/sony/gobreaker" ) @@ -255,7 +257,7 @@ type NonSeekableRequestRetryFailure struct { func (ne NonSeekableRequestRetryFailure) Error() string { if ne.err == nil { - return fmt.Sprintf("Unable to perform Retry on this request body type, which did not implement seek() interface") + return "Unable to perform Retry on this request body type, which did not implement seek() interface" } return fmt.Sprintf("%s. Unable to perform Retry on this request body type, which did not implement seek() interface", ne.err.Error()) } @@ -266,9 +268,14 @@ func IsNetworkError(err error) bool { return false } - if r, ok := err.(net.Error); ok && (r.Temporary() || r.Timeout()) || strings.Contains(err.Error(), "net/http: HTTP/1.x transport connection broken") { + if errors.Is(err, syscall.ECONNRESET) { return true } + + if r, ok := err.(net.Error); ok && (r.Timeout() || strings.Contains(err.Error(), "net/http: HTTP/1.x transport connection broken")) { + return true + } + return false } @@ -287,7 +294,7 @@ func IsCircuitBreakerError(err error) bool { func getCircuitBreakerError(request *http.Request, err error, cbr *OciCircuitBreaker) error { cbErr := fmt.Errorf("%s, so this request was not sent to the %s service.\n\n The circuit breaker was opened because the %s service failed too many times recently. "+ "Because the circuit breaker has been opened, requests within a %.2f second window of when the circuit breaker opened will not be sent to the %s service.\n\n"+ - "URL which circuit breaker prevented request to - %s \n Circuit Breaker Info \n Name - %s \n State - %s \n\n Errors from %s service which opened the circuit breaker:\n\n%s \n", + "URL which circuit breaker prevented request to - %s \n Circuit Breaker Info \n Name - %s \n State - %s \n\n Errors from %s service which opened the circuit breaker:\n\n%s", err, cbr.Cbst.serviceName, cbr.Cbst.serviceName, cbr.Cbst.openStateWindow.Seconds(), cbr.Cbst.serviceName, request.URL.Host+request.URL.Path, cbr.Cbst.name, cbr.Cb.State().String(), cbr.Cbst.serviceName, cbr.GetHistory()) return cbErr } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/helpers.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/helpers.go index d120065de9..7732c1c1d0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/helpers.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/helpers.go @@ -149,7 +149,7 @@ func tryParsing(data []byte, layouts ...string) (tm time.Time, err error) { return } } - err = fmt.Errorf("Could not parse time: %s with formats: %s", datestring, layouts[:]) + err = fmt.Errorf("could not parse time: %s with formats: %s", datestring, layouts[:]) return } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/http.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/http.go index f2d01ac929..80d75c4d65 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/http.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/http.go @@ -320,9 +320,8 @@ func checkBinaryBodyLength(request *http.Request) (contentLen int64, err error) } func getNormalBinaryBodyLength(request *http.Request) (contentLen int64, err error) { - dumpRequestBody := ioutil.NopCloser(bytes.NewBuffer(nil)) + var dumpRequestBody io.ReadCloser if dumpRequestBody, request.Body, err = drainBody(request.Body); err != nil { - dumpRequestBody = ioutil.NopCloser(bytes.NewBuffer(nil)) return contentLen, err } contentBody, err := ioutil.ReadAll(dumpRequestBody) @@ -972,7 +971,7 @@ func addFromHeaderCollection(response *http.Response, value *reflect.Value, fiel Debugln("Unmarshaling from header-collection to field:", field.Name) var headerPrefix string if headerPrefix = field.Tag.Get("prefix"); headerPrefix == "" { - return fmt.Errorf("Unmarshaling response to a header-collection requires the 'prefix' tag for field: %s", field.Name) + return fmt.Errorf("unmarshaling response to a header-collection requires the 'prefix' tag for field: %s", field.Name) } mapCollection := make(map[string]string) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/http_signer.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/http_signer.go index 225845785a..b8a2c4c5eb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/http_signer.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/http_signer.go @@ -197,7 +197,7 @@ func GetBodyHash(request *http.Request) (hashString string, err error) { } var data []byte - bReader := request.Body + var bReader io.Reader bReader, request.Body, err = drainBody(request.Body) if err != nil { return "", fmt.Errorf("can not read body of request while calculating body hash: %s", err.Error()) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.go index 49ab7ee9b0..5acce3cd67 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.go @@ -72,6 +72,8 @@ const ( RegionEUMadrid1 Region = "eu-madrid-1" //RegionUSChicago1 region Chicago RegionUSChicago1 Region = "us-chicago-1" + //RegionMXMonterrey1 region Monterrey + RegionMXMonterrey1 Region = "mx-monterrey-1" //RegionUSLangley1 region Langley RegionUSLangley1 Region = "us-langley-1" //RegionUSLuke1 region Luke @@ -108,6 +110,8 @@ const ( RegionEUDccDublin1 Region = "eu-dcc-dublin-1" //RegionEUMadrid2 region Madrid RegionEUMadrid2 Region = "eu-madrid-2" + //RegionEUFrankfurt2 region Frankfurt + RegionEUFrankfurt2 Region = "eu-frankfurt-2" //RegionEUJovanovac1 region Jovanovac RegionEUJovanovac1 Region = "eu-jovanovac-1" ) @@ -147,6 +151,7 @@ var shortNameRegion = map[string]Region{ "qro": RegionMXQueretaro1, "mad": RegionEUMadrid1, "ord": RegionUSChicago1, + "mty": RegionMXMonterrey1, "lfi": RegionUSLangley1, "luf": RegionUSLuke1, "ric": RegionUSGovAshburn1, @@ -165,6 +170,7 @@ var shortNameRegion = map[string]Region{ "dus": RegionEUDccRating1, "ork": RegionEUDccDublin1, "vll": RegionEUMadrid2, + "str": RegionEUFrankfurt2, "beg": RegionEUJovanovac1, } @@ -216,6 +222,7 @@ var regionRealm = map[Region]string{ RegionMXQueretaro1: "oc1", RegionEUMadrid1: "oc1", RegionUSChicago1: "oc1", + RegionMXMonterrey1: "oc1", RegionUSLangley1: "oc2", RegionUSLuke1: "oc2", @@ -241,7 +248,8 @@ var regionRealm = map[Region]string{ RegionEUDccRating1: "oc14", RegionEUDccDublin1: "oc14", - RegionEUMadrid2: "oc19", + RegionEUMadrid2: "oc19", + RegionEUFrankfurt2: "oc19", RegionEUJovanovac1: "oc20", } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.json b/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.json index c9549a0979..b279c5b242 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.json +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.json @@ -316,5 +316,17 @@ "realmKey": "oc19", "regionIdentifier": "eu-madrid-2", "realmDomainComponent": "oraclecloud.eu" + }, + { + "regionKey": "str", + "realmKey": "oc19", + "regionIdentifier": "eu-frankfurt-2", + "realmDomainComponent": "oraclecloud.eu" + }, + { + "regionKey": "mty", + "realmKey": "oc1", + "regionIdentifier": "mx-monterrey-1", + "realmDomainComponent": "oraclecloud.com" } ] \ No newline at end of file diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/retry.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/retry.go index 782b12ef90..12ef50b80b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/retry.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/retry.go @@ -184,7 +184,7 @@ var GlobalRetry *RetryPolicy = nil // RetryPolicyOption is the type of the options for NewRetryPolicy. type RetryPolicyOption func(rp *RetryPolicy) -// Convert retry policy to human-readable string representation +// String Converts retry policy to human-readable string representation func (rp RetryPolicy) String() string { return fmt.Sprintf("{MaximumNumberAttempts=%v, MinSleepBetween=%v, MaxSleepBetween=%v, ExponentialBackoffBase=%v, NonEventuallyConsistentPolicy=%v}", rp.MaximumNumberAttempts, rp.MinSleepBetween, rp.MaxSleepBetween, rp.ExponentialBackoffBase, rp.NonEventuallyConsistentPolicy) @@ -753,7 +753,7 @@ func determinePolicyToUse(policy RetryPolicy) (RetryPolicy, *time.Time, float64) var useDefaultTimingInstead = true var endOfWindowTime = (*time.Time)(nil) var backoffScalingFactor = 1.0 - var policyToUse RetryPolicy = policy + var policyToUse = policy eowt := EcContext.GetEndOfWindow() if eowt != nil { @@ -774,17 +774,17 @@ func determinePolicyToUse(policy RetryPolicy) (RetryPolicy, *time.Time, float64) Debugln(fmt.Sprintf("Use eventually consistent timing, durationToEndOfWindow = %v, maximumCumulativeBackoffWithoutJitter = %v, backoffScalingFactor = %.2f", durationToEndOfWindow, maximumCumulativeBackoffWithoutJitter, backoffScalingFactor)) } else { - Debugln(fmt.Sprintf("Use default timing, end of EC window is sooner than default retries")) + Debugln("Use default timing, end of EC window is sooner than default retries") } } else { useDefaultTimingInstead = false policyToUse = *policy.NonEventuallyConsistentPolicy - Debugln(fmt.Sprintf("Use default timing and strategy, end of EC window is in the past")) + Debugln("Use default timing and strategy, end of EC window is in the past") } } else { useDefaultTimingInstead = false policyToUse = *policy.NonEventuallyConsistentPolicy - Debugln(fmt.Sprintf("Use default timing and strategy, no EC window set")) + Debugln("Use default timing and strategy, no EC window set") } if useDefaultTimingInstead { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/utils/opc_request_id.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/utils/opc_request_id.go index 55615503a0..d82f0bf5e7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/utils/opc_request_id.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/utils/opc_request_id.go @@ -6,8 +6,7 @@ import ( "fmt" ) -// GenerateOpcRequestId -// Reference: https://confluence.oci.oraclecorp.com/display/DEX/Request+IDs +// GenerateOpcRequestID - Reference: https://confluence.oci.oraclecorp.com/display/DEX/Request+IDs // Maximum segment length: 32 characters // Allowed segment contents: regular expression pattern /^[a-zA-Z0-9]{0,32}$/ func GenerateOpcRequestID() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go index 88dc1abd9d..bb214bada9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go @@ -12,8 +12,8 @@ import ( const ( major = "65" - minor = "40" - patch = "1" + minor = "49" + patch = "2" tag = "" ) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_distribution_statement_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_distribution_statement_details.go index d615fd3d0b..b1756228db 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_distribution_statement_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_distribution_statement_details.go @@ -83,7 +83,6 @@ func (m *AddDrgRouteDistributionStatementDetails) UnmarshalJSON(data []byte) (e m.MatchCriteria[i] = nil } } - m.Action = model.Action m.Priority = model.Priority diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_rule_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_rule_details.go index 5a9aacb5b7..182df7e0f7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_rule_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_rule_details.go @@ -32,7 +32,7 @@ type AddDrgRouteRuleDetails struct { // This is the range of IP addresses used for matching when routing // traffic. Only CIDR_BLOCK values are allowed. // Potential values: - // * IP address range in CIDR notation. This can be an IPv4 or IPv6 CIDR. For example: `192.168.1.0/24` + // * IP address range in CIDR notation. This can be an IPv4 CIDR block or IPv6 prefix. For example: `192.168.1.0/24` // or `2001:0db8:0123:45::/56`. Destination *string `mandatory:"true" json:"destination"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv6_subnet_cidr_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv6_subnet_cidr_request_response.go index f3e081337b..6f83e78ea5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv6_subnet_cidr_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv6_subnet_cidr_request_response.go @@ -21,7 +21,7 @@ type AddIpv6SubnetCidrRequest struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` - // Details object for adding an IPv6 CIDR to a subnet. + // Details object for adding an IPv6 prefix to a subnet. AddSubnetIpv6CidrDetails `contributesTo:"body"` // A token that uniquely identifies a request so it can be retried in case of a timeout or diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_subnet_ipv6_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_subnet_ipv6_cidr_details.go index e8b9064657..4ef2a342d5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_subnet_ipv6_cidr_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_subnet_ipv6_cidr_details.go @@ -21,10 +21,10 @@ import ( "strings" ) -// AddSubnetIpv6CidrDetails Details used when adding an IPv6 CIDR block to a subnet. +// AddSubnetIpv6CidrDetails Details used when adding an IPv6 prefix to a subnet. type AddSubnetIpv6CidrDetails struct { - // This field is not required and should only be specified when adding an IPv6 CIDR + // This field is not required and should only be specified when adding an IPv6 prefix // to a subnet's IPv6 address space. // SeeIPv6 Addresses (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). // Example: `2001:0db8:0123::/64` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_gpu_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_gpu_launch_instance_platform_config.go index bb0f7af167..94f3d130d7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_gpu_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_gpu_launch_instance_platform_config.go @@ -22,7 +22,8 @@ import ( "strings" ) -// AmdMilanBmGpuLaunchInstancePlatformConfig The platform configuration used when launching a bare metal instance with a GPU shape on the AMD Milan platform. +// AmdMilanBmGpuLaunchInstancePlatformConfig The platform configuration used when launching a bare metal GPU instance with the following shape: BM.GPU.GM4.8 (also +// named BM.GPU.A100-v2.8) (the AMD Milan platform). type AmdMilanBmGpuLaunchInstancePlatformConfig struct { // Whether Secure Boot is enabled on the instance. @@ -56,26 +57,29 @@ type AmdMilanBmGpuLaunchInstancePlatformConfig struct { // Whether the input-output memory management unit is enabled. IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m AmdMilanBmGpuLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m AmdMilanBmGpuLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m AmdMilanBmGpuLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m AmdMilanBmGpuLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_gpu_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_gpu_platform_config.go index 0bbd6a9b0b..ccbe478cea 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_gpu_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_gpu_platform_config.go @@ -22,8 +22,8 @@ import ( "strings" ) -// AmdMilanBmGpuPlatformConfig The platform configuration used when launching a bare metal GPU instance with the following shape: BM.GPU.GM4.8 -// (the AMD Milan platform). +// AmdMilanBmGpuPlatformConfig The platform configuration used when launching a bare metal GPU instance with the following shape: BM.GPU.GM4.8 (also +// named BM.GPU.A100-v2.8) (the AMD Milan platform). type AmdMilanBmGpuPlatformConfig struct { // Whether Secure Boot is enabled on the instance. @@ -57,26 +57,29 @@ type AmdMilanBmGpuPlatformConfig struct { // Whether the input-output memory management unit is enabled. IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m AmdMilanBmGpuPlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m AmdMilanBmGpuPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m AmdMilanBmGpuPlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m AmdMilanBmGpuPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_launch_instance_platform_config.go index 6aaba54d46..a312945644 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_launch_instance_platform_config.go @@ -65,26 +65,29 @@ type AmdMilanBmLaunchInstancePlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m AmdMilanBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m AmdMilanBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m AmdMilanBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m AmdMilanBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_platform_config.go index fe9a6ec96a..2c8f666e70 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_platform_config.go @@ -65,26 +65,29 @@ type AmdMilanBmPlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdMilanBmPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m AmdMilanBmPlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m AmdMilanBmPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m AmdMilanBmPlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m AmdMilanBmPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_gpu_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_gpu_launch_instance_platform_config.go index fffc58eec7..7136cd1c41 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_gpu_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_gpu_launch_instance_platform_config.go @@ -57,26 +57,29 @@ type AmdRomeBmGpuLaunchInstancePlatformConfig struct { // Whether the input-output memory management unit is enabled. IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m AmdRomeBmGpuLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m AmdRomeBmGpuLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m AmdRomeBmGpuLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m AmdRomeBmGpuLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_gpu_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_gpu_platform_config.go index 4ca9073405..8ae7c859bd 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_gpu_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_gpu_platform_config.go @@ -57,26 +57,29 @@ type AmdRomeBmGpuPlatformConfig struct { // Whether the input-output memory management unit is enabled. IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m AmdRomeBmGpuPlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m AmdRomeBmGpuPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m AmdRomeBmGpuPlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m AmdRomeBmGpuPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_launch_instance_platform_config.go index a7e79f10ed..82d961e7b8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_launch_instance_platform_config.go @@ -65,26 +65,29 @@ type AmdRomeBmLaunchInstancePlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m AmdRomeBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m AmdRomeBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m AmdRomeBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m AmdRomeBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_platform_config.go index 1d8f02bd64..118ebe44de 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_platform_config.go @@ -64,26 +64,29 @@ type AmdRomeBmPlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdRomeBmPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m AmdRomeBmPlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m AmdRomeBmPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m AmdRomeBmPlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m AmdRomeBmPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_launch_instance_platform_config.go index 4368b11419..85a974ec6b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_launch_instance_platform_config.go @@ -38,22 +38,22 @@ type AmdVmLaunchInstancePlatformConfig struct { IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m AmdVmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m AmdVmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m AmdVmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m AmdVmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_platform_config.go index 89d5005a70..3de5c42d2a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_platform_config.go @@ -38,22 +38,22 @@ type AmdVmPlatformConfig struct { IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m AmdVmPlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m AmdVmPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m AmdVmPlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m AmdVmPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_emulated_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_emulated_volume_details.go index e09916ec11..4b1ba3fce7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_emulated_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_emulated_volume_details.go @@ -48,32 +48,32 @@ type AttachEmulatedVolumeDetails struct { IsShareable *bool `mandatory:"false" json:"isShareable"` } -//GetDevice returns Device +// GetDevice returns Device func (m AttachEmulatedVolumeDetails) GetDevice() *string { return m.Device } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m AttachEmulatedVolumeDetails) GetDisplayName() *string { return m.DisplayName } -//GetInstanceId returns InstanceId +// GetInstanceId returns InstanceId func (m AttachEmulatedVolumeDetails) GetInstanceId() *string { return m.InstanceId } -//GetIsReadOnly returns IsReadOnly +// GetIsReadOnly returns IsReadOnly func (m AttachEmulatedVolumeDetails) GetIsReadOnly() *bool { return m.IsReadOnly } -//GetIsShareable returns IsShareable +// GetIsShareable returns IsShareable func (m AttachEmulatedVolumeDetails) GetIsShareable() *bool { return m.IsShareable } -//GetVolumeId returns VolumeId +// GetVolumeId returns VolumeId func (m AttachEmulatedVolumeDetails) GetVolumeId() *string { return m.VolumeId } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_i_scsi_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_i_scsi_volume_details.go index 31a4b37a2f..4334d06808 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_i_scsi_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_i_scsi_volume_details.go @@ -58,32 +58,32 @@ type AttachIScsiVolumeDetails struct { EncryptionInTransitType EncryptionInTransitTypeEnum `mandatory:"false" json:"encryptionInTransitType,omitempty"` } -//GetDevice returns Device +// GetDevice returns Device func (m AttachIScsiVolumeDetails) GetDevice() *string { return m.Device } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m AttachIScsiVolumeDetails) GetDisplayName() *string { return m.DisplayName } -//GetInstanceId returns InstanceId +// GetInstanceId returns InstanceId func (m AttachIScsiVolumeDetails) GetInstanceId() *string { return m.InstanceId } -//GetIsReadOnly returns IsReadOnly +// GetIsReadOnly returns IsReadOnly func (m AttachIScsiVolumeDetails) GetIsReadOnly() *bool { return m.IsReadOnly } -//GetIsShareable returns IsShareable +// GetIsShareable returns IsShareable func (m AttachIScsiVolumeDetails) GetIsShareable() *bool { return m.IsShareable } -//GetVolumeId returns VolumeId +// GetVolumeId returns VolumeId func (m AttachIScsiVolumeDetails) GetVolumeId() *string { return m.VolumeId } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_paravirtualized_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_paravirtualized_volume_details.go index d51cf53a1d..4666a9b54f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_paravirtualized_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_paravirtualized_volume_details.go @@ -51,32 +51,32 @@ type AttachParavirtualizedVolumeDetails struct { IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` } -//GetDevice returns Device +// GetDevice returns Device func (m AttachParavirtualizedVolumeDetails) GetDevice() *string { return m.Device } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m AttachParavirtualizedVolumeDetails) GetDisplayName() *string { return m.DisplayName } -//GetInstanceId returns InstanceId +// GetInstanceId returns InstanceId func (m AttachParavirtualizedVolumeDetails) GetInstanceId() *string { return m.InstanceId } -//GetIsReadOnly returns IsReadOnly +// GetIsReadOnly returns IsReadOnly func (m AttachParavirtualizedVolumeDetails) GetIsReadOnly() *bool { return m.IsReadOnly } -//GetIsShareable returns IsShareable +// GetIsShareable returns IsShareable func (m AttachParavirtualizedVolumeDetails) GetIsShareable() *bool { return m.IsShareable } -//GetVolumeId returns VolumeId +// GetVolumeId returns VolumeId func (m AttachParavirtualizedVolumeDetails) GetVolumeId() *string { return m.VolumeId } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_service_determined_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_service_determined_volume_details.go index 83ba68c4b8..b69c1338a1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_service_determined_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_service_determined_volume_details.go @@ -48,32 +48,32 @@ type AttachServiceDeterminedVolumeDetails struct { IsShareable *bool `mandatory:"false" json:"isShareable"` } -//GetDevice returns Device +// GetDevice returns Device func (m AttachServiceDeterminedVolumeDetails) GetDevice() *string { return m.Device } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m AttachServiceDeterminedVolumeDetails) GetDisplayName() *string { return m.DisplayName } -//GetInstanceId returns InstanceId +// GetInstanceId returns InstanceId func (m AttachServiceDeterminedVolumeDetails) GetInstanceId() *string { return m.InstanceId } -//GetIsReadOnly returns IsReadOnly +// GetIsReadOnly returns IsReadOnly func (m AttachServiceDeterminedVolumeDetails) GetIsReadOnly() *bool { return m.IsReadOnly } -//GetIsShareable returns IsShareable +// GetIsShareable returns IsShareable func (m AttachServiceDeterminedVolumeDetails) GetIsShareable() *bool { return m.IsShareable } -//GetVolumeId returns VolumeId +// GetVolumeId returns VolumeId func (m AttachServiceDeterminedVolumeDetails) GetVolumeId() *string { return m.VolumeId } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_volume_details.go index 51e891a966..c9a3f9bdf6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_volume_details.go @@ -50,12 +50,12 @@ type AttachVolumeDetails interface { type attachvolumedetails struct { JsonData []byte - InstanceId *string `mandatory:"true" json:"instanceId"` - VolumeId *string `mandatory:"true" json:"volumeId"` Device *string `mandatory:"false" json:"device"` DisplayName *string `mandatory:"false" json:"displayName"` IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` IsShareable *bool `mandatory:"false" json:"isShareable"` + InstanceId *string `mandatory:"true" json:"instanceId"` + VolumeId *string `mandatory:"true" json:"volumeId"` Type string `json:"type"` } @@ -112,36 +112,36 @@ func (m *attachvolumedetails) UnmarshalPolymorphicJSON(data []byte) (interface{} } } -//GetInstanceId returns InstanceId -func (m attachvolumedetails) GetInstanceId() *string { - return m.InstanceId -} - -//GetVolumeId returns VolumeId -func (m attachvolumedetails) GetVolumeId() *string { - return m.VolumeId -} - -//GetDevice returns Device +// GetDevice returns Device func (m attachvolumedetails) GetDevice() *string { return m.Device } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m attachvolumedetails) GetDisplayName() *string { return m.DisplayName } -//GetIsReadOnly returns IsReadOnly +// GetIsReadOnly returns IsReadOnly func (m attachvolumedetails) GetIsReadOnly() *bool { return m.IsReadOnly } -//GetIsShareable returns IsShareable +// GetIsShareable returns IsShareable func (m attachvolumedetails) GetIsShareable() *bool { return m.IsShareable } +// GetInstanceId returns InstanceId +func (m attachvolumedetails) GetInstanceId() *string { + return m.InstanceId +} + +// GetVolumeId returns VolumeId +func (m attachvolumedetails) GetVolumeId() *string { + return m.VolumeId +} + func (m attachvolumedetails) String() string { return common.PointerString(m) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/boolean_image_capability_schema_descriptor.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/boolean_image_capability_schema_descriptor.go index 7657983bcb..fd85db32f4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/boolean_image_capability_schema_descriptor.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/boolean_image_capability_schema_descriptor.go @@ -31,7 +31,7 @@ type BooleanImageCapabilitySchemaDescriptor struct { Source ImageCapabilitySchemaDescriptorSourceEnum `mandatory:"true" json:"source"` } -//GetSource returns Source +// GetSource returns Source func (m BooleanImageCapabilitySchemaDescriptor) GetSource() ImageCapabilitySchemaDescriptorSourceEnum { return m.Source } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume.go index 21add48e6a..da19cea90e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume.go @@ -197,10 +197,7 @@ func (m *BootVolume) UnmarshalJSON(data []byte) (e error) { m.AutoTunedVpusPerGB = model.AutoTunedVpusPerGB m.BootVolumeReplicas = make([]BootVolumeReplicaInfo, len(model.BootVolumeReplicas)) - for i, n := range model.BootVolumeReplicas { - m.BootVolumeReplicas[i] = n - } - + copy(m.BootVolumeReplicas, model.BootVolumeReplicas) m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) for i, n := range model.AutotunePolicies { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -213,7 +210,6 @@ func (m *BootVolume) UnmarshalJSON(data []byte) (e error) { m.AutotunePolicies[i] = nil } } - m.AvailabilityDomain = model.AvailabilityDomain m.CompartmentId = model.CompartmentId diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range.go index 255ebb90e1..028ca83ded 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range.go @@ -61,7 +61,7 @@ type ByoipRange struct { // Example: `{"Department": "Finance"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - // The IPv6 CIDR block being imported to the Oracle cloud. This CIDR block must be /48 or larger, and can be subdivided into sub-ranges used + // The IPv6 prefix being imported to the Oracle cloud. This prefix must be /48 or larger, and can be subdivided into sub-ranges used // across multiple VCNs. A BYOIPv6 prefix can be also assigned across multiple VCNs, and each VCN must be /64 or larger. You may specify // a ULA or private IPv6 prefix of /64 or larger to use in the VCN. IPv6-enabled subnets will remain a fixed /64 in size. Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_summary.go index 5828754970..d6842d9711 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_summary.go @@ -50,7 +50,7 @@ type ByoipRangeSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource. Id *string `mandatory:"false" json:"id"` - // The IPv6 CIDR block being imported to the Oracle cloud. This CIDR block must be /48 or larger, and can be subdivided into sub-ranges used + // The IPv6 prefix being imported to the Oracle cloud. This prefix must be /48 or larger, and can be subdivided into sub-ranges used // across multiple VCNs. A BYOIPv6 prefix can be assigned across multiple VCNs, and each VCN must be /64 or larger. You may specify // a ULA or private IPv6 prefix of /64 or larger to use in the VCN. IPv6-enabled subnets will remain a fixed /64 in size. Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_vcn_ipv6_allocation_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_vcn_ipv6_allocation_summary.go index 322a7db292..5a9e0e7f7f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_vcn_ipv6_allocation_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_vcn_ipv6_allocation_summary.go @@ -21,7 +21,7 @@ import ( "strings" ) -// ByoipRangeVcnIpv6AllocationSummary A summary of IPv6 CIDR block subranges currently allocated to a VCN. +// ByoipRangeVcnIpv6AllocationSummary A summary of IPv6 prefix subranges currently allocated to a VCN. type ByoipRangeVcnIpv6AllocationSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource to which the CIDR block belongs. @@ -30,7 +30,7 @@ type ByoipRangeVcnIpv6AllocationSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the `ByoipRange`. CompartmentId *string `mandatory:"false" json:"compartmentId"` - // The BYOIPv6 CIDR block range or subrange allocated to a VCN. This could be all or part of a BYOIPv6 CIDR block. + // The BYOIPv6 prefix range or subrange allocated to a VCN. This could be all or part of a BYOIPv6 prefix. // Each VCN allocation must be /64 or larger. Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoipv6_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoipv6_cidr_details.go index 26673979b6..84f22b15b1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoipv6_cidr_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoipv6_cidr_details.go @@ -21,17 +21,17 @@ import ( "strings" ) -// Byoipv6CidrDetails The list of one or more BYOIPv6 CIDR blocks for the VCN that meets the following criteria: -// - The CIDR must from a BYOIPv6 range. -// - The IPv6 CIDR blocks must be valid. -// - Multiple CIDR blocks must not overlap each other or the on-premises network CIDR block. -// - The number of CIDR blocks must not exceed the limit of IPv6 CIDR blocks allowed to a VCN. +// Byoipv6CidrDetails The list of one or more BYOIPv6 prefixes for the VCN that meets the following criteria: +// - The prefix must be from a BYOIPv6 range. +// - The IPv6 prefixes must be valid. +// - Multiple prefix must not overlap each other or the on-premises network prefix. +// - The number of prefixes must not exceed the limit of IPv6 prefixes allowed to a VCN. type Byoipv6CidrDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource to which the CIDR block belongs. Byoipv6RangeId *string `mandatory:"true" json:"byoipv6RangeId"` - // An IPv6 CIDR block required to create a VCN with a BYOIP prefix. It could be the whole CIDR block identified in `byoipv6RangeId`, or a subrange. + // An IPv6 prefix required to create a VCN with a BYOIP prefix. It could be the whole prefix identified in `byoipv6RangeId`, or a subrange. // Example: `2001:0db8:0123::/48` Ipv6CidrBlock *string `mandatory:"true" json:"ipv6CidrBlock"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/capture_filter.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/capture_filter.go index f8afe72646..200512cfce 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/capture_filter.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/capture_filter.go @@ -21,8 +21,9 @@ import ( "strings" ) -// CaptureFilter A capture filter contains a set of *CaptureFilterRuleDetails* governing what traffic a *Vtap* mirrors. -// The capture filter is created with no rules defined, and it must have at least one rule for the VTAP to start mirroring traffic. +// CaptureFilter A capture filter contains a set of *CaptureFilterRuleDetails* governing what traffic is +// mirrored for a *Vtap* or captured for a *VCN Flow Log (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/vcn-flow-logs.htm)*. +// The capture filter is created with no rules defined, and it must have at least one rule to mirror traffic for the VTAP or collect VCN flow logs. type CaptureFilter struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the capture filter. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_capture_filter_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_capture_filter_compartment_details.go index 883b8d2c8e..21f9e75c1a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_capture_filter_compartment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_capture_filter_compartment_details.go @@ -21,7 +21,7 @@ import ( "strings" ) -// ChangeCaptureFilterCompartmentDetails These configuration details are used in the move operation when changing the compartment containing a virtual test access point (VTAP) capture filter. +// ChangeCaptureFilterCompartmentDetails These configuration details are used in the move operation when changing the compartment containing a capture filter. type ChangeCaptureFilterCompartmentDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the destination compartment for the VTAP diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_cluster_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_cluster_compartment_details.go index 43251a725c..c10e9d6272 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_cluster_compartment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_cluster_compartment_details.go @@ -21,7 +21,7 @@ import ( "strings" ) -// ChangeComputeClusterCompartmentDetails The configuration details for the compartment to move the compute cluster to. A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory access (RDMA) network group. +// ChangeComputeClusterCompartmentDetails The configuration details for the move operation. type ChangeComputeClusterCompartmentDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the compute cluster to. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_cluster_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_cluster_compartment_request_response.go index 829094d430..f406753ced 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_cluster_compartment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_cluster_compartment_request_response.go @@ -19,8 +19,8 @@ import ( type ChangeComputeClusterCompartmentRequest struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. - // A compute cluster is a remote direct memory access (RDMA) network group. - // For more information, see Compute Clusters (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). + // A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory + // access (RDMA) network group. ComputeClusterId *string `mandatory:"true" contributesTo:"path" name:"computeClusterId"` // The request to move the compute cluster to a different compartment. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_config_details.go index dfe84032b3..eab04cca8f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_config_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_config_details.go @@ -28,10 +28,10 @@ import ( // is returned. type ClusterConfigDetails struct { - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the HpcIsland. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the HPC island. HpcIslandId *string `mandatory:"true" json:"hpcIslandId"` - // The list of OCID of the network blocks. + // The list of OCIDs of the network blocks. NetworkBlockIds []string `mandatory:"false" json:"networkBlockIds"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_configuration_details.go new file mode 100644 index 0000000000..b4057f6f10 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_configuration_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClusterConfigurationDetails The HPC cluster configuration requested when launching instances of a cluster network. +// If the parameter is provided, instances will only be placed within the HPC island and list of network blocks +// that you specify. If a list of network blocks are missing or not provided, the instances will be placed in any +// HPC blocks in the HPC island that you specify. If the values of HPC island or network block that you provide are +// not valid, an error is returned. +type ClusterConfigurationDetails struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the HPC island. + HpcIslandId *string `mandatory:"true" json:"hpcIslandId"` + + // The list of network block OCIDs. + NetworkBlockIds []string `mandatory:"false" json:"networkBlockIds"` +} + +func (m ClusterConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClusterConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network.go index 149422709a..191f7207f2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network.go @@ -21,9 +21,14 @@ import ( "strings" ) -// ClusterNetwork A cluster network is a group of high performance computing (HPC) bare metal instances that are connected -// with an ultra low latency network. For more information about cluster networks, see -// Managing Cluster Networks (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). +// ClusterNetwork A cluster network is a group of high performance computing (HPC), GPU, or optimized bare metal +// instances that are connected with an ultra low-latency remote direct memory access (RDMA) +// network. Cluster networks with instance pools (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm) +// use instance pools to manage groups of identical instances. +// Use cluster networks with instance pools when you want predictable capacity for a specific number of identical +// instances that are managed as a group. +// If you want to manage instances in the RDMA network independently of each other or use different types of instances +// in the network group, use compute clusters instead. For details, see ComputeCluster. type ClusterNetwork struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster network. @@ -43,7 +48,7 @@ type ClusterNetwork struct { // Example: `2016-08-25T21:10:29.600Z` TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the hpc island used by the cluster network. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the HPC island used by the cluster network. HpcIslandId *string `mandatory:"false" json:"hpcIslandId"` // The list of network block OCIDs of the HPC island. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network_placement_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network_placement_configuration_details.go index eeacf53b08..54febd508b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network_placement_configuration_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network_placement_configuration_details.go @@ -28,9 +28,14 @@ type ClusterNetworkPlacementConfigurationDetails struct { // Example: `Uocm:PHX-AD-1` AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet to place - // instances. - PrimarySubnetId *string `mandatory:"true" json:"primarySubnetId"` + // The placement constraint when reserving hosts. + PlacementConstraint ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum `mandatory:"false" json:"placementConstraint,omitempty"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet to place instances. This field is deprecated. + // Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. + PrimarySubnetId *string `mandatory:"false" json:"primarySubnetId"` + + PrimaryVnicSubnets *InstancePoolPlacementPrimarySubnet `mandatory:"false" json:"primaryVnicSubnets"` // The set of secondary VNIC data for instances in the pool. SecondaryVnicSubnets []InstancePoolPlacementSecondaryVnicSubnet `mandatory:"false" json:"secondaryVnicSubnets"` @@ -46,8 +51,57 @@ func (m ClusterNetworkPlacementConfigurationDetails) String() string { func (m ClusterNetworkPlacementConfigurationDetails) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum(string(m.PlacementConstraint)); !ok && m.PlacementConstraint != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PlacementConstraint: %s. Supported values are: %s.", m.PlacementConstraint, strings.Join(GetClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } return false, nil } + +// ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum Enum with underlying type: string +type ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum string + +// Set of constants representing the allowable values for ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum +const ( + ClusterNetworkPlacementConfigurationDetailsPlacementConstraintSingleTier ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum = "SINGLE_TIER" + ClusterNetworkPlacementConfigurationDetailsPlacementConstraintSingleBlock ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum = "SINGLE_BLOCK" + ClusterNetworkPlacementConfigurationDetailsPlacementConstraintPackedDistributionMultiBlock ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum = "PACKED_DISTRIBUTION_MULTI_BLOCK" +) + +var mappingClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum = map[string]ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum{ + "SINGLE_TIER": ClusterNetworkPlacementConfigurationDetailsPlacementConstraintSingleTier, + "SINGLE_BLOCK": ClusterNetworkPlacementConfigurationDetailsPlacementConstraintSingleBlock, + "PACKED_DISTRIBUTION_MULTI_BLOCK": ClusterNetworkPlacementConfigurationDetailsPlacementConstraintPackedDistributionMultiBlock, +} + +var mappingClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnumLowerCase = map[string]ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum{ + "single_tier": ClusterNetworkPlacementConfigurationDetailsPlacementConstraintSingleTier, + "single_block": ClusterNetworkPlacementConfigurationDetailsPlacementConstraintSingleBlock, + "packed_distribution_multi_block": ClusterNetworkPlacementConfigurationDetailsPlacementConstraintPackedDistributionMultiBlock, +} + +// GetClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnumValues Enumerates the set of values for ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum +func GetClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnumValues() []ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum { + values := make([]ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum, 0) + for _, v := range mappingClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum { + values = append(values, v) + } + return values +} + +// GetClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnumStringValues Enumerates the set of values in String for ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum +func GetClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnumStringValues() []string { + return []string{ + "SINGLE_TIER", + "SINGLE_BLOCK", + "PACKED_DISTRIBUTION_MULTI_BLOCK", + } +} + +// GetMappingClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum(val string) (ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum, bool) { + enum, ok := mappingClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network_summary.go index 9adac2a7f5..9e35b8be80 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network_summary.go @@ -21,7 +21,7 @@ import ( "strings" ) -// ClusterNetworkSummary Summary information for a cluster network. +// ClusterNetworkSummary Summary information for a cluster network with instance pools (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). type ClusterNetworkSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster network. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster.go index 181304a492..4800ab6560 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster.go @@ -21,11 +21,12 @@ import ( "strings" ) -// ComputeCluster A remote direct memory access (RDMA) network group. Compute clusters are groups -// of high performance computing (HPC) bare metal instances that are connected with an ultra low latency network. -// Compute clusters allow you to manage instances in the cluster individually. -// For more information, see Compute Clusters (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). -// For details about cluster networks that use intance pools to manage groups of identical instances, +// ComputeCluster A remote direct memory access (RDMA) network group. +// A cluster network on a compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a group of +// high performance computing (HPC), GPU, or optimized instances that are connected with an ultra low-latency network. +// Use compute clusters when you want to manage instances in the cluster individually, or when you want +// to use different types of instances in the RDMA network group. +// For details about cluster networks that use instance pools to manage groups of identical instances, // see ClusterNetwork. type ComputeCluster struct { @@ -33,10 +34,10 @@ type ComputeCluster struct { // Example: `Uocm:PHX-AD-1` AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains this compute cluster. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the compute cluster. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of this compute cluster. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. Id *string `mandatory:"true" json:"id"` // The current state of the compute cluster. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster_collection.go index 8a84effba6..63312f6de4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster_collection.go @@ -21,7 +21,8 @@ import ( "strings" ) -// ComputeClusterCollection A list of compute clusters that match filter criteria, if any. A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory access (RDMA) network group. +// ComputeClusterCollection A list of compute clusters that match filter criteria, if any. A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) +// is a remote direct memory access (RDMA) network group. type ComputeClusterCollection struct { // The list of compute clusters. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster_summary.go index bea56d1477..040c6bf7fb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster_summary.go @@ -21,17 +21,18 @@ import ( "strings" ) -// ComputeClusterSummary Summary information for a compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm), which is a remote direct memory access (RDMA) network group. +// ComputeClusterSummary Summary information for a compute cluster. A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) +// is a remote direct memory access (RDMA) network group. type ComputeClusterSummary struct { // The availability domain the compute cluster is running in. // Example: `Uocm:PHX-AD-1` AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains this compute cluster. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the compute cluster. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of this compute cluster. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. Id *string `mandatory:"true" json:"id"` // The current state of the compute cluster. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_instance_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_instance_options.go new file mode 100644 index 0000000000..c9b1275083 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_instance_options.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeInstanceOptions Multiple Compute Instance Configuration instance details. +type ComputeInstanceOptions struct { + + // The Compute Instance Configuration parameters. + Options []ComputeInstanceDetails `mandatory:"false" json:"options"` +} + +func (m ComputeInstanceOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeInstanceOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ComputeInstanceOptions) MarshalJSON() (buff []byte, e error) { + type MarshalTypeComputeInstanceOptions ComputeInstanceOptions + s := struct { + DiscriminatorParam string `json:"instanceType"` + MarshalTypeComputeInstanceOptions + }{ + "instance_options", + (MarshalTypeComputeInstanceOptions)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/core_blockstorage_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_blockstorage_client.go index e8377ef50f..de1d563b88 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/core_blockstorage_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_blockstorage_client.go @@ -32,6 +32,9 @@ type BlockstorageClient struct { // NewBlockstorageClientWithConfigurationProvider Creates a new default Blockstorage client with the given configuration provider. // the configuration provider will be used for the default signer as well as reading the region func NewBlockstorageClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client BlockstorageClient, err error) { + if enabled := common.CheckForEnabledServices("core"); !enabled { + return client, fmt.Errorf("the Alloy configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local alloy_config file configured the service you're targeting or contact the cloud provider on the availability of this service") + } provider, err := auth.GetGenericConfigurationProvider(configProvider) if err != nil { return client, err @@ -83,7 +86,7 @@ func (client *BlockstorageClient) setConfigurationProvider(configProvider common region, _ := configProvider.Region() client.SetRegion(region) if client.Host == "" { - return fmt.Errorf("Invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil @@ -98,7 +101,7 @@ func (client *BlockstorageClient) ConfigurationProvider() *common.ConfigurationP // For information about moving resources between compartments, // see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeBootVolumeBackupCompartment.go.html to see an example of how to use ChangeBootVolumeBackupCompartment API. func (client BlockstorageClient) ChangeBootVolumeBackupCompartment(ctx context.Context, request ChangeBootVolumeBackupCompartmentRequest) (response ChangeBootVolumeBackupCompartmentResponse, err error) { @@ -157,7 +160,7 @@ func (client BlockstorageClient) changeBootVolumeBackupCompartment(ctx context.C // For information about moving resources between compartments, // see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeBootVolumeCompartment.go.html to see an example of how to use ChangeBootVolumeCompartment API. func (client BlockstorageClient) ChangeBootVolumeCompartment(ctx context.Context, request ChangeBootVolumeCompartmentRequest) (response ChangeBootVolumeCompartmentResponse, err error) { @@ -216,7 +219,7 @@ func (client BlockstorageClient) changeBootVolumeCompartment(ctx context.Context // For information about moving resources between compartments, // see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVolumeBackupCompartment.go.html to see an example of how to use ChangeVolumeBackupCompartment API. func (client BlockstorageClient) ChangeVolumeBackupCompartment(ctx context.Context, request ChangeVolumeBackupCompartmentRequest) (response ChangeVolumeBackupCompartmentResponse, err error) { @@ -275,7 +278,7 @@ func (client BlockstorageClient) changeVolumeBackupCompartment(ctx context.Conte // For information about moving resources between compartments, // see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVolumeCompartment.go.html to see an example of how to use ChangeVolumeCompartment API. func (client BlockstorageClient) ChangeVolumeCompartment(ctx context.Context, request ChangeVolumeCompartmentRequest) (response ChangeVolumeCompartmentResponse, err error) { @@ -334,7 +337,7 @@ func (client BlockstorageClient) changeVolumeCompartment(ctx context.Context, re // For information about moving resources between compartments, // see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVolumeGroupBackupCompartment.go.html to see an example of how to use ChangeVolumeGroupBackupCompartment API. func (client BlockstorageClient) ChangeVolumeGroupBackupCompartment(ctx context.Context, request ChangeVolumeGroupBackupCompartmentRequest) (response ChangeVolumeGroupBackupCompartmentResponse, err error) { @@ -393,7 +396,7 @@ func (client BlockstorageClient) changeVolumeGroupBackupCompartment(ctx context. // For information about moving resources between compartments, // see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVolumeGroupCompartment.go.html to see an example of how to use ChangeVolumeGroupCompartment API. func (client BlockstorageClient) ChangeVolumeGroupCompartment(ctx context.Context, request ChangeVolumeGroupCompartmentRequest) (response ChangeVolumeGroupCompartmentResponse, err error) { @@ -451,7 +454,7 @@ func (client BlockstorageClient) changeVolumeGroupCompartment(ctx context.Contex // CopyBootVolumeBackup Creates a boot volume backup copy in specified region. For general information about volume backups, // see Overview of Boot Volume Backups (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/bootvolumebackups.htm) // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CopyBootVolumeBackup.go.html to see an example of how to use CopyBootVolumeBackup API. func (client BlockstorageClient) CopyBootVolumeBackup(ctx context.Context, request CopyBootVolumeBackupRequest) (response CopyBootVolumeBackupResponse, err error) { @@ -514,7 +517,7 @@ func (client BlockstorageClient) copyBootVolumeBackup(ctx context.Context, reque // CopyVolumeBackup Creates a volume backup copy in specified region. For general information about volume backups, // see Overview of Block Volume Service Backups (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/blockvolumebackups.htm) // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CopyVolumeBackup.go.html to see an example of how to use CopyVolumeBackup API. func (client BlockstorageClient) CopyVolumeBackup(ctx context.Context, request CopyVolumeBackupRequest) (response CopyVolumeBackupResponse, err error) { @@ -577,7 +580,7 @@ func (client BlockstorageClient) copyVolumeBackup(ctx context.Context, request c // CopyVolumeGroupBackup Creates a volume group backup copy in specified region. For general information about volume group backups, // see Overview of Block Volume Backups (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/blockvolumebackups.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CopyVolumeGroupBackup.go.html to see an example of how to use CopyVolumeGroupBackup API. func (client BlockstorageClient) CopyVolumeGroupBackup(ctx context.Context, request CopyVolumeGroupBackupRequest) (response CopyVolumeGroupBackupResponse, err error) { @@ -642,7 +645,7 @@ func (client BlockstorageClient) copyVolumeGroupBackup(ctx context.Context, requ // You may optionally specify a *display name* for the volume, which is simply a friendly name or // description. It does not have to be unique, and you can change it. Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateBootVolume.go.html to see an example of how to use CreateBootVolume API. func (client BlockstorageClient) CreateBootVolume(ctx context.Context, request CreateBootVolumeRequest) (response CreateBootVolumeResponse, err error) { @@ -708,7 +711,7 @@ func (client BlockstorageClient) createBootVolume(ctx context.Context, request c // When the data is imaged, it goes into a CREATING state. // After the backup is fully uploaded to the cloud, it goes into an AVAILABLE state. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateBootVolumeBackup.go.html to see an example of how to use CreateBootVolumeBackup API. func (client BlockstorageClient) CreateBootVolumeBackup(ctx context.Context, request CreateBootVolumeBackupRequest) (response CreateBootVolumeBackupResponse, err error) { @@ -781,7 +784,7 @@ func (client BlockstorageClient) createBootVolumeBackup(ctx context.Context, req // You may optionally specify a *display name* for the volume, which is simply a friendly name or // description. It does not have to be unique, and you can change it. Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolume.go.html to see an example of how to use CreateVolume API. func (client BlockstorageClient) CreateVolume(ctx context.Context, request CreateVolumeRequest) (response CreateVolumeResponse, err error) { @@ -847,7 +850,7 @@ func (client BlockstorageClient) createVolume(ctx context.Context, request commo // When the data is imaged, it goes into a CREATING state. // After the backup is fully uploaded to the cloud, it goes into an AVAILABLE state. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolumeBackup.go.html to see an example of how to use CreateVolumeBackup API. func (client BlockstorageClient) CreateVolumeBackup(ctx context.Context, request CreateVolumeBackupRequest) (response CreateVolumeBackupResponse, err error) { @@ -911,7 +914,7 @@ func (client BlockstorageClient) createVolumeBackup(ctx context.Context, request // For more information about Oracle defined backup policies and user defined backup policies, // see Policy-Based Backups (https://docs.cloud.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolumeBackupPolicy.go.html to see an example of how to use CreateVolumeBackupPolicy API. func (client BlockstorageClient) CreateVolumeBackupPolicy(ctx context.Context, request CreateVolumeBackupPolicyRequest) (response CreateVolumeBackupPolicyResponse, err error) { @@ -975,7 +978,7 @@ func (client BlockstorageClient) createVolumeBackupPolicy(ctx context.Context, r // only have one backup policy assigned to it. If this operation is used for a volume that already // has a different backup policy assigned, the prior backup policy will be silently unassigned. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolumeBackupPolicyAssignment.go.html to see an example of how to use CreateVolumeBackupPolicyAssignment API. func (client BlockstorageClient) CreateVolumeBackupPolicyAssignment(ctx context.Context, request CreateVolumeBackupPolicyAssignmentRequest) (response CreateVolumeBackupPolicyAssignmentResponse, err error) { @@ -1037,7 +1040,7 @@ func (client BlockstorageClient) createVolumeBackupPolicyAssignment(ctx context. // description. It does not have to be unique, and you can change it. Avoid entering confidential information. // For more information, see Volume Groups (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolumeGroup.go.html to see an example of how to use CreateVolumeGroup API. func (client BlockstorageClient) CreateVolumeGroup(ctx context.Context, request CreateVolumeGroupRequest) (response CreateVolumeGroupResponse, err error) { @@ -1100,7 +1103,7 @@ func (client BlockstorageClient) createVolumeGroup(ctx context.Context, request // CreateVolumeGroupBackup Creates a new backup volume group of the specified volume group. // For more information, see Volume Groups (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolumeGroupBackup.go.html to see an example of how to use CreateVolumeGroupBackup API. func (client BlockstorageClient) CreateVolumeGroupBackup(ctx context.Context, request CreateVolumeGroupBackupRequest) (response CreateVolumeGroupBackupResponse, err error) { @@ -1165,7 +1168,7 @@ func (client BlockstorageClient) createVolumeGroupBackup(ctx context.Context, re // Disconnecting From a Boot Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Tasks/deletingbootvolume.htm). // **Warning:** All data on the boot volume will be permanently lost when the boot volume is deleted. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteBootVolume.go.html to see an example of how to use DeleteBootVolume API. func (client BlockstorageClient) DeleteBootVolume(ctx context.Context, request DeleteBootVolumeRequest) (response DeleteBootVolumeResponse, err error) { @@ -1222,7 +1225,7 @@ func (client BlockstorageClient) deleteBootVolume(ctx context.Context, request c // DeleteBootVolumeBackup Deletes a boot volume backup. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteBootVolumeBackup.go.html to see an example of how to use DeleteBootVolumeBackup API. func (client BlockstorageClient) DeleteBootVolumeBackup(ctx context.Context, request DeleteBootVolumeBackupRequest) (response DeleteBootVolumeBackupResponse, err error) { @@ -1279,7 +1282,7 @@ func (client BlockstorageClient) deleteBootVolumeBackup(ctx context.Context, req // DeleteBootVolumeKmsKey Removes the specified boot volume's assigned Vault Service encryption key. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteBootVolumeKmsKey.go.html to see an example of how to use DeleteBootVolumeKmsKey API. func (client BlockstorageClient) DeleteBootVolumeKmsKey(ctx context.Context, request DeleteBootVolumeKmsKeyRequest) (response DeleteBootVolumeKmsKeyResponse, err error) { @@ -1339,7 +1342,7 @@ func (client BlockstorageClient) deleteBootVolumeKmsKey(ctx context.Context, req // Disconnecting From a Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Tasks/disconnectingfromavolume.htm). // **Warning:** All data on the volume will be permanently lost when the volume is deleted. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolume.go.html to see an example of how to use DeleteVolume API. func (client BlockstorageClient) DeleteVolume(ctx context.Context, request DeleteVolumeRequest) (response DeleteVolumeResponse, err error) { @@ -1396,7 +1399,7 @@ func (client BlockstorageClient) deleteVolume(ctx context.Context, request commo // DeleteVolumeBackup Deletes a volume backup. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeBackup.go.html to see an example of how to use DeleteVolumeBackup API. func (client BlockstorageClient) DeleteVolumeBackup(ctx context.Context, request DeleteVolumeBackupRequest) (response DeleteVolumeBackupResponse, err error) { @@ -1452,11 +1455,12 @@ func (client BlockstorageClient) deleteVolumeBackup(ctx context.Context, request } // DeleteVolumeBackupPolicy Deletes a user defined backup policy. -// For more information about user defined backup policies, -// see Policy-Based Backups (https://docs.cloud.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#UserDefinedBackupPolicies). -// Avoid entering confidential information. // -// See also +// For more information about user defined backup policies, +// see Policy-Based Backups (https://docs.cloud.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#UserDefinedBackupPolicies). +// Avoid entering confidential information. +// +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeBackupPolicy.go.html to see an example of how to use DeleteVolumeBackupPolicy API. func (client BlockstorageClient) DeleteVolumeBackupPolicy(ctx context.Context, request DeleteVolumeBackupPolicyRequest) (response DeleteVolumeBackupPolicyResponse, err error) { @@ -1513,7 +1517,7 @@ func (client BlockstorageClient) deleteVolumeBackupPolicy(ctx context.Context, r // DeleteVolumeBackupPolicyAssignment Deletes a volume backup policy assignment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeBackupPolicyAssignment.go.html to see an example of how to use DeleteVolumeBackupPolicyAssignment API. func (client BlockstorageClient) DeleteVolumeBackupPolicyAssignment(ctx context.Context, request DeleteVolumeBackupPolicyAssignmentRequest) (response DeleteVolumeBackupPolicyAssignmentResponse, err error) { @@ -1571,7 +1575,7 @@ func (client BlockstorageClient) deleteVolumeBackupPolicyAssignment(ctx context. // DeleteVolumeGroup Deletes the specified volume group. Individual volumes are not deleted, only the volume group is deleted. // For more information, see Volume Groups (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeGroup.go.html to see an example of how to use DeleteVolumeGroup API. func (client BlockstorageClient) DeleteVolumeGroup(ctx context.Context, request DeleteVolumeGroupRequest) (response DeleteVolumeGroupResponse, err error) { @@ -1629,7 +1633,7 @@ func (client BlockstorageClient) deleteVolumeGroup(ctx context.Context, request // DeleteVolumeGroupBackup Deletes a volume group backup. This operation deletes all the backups in // the volume group. For more information, see Volume Groups (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeGroupBackup.go.html to see an example of how to use DeleteVolumeGroupBackup API. func (client BlockstorageClient) DeleteVolumeGroupBackup(ctx context.Context, request DeleteVolumeGroupBackupRequest) (response DeleteVolumeGroupBackupResponse, err error) { @@ -1686,7 +1690,7 @@ func (client BlockstorageClient) deleteVolumeGroupBackup(ctx context.Context, re // DeleteVolumeKmsKey Removes the specified volume's assigned Vault service encryption key. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeKmsKey.go.html to see an example of how to use DeleteVolumeKmsKey API. func (client BlockstorageClient) DeleteVolumeKmsKey(ctx context.Context, request DeleteVolumeKmsKeyRequest) (response DeleteVolumeKmsKeyResponse, err error) { @@ -1743,7 +1747,7 @@ func (client BlockstorageClient) deleteVolumeKmsKey(ctx context.Context, request // GetBlockVolumeReplica Gets information for the specified block volume replica. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBlockVolumeReplica.go.html to see an example of how to use GetBlockVolumeReplica API. func (client BlockstorageClient) GetBlockVolumeReplica(ctx context.Context, request GetBlockVolumeReplicaRequest) (response GetBlockVolumeReplicaResponse, err error) { @@ -1800,7 +1804,7 @@ func (client BlockstorageClient) getBlockVolumeReplica(ctx context.Context, requ // GetBootVolume Gets information for the specified boot volume. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBootVolume.go.html to see an example of how to use GetBootVolume API. func (client BlockstorageClient) GetBootVolume(ctx context.Context, request GetBootVolumeRequest) (response GetBootVolumeResponse, err error) { @@ -1857,7 +1861,7 @@ func (client BlockstorageClient) getBootVolume(ctx context.Context, request comm // GetBootVolumeBackup Gets information for the specified boot volume backup. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBootVolumeBackup.go.html to see an example of how to use GetBootVolumeBackup API. func (client BlockstorageClient) GetBootVolumeBackup(ctx context.Context, request GetBootVolumeBackupRequest) (response GetBootVolumeBackupResponse, err error) { @@ -1914,7 +1918,7 @@ func (client BlockstorageClient) getBootVolumeBackup(ctx context.Context, reques // GetBootVolumeKmsKey Gets the Vault service encryption key assigned to the specified boot volume. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBootVolumeKmsKey.go.html to see an example of how to use GetBootVolumeKmsKey API. func (client BlockstorageClient) GetBootVolumeKmsKey(ctx context.Context, request GetBootVolumeKmsKeyRequest) (response GetBootVolumeKmsKeyResponse, err error) { @@ -1971,7 +1975,7 @@ func (client BlockstorageClient) getBootVolumeKmsKey(ctx context.Context, reques // GetBootVolumeReplica Gets information for the specified boot volume replica. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBootVolumeReplica.go.html to see an example of how to use GetBootVolumeReplica API. func (client BlockstorageClient) GetBootVolumeReplica(ctx context.Context, request GetBootVolumeReplicaRequest) (response GetBootVolumeReplicaResponse, err error) { @@ -2028,7 +2032,7 @@ func (client BlockstorageClient) getBootVolumeReplica(ctx context.Context, reque // GetVolume Gets information for the specified volume. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolume.go.html to see an example of how to use GetVolume API. func (client BlockstorageClient) GetVolume(ctx context.Context, request GetVolumeRequest) (response GetVolumeResponse, err error) { @@ -2085,7 +2089,7 @@ func (client BlockstorageClient) getVolume(ctx context.Context, request common.O // GetVolumeBackup Gets information for the specified volume backup. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeBackup.go.html to see an example of how to use GetVolumeBackup API. func (client BlockstorageClient) GetVolumeBackup(ctx context.Context, request GetVolumeBackupRequest) (response GetVolumeBackupResponse, err error) { @@ -2142,7 +2146,7 @@ func (client BlockstorageClient) getVolumeBackup(ctx context.Context, request co // GetVolumeBackupPolicy Gets information for the specified volume backup policy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeBackupPolicy.go.html to see an example of how to use GetVolumeBackupPolicy API. func (client BlockstorageClient) GetVolumeBackupPolicy(ctx context.Context, request GetVolumeBackupPolicyRequest) (response GetVolumeBackupPolicyResponse, err error) { @@ -2201,7 +2205,7 @@ func (client BlockstorageClient) getVolumeBackupPolicy(ctx context.Context, requ // `assetId` query parameter is required, and the returned list will contain at most // one item, since volume can only have one volume backup policy assigned at a time. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeBackupPolicyAssetAssignment.go.html to see an example of how to use GetVolumeBackupPolicyAssetAssignment API. func (client BlockstorageClient) GetVolumeBackupPolicyAssetAssignment(ctx context.Context, request GetVolumeBackupPolicyAssetAssignmentRequest) (response GetVolumeBackupPolicyAssetAssignmentResponse, err error) { @@ -2258,7 +2262,7 @@ func (client BlockstorageClient) getVolumeBackupPolicyAssetAssignment(ctx contex // GetVolumeBackupPolicyAssignment Gets information for the specified volume backup policy assignment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeBackupPolicyAssignment.go.html to see an example of how to use GetVolumeBackupPolicyAssignment API. func (client BlockstorageClient) GetVolumeBackupPolicyAssignment(ctx context.Context, request GetVolumeBackupPolicyAssignmentRequest) (response GetVolumeBackupPolicyAssignmentResponse, err error) { @@ -2315,7 +2319,7 @@ func (client BlockstorageClient) getVolumeBackupPolicyAssignment(ctx context.Con // GetVolumeGroup Gets information for the specified volume group. For more information, see Volume Groups (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeGroup.go.html to see an example of how to use GetVolumeGroup API. func (client BlockstorageClient) GetVolumeGroup(ctx context.Context, request GetVolumeGroupRequest) (response GetVolumeGroupResponse, err error) { @@ -2372,7 +2376,7 @@ func (client BlockstorageClient) getVolumeGroup(ctx context.Context, request com // GetVolumeGroupBackup Gets information for the specified volume group backup. For more information, see Volume Groups (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeGroupBackup.go.html to see an example of how to use GetVolumeGroupBackup API. func (client BlockstorageClient) GetVolumeGroupBackup(ctx context.Context, request GetVolumeGroupBackupRequest) (response GetVolumeGroupBackupResponse, err error) { @@ -2429,7 +2433,7 @@ func (client BlockstorageClient) getVolumeGroupBackup(ctx context.Context, reque // GetVolumeGroupReplica Gets information for the specified volume group replica. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeGroupReplica.go.html to see an example of how to use GetVolumeGroupReplica API. func (client BlockstorageClient) GetVolumeGroupReplica(ctx context.Context, request GetVolumeGroupReplicaRequest) (response GetVolumeGroupReplicaResponse, err error) { @@ -2486,7 +2490,7 @@ func (client BlockstorageClient) getVolumeGroupReplica(ctx context.Context, requ // GetVolumeKmsKey Gets the Vault service encryption key assigned to the specified volume. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeKmsKey.go.html to see an example of how to use GetVolumeKmsKey API. func (client BlockstorageClient) GetVolumeKmsKey(ctx context.Context, request GetVolumeKmsKeyRequest) (response GetVolumeKmsKeyResponse, err error) { @@ -2543,7 +2547,7 @@ func (client BlockstorageClient) getVolumeKmsKey(ctx context.Context, request co // ListBlockVolumeReplicas Lists the block volume replicas in the specified compartment and availability domain. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListBlockVolumeReplicas.go.html to see an example of how to use ListBlockVolumeReplicas API. func (client BlockstorageClient) ListBlockVolumeReplicas(ctx context.Context, request ListBlockVolumeReplicasRequest) (response ListBlockVolumeReplicasResponse, err error) { @@ -2600,7 +2604,7 @@ func (client BlockstorageClient) listBlockVolumeReplicas(ctx context.Context, re // ListBootVolumeBackups Lists the boot volume backups in the specified compartment. You can filter the results by boot volume. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListBootVolumeBackups.go.html to see an example of how to use ListBootVolumeBackups API. func (client BlockstorageClient) ListBootVolumeBackups(ctx context.Context, request ListBootVolumeBackupsRequest) (response ListBootVolumeBackupsResponse, err error) { @@ -2657,7 +2661,7 @@ func (client BlockstorageClient) listBootVolumeBackups(ctx context.Context, requ // ListBootVolumeReplicas Lists the boot volume replicas in the specified compartment and availability domain. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListBootVolumeReplicas.go.html to see an example of how to use ListBootVolumeReplicas API. func (client BlockstorageClient) ListBootVolumeReplicas(ctx context.Context, request ListBootVolumeReplicasRequest) (response ListBootVolumeReplicasResponse, err error) { @@ -2714,7 +2718,7 @@ func (client BlockstorageClient) listBootVolumeReplicas(ctx context.Context, req // ListBootVolumes Lists the boot volumes in the specified compartment and availability domain. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListBootVolumes.go.html to see an example of how to use ListBootVolumes API. func (client BlockstorageClient) ListBootVolumes(ctx context.Context, request ListBootVolumesRequest) (response ListBootVolumesResponse, err error) { @@ -2773,7 +2777,7 @@ func (client BlockstorageClient) listBootVolumes(ctx context.Context, request co // For more information about Oracle defined backup policies and user defined backup policies, // see Policy-Based Backups (https://docs.cloud.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeBackupPolicies.go.html to see an example of how to use ListVolumeBackupPolicies API. func (client BlockstorageClient) ListVolumeBackupPolicies(ctx context.Context, request ListVolumeBackupPoliciesRequest) (response ListVolumeBackupPoliciesResponse, err error) { @@ -2830,7 +2834,7 @@ func (client BlockstorageClient) listVolumeBackupPolicies(ctx context.Context, r // ListVolumeBackups Lists the volume backups in the specified compartment. You can filter the results by volume. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeBackups.go.html to see an example of how to use ListVolumeBackups API. func (client BlockstorageClient) ListVolumeBackups(ctx context.Context, request ListVolumeBackupsRequest) (response ListVolumeBackupsResponse, err error) { @@ -2888,7 +2892,7 @@ func (client BlockstorageClient) listVolumeBackups(ctx context.Context, request // ListVolumeGroupBackups Lists the volume group backups in the specified compartment. You can filter the results by volume group. // For more information, see Volume Groups (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeGroupBackups.go.html to see an example of how to use ListVolumeGroupBackups API. func (client BlockstorageClient) ListVolumeGroupBackups(ctx context.Context, request ListVolumeGroupBackupsRequest) (response ListVolumeGroupBackupsResponse, err error) { @@ -2946,7 +2950,7 @@ func (client BlockstorageClient) listVolumeGroupBackups(ctx context.Context, req // ListVolumeGroupReplicas Lists the volume group replicas in the specified compartment. You can filter the results by volume group. // For more information, see Volume Group Replication (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/volumegroupreplication.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeGroupReplicas.go.html to see an example of how to use ListVolumeGroupReplicas API. func (client BlockstorageClient) ListVolumeGroupReplicas(ctx context.Context, request ListVolumeGroupReplicasRequest) (response ListVolumeGroupReplicasResponse, err error) { @@ -3004,7 +3008,7 @@ func (client BlockstorageClient) listVolumeGroupReplicas(ctx context.Context, re // ListVolumeGroups Lists the volume groups in the specified compartment and availability domain. // For more information, see Volume Groups (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeGroups.go.html to see an example of how to use ListVolumeGroups API. func (client BlockstorageClient) ListVolumeGroups(ctx context.Context, request ListVolumeGroupsRequest) (response ListVolumeGroupsResponse, err error) { @@ -3061,7 +3065,7 @@ func (client BlockstorageClient) listVolumeGroups(ctx context.Context, request c // ListVolumes Lists the volumes in the specified compartment and availability domain. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumes.go.html to see an example of how to use ListVolumes API. func (client BlockstorageClient) ListVolumes(ctx context.Context, request ListVolumesRequest) (response ListVolumesResponse, err error) { @@ -3118,7 +3122,7 @@ func (client BlockstorageClient) listVolumes(ctx context.Context, request common // UpdateBootVolume Updates the specified boot volume's display name, defined tags, and free-form tags. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateBootVolume.go.html to see an example of how to use UpdateBootVolume API. func (client BlockstorageClient) UpdateBootVolume(ctx context.Context, request UpdateBootVolumeRequest) (response UpdateBootVolumeResponse, err error) { @@ -3176,7 +3180,7 @@ func (client BlockstorageClient) updateBootVolume(ctx context.Context, request c // UpdateBootVolumeBackup Updates the display name for the specified boot volume backup. // Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateBootVolumeBackup.go.html to see an example of how to use UpdateBootVolumeBackup API. func (client BlockstorageClient) UpdateBootVolumeBackup(ctx context.Context, request UpdateBootVolumeBackupRequest) (response UpdateBootVolumeBackupResponse, err error) { @@ -3228,7 +3232,7 @@ func (client BlockstorageClient) updateBootVolumeBackup(ctx context.Context, req // UpdateBootVolumeKmsKey Updates the specified volume with a new Vault service master encryption key. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateBootVolumeKmsKey.go.html to see an example of how to use UpdateBootVolumeKmsKey API. func (client BlockstorageClient) UpdateBootVolumeKmsKey(ctx context.Context, request UpdateBootVolumeKmsKeyRequest) (response UpdateBootVolumeKmsKeyResponse, err error) { @@ -3286,7 +3290,7 @@ func (client BlockstorageClient) updateBootVolumeKmsKey(ctx context.Context, req // UpdateVolume Updates the specified volume's display name. // Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolume.go.html to see an example of how to use UpdateVolume API. func (client BlockstorageClient) UpdateVolume(ctx context.Context, request UpdateVolumeRequest) (response UpdateVolumeResponse, err error) { @@ -3344,7 +3348,7 @@ func (client BlockstorageClient) updateVolume(ctx context.Context, request commo // UpdateVolumeBackup Updates the display name for the specified volume backup. // Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeBackup.go.html to see an example of how to use UpdateVolumeBackup API. func (client BlockstorageClient) UpdateVolumeBackup(ctx context.Context, request UpdateVolumeBackupRequest) (response UpdateVolumeBackupResponse, err error) { @@ -3395,11 +3399,12 @@ func (client BlockstorageClient) updateVolumeBackup(ctx context.Context, request } // UpdateVolumeBackupPolicy Updates a user defined backup policy. -// For more information about user defined backup policies, -// see Policy-Based Backups (https://docs.cloud.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#UserDefinedBackupPolicies). -// Avoid entering confidential information. // -// See also +// For more information about user defined backup policies, +// see Policy-Based Backups (https://docs.cloud.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#UserDefinedBackupPolicies). +// Avoid entering confidential information. +// +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeBackupPolicy.go.html to see an example of how to use UpdateVolumeBackupPolicy API. func (client BlockstorageClient) UpdateVolumeBackupPolicy(ctx context.Context, request UpdateVolumeBackupPolicyRequest) (response UpdateVolumeBackupPolicyResponse, err error) { @@ -3465,7 +3470,7 @@ func (client BlockstorageClient) updateVolumeBackupPolicy(ctx context.Context, r // Avoid entering confidential information. // For more information, see Volume Groups (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeGroup.go.html to see an example of how to use UpdateVolumeGroup API. func (client BlockstorageClient) UpdateVolumeGroup(ctx context.Context, request UpdateVolumeGroupRequest) (response UpdateVolumeGroupResponse, err error) { @@ -3522,7 +3527,7 @@ func (client BlockstorageClient) updateVolumeGroup(ctx context.Context, request // UpdateVolumeGroupBackup Updates the display name for the specified volume group backup. For more information, see Volume Groups (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeGroupBackup.go.html to see an example of how to use UpdateVolumeGroupBackup API. func (client BlockstorageClient) UpdateVolumeGroupBackup(ctx context.Context, request UpdateVolumeGroupBackupRequest) (response UpdateVolumeGroupBackupResponse, err error) { @@ -3574,7 +3579,7 @@ func (client BlockstorageClient) updateVolumeGroupBackup(ctx context.Context, re // UpdateVolumeKmsKey Updates the specified volume with a new Key Management master encryption key. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeKmsKey.go.html to see an example of how to use UpdateVolumeKmsKey API. func (client BlockstorageClient) UpdateVolumeKmsKey(ctx context.Context, request UpdateVolumeKmsKeyRequest) (response UpdateVolumeKmsKeyResponse, err error) { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/core_compute_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_compute_client.go index c9d136f5eb..54cc77b017 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/core_compute_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_compute_client.go @@ -32,6 +32,9 @@ type ComputeClient struct { // NewComputeClientWithConfigurationProvider Creates a new default Compute client with the given configuration provider. // the configuration provider will be used for the default signer as well as reading the region func NewComputeClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ComputeClient, err error) { + if enabled := common.CheckForEnabledServices("core"); !enabled { + return client, fmt.Errorf("the Alloy configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local alloy_config file configured the service you're targeting or contact the cloud provider on the availability of this service") + } provider, err := auth.GetGenericConfigurationProvider(configProvider) if err != nil { return client, err @@ -81,7 +84,7 @@ func (client *ComputeClient) setConfigurationProvider(configProvider common.Conf region, _ := configProvider.Region() client.SetRegion(region) if client.Host == "" { - return fmt.Errorf("Invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil @@ -94,7 +97,7 @@ func (client *ComputeClient) ConfigurationProvider() *common.ConfigurationProvid // AcceptShieldedIntegrityPolicy Accept the changes to the PCR values in the measured boot report. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AcceptShieldedIntegrityPolicy.go.html to see an example of how to use AcceptShieldedIntegrityPolicy API. func (client ComputeClient) AcceptShieldedIntegrityPolicy(ctx context.Context, request AcceptShieldedIntegrityPolicyRequest) (response AcceptShieldedIntegrityPolicyResponse, err error) { @@ -156,7 +159,7 @@ func (client ComputeClient) acceptShieldedIntegrityPolicy(ctx context.Context, r // AddImageShapeCompatibilityEntry Adds a shape to the compatible shapes list for the image. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddImageShapeCompatibilityEntry.go.html to see an example of how to use AddImageShapeCompatibilityEntry API. func (client ComputeClient) AddImageShapeCompatibilityEntry(ctx context.Context, request AddImageShapeCompatibilityEntryRequest) (response AddImageShapeCompatibilityEntryResponse, err error) { @@ -213,7 +216,7 @@ func (client ComputeClient) addImageShapeCompatibilityEntry(ctx context.Context, // AttachBootVolume Attaches the specified boot volume to the specified instance. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachBootVolume.go.html to see an example of how to use AttachBootVolume API. func (client ComputeClient) AttachBootVolume(ctx context.Context, request AttachBootVolumeRequest) (response AttachBootVolumeResponse, err error) { @@ -277,7 +280,7 @@ func (client ComputeClient) attachBootVolume(ctx context.Context, request common // For more information about secondary VNICs, see // Virtual Network Interface Cards (VNICs) (https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachVnic.go.html to see an example of how to use AttachVnic API. func (client ComputeClient) AttachVnic(ctx context.Context, request AttachVnicRequest) (response AttachVnicResponse, err error) { @@ -339,7 +342,7 @@ func (client ComputeClient) attachVnic(ctx context.Context, request common.OCIRe // AttachVolume Attaches the specified storage volume to the specified instance. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachVolume.go.html to see an example of how to use AttachVolume API. func (client ComputeClient) AttachVolume(ctx context.Context, request AttachVolumeRequest) (response AttachVolumeResponse, err error) { @@ -415,7 +418,7 @@ func (client ComputeClient) attachVolume(ctx context.Context, request common.OCI // 4. Optionally, use `DeleteConsoleHistory` to delete the console history metadata // and the console history data. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CaptureConsoleHistory.go.html to see an example of how to use CaptureConsoleHistory API. func (client ComputeClient) CaptureConsoleHistory(ctx context.Context, request CaptureConsoleHistoryRequest) (response CaptureConsoleHistoryResponse, err error) { @@ -479,7 +482,7 @@ func (client ComputeClient) captureConsoleHistory(ctx context.Context, request c // moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeCapacityReservationCompartment.go.html to see an example of how to use ChangeComputeCapacityReservationCompartment API. func (client ComputeClient) ChangeComputeCapacityReservationCompartment(ctx context.Context, request ChangeComputeCapacityReservationCompartmentRequest) (response ChangeComputeCapacityReservationCompartmentResponse, err error) { @@ -540,11 +543,11 @@ func (client ComputeClient) changeComputeCapacityReservationCompartment(ctx cont } // ChangeComputeClusterCompartment Moves a compute cluster into a different compartment within the same tenancy. -// A compute cluster is a remote direct memory access (RDMA) network group. +// A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory access (RDMA) network group. // For information about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeClusterCompartment.go.html to see an example of how to use ChangeComputeClusterCompartment API. func (client ComputeClient) ChangeComputeClusterCompartment(ctx context.Context, request ChangeComputeClusterCompartmentRequest) (response ChangeComputeClusterCompartmentResponse, err error) { @@ -606,9 +609,10 @@ func (client ComputeClient) changeComputeClusterCompartment(ctx context.Context, // ChangeComputeImageCapabilitySchemaCompartment Moves a compute image capability schema into a different compartment within the same tenancy. // For information about moving resources between compartments, see -// Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeImageCapabilitySchemaCompartment.go.html to see an example of how to use ChangeComputeImageCapabilitySchemaCompartment API. // A default retry strategy applies to this operation ChangeComputeImageCapabilitySchemaCompartment() @@ -671,7 +675,7 @@ func (client ComputeClient) changeComputeImageCapabilitySchemaCompartment(ctx co // ChangeDedicatedVmHostCompartment Moves a dedicated virtual machine host from one compartment to another. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeDedicatedVmHostCompartment.go.html to see an example of how to use ChangeDedicatedVmHostCompartment API. func (client ComputeClient) ChangeDedicatedVmHostCompartment(ctx context.Context, request ChangeDedicatedVmHostCompartmentRequest) (response ChangeDedicatedVmHostCompartmentResponse, err error) { @@ -735,7 +739,7 @@ func (client ComputeClient) changeDedicatedVmHostCompartment(ctx context.Context // resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeImageCompartment.go.html to see an example of how to use ChangeImageCompartment API. // A default retry strategy applies to this operation ChangeImageCompartment() @@ -802,7 +806,7 @@ func (client ComputeClient) changeImageCompartment(ctx context.Context, request // When you move an instance to a different compartment, associated resources such as boot volumes and VNICs // are not moved. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeInstanceCompartment.go.html to see an example of how to use ChangeInstanceCompartment API. func (client ComputeClient) ChangeInstanceCompartment(ctx context.Context, request ChangeInstanceCompartmentRequest) (response ChangeInstanceCompartmentResponse, err error) { @@ -864,7 +868,7 @@ func (client ComputeClient) changeInstanceCompartment(ctx context.Context, reque // CreateAppCatalogSubscription Create a subscription for listing resource version for a compartment. It will take some time to propagate to all regions. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateAppCatalogSubscription.go.html to see an example of how to use CreateAppCatalogSubscription API. // A default retry strategy applies to this operation CreateAppCatalogSubscription() @@ -931,7 +935,7 @@ func (client ComputeClient) createAppCatalogSubscription(ctx context.Context, re // Use the capacity report to determine whether sufficient capacity is available for a shape before // you create an instance or change the shape of an instance. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeCapacityReport.go.html to see an example of how to use CreateComputeCapacityReport API. // A default retry strategy applies to this operation CreateComputeCapacityReport() @@ -998,7 +1002,7 @@ func (client ComputeClient) createComputeCapacityReport(ctx context.Context, req // and you won't get out of capacity errors. // For more information, see Reserved Capacity (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeCapacityReservation.go.html to see an example of how to use CreateComputeCapacityReservation API. func (client ComputeClient) CreateComputeCapacityReservation(ctx context.Context, request CreateComputeCapacityReservationRequest) (response CreateComputeCapacityReservationResponse, err error) { @@ -1058,14 +1062,18 @@ func (client ComputeClient) createComputeCapacityReservation(ctx context.Context return response, err } -// CreateComputeCluster Creates an empty compute cluster, which is a remote direct memory access (RDMA) network group. +// CreateComputeCluster Creates an empty compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). A compute cluster +// is a remote direct memory access (RDMA) network group. // After the compute cluster is created, you can use the compute cluster's OCID with the // LaunchInstance operation to create instances in the compute cluster. -// For more information, see Compute Clusters (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). -// To create a cluster network that uses intance pools to manage groups of identical instances, -// see CreateClusterNetwork. +// The instances must be created in the same compartment and availability domain as the cluster. +// Use compute clusters when you want to manage instances in the cluster individually, or when you want +// to use different types of instances in the RDMA network group. +// If you want predictable capacity for a specific number of identical instances that are managed as a group, +// create a cluster network that uses instance pools by using the +// CreateClusterNetwork operation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeCluster.go.html to see an example of how to use CreateComputeCluster API. func (client ComputeClient) CreateComputeCluster(ctx context.Context, request CreateComputeClusterRequest) (response CreateComputeClusterResponse, err error) { @@ -1127,7 +1135,7 @@ func (client ComputeClient) createComputeCluster(ctx context.Context, request co // CreateComputeImageCapabilitySchema Creates compute image capability schema. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeImageCapabilitySchema.go.html to see an example of how to use CreateComputeImageCapabilitySchema API. // A default retry strategy applies to this operation CreateComputeImageCapabilitySchema() @@ -1193,7 +1201,7 @@ func (client ComputeClient) createComputeImageCapabilitySchema(ctx context.Conte // that are a single tenant and not shared with other customers. // For more information, see Dedicated Virtual Machine Hosts (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/dedicatedvmhosts.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDedicatedVmHost.go.html to see an example of how to use CreateDedicatedVmHost API. func (client ComputeClient) CreateDedicatedVmHost(ctx context.Context, request CreateDedicatedVmHostRequest) (response CreateDedicatedVmHostResponse, err error) { @@ -1271,7 +1279,7 @@ func (client ComputeClient) createDedicatedVmHost(ctx context.Context, request c // It does not have to be unique, and you can change it. See UpdateImage. // Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateImage.go.html to see an example of how to use CreateImage API. // A default retry strategy applies to this operation CreateImage() @@ -1337,7 +1345,7 @@ func (client ComputeClient) createImage(ctx context.Context, request common.OCIR // you connect to the console using SSH. // For more information about instance console connections, see Troubleshooting Instances Using Instance Console Connections (https://docs.cloud.oracle.com/iaas/Content/Compute/References/serialconsole.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateInstanceConsoleConnection.go.html to see an example of how to use CreateInstanceConsoleConnection API. func (client ComputeClient) CreateInstanceConsoleConnection(ctx context.Context, request CreateInstanceConsoleConnectionRequest) (response CreateInstanceConsoleConnectionResponse, err error) { @@ -1399,7 +1407,7 @@ func (client ComputeClient) createInstanceConsoleConnection(ctx context.Context, // DeleteAppCatalogSubscription Delete a subscription for a listing resource version for a compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteAppCatalogSubscription.go.html to see an example of how to use DeleteAppCatalogSubscription API. func (client ComputeClient) DeleteAppCatalogSubscription(ctx context.Context, request DeleteAppCatalogSubscriptionRequest) (response DeleteAppCatalogSubscriptionResponse, err error) { @@ -1456,7 +1464,7 @@ func (client ComputeClient) deleteAppCatalogSubscription(ctx context.Context, re // DeleteComputeCapacityReservation Deletes the specified compute capacity reservation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeCapacityReservation.go.html to see an example of how to use DeleteComputeCapacityReservation API. func (client ComputeClient) DeleteComputeCapacityReservation(ctx context.Context, request DeleteComputeCapacityReservationRequest) (response DeleteComputeCapacityReservationResponse, err error) { @@ -1511,10 +1519,12 @@ func (client ComputeClient) deleteComputeCapacityReservation(ctx context.Context return response, err } -// DeleteComputeCluster Deletes the compute cluster, which is a remote direct memory access (RDMA) network group. -// To delete a compute cluster, all instances in the cluster must be deleted first. +// DeleteComputeCluster Deletes a compute cluster. A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a +// remote direct memory access (RDMA) network group. +// Before you delete a compute cluster, first delete all instances in the cluster by using +// the TerminateInstance operation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeCluster.go.html to see an example of how to use DeleteComputeCluster API. func (client ComputeClient) DeleteComputeCluster(ctx context.Context, request DeleteComputeClusterRequest) (response DeleteComputeClusterResponse, err error) { @@ -1571,7 +1581,7 @@ func (client ComputeClient) deleteComputeCluster(ctx context.Context, request co // DeleteComputeImageCapabilitySchema Deletes the specified Compute Image Capability Schema // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeImageCapabilitySchema.go.html to see an example of how to use DeleteComputeImageCapabilitySchema API. func (client ComputeClient) DeleteComputeImageCapabilitySchema(ctx context.Context, request DeleteComputeImageCapabilitySchemaRequest) (response DeleteComputeImageCapabilitySchemaResponse, err error) { @@ -1628,7 +1638,7 @@ func (client ComputeClient) deleteComputeImageCapabilitySchema(ctx context.Conte // DeleteConsoleHistory Deletes the specified console history metadata and the console history data. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteConsoleHistory.go.html to see an example of how to use DeleteConsoleHistory API. func (client ComputeClient) DeleteConsoleHistory(ctx context.Context, request DeleteConsoleHistoryRequest) (response DeleteConsoleHistoryResponse, err error) { @@ -1687,7 +1697,7 @@ func (client ComputeClient) deleteConsoleHistory(ctx context.Context, request co // If any VM instances are assigned to the dedicated virtual machine host, // the delete operation will fail and the service will return a 409 response code. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDedicatedVmHost.go.html to see an example of how to use DeleteDedicatedVmHost API. func (client ComputeClient) DeleteDedicatedVmHost(ctx context.Context, request DeleteDedicatedVmHostRequest) (response DeleteDedicatedVmHostResponse, err error) { @@ -1744,7 +1754,7 @@ func (client ComputeClient) deleteDedicatedVmHost(ctx context.Context, request c // DeleteImage Deletes an image. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteImage.go.html to see an example of how to use DeleteImage API. func (client ComputeClient) DeleteImage(ctx context.Context, request DeleteImageRequest) (response DeleteImageResponse, err error) { @@ -1801,7 +1811,7 @@ func (client ComputeClient) deleteImage(ctx context.Context, request common.OCIR // DeleteInstanceConsoleConnection Deletes the specified instance console connection. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteInstanceConsoleConnection.go.html to see an example of how to use DeleteInstanceConsoleConnection API. func (client ComputeClient) DeleteInstanceConsoleConnection(ctx context.Context, request DeleteInstanceConsoleConnectionRequest) (response DeleteInstanceConsoleConnectionResponse, err error) { @@ -1860,7 +1870,7 @@ func (client ComputeClient) deleteInstanceConsoleConnection(ctx context.Context, // This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily // until the attachment is completely removed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachBootVolume.go.html to see an example of how to use DetachBootVolume API. func (client ComputeClient) DetachBootVolume(ctx context.Context, request DetachBootVolumeRequest) (response DetachBootVolumeResponse, err error) { @@ -1925,7 +1935,7 @@ func (client ComputeClient) detachBootVolume(ctx context.Context, request common // deleting the VNIC causes that route rule to blackhole and the traffic // will be dropped. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachVnic.go.html to see an example of how to use DetachVnic API. func (client ComputeClient) DetachVnic(ctx context.Context, request DetachVnicRequest) (response DetachVnicResponse, err error) { @@ -1984,7 +1994,7 @@ func (client ComputeClient) detachVnic(ctx context.Context, request common.OCIRe // This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily // until the attachment is completely removed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachVolume.go.html to see an example of how to use DetachVolume API. func (client ComputeClient) DetachVolume(ctx context.Context, request DetachVolumeRequest) (response DetachVolumeResponse, err error) { @@ -2047,7 +2057,7 @@ func (client ComputeClient) detachVolume(ctx context.Context, request common.OCI // See Object Storage URLs (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm#URLs) and Using Pre-Authenticated Requests (https://docs.cloud.oracle.com/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm) // for constructing URLs for image import/export. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ExportImage.go.html to see an example of how to use ExportImage API. // A default retry strategy applies to this operation ExportImage() @@ -2110,7 +2120,7 @@ func (client ComputeClient) exportImage(ctx context.Context, request common.OCIR // GetAppCatalogListing Gets the specified listing. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetAppCatalogListing.go.html to see an example of how to use GetAppCatalogListing API. // A default retry strategy applies to this operation GetAppCatalogListing() @@ -2168,7 +2178,7 @@ func (client ComputeClient) getAppCatalogListing(ctx context.Context, request co // GetAppCatalogListingAgreements Retrieves the agreements for a particular resource version of a listing. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetAppCatalogListingAgreements.go.html to see an example of how to use GetAppCatalogListingAgreements API. // A default retry strategy applies to this operation GetAppCatalogListingAgreements() @@ -2226,7 +2236,7 @@ func (client ComputeClient) getAppCatalogListingAgreements(ctx context.Context, // GetAppCatalogListingResourceVersion Gets the specified listing resource version. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetAppCatalogListingResourceVersion.go.html to see an example of how to use GetAppCatalogListingResourceVersion API. // A default retry strategy applies to this operation GetAppCatalogListingResourceVersion() @@ -2284,7 +2294,7 @@ func (client ComputeClient) getAppCatalogListingResourceVersion(ctx context.Cont // GetBootVolumeAttachment Gets information about the specified boot volume attachment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBootVolumeAttachment.go.html to see an example of how to use GetBootVolumeAttachment API. func (client ComputeClient) GetBootVolumeAttachment(ctx context.Context, request GetBootVolumeAttachmentRequest) (response GetBootVolumeAttachmentResponse, err error) { @@ -2341,7 +2351,7 @@ func (client ComputeClient) getBootVolumeAttachment(ctx context.Context, request // GetComputeCapacityReservation Gets information about the specified compute capacity reservation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeCapacityReservation.go.html to see an example of how to use GetComputeCapacityReservation API. func (client ComputeClient) GetComputeCapacityReservation(ctx context.Context, request GetComputeCapacityReservationRequest) (response GetComputeCapacityReservationResponse, err error) { @@ -2396,9 +2406,10 @@ func (client ComputeClient) getComputeCapacityReservation(ctx context.Context, r return response, err } -// GetComputeCluster Gets information about the specified compute cluster. +// GetComputeCluster Gets information about a compute cluster. A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) +// is a remote direct memory access (RDMA) network group. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeCluster.go.html to see an example of how to use GetComputeCluster API. func (client ComputeClient) GetComputeCluster(ctx context.Context, request GetComputeClusterRequest) (response GetComputeClusterResponse, err error) { @@ -2455,7 +2466,7 @@ func (client ComputeClient) getComputeCluster(ctx context.Context, request commo // GetComputeGlobalImageCapabilitySchema Gets the specified Compute Global Image Capability Schema // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeGlobalImageCapabilitySchema.go.html to see an example of how to use GetComputeGlobalImageCapabilitySchema API. // A default retry strategy applies to this operation GetComputeGlobalImageCapabilitySchema() @@ -2513,7 +2524,7 @@ func (client ComputeClient) getComputeGlobalImageCapabilitySchema(ctx context.Co // GetComputeGlobalImageCapabilitySchemaVersion Gets the specified Compute Global Image Capability Schema Version // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeGlobalImageCapabilitySchemaVersion.go.html to see an example of how to use GetComputeGlobalImageCapabilitySchemaVersion API. // A default retry strategy applies to this operation GetComputeGlobalImageCapabilitySchemaVersion() @@ -2571,7 +2582,7 @@ func (client ComputeClient) getComputeGlobalImageCapabilitySchemaVersion(ctx con // GetComputeImageCapabilitySchema Gets the specified Compute Image Capability Schema // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeImageCapabilitySchema.go.html to see an example of how to use GetComputeImageCapabilitySchema API. // A default retry strategy applies to this operation GetComputeImageCapabilitySchema() @@ -2631,7 +2642,7 @@ func (client ComputeClient) getComputeImageCapabilitySchema(ctx context.Context, // See CaptureConsoleHistory // for details about using the console history operations. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetConsoleHistory.go.html to see an example of how to use GetConsoleHistory API. func (client ComputeClient) GetConsoleHistory(ctx context.Context, request GetConsoleHistoryRequest) (response GetConsoleHistoryResponse, err error) { @@ -2690,7 +2701,7 @@ func (client ComputeClient) getConsoleHistory(ctx context.Context, request commo // See CaptureConsoleHistory // for details about using the console history operations. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetConsoleHistoryContent.go.html to see an example of how to use GetConsoleHistoryContent API. func (client ComputeClient) GetConsoleHistoryContent(ctx context.Context, request GetConsoleHistoryContentRequest) (response GetConsoleHistoryContentResponse, err error) { @@ -2747,7 +2758,7 @@ func (client ComputeClient) getConsoleHistoryContent(ctx context.Context, reques // GetDedicatedVmHost Gets information about the specified dedicated virtual machine host. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDedicatedVmHost.go.html to see an example of how to use GetDedicatedVmHost API. func (client ComputeClient) GetDedicatedVmHost(ctx context.Context, request GetDedicatedVmHostRequest) (response GetDedicatedVmHostResponse, err error) { @@ -2804,7 +2815,7 @@ func (client ComputeClient) getDedicatedVmHost(ctx context.Context, request comm // GetImage Gets the specified image. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetImage.go.html to see an example of how to use GetImage API. // A default retry strategy applies to this operation GetImage() @@ -2862,7 +2873,7 @@ func (client ComputeClient) getImage(ctx context.Context, request common.OCIRequ // GetImageShapeCompatibilityEntry Retrieves an image shape compatibility entry. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetImageShapeCompatibilityEntry.go.html to see an example of how to use GetImageShapeCompatibilityEntry API. // A default retry strategy applies to this operation GetImageShapeCompatibilityEntry() @@ -2922,7 +2933,7 @@ func (client ComputeClient) getImageShapeCompatibilityEntry(ctx context.Context, // **Note:** To retrieve public and private IP addresses for an instance, use the ListVnicAttachments // operation to get the VNIC ID for the instance, and then call GetVnic with the VNIC ID. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstance.go.html to see an example of how to use GetInstance API. func (client ComputeClient) GetInstance(ctx context.Context, request GetInstanceRequest) (response GetInstanceResponse, err error) { @@ -2979,7 +2990,7 @@ func (client ComputeClient) getInstance(ctx context.Context, request common.OCIR // GetInstanceConsoleConnection Gets the specified instance console connection's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstanceConsoleConnection.go.html to see an example of how to use GetInstanceConsoleConnection API. func (client ComputeClient) GetInstanceConsoleConnection(ctx context.Context, request GetInstanceConsoleConnectionRequest) (response GetInstanceConsoleConnectionResponse, err error) { @@ -3037,7 +3048,7 @@ func (client ComputeClient) getInstanceConsoleConnection(ctx context.Context, re // GetInstanceMaintenanceReboot Gets the maximum possible date that a maintenance reboot can be extended. For more information, see // Infrastructure Maintenance (https://docs.cloud.oracle.com/iaas/Content/Compute/References/infrastructure-maintenance.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstanceMaintenanceReboot.go.html to see an example of how to use GetInstanceMaintenanceReboot API. func (client ComputeClient) GetInstanceMaintenanceReboot(ctx context.Context, request GetInstanceMaintenanceRebootRequest) (response GetInstanceMaintenanceRebootResponse, err error) { @@ -3094,7 +3105,7 @@ func (client ComputeClient) getInstanceMaintenanceReboot(ctx context.Context, re // GetMeasuredBootReport Gets the measured boot report for this shielded instance. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetMeasuredBootReport.go.html to see an example of how to use GetMeasuredBootReport API. func (client ComputeClient) GetMeasuredBootReport(ctx context.Context, request GetMeasuredBootReportRequest) (response GetMeasuredBootReportResponse, err error) { @@ -3151,7 +3162,7 @@ func (client ComputeClient) getMeasuredBootReport(ctx context.Context, request c // GetVnicAttachment Gets the information for the specified VNIC attachment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVnicAttachment.go.html to see an example of how to use GetVnicAttachment API. func (client ComputeClient) GetVnicAttachment(ctx context.Context, request GetVnicAttachmentRequest) (response GetVnicAttachmentResponse, err error) { @@ -3208,7 +3219,7 @@ func (client ComputeClient) getVnicAttachment(ctx context.Context, request commo // GetVolumeAttachment Gets information about the specified volume attachment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeAttachment.go.html to see an example of how to use GetVolumeAttachment API. func (client ComputeClient) GetVolumeAttachment(ctx context.Context, request GetVolumeAttachmentRequest) (response GetVolumeAttachmentResponse, err error) { @@ -3266,7 +3277,7 @@ func (client ComputeClient) getVolumeAttachment(ctx context.Context, request com // GetWindowsInstanceInitialCredentials Gets the generated credentials for the instance. Only works for instances that require a password to log in, such as Windows. // For certain operating systems, users will be forced to change the initial credentials. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetWindowsInstanceInitialCredentials.go.html to see an example of how to use GetWindowsInstanceInitialCredentials API. func (client ComputeClient) GetWindowsInstanceInitialCredentials(ctx context.Context, request GetWindowsInstanceInitialCredentialsRequest) (response GetWindowsInstanceInitialCredentialsResponse, err error) { @@ -3353,7 +3364,7 @@ func (client ComputeClient) getWindowsInstanceInitialCredentials(ctx context.Con // For more information about managing instance lifecycle states, see // Stopping and Starting an Instance (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/restartinginstance.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/InstanceAction.go.html to see an example of how to use InstanceAction API. func (client ComputeClient) InstanceAction(ctx context.Context, request InstanceActionRequest) (response InstanceActionResponse, err error) { @@ -3449,7 +3460,7 @@ func (client ComputeClient) instanceAction(ctx context.Context, request common.O // use the CreateComputeCapacityReport // operation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/LaunchInstance.go.html to see an example of how to use LaunchInstance API. func (client ComputeClient) LaunchInstance(ctx context.Context, request LaunchInstanceRequest) (response LaunchInstanceResponse, err error) { @@ -3511,7 +3522,7 @@ func (client ComputeClient) launchInstance(ctx context.Context, request common.O // ListAppCatalogListingResourceVersions Gets all resource versions for a particular listing. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListAppCatalogListingResourceVersions.go.html to see an example of how to use ListAppCatalogListingResourceVersions API. // A default retry strategy applies to this operation ListAppCatalogListingResourceVersions() @@ -3569,7 +3580,7 @@ func (client ComputeClient) listAppCatalogListingResourceVersions(ctx context.Co // ListAppCatalogListings Lists the published listings. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListAppCatalogListings.go.html to see an example of how to use ListAppCatalogListings API. // A default retry strategy applies to this operation ListAppCatalogListings() @@ -3627,7 +3638,7 @@ func (client ComputeClient) listAppCatalogListings(ctx context.Context, request // ListAppCatalogSubscriptions Lists subscriptions for a compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListAppCatalogSubscriptions.go.html to see an example of how to use ListAppCatalogSubscriptions API. // A default retry strategy applies to this operation ListAppCatalogSubscriptions() @@ -3686,7 +3697,7 @@ func (client ComputeClient) listAppCatalogSubscriptions(ctx context.Context, req // ListBootVolumeAttachments Lists the boot volume attachments in the specified compartment. You can filter the // list by specifying an instance OCID, boot volume OCID, or both. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListBootVolumeAttachments.go.html to see an example of how to use ListBootVolumeAttachments API. func (client ComputeClient) ListBootVolumeAttachments(ctx context.Context, request ListBootVolumeAttachmentsRequest) (response ListBootVolumeAttachmentsResponse, err error) { @@ -3743,7 +3754,7 @@ func (client ComputeClient) listBootVolumeAttachments(ctx context.Context, reque // ListComputeCapacityReservationInstanceShapes Lists the shapes that can be reserved within the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityReservationInstanceShapes.go.html to see an example of how to use ListComputeCapacityReservationInstanceShapes API. func (client ComputeClient) ListComputeCapacityReservationInstanceShapes(ctx context.Context, request ListComputeCapacityReservationInstanceShapesRequest) (response ListComputeCapacityReservationInstanceShapesResponse, err error) { @@ -3800,7 +3811,7 @@ func (client ComputeClient) listComputeCapacityReservationInstanceShapes(ctx con // ListComputeCapacityReservationInstances Lists the instances launched under a capacity reservation. You can filter results by specifying criteria. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityReservationInstances.go.html to see an example of how to use ListComputeCapacityReservationInstances API. func (client ComputeClient) ListComputeCapacityReservationInstances(ctx context.Context, request ListComputeCapacityReservationInstancesRequest) (response ListComputeCapacityReservationInstancesResponse, err error) { @@ -3859,7 +3870,7 @@ func (client ComputeClient) listComputeCapacityReservationInstances(ctx context. // You can limit the list by specifying a compute capacity reservation display name // (the list will include all the identically-named compute capacity reservations in the compartment). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityReservations.go.html to see an example of how to use ListComputeCapacityReservations API. func (client ComputeClient) ListComputeCapacityReservations(ctx context.Context, request ListComputeCapacityReservationsRequest) (response ListComputeCapacityReservationsResponse, err error) { @@ -3917,7 +3928,7 @@ func (client ComputeClient) listComputeCapacityReservations(ctx context.Context, // ListComputeClusters Lists the compute clusters in the specified compartment. // A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory access (RDMA) network group. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeClusters.go.html to see an example of how to use ListComputeClusters API. func (client ComputeClient) ListComputeClusters(ctx context.Context, request ListComputeClustersRequest) (response ListComputeClustersResponse, err error) { @@ -3974,7 +3985,7 @@ func (client ComputeClient) listComputeClusters(ctx context.Context, request com // ListComputeGlobalImageCapabilitySchemaVersions Lists Compute Global Image Capability Schema versions in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeGlobalImageCapabilitySchemaVersions.go.html to see an example of how to use ListComputeGlobalImageCapabilitySchemaVersions API. // A default retry strategy applies to this operation ListComputeGlobalImageCapabilitySchemaVersions() @@ -4032,7 +4043,7 @@ func (client ComputeClient) listComputeGlobalImageCapabilitySchemaVersions(ctx c // ListComputeGlobalImageCapabilitySchemas Lists Compute Global Image Capability Schema in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeGlobalImageCapabilitySchemas.go.html to see an example of how to use ListComputeGlobalImageCapabilitySchemas API. // A default retry strategy applies to this operation ListComputeGlobalImageCapabilitySchemas() @@ -4090,7 +4101,7 @@ func (client ComputeClient) listComputeGlobalImageCapabilitySchemas(ctx context. // ListComputeImageCapabilitySchemas Lists Compute Image Capability Schema in the specified compartment. You can also query by a specific imageId. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeImageCapabilitySchemas.go.html to see an example of how to use ListComputeImageCapabilitySchemas API. // A default retry strategy applies to this operation ListComputeImageCapabilitySchemas() @@ -4148,7 +4159,7 @@ func (client ComputeClient) listComputeImageCapabilitySchemas(ctx context.Contex // ListConsoleHistories Lists the console history metadata for the specified compartment or instance. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListConsoleHistories.go.html to see an example of how to use ListConsoleHistories API. func (client ComputeClient) ListConsoleHistories(ctx context.Context, request ListConsoleHistoriesRequest) (response ListConsoleHistoriesResponse, err error) { @@ -4206,7 +4217,7 @@ func (client ComputeClient) listConsoleHistories(ctx context.Context, request co // ListDedicatedVmHostInstanceShapes Lists the shapes that can be used to launch a virtual machine instance on a dedicated virtual machine host within the specified compartment. // You can filter the list by compatibility with a specific dedicated virtual machine host shape. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDedicatedVmHostInstanceShapes.go.html to see an example of how to use ListDedicatedVmHostInstanceShapes API. func (client ComputeClient) ListDedicatedVmHostInstanceShapes(ctx context.Context, request ListDedicatedVmHostInstanceShapesRequest) (response ListDedicatedVmHostInstanceShapesResponse, err error) { @@ -4263,7 +4274,7 @@ func (client ComputeClient) listDedicatedVmHostInstanceShapes(ctx context.Contex // ListDedicatedVmHostInstances Returns the list of instances on the dedicated virtual machine hosts that match the specified criteria. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDedicatedVmHostInstances.go.html to see an example of how to use ListDedicatedVmHostInstances API. func (client ComputeClient) ListDedicatedVmHostInstances(ctx context.Context, request ListDedicatedVmHostInstancesRequest) (response ListDedicatedVmHostInstancesResponse, err error) { @@ -4320,7 +4331,7 @@ func (client ComputeClient) listDedicatedVmHostInstances(ctx context.Context, re // ListDedicatedVmHostShapes Lists the shapes that can be used to launch a dedicated virtual machine host within the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDedicatedVmHostShapes.go.html to see an example of how to use ListDedicatedVmHostShapes API. func (client ComputeClient) ListDedicatedVmHostShapes(ctx context.Context, request ListDedicatedVmHostShapesRequest) (response ListDedicatedVmHostShapesResponse, err error) { @@ -4379,7 +4390,7 @@ func (client ComputeClient) listDedicatedVmHostShapes(ctx context.Context, reque // You can limit the list by specifying a dedicated virtual machine host display name. The list will include all the identically-named // dedicated virtual machine hosts in the compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDedicatedVmHosts.go.html to see an example of how to use ListDedicatedVmHosts API. func (client ComputeClient) ListDedicatedVmHosts(ctx context.Context, request ListDedicatedVmHostsRequest) (response ListDedicatedVmHostsResponse, err error) { @@ -4436,7 +4447,7 @@ func (client ComputeClient) listDedicatedVmHosts(ctx context.Context, request co // ListImageShapeCompatibilityEntries Lists the compatible shapes for the specified image. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListImageShapeCompatibilityEntries.go.html to see an example of how to use ListImageShapeCompatibilityEntries API. // A default retry strategy applies to this operation ListImageShapeCompatibilityEntries() @@ -4502,7 +4513,7 @@ func (client ComputeClient) listImageShapeCompatibilityEntries(ctx context.Conte // **Caution:** Platform images are refreshed regularly. When new images are released, older versions are replaced. // The image OCIDs remain available, but when the platform image is replaced, the image OCIDs are no longer returned as part of the platform image list. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListImages.go.html to see an example of how to use ListImages API. // A default retry strategy applies to this operation ListImages() @@ -4561,7 +4572,7 @@ func (client ComputeClient) listImages(ctx context.Context, request common.OCIRe // ListInstanceConsoleConnections Lists the console connections for the specified compartment or instance. // For more information about instance console connections, see Troubleshooting Instances Using Instance Console Connections (https://docs.cloud.oracle.com/iaas/Content/Compute/References/serialconsole.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstanceConsoleConnections.go.html to see an example of how to use ListInstanceConsoleConnections API. func (client ComputeClient) ListInstanceConsoleConnections(ctx context.Context, request ListInstanceConsoleConnectionsRequest) (response ListInstanceConsoleConnectionsResponse, err error) { @@ -4618,7 +4629,7 @@ func (client ComputeClient) listInstanceConsoleConnections(ctx context.Context, // ListInstanceDevices Gets a list of all the devices for given instance. You can optionally filter results by device availability. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstanceDevices.go.html to see an example of how to use ListInstanceDevices API. func (client ComputeClient) ListInstanceDevices(ctx context.Context, request ListInstanceDevicesRequest) (response ListInstanceDevicesResponse, err error) { @@ -4679,7 +4690,7 @@ func (client ComputeClient) listInstanceDevices(ctx context.Context, request com // **Note:** To retrieve public and private IP addresses for an instance, use the ListVnicAttachments // operation to get the VNIC ID for the instance, and then call GetVnic with the VNIC ID. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstances.go.html to see an example of how to use ListInstances API. func (client ComputeClient) ListInstances(ctx context.Context, request ListInstancesRequest) (response ListInstancesResponse, err error) { @@ -4737,7 +4748,7 @@ func (client ComputeClient) listInstances(ctx context.Context, request common.OC // ListShapes Lists the shapes that can be used to launch an instance within the specified compartment. You can // filter the list by compatibility with a specific image. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListShapes.go.html to see an example of how to use ListShapes API. func (client ComputeClient) ListShapes(ctx context.Context, request ListShapesRequest) (response ListShapesResponse, err error) { @@ -4796,7 +4807,7 @@ func (client ComputeClient) listShapes(ctx context.Context, request common.OCIRe // resides in the same compartment as the attached instance. The list can be // filtered by instance, VNIC, or availability domain. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVnicAttachments.go.html to see an example of how to use ListVnicAttachments API. func (client ComputeClient) ListVnicAttachments(ctx context.Context, request ListVnicAttachmentsRequest) (response ListVnicAttachmentsResponse, err error) { @@ -4872,7 +4883,7 @@ func (m *listvolumeattachment) UnmarshalPolymorphicJSON(data []byte) (interface{ // Currently, the only supported volume attachment type are IScsiVolumeAttachment and // ParavirtualizedVolumeAttachment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeAttachments.go.html to see an example of how to use ListVolumeAttachments API. func (client ComputeClient) ListVolumeAttachments(ctx context.Context, request ListVolumeAttachmentsRequest) (response ListVolumeAttachmentsResponse, err error) { @@ -4929,7 +4940,7 @@ func (client ComputeClient) listVolumeAttachments(ctx context.Context, request c // RemoveImageShapeCompatibilityEntry Removes a shape from the compatible shapes list for the image. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveImageShapeCompatibilityEntry.go.html to see an example of how to use RemoveImageShapeCompatibilityEntry API. func (client ComputeClient) RemoveImageShapeCompatibilityEntry(ctx context.Context, request RemoveImageShapeCompatibilityEntryRequest) (response RemoveImageShapeCompatibilityEntryResponse, err error) { @@ -4984,7 +4995,7 @@ func (client ComputeClient) removeImageShapeCompatibilityEntry(ctx context.Conte return response, err } -// TerminateInstance Terminates (deletes) the specified instance. Any attached VNICs and volumes are automatically detached +// TerminateInstance Permanently terminates (deletes) the specified instance. Any attached VNICs and volumes are automatically detached // when the instance terminates. // To preserve the boot volume associated with the instance, specify `true` for `PreserveBootVolumeQueryParam`. // To delete the boot volume when the instance is deleted, specify `false` or do not specify a value for `PreserveBootVolumeQueryParam`. @@ -4992,7 +5003,7 @@ func (client ComputeClient) removeImageShapeCompatibilityEntry(ctx context.Conte // until the instance is completely deleted. After the instance is deleted, the record remains visible in the list of instances // with the state TERMINATED for at least 12 hours, but no further action is needed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/TerminateInstance.go.html to see an example of how to use TerminateInstance API. func (client ComputeClient) TerminateInstance(ctx context.Context, request TerminateInstanceRequest) (response TerminateInstanceResponse, err error) { @@ -5051,7 +5062,7 @@ func (client ComputeClient) terminateInstance(ctx context.Context, request commo // Fields that are not provided in the request will not be updated. Capacity configurations that are not included will be deleted. // Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeCapacityReservation.go.html to see an example of how to use UpdateComputeCapacityReservation API. func (client ComputeClient) UpdateComputeCapacityReservation(ctx context.Context, request UpdateComputeCapacityReservationRequest) (response UpdateComputeCapacityReservationResponse, err error) { @@ -5106,9 +5117,14 @@ func (client ComputeClient) updateComputeCapacityReservation(ctx context.Context return response, err } -// UpdateComputeCluster Updates the specified compute cluster. +// UpdateComputeCluster Updates a compute cluster. A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a +// remote direct memory access (RDMA) network group. +// To create instances within a compute cluster, use the LaunchInstance +// operation. +// To delete instances from a compute cluster, use the TerminateInstance +// operation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeCluster.go.html to see an example of how to use UpdateComputeCluster API. func (client ComputeClient) UpdateComputeCluster(ctx context.Context, request UpdateComputeClusterRequest) (response UpdateComputeClusterResponse, err error) { @@ -5170,7 +5186,7 @@ func (client ComputeClient) updateComputeCluster(ctx context.Context, request co // UpdateComputeImageCapabilitySchema Updates the specified Compute Image Capability Schema // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeImageCapabilitySchema.go.html to see an example of how to use UpdateComputeImageCapabilitySchema API. func (client ComputeClient) UpdateComputeImageCapabilitySchema(ctx context.Context, request UpdateComputeImageCapabilitySchemaRequest) (response UpdateComputeImageCapabilitySchemaResponse, err error) { @@ -5227,7 +5243,7 @@ func (client ComputeClient) updateComputeImageCapabilitySchema(ctx context.Conte // UpdateConsoleHistory Updates the specified console history metadata. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateConsoleHistory.go.html to see an example of how to use UpdateConsoleHistory API. func (client ComputeClient) UpdateConsoleHistory(ctx context.Context, request UpdateConsoleHistoryRequest) (response UpdateConsoleHistoryResponse, err error) { @@ -5285,7 +5301,7 @@ func (client ComputeClient) updateConsoleHistory(ctx context.Context, request co // UpdateDedicatedVmHost Updates the displayName, freeformTags, and definedTags attributes for the specified dedicated virtual machine host. // If an attribute value is not included, it will not be updated. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDedicatedVmHost.go.html to see an example of how to use UpdateDedicatedVmHost API. func (client ComputeClient) UpdateDedicatedVmHost(ctx context.Context, request UpdateDedicatedVmHostRequest) (response UpdateDedicatedVmHostResponse, err error) { @@ -5347,7 +5363,7 @@ func (client ComputeClient) updateDedicatedVmHost(ctx context.Context, request c // UpdateImage Updates the display name of the image. Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateImage.go.html to see an example of how to use UpdateImage API. func (client ComputeClient) UpdateImage(ctx context.Context, request UpdateImageRequest) (response UpdateImageResponse, err error) { @@ -5413,7 +5429,7 @@ func (client ComputeClient) updateImage(ctx context.Context, request common.OCIR // up to a minute). // The OCID of the instance remains the same. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInstance.go.html to see an example of how to use UpdateInstance API. func (client ComputeClient) UpdateInstance(ctx context.Context, request UpdateInstanceRequest) (response UpdateInstanceResponse, err error) { @@ -5475,7 +5491,7 @@ func (client ComputeClient) updateInstance(ctx context.Context, request common.O // UpdateInstanceConsoleConnection Updates the defined tags and free-form tags for the specified instance console connection. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInstanceConsoleConnection.go.html to see an example of how to use UpdateInstanceConsoleConnection API. func (client ComputeClient) UpdateInstanceConsoleConnection(ctx context.Context, request UpdateInstanceConsoleConnectionRequest) (response UpdateInstanceConsoleConnectionResponse, err error) { @@ -5532,7 +5548,7 @@ func (client ComputeClient) updateInstanceConsoleConnection(ctx context.Context, // UpdateVolumeAttachment Updates information about the specified volume attachment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeAttachment.go.html to see an example of how to use UpdateVolumeAttachment API. func (client ComputeClient) UpdateVolumeAttachment(ctx context.Context, request UpdateVolumeAttachmentRequest) (response UpdateVolumeAttachmentResponse, err error) { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/core_computemanagement_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_computemanagement_client.go index ea019aaf9d..23929ad2f5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/core_computemanagement_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_computemanagement_client.go @@ -32,6 +32,9 @@ type ComputeManagementClient struct { // NewComputeManagementClientWithConfigurationProvider Creates a new default ComputeManagement client with the given configuration provider. // the configuration provider will be used for the default signer as well as reading the region func NewComputeManagementClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ComputeManagementClient, err error) { + if enabled := common.CheckForEnabledServices("core"); !enabled { + return client, fmt.Errorf("the Alloy configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local alloy_config file configured the service you're targeting or contact the cloud provider on the availability of this service") + } provider, err := auth.GetGenericConfigurationProvider(configProvider) if err != nil { return client, err @@ -83,7 +86,7 @@ func (client *ComputeManagementClient) setConfigurationProvider(configProvider c region, _ := configProvider.Region() client.SetRegion(region) if client.Host == "" { - return fmt.Errorf("Invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil @@ -98,7 +101,7 @@ func (client *ComputeManagementClient) ConfigurationProvider() *common.Configura // that an instance must meet before you can attach it to a pool, see // Attaching an Instance to an Instance Pool (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/updatinginstancepool.htm#attach-instance). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachInstancePoolInstance.go.html to see an example of how to use AttachInstancePoolInstance API. func (client ComputeManagementClient) AttachInstancePoolInstance(ctx context.Context, request AttachInstancePoolInstanceRequest) (response AttachInstancePoolInstanceResponse, err error) { @@ -160,7 +163,7 @@ func (client ComputeManagementClient) attachInstancePoolInstance(ctx context.Con // AttachLoadBalancer Attach a load balancer to the instance pool. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachLoadBalancer.go.html to see an example of how to use AttachLoadBalancer API. func (client ComputeManagementClient) AttachLoadBalancer(ctx context.Context, request AttachLoadBalancerRequest) (response AttachLoadBalancerResponse, err error) { @@ -220,13 +223,14 @@ func (client ComputeManagementClient) attachLoadBalancer(ctx context.Context, re return response, err } -// ChangeClusterNetworkCompartment Moves a cluster network into a different compartment within the same tenancy. For +// ChangeClusterNetworkCompartment Moves a cluster network with instance pools (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm) +// into a different compartment within the same tenancy. For // information about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // When you move a cluster network to a different compartment, associated resources such as the instances // in the cluster network, boot volumes, and VNICs are not moved. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeClusterNetworkCompartment.go.html to see an example of how to use ChangeClusterNetworkCompartment API. func (client ComputeManagementClient) ChangeClusterNetworkCompartment(ctx context.Context, request ChangeClusterNetworkCompartmentRequest) (response ChangeClusterNetworkCompartmentResponse, err error) { @@ -298,7 +302,7 @@ func (client ComputeManagementClient) changeClusterNetworkCompartment(ctx contex // you should instead create a new instance configuration in the target compartment using // CreateInstanceConfiguration (https://docs.cloud.oracle.com/iaas/api/#/en/iaas/20160918/InstanceConfiguration/CreateInstanceConfiguration). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeInstanceConfigurationCompartment.go.html to see an example of how to use ChangeInstanceConfigurationCompartment API. func (client ComputeManagementClient) ChangeInstanceConfigurationCompartment(ctx context.Context, request ChangeInstanceConfigurationCompartmentRequest) (response ChangeInstanceConfigurationCompartmentResponse, err error) { @@ -364,7 +368,7 @@ func (client ComputeManagementClient) changeInstanceConfigurationCompartment(ctx // When you move an instance pool to a different compartment, associated resources such as the instances in // the pool, boot volumes, VNICs, and autoscaling configurations are not moved. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeInstancePoolCompartment.go.html to see an example of how to use ChangeInstancePoolCompartment API. func (client ComputeManagementClient) ChangeInstancePoolCompartment(ctx context.Context, request ChangeInstancePoolCompartmentRequest) (response ChangeInstancePoolCompartmentResponse, err error) { @@ -424,13 +428,20 @@ func (client ComputeManagementClient) changeInstancePoolCompartment(ctx context. return response, err } -// CreateClusterNetwork Creates a cluster network. For more information about cluster networks, see -// Managing Cluster Networks (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). +// CreateClusterNetwork Creates a cluster network with instance pools (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). +// A cluster network is a group of high performance computing (HPC), GPU, or optimized bare metal +// instances that are connected with an ultra low-latency remote direct memory access (RDMA) network. +// Cluster networks with instance pools use instance pools to manage groups of identical instances. +// Use cluster networks with instance pools when you want predictable capacity for a specific number of identical +// instances that are managed as a group. +// If you want to manage instances in the RDMA network independently of each other or use different types of instances +// in the network group, create a compute cluster by using the CreateComputeCluster +// operation. // To determine whether capacity is available for a specific shape before you create a cluster network, // use the CreateComputeCapacityReport // operation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateClusterNetwork.go.html to see an example of how to use CreateClusterNetwork API. func (client ComputeManagementClient) CreateClusterNetwork(ctx context.Context, request CreateClusterNetworkRequest) (response CreateClusterNetworkResponse, err error) { @@ -493,7 +504,7 @@ func (client ComputeManagementClient) createClusterNetwork(ctx context.Context, // CreateInstanceConfiguration Creates an instance configuration. An instance configuration is a template that defines the // settings to use when creating Compute instances. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateInstanceConfiguration.go.html to see an example of how to use CreateInstanceConfiguration API. func (client ComputeManagementClient) CreateInstanceConfiguration(ctx context.Context, request CreateInstanceConfigurationRequest) (response CreateInstanceConfigurationResponse, err error) { @@ -558,7 +569,7 @@ func (client ComputeManagementClient) createInstanceConfiguration(ctx context.Co // use the CreateComputeCapacityReport // operation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateInstancePool.go.html to see an example of how to use CreateInstancePool API. func (client ComputeManagementClient) CreateInstancePool(ctx context.Context, request CreateInstancePoolRequest) (response CreateInstancePoolResponse, err error) { @@ -620,7 +631,7 @@ func (client ComputeManagementClient) createInstancePool(ctx context.Context, re // DeleteInstanceConfiguration Deletes an instance configuration. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteInstanceConfiguration.go.html to see an example of how to use DeleteInstanceConfiguration API. func (client ComputeManagementClient) DeleteInstanceConfiguration(ctx context.Context, request DeleteInstanceConfigurationRequest) (response DeleteInstanceConfigurationResponse, err error) { @@ -677,7 +688,7 @@ func (client ComputeManagementClient) deleteInstanceConfiguration(ctx context.Co // DetachInstancePoolInstance Detaches an instance from an instance pool. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachInstancePoolInstance.go.html to see an example of how to use DetachInstancePoolInstance API. func (client ComputeManagementClient) DetachInstancePoolInstance(ctx context.Context, request DetachInstancePoolInstanceRequest) (response DetachInstancePoolInstanceResponse, err error) { @@ -739,7 +750,7 @@ func (client ComputeManagementClient) detachInstancePoolInstance(ctx context.Con // DetachLoadBalancer Detach a load balancer from the instance pool. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachLoadBalancer.go.html to see an example of how to use DetachLoadBalancer API. func (client ComputeManagementClient) DetachLoadBalancer(ctx context.Context, request DetachLoadBalancerRequest) (response DetachLoadBalancerResponse, err error) { @@ -799,9 +810,9 @@ func (client ComputeManagementClient) detachLoadBalancer(ctx context.Context, re return response, err } -// GetClusterNetwork Gets information about the specified cluster network. +// GetClusterNetwork Gets information about a cluster network with instance pools (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetClusterNetwork.go.html to see an example of how to use GetClusterNetwork API. func (client ComputeManagementClient) GetClusterNetwork(ctx context.Context, request GetClusterNetworkRequest) (response GetClusterNetworkResponse, err error) { @@ -858,7 +869,7 @@ func (client ComputeManagementClient) getClusterNetwork(ctx context.Context, req // GetInstanceConfiguration Gets the specified instance configuration // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstanceConfiguration.go.html to see an example of how to use GetInstanceConfiguration API. func (client ComputeManagementClient) GetInstanceConfiguration(ctx context.Context, request GetInstanceConfigurationRequest) (response GetInstanceConfigurationResponse, err error) { @@ -915,7 +926,7 @@ func (client ComputeManagementClient) getInstanceConfiguration(ctx context.Conte // GetInstancePool Gets the specified instance pool // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstancePool.go.html to see an example of how to use GetInstancePool API. func (client ComputeManagementClient) GetInstancePool(ctx context.Context, request GetInstancePoolRequest) (response GetInstancePoolResponse, err error) { @@ -972,7 +983,7 @@ func (client ComputeManagementClient) getInstancePool(ctx context.Context, reque // GetInstancePoolInstance Gets information about an instance that belongs to an instance pool. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstancePoolInstance.go.html to see an example of how to use GetInstancePoolInstance API. func (client ComputeManagementClient) GetInstancePoolInstance(ctx context.Context, request GetInstancePoolInstanceRequest) (response GetInstancePoolInstanceResponse, err error) { @@ -1029,7 +1040,7 @@ func (client ComputeManagementClient) getInstancePoolInstance(ctx context.Contex // GetInstancePoolLoadBalancerAttachment Gets information about a load balancer that is attached to the specified instance pool. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstancePoolLoadBalancerAttachment.go.html to see an example of how to use GetInstancePoolLoadBalancerAttachment API. func (client ComputeManagementClient) GetInstancePoolLoadBalancerAttachment(ctx context.Context, request GetInstancePoolLoadBalancerAttachmentRequest) (response GetInstancePoolLoadBalancerAttachmentResponse, err error) { @@ -1094,7 +1105,7 @@ func (client ComputeManagementClient) getInstancePoolLoadBalancerAttachment(ctx // use the CreateComputeCapacityReport // operation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/LaunchInstanceConfiguration.go.html to see an example of how to use LaunchInstanceConfiguration API. func (client ComputeManagementClient) LaunchInstanceConfiguration(ctx context.Context, request LaunchInstanceConfigurationRequest) (response LaunchInstanceConfigurationResponse, err error) { @@ -1154,9 +1165,9 @@ func (client ComputeManagementClient) launchInstanceConfiguration(ctx context.Co return response, err } -// ListClusterNetworkInstances Lists the instances in the specified cluster network. +// ListClusterNetworkInstances Lists the instances in a cluster network with instance pools (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListClusterNetworkInstances.go.html to see an example of how to use ListClusterNetworkInstances API. func (client ComputeManagementClient) ListClusterNetworkInstances(ctx context.Context, request ListClusterNetworkInstancesRequest) (response ListClusterNetworkInstancesResponse, err error) { @@ -1211,9 +1222,10 @@ func (client ComputeManagementClient) listClusterNetworkInstances(ctx context.Co return response, err } -// ListClusterNetworks Lists the cluster networks in the specified compartment. +// ListClusterNetworks Lists the cluster networks with instance pools (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm) +// in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListClusterNetworks.go.html to see an example of how to use ListClusterNetworks API. func (client ComputeManagementClient) ListClusterNetworks(ctx context.Context, request ListClusterNetworksRequest) (response ListClusterNetworksResponse, err error) { @@ -1270,7 +1282,7 @@ func (client ComputeManagementClient) listClusterNetworks(ctx context.Context, r // ListInstanceConfigurations Lists the instance configurations in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstanceConfigurations.go.html to see an example of how to use ListInstanceConfigurations API. func (client ComputeManagementClient) ListInstanceConfigurations(ctx context.Context, request ListInstanceConfigurationsRequest) (response ListInstanceConfigurationsResponse, err error) { @@ -1327,7 +1339,7 @@ func (client ComputeManagementClient) listInstanceConfigurations(ctx context.Con // ListInstancePoolInstances List the instances in the specified instance pool. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstancePoolInstances.go.html to see an example of how to use ListInstancePoolInstances API. func (client ComputeManagementClient) ListInstancePoolInstances(ctx context.Context, request ListInstancePoolInstancesRequest) (response ListInstancePoolInstancesResponse, err error) { @@ -1384,7 +1396,7 @@ func (client ComputeManagementClient) listInstancePoolInstances(ctx context.Cont // ListInstancePools Lists the instance pools in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstancePools.go.html to see an example of how to use ListInstancePools API. func (client ComputeManagementClient) ListInstancePools(ctx context.Context, request ListInstancePoolsRequest) (response ListInstancePoolsResponse, err error) { @@ -1442,7 +1454,7 @@ func (client ComputeManagementClient) listInstancePools(ctx context.Context, req // ResetInstancePool Performs the reset (immediate power off and power on) action on the specified instance pool, // which performs the action on all the instances in the pool. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ResetInstancePool.go.html to see an example of how to use ResetInstancePool API. func (client ComputeManagementClient) ResetInstancePool(ctx context.Context, request ResetInstancePoolRequest) (response ResetInstancePoolResponse, err error) { @@ -1507,7 +1519,7 @@ func (client ComputeManagementClient) resetInstancePool(ctx context.Context, req // Softreset gracefully reboots the instances by sending a shutdown command to the operating systems. // After waiting 15 minutes for the OS to shut down, the instances are powered off and then powered back on. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/SoftresetInstancePool.go.html to see an example of how to use SoftresetInstancePool API. func (client ComputeManagementClient) SoftresetInstancePool(ctx context.Context, request SoftresetInstancePoolRequest) (response SoftresetInstancePoolResponse, err error) { @@ -1572,7 +1584,7 @@ func (client ComputeManagementClient) softresetInstancePool(ctx context.Context, // Softstop gracefully reboots the instances by sending a shutdown command to the operating systems. // After waiting 15 minutes for the OS to shutdown, the instances are powered off and then powered back on. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/SoftstopInstancePool.go.html to see an example of how to use SoftstopInstancePool API. func (client ComputeManagementClient) SoftstopInstancePool(ctx context.Context, request SoftstopInstancePoolRequest) (response SoftstopInstancePoolResponse, err error) { @@ -1635,7 +1647,7 @@ func (client ComputeManagementClient) softstopInstancePool(ctx context.Context, // StartInstancePool Performs the start (power on) action on the specified instance pool, // which performs the action on all the instances in the pool. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/StartInstancePool.go.html to see an example of how to use StartInstancePool API. func (client ComputeManagementClient) StartInstancePool(ctx context.Context, request StartInstancePoolRequest) (response StartInstancePoolResponse, err error) { @@ -1698,7 +1710,7 @@ func (client ComputeManagementClient) startInstancePool(ctx context.Context, req // StopInstancePool Performs the stop (immediate power off) action on the specified instance pool, // which performs the action on all the instances in the pool. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/StopInstancePool.go.html to see an example of how to use StopInstancePool API. func (client ComputeManagementClient) StopInstancePool(ctx context.Context, request StopInstancePoolRequest) (response StopInstancePoolResponse, err error) { @@ -1758,11 +1770,11 @@ func (client ComputeManagementClient) stopInstancePool(ctx context.Context, requ return response, err } -// TerminateClusterNetwork Terminates the specified cluster network. +// TerminateClusterNetwork Deletes (terminates) a cluster network with instance pools (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). // When you delete a cluster network, all of its resources are permanently deleted, // including associated instances and instance pools. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/TerminateClusterNetwork.go.html to see an example of how to use TerminateClusterNetwork API. func (client ComputeManagementClient) TerminateClusterNetwork(ctx context.Context, request TerminateClusterNetworkRequest) (response TerminateClusterNetworkResponse, err error) { @@ -1824,7 +1836,7 @@ func (client ComputeManagementClient) terminateClusterNetwork(ctx context.Contex // asynchronously after the pool is deleted. You can also manually delete the autoscaling configuration using // the `DeleteAutoScalingConfiguration` operation in the Autoscaling API. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/TerminateInstancePool.go.html to see an example of how to use TerminateInstancePool API. func (client ComputeManagementClient) TerminateInstancePool(ctx context.Context, request TerminateInstancePoolRequest) (response TerminateInstancePoolResponse, err error) { @@ -1879,9 +1891,10 @@ func (client ComputeManagementClient) terminateInstancePool(ctx context.Context, return response, err } -// UpdateClusterNetwork Updates the specified cluster network. The OCID of the cluster network remains the same. +// UpdateClusterNetwork Updates a cluster network with instance pools (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). +// The OCID of the cluster network remains the same. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateClusterNetwork.go.html to see an example of how to use UpdateClusterNetwork API. func (client ComputeManagementClient) UpdateClusterNetwork(ctx context.Context, request UpdateClusterNetworkRequest) (response UpdateClusterNetworkResponse, err error) { @@ -1943,7 +1956,7 @@ func (client ComputeManagementClient) updateClusterNetwork(ctx context.Context, // UpdateInstanceConfiguration Updates the free-form tags, defined tags, and display name of an instance configuration. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInstanceConfiguration.go.html to see an example of how to use UpdateInstanceConfiguration API. func (client ComputeManagementClient) UpdateInstanceConfiguration(ctx context.Context, request UpdateInstanceConfigurationRequest) (response UpdateInstanceConfigurationResponse, err error) { @@ -2006,7 +2019,7 @@ func (client ComputeManagementClient) updateInstanceConfiguration(ctx context.Co // UpdateInstancePool Update the specified instance pool. // The OCID of the instance pool remains the same. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInstancePool.go.html to see an example of how to use UpdateInstancePool API. func (client ComputeManagementClient) UpdateInstancePool(ctx context.Context, request UpdateInstancePoolRequest) (response UpdateInstancePoolResponse, err error) { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/core_virtualnetwork_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_virtualnetwork_client.go index 230156e87b..7186f694fd 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/core_virtualnetwork_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_virtualnetwork_client.go @@ -32,6 +32,9 @@ type VirtualNetworkClient struct { // NewVirtualNetworkClientWithConfigurationProvider Creates a new default VirtualNetwork client with the given configuration provider. // the configuration provider will be used for the default signer as well as reading the region func NewVirtualNetworkClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client VirtualNetworkClient, err error) { + if enabled := common.CheckForEnabledServices("core"); !enabled { + return client, fmt.Errorf("the Alloy configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local alloy_config file configured the service you're targeting or contact the cloud provider on the availability of this service") + } provider, err := auth.GetGenericConfigurationProvider(configProvider) if err != nil { return client, err @@ -83,7 +86,7 @@ func (client *VirtualNetworkClient) setConfigurationProvider(configProvider comm region, _ := configProvider.Region() client.SetRegion(region) if client.Host == "" { - return fmt.Errorf("Invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil @@ -96,7 +99,7 @@ func (client *VirtualNetworkClient) ConfigurationProvider() *common.Configuratio // AddDrgRouteDistributionStatements Adds one or more route distribution statements to the specified route distribution. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddDrgRouteDistributionStatements.go.html to see an example of how to use AddDrgRouteDistributionStatements API. func (client VirtualNetworkClient) AddDrgRouteDistributionStatements(ctx context.Context, request AddDrgRouteDistributionStatementsRequest) (response AddDrgRouteDistributionStatementsResponse, err error) { @@ -153,7 +156,7 @@ func (client VirtualNetworkClient) addDrgRouteDistributionStatements(ctx context // AddDrgRouteRules Adds one or more static route rules to the specified DRG route table. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddDrgRouteRules.go.html to see an example of how to use AddDrgRouteRules API. func (client VirtualNetworkClient) AddDrgRouteRules(ctx context.Context, request AddDrgRouteRulesRequest) (response AddDrgRouteRulesResponse, err error) { @@ -213,9 +216,9 @@ func (client VirtualNetworkClient) addDrgRouteRules(ctx context.Context, request return response, err } -// AddIpv6SubnetCidr Add an IPv6 CIDR to a subnet. +// AddIpv6SubnetCidr Add an IPv6 prefix to a subnet. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddIpv6SubnetCidr.go.html to see an example of how to use AddIpv6SubnetCidr API. func (client VirtualNetworkClient) AddIpv6SubnetCidr(ctx context.Context, request AddIpv6SubnetCidrRequest) (response AddIpv6SubnetCidrResponse, err error) { @@ -275,10 +278,10 @@ func (client VirtualNetworkClient) addIpv6SubnetCidr(ctx context.Context, reques return response, err } -// AddIpv6VcnCidr Add an IPv6 CIDR to a VCN. The VCN size is always /56 and assigned by Oracle. -// Once added the IPv6 CIDR block cannot be removed or modified. +// AddIpv6VcnCidr Add an IPv6 prefix to a VCN. The VCN size is always /56 and assigned by Oracle. +// Once added the IPv6 prefix cannot be removed or modified. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddIpv6VcnCidr.go.html to see an example of how to use AddIpv6VcnCidr API. func (client VirtualNetworkClient) AddIpv6VcnCidr(ctx context.Context, request AddIpv6VcnCidrRequest) (response AddIpv6VcnCidrResponse, err error) { @@ -340,7 +343,7 @@ func (client VirtualNetworkClient) addIpv6VcnCidr(ctx context.Context, request c // AddNetworkSecurityGroupSecurityRules Adds one or more security rules to the specified network security group. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddNetworkSecurityGroupSecurityRules.go.html to see an example of how to use AddNetworkSecurityGroupSecurityRules API. func (client VirtualNetworkClient) AddNetworkSecurityGroupSecurityRules(ctx context.Context, request AddNetworkSecurityGroupSecurityRulesRequest) (response AddNetworkSecurityGroupSecurityRulesResponse, err error) { @@ -398,7 +401,7 @@ func (client VirtualNetworkClient) addNetworkSecurityGroupSecurityRules(ctx cont // AddPublicIpPoolCapacity Adds some or all of a CIDR block to a public IP pool. // The CIDR block (or subrange) must not overlap with any other CIDR block already added to this or any other public IP pool. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddPublicIpPoolCapacity.go.html to see an example of how to use AddPublicIpPoolCapacity API. func (client VirtualNetworkClient) AddPublicIpPoolCapacity(ctx context.Context, request AddPublicIpPoolCapacityRequest) (response AddPublicIpPoolCapacityResponse, err error) { @@ -464,7 +467,7 @@ func (client VirtualNetworkClient) addPublicIpPoolCapacity(ctx context.Context, // - Must not exceed the limit of CIDR blocks allowed per VCN. // **Note:** Adding a CIDR block places your VCN in an updating state until the changes are complete. You cannot create or update the VCN's subnets, VLANs, LPGs, or route tables during this operation. The time to completion can take a few minutes. You can use the `GetWorkRequest` operation to check the status of the update. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddVcnCidr.go.html to see an example of how to use AddVcnCidr API. func (client VirtualNetworkClient) AddVcnCidr(ctx context.Context, request AddVcnCidrRequest) (response AddVcnCidrResponse, err error) { @@ -527,7 +530,7 @@ func (client VirtualNetworkClient) addVcnCidr(ctx context.Context, request commo // AdvertiseByoipRange Begins BGP route advertisements for the BYOIP CIDR block you imported to the Oracle Cloud. // The `ByoipRange` resource must be in the PROVISIONED state before the BYOIP CIDR block routes can be advertised with BGP. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AdvertiseByoipRange.go.html to see an example of how to use AdvertiseByoipRange API. func (client VirtualNetworkClient) AdvertiseByoipRange(ctx context.Context, request AdvertiseByoipRangeRequest) (response AdvertiseByoipRangeResponse, err error) { @@ -592,7 +595,7 @@ func (client VirtualNetworkClient) advertiseByoipRange(ctx context.Context, requ // the entire existing list of enabled `Service` objects with the list that you provide in the // `Update` call. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachServiceId.go.html to see an example of how to use AttachServiceId API. func (client VirtualNetworkClient) AttachServiceId(ctx context.Context, request AttachServiceIdRequest) (response AttachServiceIdResponse, err error) { @@ -652,7 +655,7 @@ func (client VirtualNetworkClient) attachServiceId(ctx context.Context, request // to add prefixes to the virtual circuit. Oracle must verify the customer's ownership // of each prefix before traffic for that prefix will flow across the virtual circuit. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkAddVirtualCircuitPublicPrefixes.go.html to see an example of how to use BulkAddVirtualCircuitPublicPrefixes API. // A default retry strategy applies to this operation BulkAddVirtualCircuitPublicPrefixes() @@ -708,7 +711,7 @@ func (client VirtualNetworkClient) bulkAddVirtualCircuitPublicPrefixes(ctx conte // to remove prefixes from the virtual circuit. When the virtual circuit's state switches // back to PROVISIONED, Oracle stops advertising the specified prefixes across the connection. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkDeleteVirtualCircuitPublicPrefixes.go.html to see an example of how to use BulkDeleteVirtualCircuitPublicPrefixes API. // A default retry strategy applies to this operation BulkDeleteVirtualCircuitPublicPrefixes() @@ -763,7 +766,7 @@ func (client VirtualNetworkClient) bulkDeleteVirtualCircuitPublicPrefixes(ctx co // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeByoipRangeCompartment.go.html to see an example of how to use ChangeByoipRangeCompartment API. func (client VirtualNetworkClient) ChangeByoipRangeCompartment(ctx context.Context, request ChangeByoipRangeCompartmentRequest) (response ChangeByoipRangeCompartmentResponse, err error) { @@ -827,7 +830,7 @@ func (client VirtualNetworkClient) changeByoipRangeCompartment(ctx context.Conte // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeCaptureFilterCompartment.go.html to see an example of how to use ChangeCaptureFilterCompartment API. func (client VirtualNetworkClient) ChangeCaptureFilterCompartment(ctx context.Context, request ChangeCaptureFilterCompartmentRequest) (response ChangeCaptureFilterCompartmentResponse, err error) { @@ -891,7 +894,7 @@ func (client VirtualNetworkClient) changeCaptureFilterCompartment(ctx context.Co // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeCpeCompartment.go.html to see an example of how to use ChangeCpeCompartment API. // A default retry strategy applies to this operation ChangeCpeCompartment() @@ -956,7 +959,7 @@ func (client VirtualNetworkClient) changeCpeCompartment(ctx context.Context, req // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeCrossConnectCompartment.go.html to see an example of how to use ChangeCrossConnectCompartment API. // A default retry strategy applies to this operation ChangeCrossConnectCompartment() @@ -1021,7 +1024,7 @@ func (client VirtualNetworkClient) changeCrossConnectCompartment(ctx context.Con // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeCrossConnectGroupCompartment.go.html to see an example of how to use ChangeCrossConnectGroupCompartment API. // A default retry strategy applies to this operation ChangeCrossConnectGroupCompartment() @@ -1086,7 +1089,7 @@ func (client VirtualNetworkClient) changeCrossConnectGroupCompartment(ctx contex // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeDhcpOptionsCompartment.go.html to see an example of how to use ChangeDhcpOptionsCompartment API. func (client VirtualNetworkClient) ChangeDhcpOptionsCompartment(ctx context.Context, request ChangeDhcpOptionsCompartmentRequest) (response ChangeDhcpOptionsCompartmentResponse, err error) { @@ -1150,7 +1153,7 @@ func (client VirtualNetworkClient) changeDhcpOptionsCompartment(ctx context.Cont // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeDrgCompartment.go.html to see an example of how to use ChangeDrgCompartment API. func (client VirtualNetworkClient) ChangeDrgCompartment(ctx context.Context, request ChangeDrgCompartmentRequest) (response ChangeDrgCompartmentResponse, err error) { @@ -1214,7 +1217,7 @@ func (client VirtualNetworkClient) changeDrgCompartment(ctx context.Context, req // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeIPSecConnectionCompartment.go.html to see an example of how to use ChangeIPSecConnectionCompartment API. // A default retry strategy applies to this operation ChangeIPSecConnectionCompartment() @@ -1279,7 +1282,7 @@ func (client VirtualNetworkClient) changeIPSecConnectionCompartment(ctx context. // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeInternetGatewayCompartment.go.html to see an example of how to use ChangeInternetGatewayCompartment API. func (client VirtualNetworkClient) ChangeInternetGatewayCompartment(ctx context.Context, request ChangeInternetGatewayCompartmentRequest) (response ChangeInternetGatewayCompartmentResponse, err error) { @@ -1343,7 +1346,7 @@ func (client VirtualNetworkClient) changeInternetGatewayCompartment(ctx context. // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeLocalPeeringGatewayCompartment.go.html to see an example of how to use ChangeLocalPeeringGatewayCompartment API. func (client VirtualNetworkClient) ChangeLocalPeeringGatewayCompartment(ctx context.Context, request ChangeLocalPeeringGatewayCompartmentRequest) (response ChangeLocalPeeringGatewayCompartmentResponse, err error) { @@ -1407,7 +1410,7 @@ func (client VirtualNetworkClient) changeLocalPeeringGatewayCompartment(ctx cont // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeNatGatewayCompartment.go.html to see an example of how to use ChangeNatGatewayCompartment API. func (client VirtualNetworkClient) ChangeNatGatewayCompartment(ctx context.Context, request ChangeNatGatewayCompartmentRequest) (response ChangeNatGatewayCompartmentResponse, err error) { @@ -1470,7 +1473,7 @@ func (client VirtualNetworkClient) changeNatGatewayCompartment(ctx context.Conte // ChangeNetworkSecurityGroupCompartment Moves a network security group into a different compartment within the same tenancy. For // information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeNetworkSecurityGroupCompartment.go.html to see an example of how to use ChangeNetworkSecurityGroupCompartment API. func (client VirtualNetworkClient) ChangeNetworkSecurityGroupCompartment(ctx context.Context, request ChangeNetworkSecurityGroupCompartmentRequest) (response ChangeNetworkSecurityGroupCompartmentResponse, err error) { @@ -1536,7 +1539,7 @@ func (client VirtualNetworkClient) changeNetworkSecurityGroupCompartment(ctx con // This operation applies only to reserved public IPs. Ephemeral public IPs always belong to the // same compartment as their VNIC and move accordingly. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangePublicIpCompartment.go.html to see an example of how to use ChangePublicIpCompartment API. func (client VirtualNetworkClient) ChangePublicIpCompartment(ctx context.Context, request ChangePublicIpCompartmentRequest) (response ChangePublicIpCompartmentResponse, err error) { @@ -1600,7 +1603,7 @@ func (client VirtualNetworkClient) changePublicIpCompartment(ctx context.Context // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangePublicIpPoolCompartment.go.html to see an example of how to use ChangePublicIpPoolCompartment API. func (client VirtualNetworkClient) ChangePublicIpPoolCompartment(ctx context.Context, request ChangePublicIpPoolCompartmentRequest) (response ChangePublicIpPoolCompartmentResponse, err error) { @@ -1664,7 +1667,7 @@ func (client VirtualNetworkClient) changePublicIpPoolCompartment(ctx context.Con // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeRemotePeeringConnectionCompartment.go.html to see an example of how to use ChangeRemotePeeringConnectionCompartment API. // A default retry strategy applies to this operation ChangeRemotePeeringConnectionCompartment() @@ -1729,7 +1732,7 @@ func (client VirtualNetworkClient) changeRemotePeeringConnectionCompartment(ctx // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeRouteTableCompartment.go.html to see an example of how to use ChangeRouteTableCompartment API. func (client VirtualNetworkClient) ChangeRouteTableCompartment(ctx context.Context, request ChangeRouteTableCompartmentRequest) (response ChangeRouteTableCompartmentResponse, err error) { @@ -1793,7 +1796,7 @@ func (client VirtualNetworkClient) changeRouteTableCompartment(ctx context.Conte // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeSecurityListCompartment.go.html to see an example of how to use ChangeSecurityListCompartment API. func (client VirtualNetworkClient) ChangeSecurityListCompartment(ctx context.Context, request ChangeSecurityListCompartmentRequest) (response ChangeSecurityListCompartmentResponse, err error) { @@ -1857,7 +1860,7 @@ func (client VirtualNetworkClient) changeSecurityListCompartment(ctx context.Con // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeServiceGatewayCompartment.go.html to see an example of how to use ChangeServiceGatewayCompartment API. func (client VirtualNetworkClient) ChangeServiceGatewayCompartment(ctx context.Context, request ChangeServiceGatewayCompartmentRequest) (response ChangeServiceGatewayCompartmentResponse, err error) { @@ -1921,7 +1924,7 @@ func (client VirtualNetworkClient) changeServiceGatewayCompartment(ctx context.C // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeSubnetCompartment.go.html to see an example of how to use ChangeSubnetCompartment API. func (client VirtualNetworkClient) ChangeSubnetCompartment(ctx context.Context, request ChangeSubnetCompartmentRequest) (response ChangeSubnetCompartmentResponse, err error) { @@ -1985,7 +1988,7 @@ func (client VirtualNetworkClient) changeSubnetCompartment(ctx context.Context, // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVcnCompartment.go.html to see an example of how to use ChangeVcnCompartment API. func (client VirtualNetworkClient) ChangeVcnCompartment(ctx context.Context, request ChangeVcnCompartmentRequest) (response ChangeVcnCompartmentResponse, err error) { @@ -2049,7 +2052,7 @@ func (client VirtualNetworkClient) changeVcnCompartment(ctx context.Context, req // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVirtualCircuitCompartment.go.html to see an example of how to use ChangeVirtualCircuitCompartment API. // A default retry strategy applies to this operation ChangeVirtualCircuitCompartment() @@ -2114,7 +2117,7 @@ func (client VirtualNetworkClient) changeVirtualCircuitCompartment(ctx context.C // For information about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVlanCompartment.go.html to see an example of how to use ChangeVlanCompartment API. func (client VirtualNetworkClient) ChangeVlanCompartment(ctx context.Context, request ChangeVlanCompartmentRequest) (response ChangeVlanCompartmentResponse, err error) { @@ -2178,7 +2181,7 @@ func (client VirtualNetworkClient) changeVlanCompartment(ctx context.Context, re // about moving resources between compartments, see // Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVtapCompartment.go.html to see an example of how to use ChangeVtapCompartment API. func (client VirtualNetworkClient) ChangeVtapCompartment(ctx context.Context, request ChangeVtapCompartmentRequest) (response ChangeVtapCompartmentResponse, err error) { @@ -2246,7 +2249,7 @@ func (client VirtualNetworkClient) changeVtapCompartment(ctx context.Context, re // operation will fail. For more information, see // VCN Peering (https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/VCNpeering.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ConnectLocalPeeringGateways.go.html to see an example of how to use ConnectLocalPeeringGateways API. func (client VirtualNetworkClient) ConnectLocalPeeringGateways(ctx context.Context, request ConnectLocalPeeringGatewaysRequest) (response ConnectLocalPeeringGatewaysResponse, err error) { @@ -2309,7 +2312,7 @@ func (client VirtualNetworkClient) connectLocalPeeringGateways(ctx context.Conte // operation will fail. For more information, see // VCN Peering (https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/VCNpeering.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ConnectRemotePeeringConnections.go.html to see an example of how to use ConnectRemotePeeringConnections API. // A default retry strategy applies to this operation ConnectRemotePeeringConnections() @@ -2367,7 +2370,7 @@ func (client VirtualNetworkClient) connectRemotePeeringConnections(ctx context.C // CreateByoipRange Creates a subrange of the BYOIP CIDR block. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateByoipRange.go.html to see an example of how to use CreateByoipRange API. func (client VirtualNetworkClient) CreateByoipRange(ctx context.Context, request CreateByoipRangeRequest) (response CreateByoipRangeResponse, err error) { @@ -2435,7 +2438,7 @@ func (client VirtualNetworkClient) createByoipRange(ctx context.Context, request // You may optionally specify a *display name* for the VTAP, otherwise a default is provided. // It does not have to be unique, and you can change it. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateCaptureFilter.go.html to see an example of how to use CreateCaptureFilter API. func (client VirtualNetworkClient) CreateCaptureFilter(ctx context.Context, request CreateCaptureFilterRequest) (response CreateCaptureFilterResponse, err error) { @@ -2508,7 +2511,7 @@ func (client VirtualNetworkClient) createCaptureFilter(ctx context.Context, requ // You may optionally specify a *display name* for the CPE, otherwise a default is provided. It does not have to // be unique, and you can change it. Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateCpe.go.html to see an example of how to use CreateCpe API. // A default retry strategy applies to this operation CreateCpe() @@ -2586,7 +2589,7 @@ func (client VirtualNetworkClient) createCpe(ctx context.Context, request common // You may optionally specify a *display name* for the cross-connect. // It does not have to be unique, and you can change it. Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateCrossConnect.go.html to see an example of how to use CreateCrossConnect API. // A default retry strategy applies to this operation CreateCrossConnect() @@ -2661,7 +2664,7 @@ func (client VirtualNetworkClient) createCrossConnect(ctx context.Context, reque // You may optionally specify a *display name* for the cross-connect group. // It does not have to be unique, and you can change it. Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateCrossConnectGroup.go.html to see an example of how to use CreateCrossConnectGroup API. // A default retry strategy applies to this operation CreateCrossConnectGroup() @@ -2733,7 +2736,7 @@ func (client VirtualNetworkClient) createCrossConnectGroup(ctx context.Context, // You may optionally specify a *display name* for the set of DHCP options, otherwise a default is provided. // It does not have to be unique, and you can change it. Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDhcpOptions.go.html to see an example of how to use CreateDhcpOptions API. func (client VirtualNetworkClient) CreateDhcpOptions(ctx context.Context, request CreateDhcpOptionsRequest) (response CreateDhcpOptionsResponse, err error) { @@ -2804,7 +2807,7 @@ func (client VirtualNetworkClient) createDhcpOptions(ctx context.Context, reques // You may optionally specify a *display name* for the DRG, otherwise a default is provided. // It does not have to be unique, and you can change it. Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDrg.go.html to see an example of how to use CreateDrg API. func (client VirtualNetworkClient) CreateDrg(ctx context.Context, request CreateDrgRequest) (response CreateDrgResponse, err error) { @@ -2874,7 +2877,7 @@ func (client VirtualNetworkClient) createDrg(ctx context.Context, request common // For more information about compartments and access control, see // Overview of the IAM Service (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDrgAttachment.go.html to see an example of how to use CreateDrgAttachment API. func (client VirtualNetworkClient) CreateDrgAttachment(ctx context.Context, request CreateDrgAttachmentRequest) (response CreateDrgAttachmentResponse, err error) { @@ -2939,7 +2942,7 @@ func (client VirtualNetworkClient) createDrgAttachment(ctx context.Context, requ // Assign the route distribution as an export distribution to a DRG attachment // using the `UpdateDrgAttachment` or `CreateDrgAttachment` operations. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDrgRouteDistribution.go.html to see an example of how to use CreateDrgRouteDistribution API. func (client VirtualNetworkClient) CreateDrgRouteDistribution(ctx context.Context, request CreateDrgRouteDistributionRequest) (response CreateDrgRouteDistributionResponse, err error) { @@ -3002,7 +3005,7 @@ func (client VirtualNetworkClient) createDrgRouteDistribution(ctx context.Contex // CreateDrgRouteTable Creates a new DRG route table for the specified DRG. Assign the DRG route table to a DRG attachment // using the `UpdateDrgAttachment` or `CreateDrgAttachment` operations. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDrgRouteTable.go.html to see an example of how to use CreateDrgRouteTable API. func (client VirtualNetworkClient) CreateDrgRouteTable(ctx context.Context, request CreateDrgRouteTableRequest) (response CreateDrgRouteTableResponse, err error) { @@ -3079,13 +3082,14 @@ func (client VirtualNetworkClient) createDrgRouteTable(ctx context.Context, requ // It does not have to be unique, and you can change it. Avoid entering confidential information. // After creating the IPSec connection, you need to configure your on-premises router // with tunnel-specific information. For tunnel status and the required configuration information, see: -// * IPSecConnectionTunnel -// * IPSecConnectionTunnelSharedSecret +// - IPSecConnectionTunnel +// - IPSecConnectionTunnelSharedSecret +// // For each tunnel, you need the IP address of Oracle's VPN headend and the shared secret // (that is, the pre-shared key). For more information, see // CPE Configuration (https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/configuringCPE.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateIPSecConnection.go.html to see an example of how to use CreateIPSecConnection API. // A default retry strategy applies to this operation CreateIPSecConnection() @@ -3163,7 +3167,7 @@ func (client VirtualNetworkClient) createIPSecConnection(ctx context.Context, re // use UpdateInternetGateway to easily disable/enable // the gateway without changing the route rule. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateInternetGateway.go.html to see an example of how to use CreateInternetGateway API. func (client VirtualNetworkClient) CreateInternetGateway(ctx context.Context, request CreateInternetGatewayRequest) (response CreateInternetGatewayResponse, err error) { @@ -3225,7 +3229,7 @@ func (client VirtualNetworkClient) createInternetGateway(ctx context.Context, re // CreateIpv6 Creates an IPv6 for the specified VNIC. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateIpv6.go.html to see an example of how to use CreateIpv6 API. func (client VirtualNetworkClient) CreateIpv6(ctx context.Context, request CreateIpv6Request) (response CreateIpv6Response, err error) { @@ -3287,7 +3291,7 @@ func (client VirtualNetworkClient) createIpv6(ctx context.Context, request commo // CreateLocalPeeringGateway Creates a new local peering gateway (LPG) for the specified VCN. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateLocalPeeringGateway.go.html to see an example of how to use CreateLocalPeeringGateway API. func (client VirtualNetworkClient) CreateLocalPeeringGateway(ctx context.Context, request CreateLocalPeeringGatewayRequest) (response CreateLocalPeeringGatewayResponse, err error) { @@ -3350,7 +3354,7 @@ func (client VirtualNetworkClient) createLocalPeeringGateway(ctx context.Context // CreateNatGateway Creates a new NAT gateway for the specified VCN. You must also set up a route rule with the // NAT gateway as the rule's target. See RouteTable. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateNatGateway.go.html to see an example of how to use CreateNatGateway API. func (client VirtualNetworkClient) CreateNatGateway(ctx context.Context, request CreateNatGatewayRequest) (response CreateNatGatewayResponse, err error) { @@ -3412,7 +3416,7 @@ func (client VirtualNetworkClient) createNatGateway(ctx context.Context, request // CreateNetworkSecurityGroup Creates a new network security group for the specified VCN. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateNetworkSecurityGroup.go.html to see an example of how to use CreateNetworkSecurityGroup API. func (client VirtualNetworkClient) CreateNetworkSecurityGroup(ctx context.Context, request CreateNetworkSecurityGroupRequest) (response CreateNetworkSecurityGroupResponse, err error) { @@ -3476,7 +3480,7 @@ func (client VirtualNetworkClient) createNetworkSecurityGroup(ctx context.Contex // For more information about secondary private IPs, see // IP Addresses (https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingIPaddresses.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreatePrivateIp.go.html to see an example of how to use CreatePrivateIp API. func (client VirtualNetworkClient) CreatePrivateIp(ctx context.Context, request CreatePrivateIpRequest) (response CreatePrivateIpResponse, err error) { @@ -3554,7 +3558,7 @@ func (client VirtualNetworkClient) createPrivateIp(ctx context.Context, request // asynchronous. Poll the public IP's `lifecycleState` to determine if the assignment // succeeded. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreatePublicIp.go.html to see an example of how to use CreatePublicIp API. func (client VirtualNetworkClient) CreatePublicIp(ctx context.Context, request CreatePublicIpRequest) (response CreatePublicIpResponse, err error) { @@ -3616,7 +3620,7 @@ func (client VirtualNetworkClient) createPublicIp(ctx context.Context, request c // CreatePublicIpPool Creates a public IP pool. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreatePublicIpPool.go.html to see an example of how to use CreatePublicIpPool API. func (client VirtualNetworkClient) CreatePublicIpPool(ctx context.Context, request CreatePublicIpPoolRequest) (response CreatePublicIpPoolResponse, err error) { @@ -3678,7 +3682,7 @@ func (client VirtualNetworkClient) createPublicIpPool(ctx context.Context, reque // CreateRemotePeeringConnection Creates a new remote peering connection (RPC) for the specified DRG. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateRemotePeeringConnection.go.html to see an example of how to use CreateRemotePeeringConnection API. // A default retry strategy applies to this operation CreateRemotePeeringConnection() @@ -3753,7 +3757,7 @@ func (client VirtualNetworkClient) createRemotePeeringConnection(ctx context.Con // You may optionally specify a *display name* for the route table, otherwise a default is provided. // It does not have to be unique, and you can change it. Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateRouteTable.go.html to see an example of how to use CreateRouteTable API. func (client VirtualNetworkClient) CreateRouteTable(ctx context.Context, request CreateRouteTableRequest) (response CreateRouteTableResponse, err error) { @@ -3826,7 +3830,7 @@ func (client VirtualNetworkClient) createRouteTable(ctx context.Context, request // You may optionally specify a *display name* for the security list, otherwise a default is provided. // It does not have to be unique, and you can change it. Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateSecurityList.go.html to see an example of how to use CreateSecurityList API. func (client VirtualNetworkClient) CreateSecurityList(ctx context.Context, request CreateSecurityListRequest) (response CreateSecurityListResponse, err error) { @@ -3894,7 +3898,7 @@ func (client VirtualNetworkClient) createSecurityList(ctx context.Context, reque // You may optionally specify a *display name* for the service gateway, otherwise a default is provided. // It does not have to be unique, and you can change it. Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateServiceGateway.go.html to see an example of how to use CreateServiceGateway API. func (client VirtualNetworkClient) CreateServiceGateway(ctx context.Context, request CreateServiceGatewayRequest) (response CreateServiceGatewayResponse, err error) { @@ -3980,7 +3984,7 @@ func (client VirtualNetworkClient) createServiceGateway(ctx context.Context, req // VCN Resolver to resolve hostnames for instances in the subnet. For more information, see // DNS in Your Virtual Cloud Network (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/dns.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateSubnet.go.html to see an example of how to use CreateSubnet API. func (client VirtualNetworkClient) CreateSubnet(ctx context.Context, request CreateSubnetRequest) (response CreateSubnetResponse, err error) { @@ -4066,7 +4070,7 @@ func (client VirtualNetworkClient) createSubnet(ctx context.Context, request com // or FastConnect. For more information, see // Overview of the Networking Service (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVcn.go.html to see an example of how to use CreateVcn API. func (client VirtualNetworkClient) CreateVcn(ctx context.Context, request CreateVcnRequest) (response CreateVcnResponse, err error) { @@ -4145,7 +4149,7 @@ func (client VirtualNetworkClient) createVcn(ctx context.Context, request common // traffic will not flow. For more information, see // Route Tables (https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVirtualCircuit.go.html to see an example of how to use CreateVirtualCircuit API. // A default retry strategy applies to this operation CreateVirtualCircuit() @@ -4208,7 +4212,7 @@ func (client VirtualNetworkClient) createVirtualCircuit(ctx context.Context, req // CreateVlan Creates a VLAN in the specified VCN and the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVlan.go.html to see an example of how to use CreateVlan API. func (client VirtualNetworkClient) CreateVlan(ctx context.Context, request CreateVlanRequest) (response CreateVlanResponse, err error) { @@ -4276,7 +4280,7 @@ func (client VirtualNetworkClient) createVlan(ctx context.Context, request commo // You may optionally specify a *display name* for the VTAP, otherwise a default is provided. // It does not have to be unique, and you can change it. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVtap.go.html to see an example of how to use CreateVtap API. func (client VirtualNetworkClient) CreateVtap(ctx context.Context, request CreateVtapRequest) (response CreateVtapResponse, err error) { @@ -4342,7 +4346,7 @@ func (client VirtualNetworkClient) createVtap(ctx context.Context, request commo // You must specify the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). // If the `ByoipRange` resource is currently in the PROVISIONED or ACTIVE state, it will be de-provisioned and then deleted. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteByoipRange.go.html to see an example of how to use DeleteByoipRange API. func (client VirtualNetworkClient) DeleteByoipRange(ctx context.Context, request DeleteByoipRangeRequest) (response DeleteByoipRangeResponse, err error) { @@ -4400,7 +4404,7 @@ func (client VirtualNetworkClient) deleteByoipRange(ctx context.Context, request // DeleteCaptureFilter Deletes the specified VTAP capture filter. This is an asynchronous operation. The VTAP capture filter's `lifecycleState` will // change to TERMINATING temporarily until the VTAP capture filter is completely removed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteCaptureFilter.go.html to see an example of how to use DeleteCaptureFilter API. func (client VirtualNetworkClient) DeleteCaptureFilter(ctx context.Context, request DeleteCaptureFilterRequest) (response DeleteCaptureFilterResponse, err error) { @@ -4459,7 +4463,7 @@ func (client VirtualNetworkClient) deleteCaptureFilter(ctx context.Context, requ // operation. The CPE's `lifecycleState` will change to TERMINATING temporarily until the CPE is completely // removed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteCpe.go.html to see an example of how to use DeleteCpe API. // A default retry strategy applies to this operation DeleteCpe() @@ -4518,7 +4522,7 @@ func (client VirtualNetworkClient) deleteCpe(ctx context.Context, request common // DeleteCrossConnect Deletes the specified cross-connect. It must not be mapped to a // VirtualCircuit. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteCrossConnect.go.html to see an example of how to use DeleteCrossConnect API. // A default retry strategy applies to this operation DeleteCrossConnect() @@ -4578,7 +4582,7 @@ func (client VirtualNetworkClient) deleteCrossConnect(ctx context.Context, reque // cross-connects, and it cannot be mapped to a // VirtualCircuit. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteCrossConnectGroup.go.html to see an example of how to use DeleteCrossConnectGroup API. // A default retry strategy applies to this operation DeleteCrossConnectGroup() @@ -4639,7 +4643,7 @@ func (client VirtualNetworkClient) deleteCrossConnectGroup(ctx context.Context, // This is an asynchronous operation. The state of the set of options will switch to TERMINATING temporarily // until the set is completely removed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDhcpOptions.go.html to see an example of how to use DeleteDhcpOptions API. func (client VirtualNetworkClient) DeleteDhcpOptions(ctx context.Context, request DeleteDhcpOptionsRequest) (response DeleteDhcpOptionsResponse, err error) { @@ -4699,7 +4703,7 @@ func (client VirtualNetworkClient) deleteDhcpOptions(ctx context.Context, reques // operation. The DRG's `lifecycleState` will change to TERMINATING temporarily until the DRG is completely // removed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDrg.go.html to see an example of how to use DeleteDrg API. func (client VirtualNetworkClient) DeleteDrg(ctx context.Context, request DeleteDrgRequest) (response DeleteDrgResponse, err error) { @@ -4758,7 +4762,7 @@ func (client VirtualNetworkClient) deleteDrg(ctx context.Context, request common // operation. The attachment's `lifecycleState` will temporarily change to DETACHING until the attachment // is completely removed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDrgAttachment.go.html to see an example of how to use DeleteDrgAttachment API. func (client VirtualNetworkClient) DeleteDrgAttachment(ctx context.Context, request DeleteDrgAttachmentRequest) (response DeleteDrgAttachmentResponse, err error) { @@ -4816,7 +4820,7 @@ func (client VirtualNetworkClient) deleteDrgAttachment(ctx context.Context, requ // DeleteDrgRouteDistribution Deletes the specified route distribution. You can't delete a route distribution currently in use by a DRG attachment or DRG route table. // Remove the DRG route distribution from a DRG attachment or DRG route table by using the "RemoveExportDrgRouteDistribution" or "RemoveImportDrgRouteDistribution' operations. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDrgRouteDistribution.go.html to see an example of how to use DeleteDrgRouteDistribution API. func (client VirtualNetworkClient) DeleteDrgRouteDistribution(ctx context.Context, request DeleteDrgRouteDistributionRequest) (response DeleteDrgRouteDistributionResponse, err error) { @@ -4873,7 +4877,7 @@ func (client VirtualNetworkClient) deleteDrgRouteDistribution(ctx context.Contex // DeleteDrgRouteTable Deletes the specified DRG route table. There must not be any DRG attachments assigned. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDrgRouteTable.go.html to see an example of how to use DeleteDrgRouteTable API. func (client VirtualNetworkClient) DeleteDrgRouteTable(ctx context.Context, request DeleteDrgRouteTableRequest) (response DeleteDrgRouteTableResponse, err error) { @@ -4936,7 +4940,7 @@ func (client VirtualNetworkClient) deleteDrgRouteTable(ctx context.Context, requ // This is an asynchronous operation. The connection's `lifecycleState` will change to TERMINATING temporarily // until the connection is completely removed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteIPSecConnection.go.html to see an example of how to use DeleteIPSecConnection API. // A default retry strategy applies to this operation DeleteIPSecConnection() @@ -4997,7 +5001,7 @@ func (client VirtualNetworkClient) deleteIPSecConnection(ctx context.Context, re // This is an asynchronous operation. The gateway's `lifecycleState` will change to TERMINATING temporarily // until the gateway is completely removed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteInternetGateway.go.html to see an example of how to use DeleteInternetGateway API. func (client VirtualNetworkClient) DeleteInternetGateway(ctx context.Context, request DeleteInternetGatewayRequest) (response DeleteInternetGatewayResponse, err error) { @@ -5055,7 +5059,7 @@ func (client VirtualNetworkClient) deleteInternetGateway(ctx context.Context, re // DeleteIpv6 Unassigns and deletes the specified IPv6. You must specify the object's OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). // The IPv6 address is returned to the subnet's pool of available addresses. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteIpv6.go.html to see an example of how to use DeleteIpv6 API. func (client VirtualNetworkClient) DeleteIpv6(ctx context.Context, request DeleteIpv6Request) (response DeleteIpv6Response, err error) { @@ -5114,7 +5118,7 @@ func (client VirtualNetworkClient) deleteIpv6(ctx context.Context, request commo // This is an asynchronous operation; the local peering gateway's `lifecycleState` changes to TERMINATING temporarily // until the local peering gateway is completely removed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteLocalPeeringGateway.go.html to see an example of how to use DeleteLocalPeeringGateway API. func (client VirtualNetworkClient) DeleteLocalPeeringGateway(ctx context.Context, request DeleteLocalPeeringGatewayRequest) (response DeleteLocalPeeringGatewayResponse, err error) { @@ -5174,7 +5178,7 @@ func (client VirtualNetworkClient) deleteLocalPeeringGateway(ctx context.Context // This is an asynchronous operation. The NAT gateway's `lifecycleState` will change to // TERMINATING temporarily until the NAT gateway is completely removed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteNatGateway.go.html to see an example of how to use DeleteNatGateway API. func (client VirtualNetworkClient) DeleteNatGateway(ctx context.Context, request DeleteNatGatewayRequest) (response DeleteNatGatewayResponse, err error) { @@ -5236,7 +5240,7 @@ func (client VirtualNetworkClient) deleteNatGateway(ctx context.Context, request // contains both the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC and the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC's parent resource (for example, // the Compute instance that the VNIC is attached to). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteNetworkSecurityGroup.go.html to see an example of how to use DeleteNetworkSecurityGroup API. func (client VirtualNetworkClient) DeleteNetworkSecurityGroup(ctx context.Context, request DeleteNetworkSecurityGroupRequest) (response DeleteNetworkSecurityGroupResponse, err error) { @@ -5301,7 +5305,7 @@ func (client VirtualNetworkClient) deleteNetworkSecurityGroup(ctx context.Contex // unassigning it from the VNIC causes that route rule to blackhole and the traffic // will be dropped. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeletePrivateIp.go.html to see an example of how to use DeletePrivateIp API. func (client VirtualNetworkClient) DeletePrivateIp(ctx context.Context, request DeletePrivateIpRequest) (response DeletePrivateIpResponse, err error) { @@ -5369,7 +5373,7 @@ func (client VirtualNetworkClient) deletePrivateIp(ctx context.Context, request // of reserved public IPs, instead use // UpdatePublicIp. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeletePublicIp.go.html to see an example of how to use DeletePublicIp API. func (client VirtualNetworkClient) DeletePublicIp(ctx context.Context, request DeletePublicIpRequest) (response DeletePublicIpResponse, err error) { @@ -5428,7 +5432,7 @@ func (client VirtualNetworkClient) deletePublicIp(ctx context.Context, request c // To delete a public IP pool it must not have any active IP address allocations. // You must specify the object's OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) when deleting an IP pool. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeletePublicIpPool.go.html to see an example of how to use DeletePublicIpPool API. func (client VirtualNetworkClient) DeletePublicIpPool(ctx context.Context, request DeletePublicIpPoolRequest) (response DeletePublicIpPoolResponse, err error) { @@ -5487,7 +5491,7 @@ func (client VirtualNetworkClient) deletePublicIpPool(ctx context.Context, reque // This is an asynchronous operation; the RPC's `lifecycleState` changes to TERMINATING temporarily // until the RPC is completely removed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteRemotePeeringConnection.go.html to see an example of how to use DeleteRemotePeeringConnection API. // A default retry strategy applies to this operation DeleteRemotePeeringConnection() @@ -5548,7 +5552,7 @@ func (client VirtualNetworkClient) deleteRemotePeeringConnection(ctx context.Con // This is an asynchronous operation. The route table's `lifecycleState` will change to TERMINATING temporarily // until the route table is completely removed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteRouteTable.go.html to see an example of how to use DeleteRouteTable API. func (client VirtualNetworkClient) DeleteRouteTable(ctx context.Context, request DeleteRouteTableRequest) (response DeleteRouteTableResponse, err error) { @@ -5608,7 +5612,7 @@ func (client VirtualNetworkClient) deleteRouteTable(ctx context.Context, request // This is an asynchronous operation. The security list's `lifecycleState` will change to TERMINATING temporarily // until the security list is completely removed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteSecurityList.go.html to see an example of how to use DeleteSecurityList API. func (client VirtualNetworkClient) DeleteSecurityList(ctx context.Context, request DeleteSecurityListRequest) (response DeleteSecurityListResponse, err error) { @@ -5666,7 +5670,7 @@ func (client VirtualNetworkClient) deleteSecurityList(ctx context.Context, reque // DeleteServiceGateway Deletes the specified service gateway. There must not be a route table that lists the service // gateway as a target. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteServiceGateway.go.html to see an example of how to use DeleteServiceGateway API. func (client VirtualNetworkClient) DeleteServiceGateway(ctx context.Context, request DeleteServiceGatewayRequest) (response DeleteServiceGatewayResponse, err error) { @@ -5725,7 +5729,7 @@ func (client VirtualNetworkClient) deleteServiceGateway(ctx context.Context, req // operation. The subnet's `lifecycleState` will change to TERMINATING temporarily. If there are any // instances in the subnet, the state will instead change back to AVAILABLE. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteSubnet.go.html to see an example of how to use DeleteSubnet API. func (client VirtualNetworkClient) DeleteSubnet(ctx context.Context, request DeleteSubnetRequest) (response DeleteSubnetResponse, err error) { @@ -5786,7 +5790,7 @@ func (client VirtualNetworkClient) deleteSubnet(ctx context.Context, request com // removed. A completely removed VCN does not appear in the results of a `ListVcns` operation and can't be used in a // `GetVcn` operation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVcn.go.html to see an example of how to use DeleteVcn API. func (client VirtualNetworkClient) DeleteVcn(ctx context.Context, request DeleteVcnRequest) (response DeleteVcnResponse, err error) { @@ -5846,7 +5850,7 @@ func (client VirtualNetworkClient) deleteVcn(ctx context.Context, request common // make sure to also terminate the connection with // the provider, or else the provider may continue to bill you. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVirtualCircuit.go.html to see an example of how to use DeleteVirtualCircuit API. // A default retry strategy applies to this operation DeleteVirtualCircuit() @@ -5904,7 +5908,7 @@ func (client VirtualNetworkClient) deleteVirtualCircuit(ctx context.Context, req // DeleteVlan Deletes the specified VLAN, but only if there are no VNICs in the VLAN. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVlan.go.html to see an example of how to use DeleteVlan API. func (client VirtualNetworkClient) DeleteVlan(ctx context.Context, request DeleteVlanRequest) (response DeleteVlanResponse, err error) { @@ -5962,7 +5966,7 @@ func (client VirtualNetworkClient) deleteVlan(ctx context.Context, request commo // DeleteVtap Deletes the specified VTAP. This is an asynchronous operation. The VTAP's `lifecycleState` will change to // TERMINATING temporarily until the VTAP is completely removed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVtap.go.html to see an example of how to use DeleteVtap API. func (client VirtualNetworkClient) DeleteVtap(ctx context.Context, request DeleteVtapRequest) (response DeleteVtapResponse, err error) { @@ -6029,7 +6033,7 @@ func (client VirtualNetworkClient) deleteVtap(ctx context.Context, request commo // `Update` call. `UpdateServiceGateway` also lets you block all traffic through the service // gateway without having to remove each of the individual `Service` objects. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachServiceId.go.html to see an example of how to use DetachServiceId API. func (client VirtualNetworkClient) DetachServiceId(ctx context.Context, request DetachServiceIdRequest) (response DetachServiceIdResponse, err error) { @@ -6086,7 +6090,7 @@ func (client VirtualNetworkClient) detachServiceId(ctx context.Context, request // GetAllDrgAttachments Returns a complete list of DRG attachments that belong to a particular DRG. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetAllDrgAttachments.go.html to see an example of how to use GetAllDrgAttachments API. func (client VirtualNetworkClient) GetAllDrgAttachments(ctx context.Context, request GetAllDrgAttachmentsRequest) (response GetAllDrgAttachmentsResponse, err error) { @@ -6143,7 +6147,7 @@ func (client VirtualNetworkClient) getAllDrgAttachments(ctx context.Context, req // GetAllowedIkeIPSecParameters The parameters allowed for IKE IPSec tunnels. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetAllowedIkeIPSecParameters.go.html to see an example of how to use GetAllowedIkeIPSecParameters API. // A default retry strategy applies to this operation GetAllowedIkeIPSecParameters() @@ -6201,7 +6205,7 @@ func (client VirtualNetworkClient) getAllowedIkeIPSecParameters(ctx context.Cont // GetByoipRange Gets the `ByoipRange` resource. You must specify the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetByoipRange.go.html to see an example of how to use GetByoipRange API. func (client VirtualNetworkClient) GetByoipRange(ctx context.Context, request GetByoipRangeRequest) (response GetByoipRangeResponse, err error) { @@ -6258,7 +6262,7 @@ func (client VirtualNetworkClient) getByoipRange(ctx context.Context, request co // GetCaptureFilter Gets information about the specified VTAP capture filter. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCaptureFilter.go.html to see an example of how to use GetCaptureFilter API. func (client VirtualNetworkClient) GetCaptureFilter(ctx context.Context, request GetCaptureFilterRequest) (response GetCaptureFilterResponse, err error) { @@ -6315,7 +6319,7 @@ func (client VirtualNetworkClient) getCaptureFilter(ctx context.Context, request // GetCpe Gets the specified CPE's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCpe.go.html to see an example of how to use GetCpe API. // A default retry strategy applies to this operation GetCpe() @@ -6382,12 +6386,12 @@ func (client VirtualNetworkClient) getCpe(ctx context.Context, request common.OC // The operation returns configuration information for *all* of the // IPSecConnection objects that use the specified CPE. // Here are similar operations: -// * GetIpsecCpeDeviceConfigContent -// returns CPE configuration content for all IPSec tunnels in a single IPSec connection. -// * GetTunnelCpeDeviceConfigContent -// returns CPE configuration content for a specific IPSec tunnel in an IPSec connection. +// - GetIpsecCpeDeviceConfigContent +// returns CPE configuration content for all IPSec tunnels in a single IPSec connection. +// - GetTunnelCpeDeviceConfigContent +// returns CPE configuration content for a specific IPSec tunnel in an IPSec connection. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCpeDeviceConfigContent.go.html to see an example of how to use GetCpeDeviceConfigContent API. // A default retry strategy applies to this operation GetCpeDeviceConfigContent() @@ -6447,11 +6451,11 @@ func (client VirtualNetworkClient) getCpeDeviceConfigContent(ctx context.Context // (see UpdateTunnelCpeDeviceConfig). // The service merges the answers with a template of other information for the CPE device type. The following // operations return the merged content: -// * GetCpeDeviceConfigContent -// * GetIpsecCpeDeviceConfigContent -// * GetTunnelCpeDeviceConfigContent +// - GetCpeDeviceConfigContent +// - GetIpsecCpeDeviceConfigContent +// - GetTunnelCpeDeviceConfigContent // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCpeDeviceShape.go.html to see an example of how to use GetCpeDeviceShape API. // A default retry strategy applies to this operation GetCpeDeviceShape() @@ -6509,7 +6513,7 @@ func (client VirtualNetworkClient) getCpeDeviceShape(ctx context.Context, reques // GetCrossConnect Gets the specified cross-connect's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCrossConnect.go.html to see an example of how to use GetCrossConnect API. // A default retry strategy applies to this operation GetCrossConnect() @@ -6567,7 +6571,7 @@ func (client VirtualNetworkClient) getCrossConnect(ctx context.Context, request // GetCrossConnectGroup Gets the specified cross-connect group's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCrossConnectGroup.go.html to see an example of how to use GetCrossConnectGroup API. // A default retry strategy applies to this operation GetCrossConnectGroup() @@ -6625,7 +6629,7 @@ func (client VirtualNetworkClient) getCrossConnectGroup(ctx context.Context, req // GetCrossConnectLetterOfAuthority Gets the Letter of Authority for the specified cross-connect. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCrossConnectLetterOfAuthority.go.html to see an example of how to use GetCrossConnectLetterOfAuthority API. // A default retry strategy applies to this operation GetCrossConnectLetterOfAuthority() @@ -6683,7 +6687,7 @@ func (client VirtualNetworkClient) getCrossConnectLetterOfAuthority(ctx context. // GetCrossConnectStatus Gets the status of the specified cross-connect. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCrossConnectStatus.go.html to see an example of how to use GetCrossConnectStatus API. // A default retry strategy applies to this operation GetCrossConnectStatus() @@ -6741,7 +6745,7 @@ func (client VirtualNetworkClient) getCrossConnectStatus(ctx context.Context, re // GetDhcpOptions Gets the specified set of DHCP options. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDhcpOptions.go.html to see an example of how to use GetDhcpOptions API. func (client VirtualNetworkClient) GetDhcpOptions(ctx context.Context, request GetDhcpOptionsRequest) (response GetDhcpOptionsResponse, err error) { @@ -6798,7 +6802,7 @@ func (client VirtualNetworkClient) getDhcpOptions(ctx context.Context, request c // GetDrg Gets the specified DRG's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDrg.go.html to see an example of how to use GetDrg API. func (client VirtualNetworkClient) GetDrg(ctx context.Context, request GetDrgRequest) (response GetDrgResponse, err error) { @@ -6855,7 +6859,7 @@ func (client VirtualNetworkClient) getDrg(ctx context.Context, request common.OC // GetDrgAttachment Gets the `DrgAttachment` resource. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDrgAttachment.go.html to see an example of how to use GetDrgAttachment API. func (client VirtualNetworkClient) GetDrgAttachment(ctx context.Context, request GetDrgAttachmentRequest) (response GetDrgAttachmentResponse, err error) { @@ -6913,7 +6917,7 @@ func (client VirtualNetworkClient) getDrgAttachment(ctx context.Context, request // GetDrgRedundancyStatus Gets the redundancy status for the specified DRG. For more information, see // Redundancy Remedies (https://docs.cloud.oracle.com/iaas/Content/Network/Troubleshoot/drgredundancy.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDrgRedundancyStatus.go.html to see an example of how to use GetDrgRedundancyStatus API. // A default retry strategy applies to this operation GetDrgRedundancyStatus() @@ -6971,7 +6975,7 @@ func (client VirtualNetworkClient) getDrgRedundancyStatus(ctx context.Context, r // GetDrgRouteDistribution Gets the specified route distribution's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDrgRouteDistribution.go.html to see an example of how to use GetDrgRouteDistribution API. func (client VirtualNetworkClient) GetDrgRouteDistribution(ctx context.Context, request GetDrgRouteDistributionRequest) (response GetDrgRouteDistributionResponse, err error) { @@ -7028,7 +7032,7 @@ func (client VirtualNetworkClient) getDrgRouteDistribution(ctx context.Context, // GetDrgRouteTable Gets the specified DRG route table's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDrgRouteTable.go.html to see an example of how to use GetDrgRouteTable API. func (client VirtualNetworkClient) GetDrgRouteTable(ctx context.Context, request GetDrgRouteTableRequest) (response GetDrgRouteTableResponse, err error) { @@ -7086,7 +7090,7 @@ func (client VirtualNetworkClient) getDrgRouteTable(ctx context.Context, request // GetFastConnectProviderService Gets the specified provider service. // For more information, see FastConnect Overview (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetFastConnectProviderService.go.html to see an example of how to use GetFastConnectProviderService API. // A default retry strategy applies to this operation GetFastConnectProviderService() @@ -7145,7 +7149,7 @@ func (client VirtualNetworkClient) getFastConnectProviderService(ctx context.Con // GetFastConnectProviderServiceKey Gets the specified provider service key's information. Use this operation to validate a // provider service key. An invalid key returns a 404 error. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetFastConnectProviderServiceKey.go.html to see an example of how to use GetFastConnectProviderServiceKey API. // A default retry strategy applies to this operation GetFastConnectProviderServiceKey() @@ -7205,7 +7209,7 @@ func (client VirtualNetworkClient) getFastConnectProviderServiceKey(ctx context. // on-premises router. If you want the status of the connection (whether it's up or down), use // GetIPSecConnectionTunnel. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnection.go.html to see an example of how to use GetIPSecConnection API. // A default retry strategy applies to this operation GetIPSecConnection() @@ -7265,7 +7269,7 @@ func (client VirtualNetworkClient) getIPSecConnection(ctx context.Context, reque // * GetIPSecConnectionTunnel // * GetIPSecConnectionTunnelSharedSecret // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnectionDeviceConfig.go.html to see an example of how to use GetIPSecConnectionDeviceConfig API. // A default retry strategy applies to this operation GetIPSecConnectionDeviceConfig() @@ -7324,7 +7328,7 @@ func (client VirtualNetworkClient) getIPSecConnectionDeviceConfig(ctx context.Co // GetIPSecConnectionDeviceStatus Deprecated. To get the tunnel status, instead use // GetIPSecConnectionTunnel. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnectionDeviceStatus.go.html to see an example of how to use GetIPSecConnectionDeviceStatus API. // A default retry strategy applies to this operation GetIPSecConnectionDeviceStatus() @@ -7384,7 +7388,7 @@ func (client VirtualNetworkClient) getIPSecConnectionDeviceStatus(ctx context.Co // shared secret (pre-shared key). To retrieve that, use // GetIPSecConnectionTunnelSharedSecret. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnectionTunnel.go.html to see an example of how to use GetIPSecConnectionTunnel API. // A default retry strategy applies to this operation GetIPSecConnectionTunnel() @@ -7442,7 +7446,7 @@ func (client VirtualNetworkClient) getIPSecConnectionTunnel(ctx context.Context, // GetIPSecConnectionTunnelError Gets the identified error for the specified IPSec tunnel ID. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnectionTunnelError.go.html to see an example of how to use GetIPSecConnectionTunnelError API. // A default retry strategy applies to this operation GetIPSecConnectionTunnelError() @@ -7501,7 +7505,7 @@ func (client VirtualNetworkClient) getIPSecConnectionTunnelError(ctx context.Con // GetIPSecConnectionTunnelSharedSecret Gets the specified tunnel's shared secret (pre-shared key). To get other information // about the tunnel, use GetIPSecConnectionTunnel. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnectionTunnelSharedSecret.go.html to see an example of how to use GetIPSecConnectionTunnelSharedSecret API. // A default retry strategy applies to this operation GetIPSecConnectionTunnelSharedSecret() @@ -7559,7 +7563,7 @@ func (client VirtualNetworkClient) getIPSecConnectionTunnelSharedSecret(ctx cont // GetInternetGateway Gets the specified internet gateway's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInternetGateway.go.html to see an example of how to use GetInternetGateway API. func (client VirtualNetworkClient) GetInternetGateway(ctx context.Context, request GetInternetGatewayRequest) (response GetInternetGatewayResponse, err error) { @@ -7626,12 +7630,12 @@ func (client VirtualNetworkClient) getInternetGateway(ctx context.Context, reque // The operation returns configuration information for all tunnels in the single specified // IPSecConnection object. Here are other similar // operations: -// * GetTunnelCpeDeviceConfigContent -// returns CPE configuration content for a specific tunnel within an IPSec connection. -// * GetCpeDeviceConfigContent -// returns CPE configuration content for *all* IPSec connections that use a specific CPE. +// - GetTunnelCpeDeviceConfigContent +// returns CPE configuration content for a specific tunnel within an IPSec connection. +// - GetCpeDeviceConfigContent +// returns CPE configuration content for *all* IPSec connections that use a specific CPE. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIpsecCpeDeviceConfigContent.go.html to see an example of how to use GetIpsecCpeDeviceConfigContent API. // A default retry strategy applies to this operation GetIpsecCpeDeviceConfigContent() @@ -7691,7 +7695,7 @@ func (client VirtualNetworkClient) getIpsecCpeDeviceConfigContent(ctx context.Co // ListIpv6s // with the IPv6 address (for example, 2001:0db8:0123:1111:98fe:dcba:9876:4321) and subnet OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIpv6.go.html to see an example of how to use GetIpv6 API. func (client VirtualNetworkClient) GetIpv6(ctx context.Context, request GetIpv6Request) (response GetIpv6Response, err error) { @@ -7748,7 +7752,7 @@ func (client VirtualNetworkClient) getIpv6(ctx context.Context, request common.O // GetLocalPeeringGateway Gets the specified local peering gateway's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetLocalPeeringGateway.go.html to see an example of how to use GetLocalPeeringGateway API. func (client VirtualNetworkClient) GetLocalPeeringGateway(ctx context.Context, request GetLocalPeeringGatewayRequest) (response GetLocalPeeringGatewayResponse, err error) { @@ -7805,7 +7809,7 @@ func (client VirtualNetworkClient) getLocalPeeringGateway(ctx context.Context, r // GetNatGateway Gets the specified NAT gateway's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetNatGateway.go.html to see an example of how to use GetNatGateway API. func (client VirtualNetworkClient) GetNatGateway(ctx context.Context, request GetNatGatewayRequest) (response GetNatGatewayResponse, err error) { @@ -7866,7 +7870,7 @@ func (client VirtualNetworkClient) getNatGateway(ctx context.Context, request co // To list the security rules in an NSG, see // ListNetworkSecurityGroupSecurityRules. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetNetworkSecurityGroup.go.html to see an example of how to use GetNetworkSecurityGroup API. func (client VirtualNetworkClient) GetNetworkSecurityGroup(ctx context.Context, request GetNetworkSecurityGroupRequest) (response GetNetworkSecurityGroupResponse, err error) { @@ -7923,7 +7927,7 @@ func (client VirtualNetworkClient) getNetworkSecurityGroup(ctx context.Context, // GetNetworkingTopology Gets a virtual networking topology for the current region. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetNetworkingTopology.go.html to see an example of how to use GetNetworkingTopology API. func (client VirtualNetworkClient) GetNetworkingTopology(ctx context.Context, request GetNetworkingTopologyRequest) (response GetNetworkingTopologyResponse, err error) { @@ -7983,7 +7987,7 @@ func (client VirtualNetworkClient) getNetworkingTopology(ctx context.Context, re // ListPrivateIps // with the private IP address (for example, 10.0.3.3) and subnet OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetPrivateIp.go.html to see an example of how to use GetPrivateIp API. func (client VirtualNetworkClient) GetPrivateIp(ctx context.Context, request GetPrivateIpRequest) (response GetPrivateIpResponse, err error) { @@ -8047,7 +8051,7 @@ func (client VirtualNetworkClient) getPrivateIp(ctx context.Context, request com // moved to a different private IP, the service returns the public IP object with // `lifecycleState` = ASSIGNING and `assignedEntityId` = OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the target private IP. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetPublicIp.go.html to see an example of how to use GetPublicIp API. func (client VirtualNetworkClient) GetPublicIp(ctx context.Context, request GetPublicIpRequest) (response GetPublicIpResponse, err error) { @@ -8107,7 +8111,7 @@ func (client VirtualNetworkClient) getPublicIp(ctx context.Context, request comm // moved to a different private IP, the service returns the public IP object with // `lifecycleState` = ASSIGNING and `assignedEntityId` = OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the target private IP. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetPublicIpByIpAddress.go.html to see an example of how to use GetPublicIpByIpAddress API. func (client VirtualNetworkClient) GetPublicIpByIpAddress(ctx context.Context, request GetPublicIpByIpAddressRequest) (response GetPublicIpByIpAddressResponse, err error) { @@ -8173,7 +8177,7 @@ func (client VirtualNetworkClient) getPublicIpByIpAddress(ctx context.Context, r // service returns the public IP object with `lifecycleState` = ASSIGNING and // `assignedEntityId` = OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the target private IP. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetPublicIpByPrivateIpId.go.html to see an example of how to use GetPublicIpByPrivateIpId API. func (client VirtualNetworkClient) GetPublicIpByPrivateIpId(ctx context.Context, request GetPublicIpByPrivateIpIdRequest) (response GetPublicIpByPrivateIpIdResponse, err error) { @@ -8230,7 +8234,7 @@ func (client VirtualNetworkClient) getPublicIpByPrivateIpId(ctx context.Context, // GetPublicIpPool Gets the specified `PublicIpPool` object. You must specify the object's OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetPublicIpPool.go.html to see an example of how to use GetPublicIpPool API. func (client VirtualNetworkClient) GetPublicIpPool(ctx context.Context, request GetPublicIpPoolRequest) (response GetPublicIpPoolResponse, err error) { @@ -8287,7 +8291,7 @@ func (client VirtualNetworkClient) getPublicIpPool(ctx context.Context, request // GetRemotePeeringConnection Get the specified remote peering connection's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetRemotePeeringConnection.go.html to see an example of how to use GetRemotePeeringConnection API. // A default retry strategy applies to this operation GetRemotePeeringConnection() @@ -8345,7 +8349,7 @@ func (client VirtualNetworkClient) getRemotePeeringConnection(ctx context.Contex // GetRouteTable Gets the specified route table's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetRouteTable.go.html to see an example of how to use GetRouteTable API. func (client VirtualNetworkClient) GetRouteTable(ctx context.Context, request GetRouteTableRequest) (response GetRouteTableResponse, err error) { @@ -8402,7 +8406,7 @@ func (client VirtualNetworkClient) getRouteTable(ctx context.Context, request co // GetSecurityList Gets the specified security list's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetSecurityList.go.html to see an example of how to use GetSecurityList API. func (client VirtualNetworkClient) GetSecurityList(ctx context.Context, request GetSecurityListRequest) (response GetSecurityListResponse, err error) { @@ -8459,7 +8463,7 @@ func (client VirtualNetworkClient) getSecurityList(ctx context.Context, request // GetService Gets the specified Service object. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetService.go.html to see an example of how to use GetService API. func (client VirtualNetworkClient) GetService(ctx context.Context, request GetServiceRequest) (response GetServiceResponse, err error) { @@ -8516,7 +8520,7 @@ func (client VirtualNetworkClient) getService(ctx context.Context, request commo // GetServiceGateway Gets the specified service gateway's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetServiceGateway.go.html to see an example of how to use GetServiceGateway API. func (client VirtualNetworkClient) GetServiceGateway(ctx context.Context, request GetServiceGatewayRequest) (response GetServiceGatewayResponse, err error) { @@ -8573,7 +8577,7 @@ func (client VirtualNetworkClient) getServiceGateway(ctx context.Context, reques // GetSubnet Gets the specified subnet's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetSubnet.go.html to see an example of how to use GetSubnet API. func (client VirtualNetworkClient) GetSubnet(ctx context.Context, request GetSubnetRequest) (response GetSubnetResponse, err error) { @@ -8630,7 +8634,7 @@ func (client VirtualNetworkClient) getSubnet(ctx context.Context, request common // GetSubnetTopology Gets a topology for a given subnet. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetSubnetTopology.go.html to see an example of how to use GetSubnetTopology API. func (client VirtualNetworkClient) GetSubnetTopology(ctx context.Context, request GetSubnetTopologyRequest) (response GetSubnetTopologyResponse, err error) { @@ -8691,7 +8695,7 @@ func (client VirtualNetworkClient) getSubnetTopology(ctx context.Context, reques // information specific to the CPE device type), use // GetTunnelCpeDeviceConfigContent. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetTunnelCpeDeviceConfig.go.html to see an example of how to use GetTunnelCpeDeviceConfig API. // A default retry strategy applies to this operation GetTunnelCpeDeviceConfig() @@ -8758,12 +8762,12 @@ func (client VirtualNetworkClient) getTunnelCpeDeviceConfig(ctx context.Context, // merged with a template of other information specific to the CPE device type. // The operation returns configuration information for only the specified IPSec tunnel. // Here are other similar operations: -// * GetIpsecCpeDeviceConfigContent -// returns CPE configuration content for all tunnels in a single IPSec connection. -// * GetCpeDeviceConfigContent -// returns CPE configuration content for *all* IPSec connections that use a specific CPE. +// - GetIpsecCpeDeviceConfigContent +// returns CPE configuration content for all tunnels in a single IPSec connection. +// - GetCpeDeviceConfigContent +// returns CPE configuration content for *all* IPSec connections that use a specific CPE. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetTunnelCpeDeviceConfigContent.go.html to see an example of how to use GetTunnelCpeDeviceConfigContent API. // A default retry strategy applies to this operation GetTunnelCpeDeviceConfigContent() @@ -8820,7 +8824,7 @@ func (client VirtualNetworkClient) getTunnelCpeDeviceConfigContent(ctx context.C // GetUpgradeStatus Returns the DRG upgrade status. The status can be not updated, in progress, or updated. Also indicates how much of the upgrade is completed. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetUpgradeStatus.go.html to see an example of how to use GetUpgradeStatus API. func (client VirtualNetworkClient) GetUpgradeStatus(ctx context.Context, request GetUpgradeStatusRequest) (response GetUpgradeStatusResponse, err error) { @@ -8877,7 +8881,7 @@ func (client VirtualNetworkClient) getUpgradeStatus(ctx context.Context, request // GetVcn Gets the specified VCN's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVcn.go.html to see an example of how to use GetVcn API. func (client VirtualNetworkClient) GetVcn(ctx context.Context, request GetVcnRequest) (response GetVcnResponse, err error) { @@ -8934,7 +8938,7 @@ func (client VirtualNetworkClient) getVcn(ctx context.Context, request common.OC // GetVcnDnsResolverAssociation Get the associated DNS resolver information with a vcn // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVcnDnsResolverAssociation.go.html to see an example of how to use GetVcnDnsResolverAssociation API. func (client VirtualNetworkClient) GetVcnDnsResolverAssociation(ctx context.Context, request GetVcnDnsResolverAssociationRequest) (response GetVcnDnsResolverAssociationResponse, err error) { @@ -8991,7 +8995,7 @@ func (client VirtualNetworkClient) getVcnDnsResolverAssociation(ctx context.Cont // GetVcnTopology Gets a virtual network topology for a given VCN. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVcnTopology.go.html to see an example of how to use GetVcnTopology API. func (client VirtualNetworkClient) GetVcnTopology(ctx context.Context, request GetVcnTopologyRequest) (response GetVcnTopologyResponse, err error) { @@ -9048,7 +9052,7 @@ func (client VirtualNetworkClient) getVcnTopology(ctx context.Context, request c // GetVirtualCircuit Gets the specified virtual circuit's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVirtualCircuit.go.html to see an example of how to use GetVirtualCircuit API. // A default retry strategy applies to this operation GetVirtualCircuit() @@ -9106,7 +9110,7 @@ func (client VirtualNetworkClient) getVirtualCircuit(ctx context.Context, reques // GetVlan Gets the specified VLAN's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVlan.go.html to see an example of how to use GetVlan API. func (client VirtualNetworkClient) GetVlan(ctx context.Context, request GetVlanRequest) (response GetVlanResponse, err error) { @@ -9166,7 +9170,7 @@ func (client VirtualNetworkClient) getVlan(ctx context.Context, request common.O // ListVnicAttachments // operation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVnic.go.html to see an example of how to use GetVnic API. func (client VirtualNetworkClient) GetVnic(ctx context.Context, request GetVnicRequest) (response GetVnicResponse, err error) { @@ -9223,7 +9227,7 @@ func (client VirtualNetworkClient) getVnic(ctx context.Context, request common.O // GetVtap Gets the specified `Vtap` resource. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVtap.go.html to see an example of how to use GetVtap API. func (client VirtualNetworkClient) GetVtap(ctx context.Context, request GetVtapRequest) (response GetVtapResponse, err error) { @@ -9281,7 +9285,7 @@ func (client VirtualNetworkClient) getVtap(ctx context.Context, request common.O // ListAllowedPeerRegionsForRemotePeering Lists the regions that support remote VCN peering (which is peering across regions). // For more information, see VCN Peering (https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/VCNpeering.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListAllowedPeerRegionsForRemotePeering.go.html to see an example of how to use ListAllowedPeerRegionsForRemotePeering API. // A default retry strategy applies to this operation ListAllowedPeerRegionsForRemotePeering() @@ -9340,7 +9344,7 @@ func (client VirtualNetworkClient) listAllowedPeerRegionsForRemotePeering(ctx co // ListByoipAllocatedRanges Lists the subranges of a BYOIP CIDR block currently allocated to an IP pool. // Each `ByoipAllocatedRange` object also lists the IP pool where it is allocated. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListByoipAllocatedRanges.go.html to see an example of how to use ListByoipAllocatedRanges API. func (client VirtualNetworkClient) ListByoipAllocatedRanges(ctx context.Context, request ListByoipAllocatedRangesRequest) (response ListByoipAllocatedRangesResponse, err error) { @@ -9398,7 +9402,7 @@ func (client VirtualNetworkClient) listByoipAllocatedRanges(ctx context.Context, // ListByoipRanges Lists the `ByoipRange` resources in the specified compartment. // You can filter the list using query parameters. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListByoipRanges.go.html to see an example of how to use ListByoipRanges API. func (client VirtualNetworkClient) ListByoipRanges(ctx context.Context, request ListByoipRangesRequest) (response ListByoipRangesResponse, err error) { @@ -9455,7 +9459,7 @@ func (client VirtualNetworkClient) listByoipRanges(ctx context.Context, request // ListCaptureFilters Lists the capture filters in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCaptureFilters.go.html to see an example of how to use ListCaptureFilters API. func (client VirtualNetworkClient) ListCaptureFilters(ctx context.Context, request ListCaptureFiltersRequest) (response ListCaptureFiltersResponse, err error) { @@ -9517,11 +9521,11 @@ func (client VirtualNetworkClient) listCaptureFilters(ctx context.Context, reque // ensure that the Cpe object's `cpeDeviceShapeId` attribute is set // to the CPE device type's OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) (returned by this operation). // For information about generating CPE configuration content, see these operations: -// * GetCpeDeviceConfigContent -// * GetIpsecCpeDeviceConfigContent -// * GetTunnelCpeDeviceConfigContent +// - GetCpeDeviceConfigContent +// - GetIpsecCpeDeviceConfigContent +// - GetTunnelCpeDeviceConfigContent // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCpeDeviceShapes.go.html to see an example of how to use ListCpeDeviceShapes API. // A default retry strategy applies to this operation ListCpeDeviceShapes() @@ -9579,7 +9583,7 @@ func (client VirtualNetworkClient) listCpeDeviceShapes(ctx context.Context, requ // ListCpes Lists the customer-premises equipment objects (CPEs) in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCpes.go.html to see an example of how to use ListCpes API. // A default retry strategy applies to this operation ListCpes() @@ -9637,7 +9641,7 @@ func (client VirtualNetworkClient) listCpes(ctx context.Context, request common. // ListCrossConnectGroups Lists the cross-connect groups in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCrossConnectGroups.go.html to see an example of how to use ListCrossConnectGroups API. // A default retry strategy applies to this operation ListCrossConnectGroups() @@ -9696,7 +9700,7 @@ func (client VirtualNetworkClient) listCrossConnectGroups(ctx context.Context, r // ListCrossConnectLocations Lists the available FastConnect locations for cross-connect installation. You need // this information so you can specify your desired location when you create a cross-connect. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCrossConnectLocations.go.html to see an example of how to use ListCrossConnectLocations API. // A default retry strategy applies to this operation ListCrossConnectLocations() @@ -9755,7 +9759,7 @@ func (client VirtualNetworkClient) listCrossConnectLocations(ctx context.Context // ListCrossConnectMappings Lists the Cross Connect mapping Details for the specified // virtual circuit. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCrossConnectMappings.go.html to see an example of how to use ListCrossConnectMappings API. // A default retry strategy applies to this operation ListCrossConnectMappings() @@ -9814,7 +9818,7 @@ func (client VirtualNetworkClient) listCrossConnectMappings(ctx context.Context, // ListCrossConnects Lists the cross-connects in the specified compartment. You can filter the list // by specifying the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a cross-connect group. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCrossConnects.go.html to see an example of how to use ListCrossConnects API. // A default retry strategy applies to this operation ListCrossConnects() @@ -9874,7 +9878,7 @@ func (client VirtualNetworkClient) listCrossConnects(ctx context.Context, reques // so you can specify your desired port speed (that is, shape) when you create a // cross-connect. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCrossconnectPortSpeedShapes.go.html to see an example of how to use ListCrossconnectPortSpeedShapes API. // A default retry strategy applies to this operation ListCrossconnectPortSpeedShapes() @@ -9935,7 +9939,7 @@ func (client VirtualNetworkClient) listCrossconnectPortSpeedShapes(ctx context.C // The response includes the default set of options that automatically comes with each VCN, // plus any other sets you've created. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDhcpOptions.go.html to see an example of how to use ListDhcpOptions API. func (client VirtualNetworkClient) ListDhcpOptions(ctx context.Context, request ListDhcpOptionsRequest) (response ListDhcpOptionsResponse, err error) { @@ -9996,7 +10000,7 @@ func (client VirtualNetworkClient) listDhcpOptions(ctx context.Context, request // The LIST API lists DRG attachments by attachment type. It will default to list VCN attachments, // but you may request to list ALL attachments of ALL types. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgAttachments.go.html to see an example of how to use ListDrgAttachments API. func (client VirtualNetworkClient) ListDrgAttachments(ctx context.Context, request ListDrgAttachmentsRequest) (response ListDrgAttachmentsResponse, err error) { @@ -10053,7 +10057,7 @@ func (client VirtualNetworkClient) listDrgAttachments(ctx context.Context, reque // ListDrgRouteDistributionStatements Lists the statements for the specified route distribution. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgRouteDistributionStatements.go.html to see an example of how to use ListDrgRouteDistributionStatements API. func (client VirtualNetworkClient) ListDrgRouteDistributionStatements(ctx context.Context, request ListDrgRouteDistributionStatementsRequest) (response ListDrgRouteDistributionStatementsResponse, err error) { @@ -10112,7 +10116,7 @@ func (client VirtualNetworkClient) listDrgRouteDistributionStatements(ctx contex // To retrieve the statements in a distribution, use the // ListDrgRouteDistributionStatements operation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgRouteDistributions.go.html to see an example of how to use ListDrgRouteDistributions API. func (client VirtualNetworkClient) ListDrgRouteDistributions(ctx context.Context, request ListDrgRouteDistributionsRequest) (response ListDrgRouteDistributionsResponse, err error) { @@ -10169,7 +10173,7 @@ func (client VirtualNetworkClient) listDrgRouteDistributions(ctx context.Context // ListDrgRouteRules Lists the route rules in the specified DRG route table. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgRouteRules.go.html to see an example of how to use ListDrgRouteRules API. func (client VirtualNetworkClient) ListDrgRouteRules(ctx context.Context, request ListDrgRouteRulesRequest) (response ListDrgRouteRulesResponse, err error) { @@ -10227,7 +10231,7 @@ func (client VirtualNetworkClient) listDrgRouteRules(ctx context.Context, reques // ListDrgRouteTables Lists the DRG route tables for the specified DRG. // Use the `ListDrgRouteRules` operation to retrieve the route rules in a table. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgRouteTables.go.html to see an example of how to use ListDrgRouteTables API. func (client VirtualNetworkClient) ListDrgRouteTables(ctx context.Context, request ListDrgRouteTablesRequest) (response ListDrgRouteTablesResponse, err error) { @@ -10284,7 +10288,7 @@ func (client VirtualNetworkClient) listDrgRouteTables(ctx context.Context, reque // ListDrgs Lists the DRGs in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgs.go.html to see an example of how to use ListDrgs API. func (client VirtualNetworkClient) ListDrgs(ctx context.Context, request ListDrgsRequest) (response ListDrgsResponse, err error) { @@ -10345,7 +10349,7 @@ func (client VirtualNetworkClient) listDrgs(ctx context.Context, request common. // For the compartment ID, provide the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of your tenancy (the root compartment). // For more information, see FastConnect Overview (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListFastConnectProviderServices.go.html to see an example of how to use ListFastConnectProviderServices API. // A default retry strategy applies to this operation ListFastConnectProviderServices() @@ -10405,7 +10409,7 @@ func (client VirtualNetworkClient) listFastConnectProviderServices(ctx context.C // You need this information so you can specify your desired bandwidth level (shape) when you create a virtual circuit. // For more information about virtual circuits, see FastConnect Overview (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListFastConnectProviderVirtualCircuitBandwidthShapes.go.html to see an example of how to use ListFastConnectProviderVirtualCircuitBandwidthShapes API. // A default retry strategy applies to this operation ListFastConnectProviderVirtualCircuitBandwidthShapes() @@ -10463,7 +10467,7 @@ func (client VirtualNetworkClient) listFastConnectProviderVirtualCircuitBandwidt // ListIPSecConnectionTunnelRoutes The routes advertised to the on-premises network and the routes received from the on-premises network. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIPSecConnectionTunnelRoutes.go.html to see an example of how to use ListIPSecConnectionTunnelRoutes API. // A default retry strategy applies to this operation ListIPSecConnectionTunnelRoutes() @@ -10521,7 +10525,7 @@ func (client VirtualNetworkClient) listIPSecConnectionTunnelRoutes(ctx context.C // ListIPSecConnectionTunnelSecurityAssociations Lists the tunnel security associations information for the specified IPSec tunnel ID. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIPSecConnectionTunnelSecurityAssociations.go.html to see an example of how to use ListIPSecConnectionTunnelSecurityAssociations API. // A default retry strategy applies to this operation ListIPSecConnectionTunnelSecurityAssociations() @@ -10579,7 +10583,7 @@ func (client VirtualNetworkClient) listIPSecConnectionTunnelSecurityAssociations // ListIPSecConnectionTunnels Lists the tunnel information for the specified IPSec connection. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIPSecConnectionTunnels.go.html to see an example of how to use ListIPSecConnectionTunnels API. // A default retry strategy applies to this operation ListIPSecConnectionTunnels() @@ -10638,7 +10642,7 @@ func (client VirtualNetworkClient) listIPSecConnectionTunnels(ctx context.Contex // ListIPSecConnections Lists the IPSec connections for the specified compartment. You can filter the // results by DRG or CPE. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIPSecConnections.go.html to see an example of how to use ListIPSecConnections API. // A default retry strategy applies to this operation ListIPSecConnections() @@ -10697,7 +10701,7 @@ func (client VirtualNetworkClient) listIPSecConnections(ctx context.Context, req // ListInternetGateways Lists the internet gateways in the specified VCN and the specified compartment. // If the VCN ID is not provided, then the list includes the internet gateways from all VCNs in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInternetGateways.go.html to see an example of how to use ListInternetGateways API. func (client VirtualNetworkClient) ListInternetGateways(ctx context.Context, request ListInternetGatewaysRequest) (response ListInternetGatewaysResponse, err error) { @@ -10754,13 +10758,13 @@ func (client VirtualNetworkClient) listInternetGateways(ctx context.Context, req // ListIpv6s Lists the Ipv6 objects based // on one of these filters: -// * Subnet OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). -// * VNIC OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). -// * Both IPv6 address and subnet OCID: This lets you get an `Ipv6` object based on its private -// IPv6 address (for example, 2001:0db8:0123:1111:abcd:ef01:2345:6789) and not its OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). For comparison, -// GetIpv6 requires the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// - Subnet OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// - VNIC OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// - Both IPv6 address and subnet OCID: This lets you get an `Ipv6` object based on its private +// IPv6 address (for example, 2001:0db8:0123:1111:abcd:ef01:2345:6789) and not its OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). For comparison, +// GetIpv6 requires the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIpv6s.go.html to see an example of how to use ListIpv6s API. func (client VirtualNetworkClient) ListIpv6s(ctx context.Context, request ListIpv6sRequest) (response ListIpv6sResponse, err error) { @@ -10818,7 +10822,7 @@ func (client VirtualNetworkClient) listIpv6s(ctx context.Context, request common // ListLocalPeeringGateways Lists the local peering gateways (LPGs) for the specified VCN and specified compartment. // If the VCN ID is not provided, then the list includes the LPGs from all VCNs in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListLocalPeeringGateways.go.html to see an example of how to use ListLocalPeeringGateways API. func (client VirtualNetworkClient) ListLocalPeeringGateways(ctx context.Context, request ListLocalPeeringGatewaysRequest) (response ListLocalPeeringGatewaysResponse, err error) { @@ -10876,7 +10880,7 @@ func (client VirtualNetworkClient) listLocalPeeringGateways(ctx context.Context, // ListNatGateways Lists the NAT gateways in the specified compartment. You may optionally specify a VCN OCID // to filter the results by VCN. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListNatGateways.go.html to see an example of how to use ListNatGateways API. func (client VirtualNetworkClient) ListNatGateways(ctx context.Context, request ListNatGatewaysRequest) (response ListNatGatewaysResponse, err error) { @@ -10933,7 +10937,7 @@ func (client VirtualNetworkClient) listNatGateways(ctx context.Context, request // ListNetworkSecurityGroupSecurityRules Lists the security rules in the specified network security group. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListNetworkSecurityGroupSecurityRules.go.html to see an example of how to use ListNetworkSecurityGroupSecurityRules API. func (client VirtualNetworkClient) ListNetworkSecurityGroupSecurityRules(ctx context.Context, request ListNetworkSecurityGroupSecurityRulesRequest) (response ListNetworkSecurityGroupSecurityRulesResponse, err error) { @@ -10990,7 +10994,7 @@ func (client VirtualNetworkClient) listNetworkSecurityGroupSecurityRules(ctx con // ListNetworkSecurityGroupVnics Lists the VNICs in the specified network security group. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListNetworkSecurityGroupVnics.go.html to see an example of how to use ListNetworkSecurityGroupVnics API. func (client VirtualNetworkClient) ListNetworkSecurityGroupVnics(ctx context.Context, request ListNetworkSecurityGroupVnicsRequest) (response ListNetworkSecurityGroupVnicsResponse, err error) { @@ -11048,7 +11052,7 @@ func (client VirtualNetworkClient) listNetworkSecurityGroupVnics(ctx context.Con // ListNetworkSecurityGroups Lists either the network security groups in the specified compartment, or those associated with the specified VLAN. // You must specify either a `vlanId` or a `compartmentId`, but not both. If you specify a `vlanId`, all other parameters are ignored. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListNetworkSecurityGroups.go.html to see an example of how to use ListNetworkSecurityGroups API. func (client VirtualNetworkClient) ListNetworkSecurityGroups(ctx context.Context, request ListNetworkSecurityGroupsRequest) (response ListNetworkSecurityGroupsResponse, err error) { @@ -11108,16 +11112,17 @@ func (client VirtualNetworkClient) listNetworkSecurityGroups(ctx context.Context // - Subnet OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). // - VNIC OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). // - Both private IP address and subnet OCID: This lets -// you get a `privateIP` object based on its private IP -// address (for example, 10.0.3.3) and not its OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). For comparison, -// GetPrivateIp -// requires the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// you get a `privateIP` object based on its private IP +// address (for example, 10.0.3.3) and not its OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). For comparison, +// GetPrivateIp +// requires the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// // If you're listing all the private IPs associated with a given subnet // or VNIC, the response includes both primary and secondary private IPs. // If you are an Oracle Cloud VMware Solution customer and have VLANs // in your VCN, you can filter the list by VLAN OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). See Vlan. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListPrivateIps.go.html to see an example of how to use ListPrivateIps API. func (client VirtualNetworkClient) ListPrivateIps(ctx context.Context, request ListPrivateIpsRequest) (response ListPrivateIpsResponse, err error) { @@ -11175,7 +11180,7 @@ func (client VirtualNetworkClient) listPrivateIps(ctx context.Context, request c // ListPublicIpPools Lists the public IP pools in the specified compartment. // You can filter the list using query parameters. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListPublicIpPools.go.html to see an example of how to use ListPublicIpPools API. func (client VirtualNetworkClient) ListPublicIpPools(ctx context.Context, request ListPublicIpPoolsRequest) (response ListPublicIpPoolsResponse, err error) { @@ -11233,21 +11238,24 @@ func (client VirtualNetworkClient) listPublicIpPools(ctx context.Context, reques // ListPublicIps Lists the PublicIp objects // in the specified compartment. You can filter the list by using query parameters. // To list your reserved public IPs: -// * Set `scope` = `REGION` (required) -// * Leave the `availabilityDomain` parameter empty -// * Set `lifetime` = `RESERVED` +// - Set `scope` = `REGION` (required) +// - Leave the `availabilityDomain` parameter empty +// - Set `lifetime` = `RESERVED` +// // To list the ephemeral public IPs assigned to a regional entity such as a NAT gateway: -// * Set `scope` = `REGION` (required) -// * Leave the `availabilityDomain` parameter empty -// * Set `lifetime` = `EPHEMERAL` +// - Set `scope` = `REGION` (required) +// - Leave the `availabilityDomain` parameter empty +// - Set `lifetime` = `EPHEMERAL` +// // To list the ephemeral public IPs assigned to private IPs: -// * Set `scope` = `AVAILABILITY_DOMAIN` (required) -// * Set the `availabilityDomain` parameter to the desired availability domain (required) -// * Set `lifetime` = `EPHEMERAL` +// - Set `scope` = `AVAILABILITY_DOMAIN` (required) +// - Set the `availabilityDomain` parameter to the desired availability domain (required) +// - Set `lifetime` = `EPHEMERAL` +// // **Note:** An ephemeral public IP assigned to a private IP // is always in the same availability domain and compartment as the private IP. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListPublicIps.go.html to see an example of how to use ListPublicIps API. func (client VirtualNetworkClient) ListPublicIps(ctx context.Context, request ListPublicIpsRequest) (response ListPublicIpsResponse, err error) { @@ -11305,7 +11313,7 @@ func (client VirtualNetworkClient) listPublicIps(ctx context.Context, request co // ListRemotePeeringConnections Lists the remote peering connections (RPCs) for the specified DRG and compartment // (the RPC's compartment). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListRemotePeeringConnections.go.html to see an example of how to use ListRemotePeeringConnections API. // A default retry strategy applies to this operation ListRemotePeeringConnections() @@ -11366,7 +11374,7 @@ func (client VirtualNetworkClient) listRemotePeeringConnections(ctx context.Cont // The response includes the default route table that automatically comes with // each VCN in the specified compartment, plus any route tables you've created. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListRouteTables.go.html to see an example of how to use ListRouteTables API. func (client VirtualNetworkClient) ListRouteTables(ctx context.Context, request ListRouteTablesRequest) (response ListRouteTablesResponse, err error) { @@ -11424,7 +11432,7 @@ func (client VirtualNetworkClient) listRouteTables(ctx context.Context, request // ListSecurityLists Lists the security lists in the specified VCN and compartment. // If the VCN ID is not provided, then the list includes the security lists from all VCNs in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListSecurityLists.go.html to see an example of how to use ListSecurityLists API. func (client VirtualNetworkClient) ListSecurityLists(ctx context.Context, request ListSecurityListsRequest) (response ListSecurityListsResponse, err error) { @@ -11482,7 +11490,7 @@ func (client VirtualNetworkClient) listSecurityLists(ctx context.Context, reques // ListServiceGateways Lists the service gateways in the specified compartment. You may optionally specify a VCN OCID // to filter the results by VCN. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListServiceGateways.go.html to see an example of how to use ListServiceGateways API. func (client VirtualNetworkClient) ListServiceGateways(ctx context.Context, request ListServiceGatewaysRequest) (response ListServiceGatewaysResponse, err error) { @@ -11540,7 +11548,7 @@ func (client VirtualNetworkClient) listServiceGateways(ctx context.Context, requ // ListServices Lists the available Service objects that you can enable for a // service gateway in this region. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListServices.go.html to see an example of how to use ListServices API. func (client VirtualNetworkClient) ListServices(ctx context.Context, request ListServicesRequest) (response ListServicesResponse, err error) { @@ -11598,7 +11606,7 @@ func (client VirtualNetworkClient) listServices(ctx context.Context, request com // ListSubnets Lists the subnets in the specified VCN and the specified compartment. // If the VCN ID is not provided, then the list includes the subnets from all VCNs in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListSubnets.go.html to see an example of how to use ListSubnets API. func (client VirtualNetworkClient) ListSubnets(ctx context.Context, request ListSubnetsRequest) (response ListSubnetsResponse, err error) { @@ -11655,7 +11663,7 @@ func (client VirtualNetworkClient) listSubnets(ctx context.Context, request comm // ListVcns Lists the virtual cloud networks (VCNs) in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVcns.go.html to see an example of how to use ListVcns API. func (client VirtualNetworkClient) ListVcns(ctx context.Context, request ListVcnsRequest) (response ListVcnsResponse, err error) { @@ -11710,9 +11718,67 @@ func (client VirtualNetworkClient) listVcns(ctx context.Context, request common. return response, err } +// ListVirtualCircuitAssociatedTunnels Gets the specified virtual circuit's associatedTunnelsInfo. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVirtualCircuitAssociatedTunnels.go.html to see an example of how to use ListVirtualCircuitAssociatedTunnels API. +// A default retry strategy applies to this operation ListVirtualCircuitAssociatedTunnels() +func (client VirtualNetworkClient) ListVirtualCircuitAssociatedTunnels(ctx context.Context, request ListVirtualCircuitAssociatedTunnelsRequest) (response ListVirtualCircuitAssociatedTunnelsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVirtualCircuitAssociatedTunnels, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVirtualCircuitAssociatedTunnelsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVirtualCircuitAssociatedTunnelsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVirtualCircuitAssociatedTunnelsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVirtualCircuitAssociatedTunnelsResponse") + } + return +} + +// listVirtualCircuitAssociatedTunnels implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listVirtualCircuitAssociatedTunnels(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualCircuits/{virtualCircuitId}/associatedTunnels", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListVirtualCircuitAssociatedTunnelsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VirtualCircuitAssociatedTunnelDetails/ListVirtualCircuitAssociatedTunnels" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListVirtualCircuitAssociatedTunnels", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListVirtualCircuitBandwidthShapes The deprecated operation lists available bandwidth levels for virtual circuits. For the compartment ID, provide the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of your tenancy (the root compartment). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVirtualCircuitBandwidthShapes.go.html to see an example of how to use ListVirtualCircuitBandwidthShapes API. // A default retry strategy applies to this operation ListVirtualCircuitBandwidthShapes() @@ -11771,7 +11837,7 @@ func (client VirtualNetworkClient) listVirtualCircuitBandwidthShapes(ctx context // ListVirtualCircuitPublicPrefixes Lists the public IP prefixes and their details for the specified // public virtual circuit. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVirtualCircuitPublicPrefixes.go.html to see an example of how to use ListVirtualCircuitPublicPrefixes API. // A default retry strategy applies to this operation ListVirtualCircuitPublicPrefixes() @@ -11829,7 +11895,7 @@ func (client VirtualNetworkClient) listVirtualCircuitPublicPrefixes(ctx context. // ListVirtualCircuits Lists the virtual circuits in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVirtualCircuits.go.html to see an example of how to use ListVirtualCircuits API. // A default retry strategy applies to this operation ListVirtualCircuits() @@ -11887,7 +11953,7 @@ func (client VirtualNetworkClient) listVirtualCircuits(ctx context.Context, requ // ListVlans Lists the VLANs in the specified VCN and the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVlans.go.html to see an example of how to use ListVlans API. func (client VirtualNetworkClient) ListVlans(ctx context.Context, request ListVlansRequest) (response ListVlansResponse, err error) { @@ -11944,7 +12010,7 @@ func (client VirtualNetworkClient) listVlans(ctx context.Context, request common // ListVtaps Lists the virtual test access points (VTAPs) in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVtaps.go.html to see an example of how to use ListVtaps API. func (client VirtualNetworkClient) ListVtaps(ctx context.Context, request ListVtapsRequest) (response ListVtapsResponse, err error) { @@ -12007,7 +12073,7 @@ func (client VirtualNetworkClient) listVtaps(ctx context.Context, request common // - No IP address in an existing subnet should be outside of the new CIDR block range. // **Note:** Modifying a CIDR block places your VCN in an updating state until the changes are complete. You cannot create or update the VCN's subnets, VLANs, LPGs, or route tables during this operation. The time to completion can vary depending on the size of your network. Updating a small network could take about a minute, and updating a large network could take up to an hour. You can use the `GetWorkRequest` operation to check the status of the update. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ModifyVcnCidr.go.html to see an example of how to use ModifyVcnCidr API. func (client VirtualNetworkClient) ModifyVcnCidr(ctx context.Context, request ModifyVcnCidrRequest) (response ModifyVcnCidrResponse, err error) { @@ -12069,7 +12135,7 @@ func (client VirtualNetworkClient) modifyVcnCidr(ctx context.Context, request co // RemoveDrgRouteDistributionStatements Removes one or more route distribution statements from the specified route distribution's map. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveDrgRouteDistributionStatements.go.html to see an example of how to use RemoveDrgRouteDistributionStatements API. func (client VirtualNetworkClient) RemoveDrgRouteDistributionStatements(ctx context.Context, request RemoveDrgRouteDistributionStatementsRequest) (response RemoveDrgRouteDistributionStatementsResponse, err error) { @@ -12126,7 +12192,7 @@ func (client VirtualNetworkClient) removeDrgRouteDistributionStatements(ctx cont // RemoveDrgRouteRules Removes one or more route rules from the specified DRG route table. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveDrgRouteRules.go.html to see an example of how to use RemoveDrgRouteRules API. func (client VirtualNetworkClient) RemoveDrgRouteRules(ctx context.Context, request RemoveDrgRouteRulesRequest) (response RemoveDrgRouteRulesResponse, err error) { @@ -12183,7 +12249,7 @@ func (client VirtualNetworkClient) removeDrgRouteRules(ctx context.Context, requ // RemoveExportDrgRouteDistribution Removes the export route distribution from the DRG attachment so no routes are advertised to it. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveExportDrgRouteDistribution.go.html to see an example of how to use RemoveExportDrgRouteDistribution API. func (client VirtualNetworkClient) RemoveExportDrgRouteDistribution(ctx context.Context, request RemoveExportDrgRouteDistributionRequest) (response RemoveExportDrgRouteDistributionResponse, err error) { @@ -12241,7 +12307,7 @@ func (client VirtualNetworkClient) removeExportDrgRouteDistribution(ctx context. // RemoveImportDrgRouteDistribution Removes the import route distribution from the DRG route table so no routes are imported // into it. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveImportDrgRouteDistribution.go.html to see an example of how to use RemoveImportDrgRouteDistribution API. func (client VirtualNetworkClient) RemoveImportDrgRouteDistribution(ctx context.Context, request RemoveImportDrgRouteDistributionRequest) (response RemoveImportDrgRouteDistributionResponse, err error) { @@ -12296,9 +12362,9 @@ func (client VirtualNetworkClient) removeImportDrgRouteDistribution(ctx context. return response, err } -// RemoveIpv6SubnetCidr Remove an IPv6 CIDR from a subnet. At least one IPv6 CIDR should remain. +// RemoveIpv6SubnetCidr Remove an IPv6 prefix from a subnet. At least one IPv6 CIDR should remain. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveIpv6SubnetCidr.go.html to see an example of how to use RemoveIpv6SubnetCidr API. func (client VirtualNetworkClient) RemoveIpv6SubnetCidr(ctx context.Context, request RemoveIpv6SubnetCidrRequest) (response RemoveIpv6SubnetCidrResponse, err error) { @@ -12358,9 +12424,9 @@ func (client VirtualNetworkClient) removeIpv6SubnetCidr(ctx context.Context, req return response, err } -// RemoveIpv6VcnCidr Removing an existing IPv6 CIDR from a VCN. +// RemoveIpv6VcnCidr Removing an existing IPv6 prefix from a VCN. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveIpv6VcnCidr.go.html to see an example of how to use RemoveIpv6VcnCidr API. func (client VirtualNetworkClient) RemoveIpv6VcnCidr(ctx context.Context, request RemoveIpv6VcnCidrRequest) (response RemoveIpv6VcnCidrResponse, err error) { @@ -12422,7 +12488,7 @@ func (client VirtualNetworkClient) removeIpv6VcnCidr(ctx context.Context, reques // RemoveNetworkSecurityGroupSecurityRules Removes one or more security rules from the specified network security group. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveNetworkSecurityGroupSecurityRules.go.html to see an example of how to use RemoveNetworkSecurityGroupSecurityRules API. func (client VirtualNetworkClient) RemoveNetworkSecurityGroupSecurityRules(ctx context.Context, request RemoveNetworkSecurityGroupSecurityRulesRequest) (response RemoveNetworkSecurityGroupSecurityRulesResponse, err error) { @@ -12479,7 +12545,7 @@ func (client VirtualNetworkClient) removeNetworkSecurityGroupSecurityRules(ctx c // RemovePublicIpPoolCapacity Removes a CIDR block from the referenced public IP pool. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemovePublicIpPoolCapacity.go.html to see an example of how to use RemovePublicIpPoolCapacity API. func (client VirtualNetworkClient) RemovePublicIpPoolCapacity(ctx context.Context, request RemovePublicIpPoolCapacityRequest) (response RemovePublicIpPoolCapacityResponse, err error) { @@ -12544,7 +12610,7 @@ func (client VirtualNetworkClient) removePublicIpPoolCapacity(ctx context.Contex // - You cannot remove a CIDR block if an IP address in its range is in use. // - Removing a CIDR block places your VCN in an updating state until the changes are complete. You cannot create or update the VCN's subnets, VLANs, LPGs, or route tables during this operation. The time to completion can take a few minutes. You can use the `GetWorkRequest` operation to check the status of the update. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveVcnCidr.go.html to see an example of how to use RemoveVcnCidr API. func (client VirtualNetworkClient) RemoveVcnCidr(ctx context.Context, request RemoveVcnCidrRequest) (response RemoveVcnCidrResponse, err error) { @@ -12606,7 +12672,7 @@ func (client VirtualNetworkClient) removeVcnCidr(ctx context.Context, request co // UpdateByoipRange Updates the tags or display name associated to the specified BYOIP CIDR block. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateByoipRange.go.html to see an example of how to use UpdateByoipRange API. func (client VirtualNetworkClient) UpdateByoipRange(ctx context.Context, request UpdateByoipRangeRequest) (response UpdateByoipRangeResponse, err error) { @@ -12663,7 +12729,7 @@ func (client VirtualNetworkClient) updateByoipRange(ctx context.Context, request // UpdateCaptureFilter Updates the specified VTAP capture filter's display name or tags. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateCaptureFilter.go.html to see an example of how to use UpdateCaptureFilter API. func (client VirtualNetworkClient) UpdateCaptureFilter(ctx context.Context, request UpdateCaptureFilterRequest) (response UpdateCaptureFilterResponse, err error) { @@ -12721,7 +12787,7 @@ func (client VirtualNetworkClient) updateCaptureFilter(ctx context.Context, requ // UpdateCpe Updates the specified CPE's display name or tags. // Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateCpe.go.html to see an example of how to use UpdateCpe API. // A default retry strategy applies to this operation UpdateCpe() @@ -12779,7 +12845,7 @@ func (client VirtualNetworkClient) updateCpe(ctx context.Context, request common // UpdateCrossConnect Updates the specified cross-connect. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateCrossConnect.go.html to see an example of how to use UpdateCrossConnect API. // A default retry strategy applies to this operation UpdateCrossConnect() @@ -12838,7 +12904,7 @@ func (client VirtualNetworkClient) updateCrossConnect(ctx context.Context, reque // UpdateCrossConnectGroup Updates the specified cross-connect group's display name. // Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateCrossConnectGroup.go.html to see an example of how to use UpdateCrossConnectGroup API. // A default retry strategy applies to this operation UpdateCrossConnectGroup() @@ -12898,7 +12964,7 @@ func (client VirtualNetworkClient) updateCrossConnectGroup(ctx context.Context, // themselves. Avoid entering confidential information. // Note that the `options` object you provide replaces the entire existing set of options. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDhcpOptions.go.html to see an example of how to use UpdateDhcpOptions API. func (client VirtualNetworkClient) UpdateDhcpOptions(ctx context.Context, request UpdateDhcpOptionsRequest) (response UpdateDhcpOptionsResponse, err error) { @@ -12955,7 +13021,7 @@ func (client VirtualNetworkClient) updateDhcpOptions(ctx context.Context, reques // UpdateDrg Updates the specified DRG's display name or tags. Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrg.go.html to see an example of how to use UpdateDrg API. func (client VirtualNetworkClient) UpdateDrg(ctx context.Context, request UpdateDrgRequest) (response UpdateDrgResponse, err error) { @@ -13013,7 +13079,7 @@ func (client VirtualNetworkClient) updateDrg(ctx context.Context, request common // UpdateDrgAttachment Updates the display name and routing information for the specified `DrgAttachment`. // Avoid entering confidential information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrgAttachment.go.html to see an example of how to use UpdateDrgAttachment API. func (client VirtualNetworkClient) UpdateDrgAttachment(ctx context.Context, request UpdateDrgAttachmentRequest) (response UpdateDrgAttachmentResponse, err error) { @@ -13070,7 +13136,7 @@ func (client VirtualNetworkClient) updateDrgAttachment(ctx context.Context, requ // UpdateDrgRouteDistribution Updates the specified route distribution // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrgRouteDistribution.go.html to see an example of how to use UpdateDrgRouteDistribution API. func (client VirtualNetworkClient) UpdateDrgRouteDistribution(ctx context.Context, request UpdateDrgRouteDistributionRequest) (response UpdateDrgRouteDistributionResponse, err error) { @@ -13127,7 +13193,7 @@ func (client VirtualNetworkClient) updateDrgRouteDistribution(ctx context.Contex // UpdateDrgRouteDistributionStatements Updates one or more route distribution statements in the specified route distribution. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrgRouteDistributionStatements.go.html to see an example of how to use UpdateDrgRouteDistributionStatements API. func (client VirtualNetworkClient) UpdateDrgRouteDistributionStatements(ctx context.Context, request UpdateDrgRouteDistributionStatementsRequest) (response UpdateDrgRouteDistributionStatementsResponse, err error) { @@ -13184,7 +13250,7 @@ func (client VirtualNetworkClient) updateDrgRouteDistributionStatements(ctx cont // UpdateDrgRouteRules Updates one or more route rules in the specified DRG route table. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrgRouteRules.go.html to see an example of how to use UpdateDrgRouteRules API. func (client VirtualNetworkClient) UpdateDrgRouteRules(ctx context.Context, request UpdateDrgRouteRulesRequest) (response UpdateDrgRouteRulesResponse, err error) { @@ -13241,7 +13307,7 @@ func (client VirtualNetworkClient) updateDrgRouteRules(ctx context.Context, requ // UpdateDrgRouteTable Updates the specified DRG route table. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrgRouteTable.go.html to see an example of how to use UpdateDrgRouteTable API. func (client VirtualNetworkClient) UpdateDrgRouteTable(ctx context.Context, request UpdateDrgRouteTableRequest) (response UpdateDrgRouteTableResponse, err error) { @@ -13300,7 +13366,7 @@ func (client VirtualNetworkClient) updateDrgRouteTable(ctx context.Context, requ // To update an individual IPSec tunnel's attributes, use // UpdateIPSecConnectionTunnel. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateIPSecConnection.go.html to see an example of how to use UpdateIPSecConnection API. // A default retry strategy applies to this operation UpdateIPSecConnection() @@ -13358,15 +13424,15 @@ func (client VirtualNetworkClient) updateIPSecConnection(ctx context.Context, re // UpdateIPSecConnectionTunnel Updates the specified tunnel. This operation lets you change tunnel attributes such as the // routing type (BGP dynamic routing or static routing). Here are some important notes: -// * If you change the tunnel's routing type or BGP session configuration, the tunnel will go +// - If you change the tunnel's routing type or BGP session configuration, the tunnel will go // down while it's reprovisioned. -// * If you want to switch the tunnel's `routing` from `STATIC` to `BGP`, make sure the tunnel's +// - If you want to switch the tunnel's `routing` from `STATIC` to `BGP`, make sure the tunnel's // BGP session configuration attributes have been set (BgpSessionInfo). -// * If you want to switch the tunnel's `routing` from `BGP` to `STATIC`, make sure the +// - If you want to switch the tunnel's `routing` from `BGP` to `STATIC`, make sure the // IPSecConnection already has at least one valid CIDR // static route. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateIPSecConnectionTunnel.go.html to see an example of how to use UpdateIPSecConnectionTunnel API. // A default retry strategy applies to this operation UpdateIPSecConnectionTunnel() @@ -13425,7 +13491,7 @@ func (client VirtualNetworkClient) updateIPSecConnectionTunnel(ctx context.Conte // UpdateIPSecConnectionTunnelSharedSecret Updates the shared secret (pre-shared key) for the specified tunnel. // **Important:** If you change the shared secret, the tunnel will go down while it's reprovisioned. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateIPSecConnectionTunnelSharedSecret.go.html to see an example of how to use UpdateIPSecConnectionTunnelSharedSecret API. // A default retry strategy applies to this operation UpdateIPSecConnectionTunnelSharedSecret() @@ -13486,7 +13552,7 @@ func (client VirtualNetworkClient) updateIPSecConnectionTunnelSharedSecret(ctx c // If the gateway is disabled, that means no traffic will flow to/from the internet even if there's // a route rule that enables that traffic. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInternetGateway.go.html to see an example of how to use UpdateInternetGateway API. func (client VirtualNetworkClient) UpdateInternetGateway(ctx context.Context, request UpdateInternetGatewayRequest) (response UpdateInternetGatewayResponse, err error) { @@ -13543,12 +13609,12 @@ func (client VirtualNetworkClient) updateInternetGateway(ctx context.Context, re // UpdateIpv6 Updates the specified IPv6. You must specify the object's OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). // Use this operation if you want to: -// * Move an IPv6 to a different VNIC in the same subnet. -// * Enable/disable internet access for an IPv6. -// * Change the display name for an IPv6. -// * Update resource tags for an IPv6. +// - Move an IPv6 to a different VNIC in the same subnet. +// - Enable/disable internet access for an IPv6. +// - Change the display name for an IPv6. +// - Update resource tags for an IPv6. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateIpv6.go.html to see an example of how to use UpdateIpv6 API. func (client VirtualNetworkClient) UpdateIpv6(ctx context.Context, request UpdateIpv6Request) (response UpdateIpv6Response, err error) { @@ -13605,7 +13671,7 @@ func (client VirtualNetworkClient) updateIpv6(ctx context.Context, request commo // UpdateLocalPeeringGateway Updates the specified local peering gateway (LPG). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateLocalPeeringGateway.go.html to see an example of how to use UpdateLocalPeeringGateway API. func (client VirtualNetworkClient) UpdateLocalPeeringGateway(ctx context.Context, request UpdateLocalPeeringGatewayRequest) (response UpdateLocalPeeringGatewayResponse, err error) { @@ -13662,7 +13728,7 @@ func (client VirtualNetworkClient) updateLocalPeeringGateway(ctx context.Context // UpdateNatGateway Updates the specified NAT gateway. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateNatGateway.go.html to see an example of how to use UpdateNatGateway API. func (client VirtualNetworkClient) UpdateNatGateway(ctx context.Context, request UpdateNatGatewayRequest) (response UpdateNatGatewayResponse, err error) { @@ -13729,7 +13795,7 @@ func (client VirtualNetworkClient) updateNatGateway(ctx context.Context, request // To edit the contents of existing security rules in the group, use // UpdateNetworkSecurityGroupSecurityRules. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateNetworkSecurityGroup.go.html to see an example of how to use UpdateNetworkSecurityGroup API. func (client VirtualNetworkClient) UpdateNetworkSecurityGroup(ctx context.Context, request UpdateNetworkSecurityGroupRequest) (response UpdateNetworkSecurityGroupResponse, err error) { @@ -13786,7 +13852,7 @@ func (client VirtualNetworkClient) updateNetworkSecurityGroup(ctx context.Contex // UpdateNetworkSecurityGroupSecurityRules Updates one or more security rules in the specified network security group. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateNetworkSecurityGroupSecurityRules.go.html to see an example of how to use UpdateNetworkSecurityGroupSecurityRules API. func (client VirtualNetworkClient) UpdateNetworkSecurityGroupSecurityRules(ctx context.Context, request UpdateNetworkSecurityGroupSecurityRulesRequest) (response UpdateNetworkSecurityGroupSecurityRulesResponse, err error) { @@ -13846,11 +13912,12 @@ func (client VirtualNetworkClient) updateNetworkSecurityGroupSecurityRules(ctx c // - Move a secondary private IP to a different VNIC in the same subnet. // - Change the display name for a secondary private IP. // - Change the hostname for a secondary private IP. +// // This operation cannot be used with primary private IPs. // To update the hostname for the primary IP on a VNIC, use // UpdateVnic. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdatePrivateIp.go.html to see an example of how to use UpdatePrivateIp API. func (client VirtualNetworkClient) UpdatePrivateIp(ctx context.Context, request UpdatePrivateIpRequest) (response UpdatePrivateIpResponse, err error) { @@ -13938,7 +14005,7 @@ func (client VirtualNetworkClient) updatePrivateIp(ctx context.Context, request // returned. For information about the public IP limits, see // Public IP Addresses (https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingpublicIPs.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdatePublicIp.go.html to see an example of how to use UpdatePublicIp API. func (client VirtualNetworkClient) UpdatePublicIp(ctx context.Context, request UpdatePublicIpRequest) (response UpdatePublicIpResponse, err error) { @@ -13995,7 +14062,7 @@ func (client VirtualNetworkClient) updatePublicIp(ctx context.Context, request c // UpdatePublicIpPool Updates the specified public IP pool. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdatePublicIpPool.go.html to see an example of how to use UpdatePublicIpPool API. func (client VirtualNetworkClient) UpdatePublicIpPool(ctx context.Context, request UpdatePublicIpPoolRequest) (response UpdatePublicIpPoolResponse, err error) { @@ -14052,7 +14119,7 @@ func (client VirtualNetworkClient) updatePublicIpPool(ctx context.Context, reque // UpdateRemotePeeringConnection Updates the specified remote peering connection (RPC). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateRemotePeeringConnection.go.html to see an example of how to use UpdateRemotePeeringConnection API. // A default retry strategy applies to this operation UpdateRemotePeeringConnection() @@ -14112,7 +14179,7 @@ func (client VirtualNetworkClient) updateRemotePeeringConnection(ctx context.Con // Avoid entering confidential information. // Note that the `routeRules` object you provide replaces the entire existing set of rules. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateRouteTable.go.html to see an example of how to use UpdateRouteTable API. func (client VirtualNetworkClient) UpdateRouteTable(ctx context.Context, request UpdateRouteTableRequest) (response UpdateRouteTableResponse, err error) { @@ -14172,7 +14239,7 @@ func (client VirtualNetworkClient) updateRouteTable(ctx context.Context, request // Note that the `egressSecurityRules` or `ingressSecurityRules` objects you provide replace the entire // existing objects. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateSecurityList.go.html to see an example of how to use UpdateSecurityList API. func (client VirtualNetworkClient) UpdateSecurityList(ctx context.Context, request UpdateSecurityListRequest) (response UpdateSecurityListResponse, err error) { @@ -14230,7 +14297,7 @@ func (client VirtualNetworkClient) updateSecurityList(ctx context.Context, reque // UpdateServiceGateway Updates the specified service gateway. The information you provide overwrites the existing // attributes of the gateway. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateServiceGateway.go.html to see an example of how to use UpdateServiceGateway API. func (client VirtualNetworkClient) UpdateServiceGateway(ctx context.Context, request UpdateServiceGatewayRequest) (response UpdateServiceGatewayResponse, err error) { @@ -14287,7 +14354,7 @@ func (client VirtualNetworkClient) updateServiceGateway(ctx context.Context, req // UpdateSubnet Updates the specified subnet. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateSubnet.go.html to see an example of how to use UpdateSubnet API. func (client VirtualNetworkClient) UpdateSubnet(ctx context.Context, request UpdateSubnetRequest) (response UpdateSubnetResponse, err error) { @@ -14346,7 +14413,7 @@ func (client VirtualNetworkClient) updateSubnet(ctx context.Context, request com // The answers correlate to the questions that are specific to the CPE device type (see the // `parameters` attribute of CpeDeviceShapeDetail). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateTunnelCpeDeviceConfig.go.html to see an example of how to use UpdateTunnelCpeDeviceConfig API. // A default retry strategy applies to this operation UpdateTunnelCpeDeviceConfig() @@ -14409,7 +14476,7 @@ func (client VirtualNetworkClient) updateTunnelCpeDeviceConfig(ctx context.Conte // UpdateVcn Updates the specified VCN. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVcn.go.html to see an example of how to use UpdateVcn API. func (client VirtualNetworkClient) UpdateVcn(ctx context.Context, request UpdateVcnRequest) (response UpdateVcnResponse, err error) { @@ -14487,7 +14554,7 @@ func (client VirtualNetworkClient) updateVcn(ctx context.Context, request common // Oracle must verify the customer's ownership of each added prefix before // traffic for that prefix will flow across the virtual circuit. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVirtualCircuit.go.html to see an example of how to use UpdateVirtualCircuit API. // A default retry strategy applies to this operation UpdateVirtualCircuit() @@ -14546,7 +14613,7 @@ func (client VirtualNetworkClient) updateVirtualCircuit(ctx context.Context, req // UpdateVlan Updates the specified VLAN. Note that this operation might require changes to all // the VNICs in the VLAN, which can take a while. The VLAN will be in the UPDATING state until the changes are complete. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVlan.go.html to see an example of how to use UpdateVlan API. func (client VirtualNetworkClient) UpdateVlan(ctx context.Context, request UpdateVlanRequest) (response UpdateVlanResponse, err error) { @@ -14603,7 +14670,7 @@ func (client VirtualNetworkClient) updateVlan(ctx context.Context, request commo // UpdateVnic Updates the specified VNIC. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVnic.go.html to see an example of how to use UpdateVnic API. func (client VirtualNetworkClient) UpdateVnic(ctx context.Context, request UpdateVnicRequest) (response UpdateVnicResponse, err error) { @@ -14660,7 +14727,7 @@ func (client VirtualNetworkClient) updateVnic(ctx context.Context, request commo // UpdateVtap Updates the specified VTAP's display name or tags. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVtap.go.html to see an example of how to use UpdateVtap API. func (client VirtualNetworkClient) UpdateVtap(ctx context.Context, request UpdateVtapRequest) (response UpdateVtapResponse, err error) { @@ -14718,7 +14785,7 @@ func (client VirtualNetworkClient) updateVtap(ctx context.Context, request commo // UpgradeDrg Upgrades the DRG. After upgrade, you can control routing inside your DRG // via DRG attachments, route distributions, and DRG route tables. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpgradeDrg.go.html to see an example of how to use UpgradeDrg API. func (client VirtualNetworkClient) UpgradeDrg(ctx context.Context, request UpgradeDrgRequest) (response UpgradeDrgResponse, err error) { @@ -14781,7 +14848,7 @@ func (client VirtualNetworkClient) upgradeDrg(ctx context.Context, request commo // ValidateByoipRange Submits the BYOIP CIDR block you are importing for validation. Do not submit to Oracle for validation if you have not already // modified the information for the BYOIP CIDR block with your Regional Internet Registry. See To import a CIDR block (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/BYOIP.htm#import_cidr) for details. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ValidateByoipRange.go.html to see an example of how to use ValidateByoipRange API. func (client VirtualNetworkClient) ValidateByoipRange(ctx context.Context, request ValidateByoipRangeRequest) (response ValidateByoipRangeResponse, err error) { @@ -14838,7 +14905,7 @@ func (client VirtualNetworkClient) validateByoipRange(ctx context.Context, reque // WithdrawByoipRange Withdraws BGP route advertisement for the BYOIP CIDR block. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/WithdrawByoipRange.go.html to see an example of how to use WithdrawByoipRange API. func (client VirtualNetworkClient) WithdrawByoipRange(ctx context.Context, request WithdrawByoipRangeRequest) (response WithdrawByoipRangeResponse, err error) { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe.go index ed42d02df7..5304fc0f4a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe.go @@ -71,6 +71,9 @@ type Cpe struct { // The date and time the CPE was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Indicates whether this CPE is of type `private` or not. + IsPrivate *bool `mandatory:"false" json:"isPrivate"` } func (m Cpe) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_backup_details.go index 77c9a9e465..91ce59339c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_backup_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_backup_details.go @@ -43,6 +43,12 @@ type CreateBootVolumeBackupDetails struct { // The type of backup to create. If omitted, defaults to incremental. Type CreateBootVolumeBackupDetailsTypeEnum `mandatory:"false" json:"type,omitempty"` + + // The OCID of the Vault service key which is the master encryption key for the volume backup. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` } func (m CreateBootVolumeBackupDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_details.go index dda0189402..081f182c6c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_details.go @@ -139,10 +139,7 @@ func (m *CreateBootVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.IsAutoTuneEnabled = model.IsAutoTuneEnabled m.BootVolumeReplicas = make([]BootVolumeReplicaDetails, len(model.BootVolumeReplicas)) - for i, n := range model.BootVolumeReplicas { - m.BootVolumeReplicas[i] = n - } - + copy(m.BootVolumeReplicas, model.BootVolumeReplicas) m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) for i, n := range model.AutotunePolicies { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -155,7 +152,6 @@ func (m *CreateBootVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.AutotunePolicies[i] = nil } } - m.CompartmentId = model.CompartmentId nn, e = model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoip_range_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoip_range_details.go index e8c0670f89..9ef7e46f68 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoip_range_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoip_range_details.go @@ -31,7 +31,7 @@ type CreateByoipRangeDetails struct { // Example: `10.0.1.0/24` CidrBlock *string `mandatory:"false" json:"cidrBlock"` - // The BYOIPv6 CIDR block. You can assign some or all of it to a VCN after it is validated. + // The BYOIPv6 prefix. You can assign some or all of it to a VCN after it is validated. Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` // Defined tags for this resource. Each key is predefined and scoped to a diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capture_filter_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capture_filter_details.go index d7adaa104e..5ff6cabb34 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capture_filter_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capture_filter_details.go @@ -21,7 +21,7 @@ import ( "strings" ) -// CreateCaptureFilterDetails A capture filter contains a set of rules governing what traffic a VTAP mirrors. +// CreateCaptureFilterDetails A capture filter contains a set of rules governing what traffic a VTAP mirrors or a VCN flow log collects. type CreateCaptureFilterDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the capture filter. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cluster_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cluster_network_details.go index 4c4016fb25..5bd1e61fa9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cluster_network_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cluster_network_details.go @@ -21,7 +21,12 @@ import ( "strings" ) -// CreateClusterNetworkDetails The data to create a cluster network. +// CreateClusterNetworkDetails The data to create a cluster network with instance pools (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). +// Use cluster networks with instance pools when you want predictable capacity for a specific number of identical +// instances that are managed as a group. +// For details about creating compute clusters, which let you manage instances in the RDMA network independently +// of each other or use different types of instances in the network group, +// see CreateComputeClusterDetails. type CreateClusterNetworkDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment @@ -47,6 +52,8 @@ type CreateClusterNetworkDetails struct { // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). // Example: `{"Department": "Finance"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + ClusterConfiguration *ClusterConfigurationDetails `mandatory:"false" json:"clusterConfiguration"` } func (m CreateClusterNetworkDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_cluster_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_cluster_details.go index 74651a5b28..28d4c60bb8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_cluster_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_cluster_details.go @@ -21,20 +21,22 @@ import ( "strings" ) -// CreateComputeClusterDetails The data for creating a compute cluster, which is an empty remote direct memory access (RDMA) network group. +// CreateComputeClusterDetails The data for creating a compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). A compute cluster +// is an empty remote direct memory access (RDMA) network group // After the compute cluster is created, you can use the compute cluster's OCID with the // LaunchInstance operation to create instances in the compute cluster. -// Compute clusters allow you to manage instances in the cluster individually. -// For more information, see Compute Clusters (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). -// For details about creating a cluster network that uses intance pools to manage groups of identical instances, +// The instances must be created in the same compartment and availability domain as the cluster. +// Use compute clusters when you want to manage instances in the cluster individually, or when you want +// to use different types of instances in the RDMA network group. +// For details about creating a cluster network that uses instance pools to manage groups of identical instances, // see CreateClusterNetworkDetails. type CreateComputeClusterDetails struct { - // The availability domain that the compute cluster is running in. + // The availability domain to place the compute cluster in. // Example: `Uocm:PHX-AD-1` AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains this compute cluster. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. CompartmentId *string `mandatory:"true" json:"compartmentId"` // A user-friendly name. Does not have to be unique, and it's changeable. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_cluster_request_response.go index 06a9db0e08..79fb9798f7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_cluster_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_cluster_request_response.go @@ -18,12 +18,14 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeCluster.go.html to see an example of how to use CreateComputeClusterRequest. type CreateComputeClusterRequest struct { - // Details for creating a compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm), which is a remote direct memory access (RDMA) network group. - // When first created, the compute cluster is empty. - // After the compute cluster is created, you can use the compute cluster's OCID with the LaunchInstance - // operation to create instances in the compute cluster. - // Compute clusters allow you to manage instances in the cluster individually. - // For details about creating a cluster network that uses intance pools to manage groups of identical instances, + // The data for creating a compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). A compute cluster + // is an empty remote direct memory access (RDMA) network group. + // After the compute cluster is created, you can use the compute cluster's OCID with the + // LaunchInstance operation to create instances in the compute cluster. + // The instances must be created in the same compartment and availability domain as the cluster. + // Use compute clusters when you want to manage instances in the cluster individually, or when you want + // to use different types of instances in the RDMA network group. + // For details about creating a cluster network that uses instance pools to manage groups of identical instances, // see CreateClusterNetworkDetails. CreateComputeClusterDetails `contributesTo:"body"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cpe_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cpe_details.go index 94545f5cf4..97d035f710 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cpe_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cpe_details.go @@ -56,6 +56,9 @@ type CreateCpeDetails struct { // * GetTunnelCpeDeviceConfigContent // * GetTunnelCpeDeviceConfig CpeDeviceShapeId *string `mandatory:"false" json:"cpeDeviceShapeId"` + + // Indicates whether this CPE is of type `private` or not. + IsPrivate *bool `mandatory:"false" json:"isPrivate"` } func (m CreateCpeDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dhcp_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dhcp_details.go index d3477a1e41..875c7c30ad 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dhcp_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dhcp_details.go @@ -110,7 +110,6 @@ func (m *CreateDhcpDetails) UnmarshalJSON(data []byte) (e error) { m.Options[i] = nil } } - m.VcnId = model.VcnId return diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_base.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_base.go index 8929eee6e6..e49a2e924b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_base.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_base.go @@ -46,10 +46,10 @@ type CreateInstanceConfigurationBase interface { type createinstanceconfigurationbase struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` DisplayName *string `mandatory:"false" json:"displayName"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` Source string `json:"source"` } @@ -96,26 +96,26 @@ func (m *createinstanceconfigurationbase) UnmarshalPolymorphicJSON(data []byte) } } -//GetCompartmentId returns CompartmentId -func (m createinstanceconfigurationbase) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createinstanceconfigurationbase) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createinstanceconfigurationbase) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createinstanceconfigurationbase) GetFreeformTags() map[string]string { return m.FreeformTags } +// GetCompartmentId returns CompartmentId +func (m createinstanceconfigurationbase) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createinstanceconfigurationbase) String() string { return common.PointerString(m) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_details.go index 9686ca2f56..a7ad77e12e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_details.go @@ -46,22 +46,22 @@ type CreateInstanceConfigurationDetails struct { FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m CreateInstanceConfigurationDetails) GetCompartmentId() *string { return m.CompartmentId } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m CreateInstanceConfigurationDetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m CreateInstanceConfigurationDetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m CreateInstanceConfigurationDetails) GetFreeformTags() map[string]string { return m.FreeformTags } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_from_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_from_instance_details.go index 4471fa44c0..fa3fc298fc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_from_instance_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_from_instance_details.go @@ -48,22 +48,22 @@ type CreateInstanceConfigurationFromInstanceDetails struct { FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m CreateInstanceConfigurationFromInstanceDetails) GetCompartmentId() *string { return m.CompartmentId } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m CreateInstanceConfigurationFromInstanceDetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m CreateInstanceConfigurationFromInstanceDetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m CreateInstanceConfigurationFromInstanceDetails) GetFreeformTags() map[string]string { return m.FreeformTags } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_details.go index 8032d0b900..3db2af6d63 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_details.go @@ -57,6 +57,14 @@ type CreateInstancePoolDetails struct { // The load balancers to attach to the instance pool. LoadBalancers []AttachLoadBalancerDetails `mandatory:"false" json:"loadBalancers"` + + // A user-friendly formatter for the instance pool's instances. Instance displaynames follow the format. + // The formatter does not retroactively change instance's displaynames, only instance displaynames in the future follow the format + InstanceDisplayNameFormatter *string `mandatory:"false" json:"instanceDisplayNameFormatter"` + + // A user-friendly formatter for the instance pool's instances. Instance hostnames follow the format. + // The formatter does not retroactively change instance's hostnames, only instance hostnames in the future follow the format + InstanceHostnameFormatter *string `mandatory:"false" json:"instanceHostnameFormatter"` } func (m CreateInstancePoolDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_placement_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_placement_configuration_details.go index 3fa3e44471..2a486971b1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_placement_configuration_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_placement_configuration_details.go @@ -28,10 +28,6 @@ type CreateInstancePoolPlacementConfigurationDetails struct { // Example: `Uocm:PHX-AD-1` AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet to place - // instances. - PrimarySubnetId *string `mandatory:"true" json:"primarySubnetId"` - // The fault domains to place instances. // If you don't provide any values, the system makes a best effort to distribute // instances across all fault domains based on capacity. @@ -44,6 +40,12 @@ type CreateInstancePoolPlacementConfigurationDetails struct { // Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` FaultDomains []string `mandatory:"false" json:"faultDomains"` + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. This field is deprecated. + // Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. + PrimarySubnetId *string `mandatory:"false" json:"primarySubnetId"` + + PrimaryVnicSubnets *InstancePoolPlacementPrimarySubnet `mandatory:"false" json:"primaryVnicSubnets"` + // The set of secondary VNIC data for instances in the pool. SecondaryVnicSubnets []InstancePoolPlacementSecondaryVnicSubnet `mandatory:"false" json:"secondaryVnicSubnets"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_connection_tunnel_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_connection_tunnel_details.go index 82f16d410c..d3d4c37458 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_connection_tunnel_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_connection_tunnel_details.go @@ -59,6 +59,16 @@ type CreateIpSecConnectionTunnelDetails struct { DpdConfig *DpdConfig `mandatory:"false" json:"dpdConfig"` + // The headend IP that you can choose on the Oracle side to terminate your private IPSec tunnel. + OracleTunnelIp *string `mandatory:"false" json:"oracleTunnelIp"` + + // The list of virtual circuit OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)s over which your network can reach this tunnel. + AssociatedVirtualCircuits []string `mandatory:"false" json:"associatedVirtualCircuits"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table assigned to this attachment. + // The DRG route table manages traffic inside the DRG. + DrgRouteTableId *string `mandatory:"false" json:"drgRouteTableId"` + EncryptionDomainConfig *CreateIpSecTunnelEncryptionDomainDetails `mandatory:"false" json:"encryptionDomainConfig"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ipv6_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ipv6_details.go index 24eff34b0e..55b2d5a48d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ipv6_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ipv6_details.go @@ -49,7 +49,7 @@ type CreateIpv6Details struct { // Example: `2001:DB8::` IpAddress *string `mandatory:"false" json:"ipAddress"` - // The IPv6 CIDR allocated to the subnet. This is required if more than one IPv6 CIDR exists on the subnet. + // The IPv6 prefix allocated to the subnet. This is required if more than one IPv6 prefix exists on the subnet. Ipv6SubnetCidr *string `mandatory:"false" json:"ipv6SubnetCidr"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_macsec_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_macsec_properties.go index 5c02b1b017..aa1cc2ff48 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_macsec_properties.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_macsec_properties.go @@ -31,6 +31,9 @@ type CreateMacsecProperties struct { // Type of encryption cipher suite to use for the MACsec connection. EncryptionCipher MacsecEncryptionCipherEnum `mandatory:"false" json:"encryptionCipher,omitempty"` + + // Indicates whether unencrypted traffic is allowed if MACsec Key Agreement protocol (MKA) fails. + IsUnprotectedTrafficAllowed *bool `mandatory:"false" json:"isUnprotectedTrafficAllowed"` } func (m CreateMacsecProperties) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_subnet_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_subnet_details.go index 723bdb751a..811c619ebd 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_subnet_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_subnet_details.go @@ -86,10 +86,10 @@ type CreateSubnetDetails struct { // Example: `2001:0db8:0123:1111::/64` Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` - // The list of all IPv6 CIDR blocks (Oracle allocated IPv6 GUA, ULA or private IPv6 CIDR blocks, BYOIPv6 CIDR blocks) for the subnet that meets the following criteria: - // - The CIDR blocks must be valid. - // - Multiple CIDR blocks must not overlap each other or the on-premises network CIDR block. - // - The number of CIDR blocks must not exceed the limit of IPv6 CIDR blocks allowed to a subnet. + // The list of all IPv6 prefixes (Oracle allocated IPv6 GUA, ULA or private IPv6 prefixes, BYOIPv6 prefixes) for the subnet that meets the following criteria: + // - The prefixes must be valid. + // - Multiple prefixes must not overlap each other or the on-premises network prefix. + // - The number of prefixes must not exceed the limit of IPv6 prefixes allowed to a subnet. Ipv6CidrBlocks []string `mandatory:"false" json:"ipv6CidrBlocks"` // Whether to disallow ingress internet traffic to VNICs within this subnet. Defaults to false. @@ -108,7 +108,7 @@ type CreateSubnetDetails struct { // If `prohibitPublicIpOnVnic` is set to true, VNICs created in this // subnet cannot have public IP addresses (that is, it's a private // subnet). - // If you intend to use an IPv6 CIDR block, you should use the flag `prohibitInternetIngress` to + // If you intend to use an IPv6 prefix, you should use the flag `prohibitInternetIngress` to // specify ingress internet traffic behavior of the subnet. // Example: `true` ProhibitPublicIpOnVnic *bool `mandatory:"false" json:"prohibitPublicIpOnVnic"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vcn_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vcn_details.go index 815f21c044..e136e0b1e8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vcn_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vcn_details.go @@ -38,10 +38,10 @@ type CreateVcnDetails struct { // **Important:** Do *not* specify a value for `cidrBlock`. Use this parameter instead. CidrBlocks []string `mandatory:"false" json:"cidrBlocks"` - // The list of one or more ULA or Private IPv6 CIDR blocks for the vcn that meets the following criteria: + // The list of one or more ULA or Private IPv6 prefixes for the VCN that meets the following criteria: // - The CIDR blocks must be valid. - // - Multiple CIDR blocks must not overlap each other or the on-premises network CIDR block. - // - The number of CIDR blocks must not exceed the limit of IPv6 CIDR blocks allowed to a vcn. + // - Multiple CIDR blocks must not overlap each other or the on-premises network prefix. + // - The number of CIDR blocks must not exceed the limit of IPv6 prefixes allowed to a VCN. // **Important:** Do *not* specify a value for `ipv6CidrBlock`. Use this parameter instead. Ipv6PrivateCidrBlocks []string `mandatory:"false" json:"ipv6PrivateCidrBlocks"` @@ -49,7 +49,7 @@ type CreateVcnDetails struct { // size for an IPv6 enabled VCN. IsOracleGuaAllocationEnabled *bool `mandatory:"false" json:"isOracleGuaAllocationEnabled"` - // The list of BYOIPv6 OCIDs and BYOIPv6 CIDR blocks required to create a VCN that uses BYOIPv6 ranges. + // The list of BYOIPv6 OCIDs and BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 address ranges. Byoipv6CidrDetails []Byoipv6CidrDetails `mandatory:"false" json:"byoipv6CidrDetails"` // Defined tags for this resource. Each key is predefined and scoped to a diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_virtual_circuit_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_virtual_circuit_details.go index 5e6ff90db9..b7c148d853 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_virtual_circuit_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_virtual_circuit_details.go @@ -54,6 +54,9 @@ type CreateVirtualCircuitDetails struct { // Set to `true` to enable BFD for IPv4 BGP peering, or set to `false` to disable BFD. If this is not set, the default is `false`. IsBfdEnabled *bool `mandatory:"false" json:"isBfdEnabled"` + // Set to `true` for the virtual circuit to carry only encrypted traffic, or set to `false` for the virtual circuit to carry unencrypted traffic. If this is not set, the default is `false`. + IsTransportMode *bool `mandatory:"false" json:"isTransportMode"` + // Deprecated. Instead use `customerAsn`. // If you specify values for both, the request will be rejected. CustomerBgpAsn *int `mandatory:"false" json:"customerBgpAsn"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vnic_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vnic_details.go index fd4d3b7d4e..3fb456c6f4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vnic_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vnic_details.go @@ -27,6 +27,13 @@ import ( // Virtual Network Interface Cards (VNICs) (https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm). type CreateVnicDetails struct { + // Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled + // subnet. Default: False. When provided you may optionally provide an IPv6 prefix + // (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` + // is not provided then an IPv6 prefix is chosen + // for you. + AssignIpv6Ip *bool `mandatory:"false" json:"assignIpv6Ip"` + // Whether the VNIC should be assigned a public IP address. Defaults to whether // the subnet is public or private. If not set and the VNIC is being created // in a private subnet (that is, where `prohibitPublicIpOnVnic` = true in the @@ -89,6 +96,12 @@ type CreateVnicDetails struct { // can not be assigned a hostname. See Vlan. HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + // A list of IPv6 prefix ranges from which the VNIC is assigned an IPv6 address. + // You can provide only the prefix ranges from which OCI selects an available + // address from the range. You can optionally choose to leave the prefix range empty + // and instead provide the specific IPv6 address within that range to use. + Ipv6AddressIpv6SubnetCidrPairDetails []Ipv6AddressIpv6SubnetCidrPairDetails `mandatory:"false" json:"ipv6AddressIpv6SubnetCidrPairDetails"` + // A list of the OCIDs of the network security groups (NSGs) to add the VNIC to. For more // information about NSGs, see // NetworkSecurityGroup. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_details.go index 7f027b9cd3..eec61386fc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_details.go @@ -27,6 +27,12 @@ type CreateVolumeBackupDetails struct { // The OCID of the volume that needs to be backed up. VolumeId *string `mandatory:"true" json:"volumeId"` + // The OCID of the Vault service key which is the master encryption key for the volume backup. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + // Defined tags for this resource. Each key is predefined and scoped to a // namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). // Example: `{"Operations": {"CostCenter": "42"}}` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_details.go index 224f06193f..e211dd4cec 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_details.go @@ -166,10 +166,7 @@ func (m *CreateVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.IsAutoTuneEnabled = model.IsAutoTuneEnabled m.BlockVolumeReplicas = make([]BlockVolumeReplicaDetails, len(model.BlockVolumeReplicas)) - for i, n := range model.BlockVolumeReplicas { - m.BlockVolumeReplicas[i] = n - } - + copy(m.BlockVolumeReplicas, model.BlockVolumeReplicas) m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) for i, n := range model.AutotunePolicies { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -182,7 +179,6 @@ func (m *CreateVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.AutotunePolicies[i] = nil } } - m.CompartmentId = model.CompartmentId return diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_details.go index 8ff819512e..2d18bb4387 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_details.go @@ -99,10 +99,7 @@ func (m *CreateVolumeGroupDetails) UnmarshalJSON(data []byte) (e error) { m.FreeformTags = model.FreeformTags m.VolumeGroupReplicas = make([]VolumeGroupReplicaDetails, len(model.VolumeGroupReplicas)) - for i, n := range model.VolumeGroupReplicas { - m.VolumeGroupReplicas[i] = n - } - + copy(m.VolumeGroupReplicas, model.VolumeGroupReplicas) m.AvailabilityDomain = model.AvailabilityDomain m.CompartmentId = model.CompartmentId diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_cluster_request_response.go index 1e9fabb751..f805c7b207 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_cluster_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_cluster_request_response.go @@ -19,8 +19,8 @@ import ( type DeleteComputeClusterRequest struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. - // A compute cluster is a remote direct memory access (RDMA) network group. - // For more information, see Compute Clusters (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). + // A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory + // access (RDMA) network group. ComputeClusterId *string `mandatory:"true" contributesTo:"path" name:"computeClusterId"` // Unique identifier for the request. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_options.go index 8a288fd09b..a9866504ab 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_options.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_options.go @@ -140,7 +140,6 @@ func (m *DhcpOptions) UnmarshalJSON(data []byte) (e error) { m.Options[i] = nil } } - m.TimeCreated = model.TimeCreated m.VcnId = model.VcnId diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_create_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_create_details.go index 6e1e3273fd..cef401e927 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_create_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_create_details.go @@ -31,7 +31,7 @@ type DrgAttachmentNetworkCreateDetails interface { type drgattachmentnetworkcreatedetails struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` Type string `json:"type"` } @@ -71,7 +71,7 @@ func (m *drgattachmentnetworkcreatedetails) UnmarshalPolymorphicJSON(data []byte } } -//GetId returns Id +// GetId returns Id func (m drgattachmentnetworkcreatedetails) GetId() *string { return m.Id } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_details.go index 098c58a683..a9c0445ea1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_details.go @@ -31,7 +31,7 @@ type DrgAttachmentNetworkDetails interface { type drgattachmentnetworkdetails struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` Type string `json:"type"` } @@ -65,6 +65,10 @@ func (m *drgattachmentnetworkdetails) UnmarshalPolymorphicJSON(data []byte) (int mm := VcnDrgAttachmentNetworkDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "LOOPBACK": + mm := LoopBackDrgAttachmentNetworkDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "IPSEC_TUNNEL": mm := IpsecTunnelDrgAttachmentNetworkDetails{} err = json.Unmarshal(data, &mm) @@ -83,7 +87,7 @@ func (m *drgattachmentnetworkdetails) UnmarshalPolymorphicJSON(data []byte) (int } } -//GetId returns Id +// GetId returns Id func (m drgattachmentnetworkdetails) GetId() *string { return m.Id } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_distribution_statement.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_distribution_statement.go index fa9d54637d..3e04abb2bc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_distribution_statement.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_distribution_statement.go @@ -90,7 +90,6 @@ func (m *DrgRouteDistributionStatement) UnmarshalJSON(data []byte) (e error) { m.MatchCriteria[i] = nil } } - m.Action = model.Action m.Priority = model.Priority diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/emulated_volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/emulated_volume_attachment.go index 7509762f14..c8e18dea5a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/emulated_volume_attachment.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/emulated_volume_attachment.go @@ -75,72 +75,72 @@ type EmulatedVolumeAttachment struct { IscsiLoginState VolumeAttachmentIscsiLoginStateEnum `mandatory:"false" json:"iscsiLoginState,omitempty"` } -//GetAvailabilityDomain returns AvailabilityDomain +// GetAvailabilityDomain returns AvailabilityDomain func (m EmulatedVolumeAttachment) GetAvailabilityDomain() *string { return m.AvailabilityDomain } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m EmulatedVolumeAttachment) GetCompartmentId() *string { return m.CompartmentId } -//GetDevice returns Device +// GetDevice returns Device func (m EmulatedVolumeAttachment) GetDevice() *string { return m.Device } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m EmulatedVolumeAttachment) GetDisplayName() *string { return m.DisplayName } -//GetId returns Id +// GetId returns Id func (m EmulatedVolumeAttachment) GetId() *string { return m.Id } -//GetInstanceId returns InstanceId +// GetInstanceId returns InstanceId func (m EmulatedVolumeAttachment) GetInstanceId() *string { return m.InstanceId } -//GetIsReadOnly returns IsReadOnly +// GetIsReadOnly returns IsReadOnly func (m EmulatedVolumeAttachment) GetIsReadOnly() *bool { return m.IsReadOnly } -//GetIsShareable returns IsShareable +// GetIsShareable returns IsShareable func (m EmulatedVolumeAttachment) GetIsShareable() *bool { return m.IsShareable } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m EmulatedVolumeAttachment) GetLifecycleState() VolumeAttachmentLifecycleStateEnum { return m.LifecycleState } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m EmulatedVolumeAttachment) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetVolumeId returns VolumeId +// GetVolumeId returns VolumeId func (m EmulatedVolumeAttachment) GetVolumeId() *string { return m.VolumeId } -//GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled +// GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled func (m EmulatedVolumeAttachment) GetIsPvEncryptionInTransitEnabled() *bool { return m.IsPvEncryptionInTransitEnabled } -//GetIsMultipath returns IsMultipath +// GetIsMultipath returns IsMultipath func (m EmulatedVolumeAttachment) GetIsMultipath() *bool { return m.IsMultipath } -//GetIscsiLoginState returns IscsiLoginState +// GetIscsiLoginState returns IscsiLoginState func (m EmulatedVolumeAttachment) GetIscsiLoginState() VolumeAttachmentIscsiLoginStateEnum { return m.IscsiLoginState } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/enum_integer_image_capability_descriptor.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/enum_integer_image_capability_descriptor.go index 09046414c6..8072e212f3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/enum_integer_image_capability_descriptor.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/enum_integer_image_capability_descriptor.go @@ -34,7 +34,7 @@ type EnumIntegerImageCapabilityDescriptor struct { Source ImageCapabilitySchemaDescriptorSourceEnum `mandatory:"true" json:"source"` } -//GetSource returns Source +// GetSource returns Source func (m EnumIntegerImageCapabilityDescriptor) GetSource() ImageCapabilitySchemaDescriptorSourceEnum { return m.Source } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/enum_string_image_capability_schema_descriptor.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/enum_string_image_capability_schema_descriptor.go index ef74a0ed4e..ed6ec50596 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/enum_string_image_capability_schema_descriptor.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/enum_string_image_capability_schema_descriptor.go @@ -34,7 +34,7 @@ type EnumStringImageCapabilitySchemaDescriptor struct { Source ImageCapabilitySchemaDescriptorSourceEnum `mandatory:"true" json:"source"` } -//GetSource returns Source +// GetSource returns Source func (m EnumStringImageCapabilitySchemaDescriptor) GetSource() ImageCapabilitySchemaDescriptorSourceEnum { return m.Source } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_details.go index c39bee8ed1..2c8b30b687 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_details.go @@ -88,7 +88,7 @@ func (m *exportimagedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetExportFormat returns ExportFormat +// GetExportFormat returns ExportFormat func (m exportimagedetails) GetExportFormat() ExportImageDetailsExportFormatEnum { return m.ExportFormat } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_via_object_storage_tuple_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_via_object_storage_tuple_details.go index 08ee65fcd7..66595f703f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_via_object_storage_tuple_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_via_object_storage_tuple_details.go @@ -45,7 +45,7 @@ type ExportImageViaObjectStorageTupleDetails struct { ExportFormat ExportImageDetailsExportFormatEnum `mandatory:"false" json:"exportFormat,omitempty"` } -//GetExportFormat returns ExportFormat +// GetExportFormat returns ExportFormat func (m ExportImageViaObjectStorageTupleDetails) GetExportFormat() ExportImageDetailsExportFormatEnum { return m.ExportFormat } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_via_object_storage_uri_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_via_object_storage_uri_details.go index 2e8956a2b1..63c3c87078 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_via_object_storage_uri_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_via_object_storage_uri_details.go @@ -42,7 +42,7 @@ type ExportImageViaObjectStorageUriDetails struct { ExportFormat ExportImageDetailsExportFormatEnum `mandatory:"false" json:"exportFormat,omitempty"` } -//GetExportFormat returns ExportFormat +// GetExportFormat returns ExportFormat func (m ExportImageViaObjectStorageUriDetails) GetExportFormat() ExportImageDetailsExportFormatEnum { return m.ExportFormat } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/generic_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/generic_bm_launch_instance_platform_config.go new file mode 100644 index 0000000000..2611d7e98c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/generic_bm_launch_instance_platform_config.go @@ -0,0 +1,175 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GenericBmLaunchInstancePlatformConfig The standard platform configuration to be used when launching a bare metal instance. +type GenericBmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m GenericBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m GenericBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m GenericBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m GenericBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m GenericBmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GenericBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m GenericBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeGenericBmLaunchInstancePlatformConfig GenericBmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeGenericBmLaunchInstancePlatformConfig + }{ + "GENERIC_BM", + (MarshalTypeGenericBmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0 GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS0" + GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" + GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4 GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS4" +) + +var mappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS0": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "NPS1": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "NPS4": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, +} + +var mappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps0": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "nps1": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "nps4": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, +} + +// GetGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + } +} + +// GetMappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/generic_bm_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/generic_bm_platform_config.go new file mode 100644 index 0000000000..ec09424bdc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/generic_bm_platform_config.go @@ -0,0 +1,175 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GenericBmPlatformConfig The standard platform configuration of a bare metal instance. +type GenericBmPlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket GenericBmPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m GenericBmPlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m GenericBmPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m GenericBmPlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m GenericBmPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m GenericBmPlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GenericBmPlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGenericBmPlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetGenericBmPlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m GenericBmPlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeGenericBmPlatformConfig GenericBmPlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeGenericBmPlatformConfig + }{ + "GENERIC_BM", + (MarshalTypeGenericBmPlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// GenericBmPlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type GenericBmPlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for GenericBmPlatformConfigNumaNodesPerSocketEnum +const ( + GenericBmPlatformConfigNumaNodesPerSocketNps0 GenericBmPlatformConfigNumaNodesPerSocketEnum = "NPS0" + GenericBmPlatformConfigNumaNodesPerSocketNps1 GenericBmPlatformConfigNumaNodesPerSocketEnum = "NPS1" + GenericBmPlatformConfigNumaNodesPerSocketNps2 GenericBmPlatformConfigNumaNodesPerSocketEnum = "NPS2" + GenericBmPlatformConfigNumaNodesPerSocketNps4 GenericBmPlatformConfigNumaNodesPerSocketEnum = "NPS4" +) + +var mappingGenericBmPlatformConfigNumaNodesPerSocketEnum = map[string]GenericBmPlatformConfigNumaNodesPerSocketEnum{ + "NPS0": GenericBmPlatformConfigNumaNodesPerSocketNps0, + "NPS1": GenericBmPlatformConfigNumaNodesPerSocketNps1, + "NPS2": GenericBmPlatformConfigNumaNodesPerSocketNps2, + "NPS4": GenericBmPlatformConfigNumaNodesPerSocketNps4, +} + +var mappingGenericBmPlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]GenericBmPlatformConfigNumaNodesPerSocketEnum{ + "nps0": GenericBmPlatformConfigNumaNodesPerSocketNps0, + "nps1": GenericBmPlatformConfigNumaNodesPerSocketNps1, + "nps2": GenericBmPlatformConfigNumaNodesPerSocketNps2, + "nps4": GenericBmPlatformConfigNumaNodesPerSocketNps4, +} + +// GetGenericBmPlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for GenericBmPlatformConfigNumaNodesPerSocketEnum +func GetGenericBmPlatformConfigNumaNodesPerSocketEnumValues() []GenericBmPlatformConfigNumaNodesPerSocketEnum { + values := make([]GenericBmPlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingGenericBmPlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetGenericBmPlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for GenericBmPlatformConfigNumaNodesPerSocketEnum +func GetGenericBmPlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + } +} + +// GetMappingGenericBmPlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGenericBmPlatformConfigNumaNodesPerSocketEnum(val string) (GenericBmPlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingGenericBmPlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_cluster_request_response.go index e9ec194138..229aa60bc7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_cluster_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_cluster_request_response.go @@ -19,8 +19,8 @@ import ( type GetComputeClusterRequest struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. - // A compute cluster is a remote direct memory access (RDMA) network group. - // For more information, see Compute Clusters (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). + // A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory + // access (RDMA) network group. ComputeClusterId *string `mandatory:"true" contributesTo:"path" name:"computeClusterId"` // Unique identifier for the request. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/i_scsi_volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/i_scsi_volume_attachment.go index 8594488684..ace8eb3d56 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/i_scsi_volume_attachment.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/i_scsi_volume_attachment.go @@ -108,72 +108,72 @@ type IScsiVolumeAttachment struct { EncryptionInTransitType EncryptionInTransitTypeEnum `mandatory:"false" json:"encryptionInTransitType,omitempty"` } -//GetAvailabilityDomain returns AvailabilityDomain +// GetAvailabilityDomain returns AvailabilityDomain func (m IScsiVolumeAttachment) GetAvailabilityDomain() *string { return m.AvailabilityDomain } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m IScsiVolumeAttachment) GetCompartmentId() *string { return m.CompartmentId } -//GetDevice returns Device +// GetDevice returns Device func (m IScsiVolumeAttachment) GetDevice() *string { return m.Device } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m IScsiVolumeAttachment) GetDisplayName() *string { return m.DisplayName } -//GetId returns Id +// GetId returns Id func (m IScsiVolumeAttachment) GetId() *string { return m.Id } -//GetInstanceId returns InstanceId +// GetInstanceId returns InstanceId func (m IScsiVolumeAttachment) GetInstanceId() *string { return m.InstanceId } -//GetIsReadOnly returns IsReadOnly +// GetIsReadOnly returns IsReadOnly func (m IScsiVolumeAttachment) GetIsReadOnly() *bool { return m.IsReadOnly } -//GetIsShareable returns IsShareable +// GetIsShareable returns IsShareable func (m IScsiVolumeAttachment) GetIsShareable() *bool { return m.IsShareable } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m IScsiVolumeAttachment) GetLifecycleState() VolumeAttachmentLifecycleStateEnum { return m.LifecycleState } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m IScsiVolumeAttachment) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetVolumeId returns VolumeId +// GetVolumeId returns VolumeId func (m IScsiVolumeAttachment) GetVolumeId() *string { return m.VolumeId } -//GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled +// GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled func (m IScsiVolumeAttachment) GetIsPvEncryptionInTransitEnabled() *bool { return m.IsPvEncryptionInTransitEnabled } -//GetIsMultipath returns IsMultipath +// GetIsMultipath returns IsMultipath func (m IScsiVolumeAttachment) GetIsMultipath() *bool { return m.IsMultipath } -//GetIscsiLoginState returns IscsiLoginState +// GetIscsiLoginState returns IscsiLoginState func (m IScsiVolumeAttachment) GetIscsiLoginState() VolumeAttachmentIscsiLoginStateEnum { return m.IscsiLoginState } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_capability_schema_descriptor.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_capability_schema_descriptor.go index 013c13005f..e90927a87c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_capability_schema_descriptor.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_capability_schema_descriptor.go @@ -77,7 +77,7 @@ func (m *imagecapabilityschemadescriptor) UnmarshalPolymorphicJSON(data []byte) } } -//GetSource returns Source +// GetSource returns Source func (m imagecapabilityschemadescriptor) GetSource() ImageCapabilitySchemaDescriptorSourceEnum { return m.Source } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_details.go index 655a779784..586bc4f70e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_details.go @@ -83,17 +83,17 @@ func (m *imagesourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetOperatingSystem returns OperatingSystem +// GetOperatingSystem returns OperatingSystem func (m imagesourcedetails) GetOperatingSystem() *string { return m.OperatingSystem } -//GetOperatingSystemVersion returns OperatingSystemVersion +// GetOperatingSystemVersion returns OperatingSystemVersion func (m imagesourcedetails) GetOperatingSystemVersion() *string { return m.OperatingSystemVersion } -//GetSourceImageType returns SourceImageType +// GetSourceImageType returns SourceImageType func (m imagesourcedetails) GetSourceImageType() ImageSourceDetailsSourceImageTypeEnum { return m.SourceImageType } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_via_object_storage_tuple_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_via_object_storage_tuple_details.go index 1eb6f75306..bd8d35901d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_via_object_storage_tuple_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_via_object_storage_tuple_details.go @@ -43,17 +43,17 @@ type ImageSourceViaObjectStorageTupleDetails struct { SourceImageType ImageSourceDetailsSourceImageTypeEnum `mandatory:"false" json:"sourceImageType,omitempty"` } -//GetOperatingSystem returns OperatingSystem +// GetOperatingSystem returns OperatingSystem func (m ImageSourceViaObjectStorageTupleDetails) GetOperatingSystem() *string { return m.OperatingSystem } -//GetOperatingSystemVersion returns OperatingSystemVersion +// GetOperatingSystemVersion returns OperatingSystemVersion func (m ImageSourceViaObjectStorageTupleDetails) GetOperatingSystemVersion() *string { return m.OperatingSystemVersion } -//GetSourceImageType returns SourceImageType +// GetSourceImageType returns SourceImageType func (m ImageSourceViaObjectStorageTupleDetails) GetSourceImageType() ImageSourceDetailsSourceImageTypeEnum { return m.SourceImageType } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_via_object_storage_uri_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_via_object_storage_uri_details.go index 2a1354c42a..1399d96847 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_via_object_storage_uri_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_via_object_storage_uri_details.go @@ -37,17 +37,17 @@ type ImageSourceViaObjectStorageUriDetails struct { SourceImageType ImageSourceDetailsSourceImageTypeEnum `mandatory:"false" json:"sourceImageType,omitempty"` } -//GetOperatingSystem returns OperatingSystem +// GetOperatingSystem returns OperatingSystem func (m ImageSourceViaObjectStorageUriDetails) GetOperatingSystem() *string { return m.OperatingSystem } -//GetOperatingSystemVersion returns OperatingSystemVersion +// GetOperatingSystemVersion returns OperatingSystemVersion func (m ImageSourceViaObjectStorageUriDetails) GetOperatingSystemVersion() *string { return m.OperatingSystemVersion } -//GetSourceImageType returns SourceImageType +// GetSourceImageType returns SourceImageType func (m ImageSourceViaObjectStorageUriDetails) GetSourceImageType() ImageSourceDetailsSourceImageTypeEnum { return m.SourceImageType } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance.go index 8e129274f4..1f0a200e0f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance.go @@ -125,9 +125,9 @@ type Instance struct { // over iSCSI the same way as the default iPXE script, use the // following iSCSI IP address: 169.254.0.2, and boot volume IQN: // iqn.2015-02.oracle.boot. - // If your instance boot volume type is paravirtualized, + // If your instance boot volume attachment type is paravirtualized, // the boot volume is attached to the instance through virtio-scsi and no iPXE script is used. - // If your instance boot volume type is paravirtualized + // If your instance boot volume attachment type is paravirtualized // and you use custom iPXE to network boot into your instance, // the primary boot volume is attached as a data volume through virtio-scsi drive. // For more information about the Bring Your Own Image feature of @@ -174,6 +174,9 @@ type Instance struct { TimeMaintenanceRebootDue *common.SDKTime `mandatory:"false" json:"timeMaintenanceRebootDue"` PlatformConfig PlatformConfig `mandatory:"false" json:"platformConfig"` + + // The OCID of the Instance Configuration used to source launch details for this instance. Any other fields supplied in the instance launch request override the details stored in the Instance Configuration for this instance launch. + InstanceConfigurationId *string `mandatory:"false" json:"instanceConfigurationId"` } func (m Instance) String() string { @@ -223,6 +226,7 @@ func (m *Instance) UnmarshalJSON(data []byte) (e error) { AgentConfig *InstanceAgentConfig `json:"agentConfig"` TimeMaintenanceRebootDue *common.SDKTime `json:"timeMaintenanceRebootDue"` PlatformConfig platformconfig `json:"platformConfig"` + InstanceConfigurationId *string `json:"instanceConfigurationId"` AvailabilityDomain *string `json:"availabilityDomain"` CompartmentId *string `json:"compartmentId"` Id *string `json:"id"` @@ -297,6 +301,8 @@ func (m *Instance) UnmarshalJSON(data []byte) (e error) { m.PlatformConfig = nil } + m.InstanceConfigurationId = model.InstanceConfigurationId + m.AvailabilityDomain = model.AvailabilityDomain m.CompartmentId = model.CompartmentId diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration.go index fe1d4d07ae..a935f1452d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration.go @@ -111,10 +111,7 @@ func (m *InstanceConfiguration) UnmarshalJSON(data []byte) (e error) { } m.DeferredFields = make([]string, len(model.DeferredFields)) - for i, n := range model.DeferredFields { - m.DeferredFields[i] = n - } - + copy(m.DeferredFields, model.DeferredFields) m.CompartmentId = model.CompartmentId m.Id = model.Id diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_milan_bm_gpu_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_milan_bm_gpu_launch_instance_platform_config.go index 7f86c1eb1b..a8929f8c03 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_milan_bm_gpu_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_milan_bm_gpu_launch_instance_platform_config.go @@ -22,7 +22,8 @@ import ( "strings" ) -// InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig The platform configuration of a bare metal instance that uses a GPU shape on the AMD Milan platform. +// InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig The platform configuration used when launching a bare metal GPU instance with the following shape: BM.GPU.GM4.8 (also +// named BM.GPU.A100-v2.8) (the AMD Milan platform). type InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig struct { // Whether Secure Boot is enabled on the instance. @@ -56,26 +57,29 @@ type InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig struct { // Whether the input-output memory management unit is enabled. IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_milan_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_milan_bm_launch_instance_platform_config.go index 581236c5bb..c09305e0a7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_milan_bm_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_milan_bm_launch_instance_platform_config.go @@ -65,26 +65,29 @@ type InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_rome_bm_gpu_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_rome_bm_gpu_launch_instance_platform_config.go index 0defe348cd..d2d522d732 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_rome_bm_gpu_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_rome_bm_gpu_launch_instance_platform_config.go @@ -57,26 +57,29 @@ type InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig struct { // Whether the input-output memory management unit is enabled. IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_rome_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_rome_bm_launch_instance_platform_config.go index 3d0cc25faa..df82c1007b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_rome_bm_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_rome_bm_launch_instance_platform_config.go @@ -65,26 +65,29 @@ type InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_vm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_vm_launch_instance_platform_config.go index 0b4c3e205d..5f5bd998e7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_vm_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_vm_launch_instance_platform_config.go @@ -38,22 +38,22 @@ type InstanceConfigurationAmdVmLaunchInstancePlatformConfig struct { IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m InstanceConfigurationAmdVmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m InstanceConfigurationAmdVmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m InstanceConfigurationAmdVmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m InstanceConfigurationAmdVmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_attach_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_attach_volume_details.go index 9aa9fb8759..d18cf4d505 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_attach_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_attach_volume_details.go @@ -94,22 +94,22 @@ func (m *instanceconfigurationattachvolumedetails) UnmarshalPolymorphicJSON(data } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m instanceconfigurationattachvolumedetails) GetDisplayName() *string { return m.DisplayName } -//GetIsReadOnly returns IsReadOnly +// GetIsReadOnly returns IsReadOnly func (m instanceconfigurationattachvolumedetails) GetIsReadOnly() *bool { return m.IsReadOnly } -//GetDevice returns Device +// GetDevice returns Device func (m instanceconfigurationattachvolumedetails) GetDevice() *string { return m.Device } -//GetIsShareable returns IsShareable +// GetIsShareable returns IsShareable func (m instanceconfigurationattachvolumedetails) GetIsShareable() *bool { return m.IsShareable } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_create_vnic_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_create_vnic_details.go index a846373b4d..d8fe767ed6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_create_vnic_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_create_vnic_details.go @@ -25,6 +25,13 @@ import ( // and Instance Configurations (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/instancemanagement.htm#config) for more information. type InstanceConfigurationCreateVnicDetails struct { + // Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled + // subnet. Default: False. When provided you may optionally provide an IPv6 prefix + // (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` + // is not provided then an IPv6 prefix is chosen + // for you. + AssignIpv6Ip *bool `mandatory:"false" json:"assignIpv6Ip"` + // Whether the VNIC should be assigned a public IP address. See the `assignPublicIp` attribute of CreateVnicDetails // for more information. AssignPublicIp *bool `mandatory:"false" json:"assignPublicIp"` @@ -47,6 +54,12 @@ type InstanceConfigurationCreateVnicDetails struct { // Example: `{"Department": "Finance"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // A list of IPv6 prefixes from which the VNIC should be assigned an IPv6 address. + // You can provide only the prefix and OCI selects an available + // address from the range. You can optionally choose to leave the prefix range empty + // and instead provide the specific IPv6 address that should be used from within that range. + Ipv6AddressIpv6SubnetCidrPairDetails []InstanceConfigurationIpv6AddressIpv6SubnetCidrPairDetails `mandatory:"false" json:"ipv6AddressIpv6SubnetCidrPairDetails"` + // The hostname for the VNIC's primary private IP. // See the `hostnameLabel` attribute of CreateVnicDetails for more information. HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_create_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_create_volume_details.go index 8dcc0f45f6..5e0fc3cb7a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_create_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_create_volume_details.go @@ -130,10 +130,7 @@ func (m *InstanceConfigurationCreateVolumeDetails) UnmarshalJSON(data []byte) (e m.IsAutoTuneEnabled = model.IsAutoTuneEnabled m.BlockVolumeReplicas = make([]InstanceConfigurationBlockVolumeReplicaDetails, len(model.BlockVolumeReplicas)) - for i, n := range model.BlockVolumeReplicas { - m.BlockVolumeReplicas[i] = n - } - + copy(m.BlockVolumeReplicas, model.BlockVolumeReplicas) m.DefinedTags = model.DefinedTags m.DisplayName = model.DisplayName @@ -168,6 +165,5 @@ func (m *InstanceConfigurationCreateVolumeDetails) UnmarshalJSON(data []byte) (e m.AutotunePolicies[i] = nil } } - return } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_generic_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_generic_bm_launch_instance_platform_config.go new file mode 100644 index 0000000000..add104d5a6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_generic_bm_launch_instance_platform_config.go @@ -0,0 +1,175 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationGenericBmLaunchInstancePlatformConfig The standard platform configuration to be used when launching a bare metal instance. +type InstanceConfigurationGenericBmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationGenericBmLaunchInstancePlatformConfig InstanceConfigurationGenericBmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationGenericBmLaunchInstancePlatformConfig + }{ + "GENERIC_BM", + (MarshalTypeInstanceConfigurationGenericBmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0 InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS0" + InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" + InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4 InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS4" +) + +var mappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS0": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "NPS1": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "NPS4": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, +} + +var mappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps0": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "nps1": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "nps4": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, +} + +// GetInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + } +} + +// GetMappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_details.go index d726fe3050..9af876aa14 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_details.go @@ -56,6 +56,10 @@ func (m *instanceconfigurationinstancedetails) UnmarshalPolymorphicJSON(data []b var err error switch m.InstanceType { + case "instance_options": + mm := ComputeInstanceOptions{} + err = json.Unmarshal(data, &mm) + return mm, err case "compute": mm := ComputeInstanceDetails{} err = json.Unmarshal(data, &mm) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_image_filter_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_image_filter_details.go new file mode 100644 index 0000000000..35c99bceb3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_image_filter_details.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationInstanceSourceImageFilterDetails These are the criteria for selecting an image. This is required if imageId is not specified. +type InstanceConfigurationInstanceSourceImageFilterDetails struct { + + // The OCID of the compartment containing images to search + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Filter based on these defined tags. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + DefinedTagsFilter map[string]map[string]interface{} `mandatory:"false" json:"definedTagsFilter"` + + // The image's operating system. + // Example: `Oracle Linux` + OperatingSystem *string `mandatory:"false" json:"operatingSystem"` + + // The image's operating system version. + // Example: `7.2` + OperatingSystemVersion *string `mandatory:"false" json:"operatingSystemVersion"` +} + +func (m InstanceConfigurationInstanceSourceImageFilterDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationInstanceSourceImageFilterDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_via_image_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_via_image_details.go index 0f62c58b23..053cf6217c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_via_image_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_via_image_details.go @@ -44,6 +44,8 @@ type InstanceConfigurationInstanceSourceViaImageDetails struct { // * `30`-`120`: Represents the Ultra High Performance option. // For performance autotune enabled volumes, it would be the Default(Minimum) VPUs/GB. BootVolumeVpusPerGB *int64 `mandatory:"false" json:"bootVolumeVpusPerGB"` + + InstanceSourceImageFilterDetails *InstanceConfigurationInstanceSourceImageFilterDetails `mandatory:"false" json:"instanceSourceImageFilterDetails"` } func (m InstanceConfigurationInstanceSourceViaImageDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_icelake_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_icelake_bm_launch_instance_platform_config.go index 7c922ae4f8..07fcdd87c5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_icelake_bm_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_icelake_bm_launch_instance_platform_config.go @@ -57,26 +57,29 @@ type InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_skylake_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_skylake_bm_launch_instance_platform_config.go index d6cb22ca65..c6cd688883 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_skylake_bm_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_skylake_bm_launch_instance_platform_config.go @@ -37,24 +37,49 @@ type InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig struct { // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } @@ -68,6 +93,9 @@ func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) String( // Not recommended for calling this function directly func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) @@ -88,3 +116,45 @@ func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) Marshal return json.Marshal(&s) } + +// InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" +) + +var mappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS1": InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +var mappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps1": InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +// GetInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS1", + "NPS2", + } +} + +// GetMappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_vm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_vm_launch_instance_platform_config.go index 1790df1640..c05abc44ff 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_vm_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_vm_launch_instance_platform_config.go @@ -38,22 +38,22 @@ type InstanceConfigurationIntelVmLaunchInstancePlatformConfig struct { IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m InstanceConfigurationIntelVmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m InstanceConfigurationIntelVmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m InstanceConfigurationIntelVmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m InstanceConfigurationIntelVmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_ipv6_address_ipv6_subnet_cidr_pair_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_ipv6_address_ipv6_subnet_cidr_pair_details.go new file mode 100644 index 0000000000..32511997b8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_ipv6_address_ipv6_subnet_cidr_pair_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationIpv6AddressIpv6SubnetCidrPairDetails Optional. Used to specify from which subnet prefixes an IPv6 address should be allocated, or to assign valid available IPv6 addresses. +type InstanceConfigurationIpv6AddressIpv6SubnetCidrPairDetails struct { + + // Optional. Used to disambiguate which subnet prefix should be used to create an IPv6 allocation. + Ipv6SubnetCidr *string `mandatory:"false" json:"ipv6SubnetCidr"` + + // Optional. An available IPv6 address of your subnet from a valid IPv6 prefix on the subnet (otherwise the IP address is automatically assigned). + Ipv6Address *string `mandatory:"false" json:"ipv6Address"` +} + +func (m InstanceConfigurationIpv6AddressIpv6SubnetCidrPairDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationIpv6AddressIpv6SubnetCidrPairDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_iscsi_attach_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_iscsi_attach_volume_details.go index c895ab9eef..3a903d603a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_iscsi_attach_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_iscsi_attach_volume_details.go @@ -45,22 +45,22 @@ type InstanceConfigurationIscsiAttachVolumeDetails struct { UseChap *bool `mandatory:"false" json:"useChap"` } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m InstanceConfigurationIscsiAttachVolumeDetails) GetDisplayName() *string { return m.DisplayName } -//GetIsReadOnly returns IsReadOnly +// GetIsReadOnly returns IsReadOnly func (m InstanceConfigurationIscsiAttachVolumeDetails) GetIsReadOnly() *bool { return m.IsReadOnly } -//GetDevice returns Device +// GetDevice returns Device func (m InstanceConfigurationIscsiAttachVolumeDetails) GetDevice() *string { return m.Device } -//GetIsShareable returns IsShareable +// GetIsShareable returns IsShareable func (m InstanceConfigurationIscsiAttachVolumeDetails) GetIsShareable() *bool { return m.IsShareable } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_platform_config.go index 218bb10180..eeee014c2e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_platform_config.go @@ -97,6 +97,10 @@ func (m *instanceconfigurationlaunchinstanceplatformconfig) UnmarshalPolymorphic mm := InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig{} err = json.Unmarshal(data, &mm) return mm, err + case "GENERIC_BM": + mm := InstanceConfigurationGenericBmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err case "AMD_ROME_BM": mm := InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig{} err = json.Unmarshal(data, &mm) @@ -119,22 +123,22 @@ func (m *instanceconfigurationlaunchinstanceplatformconfig) UnmarshalPolymorphic } } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m instanceconfigurationlaunchinstanceplatformconfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m instanceconfigurationlaunchinstanceplatformconfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m instanceconfigurationlaunchinstanceplatformconfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m instanceconfigurationlaunchinstanceplatformconfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } @@ -164,6 +168,7 @@ const ( InstanceConfigurationLaunchInstancePlatformConfigTypeAmdMilanBmGpu InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "AMD_MILAN_BM_GPU" InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "AMD_ROME_BM" InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBmGpu InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "AMD_ROME_BM_GPU" + InstanceConfigurationLaunchInstancePlatformConfigTypeGenericBm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "GENERIC_BM" InstanceConfigurationLaunchInstancePlatformConfigTypeIntelIcelakeBm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "INTEL_ICELAKE_BM" InstanceConfigurationLaunchInstancePlatformConfigTypeIntelSkylakeBm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "INTEL_SKYLAKE_BM" InstanceConfigurationLaunchInstancePlatformConfigTypeAmdVm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "AMD_VM" @@ -175,6 +180,7 @@ var mappingInstanceConfigurationLaunchInstancePlatformConfigTypeEnum = map[strin "AMD_MILAN_BM_GPU": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdMilanBmGpu, "AMD_ROME_BM": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBm, "AMD_ROME_BM_GPU": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBmGpu, + "GENERIC_BM": InstanceConfigurationLaunchInstancePlatformConfigTypeGenericBm, "INTEL_ICELAKE_BM": InstanceConfigurationLaunchInstancePlatformConfigTypeIntelIcelakeBm, "INTEL_SKYLAKE_BM": InstanceConfigurationLaunchInstancePlatformConfigTypeIntelSkylakeBm, "AMD_VM": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdVm, @@ -186,6 +192,7 @@ var mappingInstanceConfigurationLaunchInstancePlatformConfigTypeEnumLowerCase = "amd_milan_bm_gpu": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdMilanBmGpu, "amd_rome_bm": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBm, "amd_rome_bm_gpu": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBmGpu, + "generic_bm": InstanceConfigurationLaunchInstancePlatformConfigTypeGenericBm, "intel_icelake_bm": InstanceConfigurationLaunchInstancePlatformConfigTypeIntelIcelakeBm, "intel_skylake_bm": InstanceConfigurationLaunchInstancePlatformConfigTypeIntelSkylakeBm, "amd_vm": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdVm, @@ -208,6 +215,7 @@ func GetInstanceConfigurationLaunchInstancePlatformConfigTypeEnumStringValues() "AMD_MILAN_BM_GPU", "AMD_ROME_BM", "AMD_ROME_BM_GPU", + "GENERIC_BM", "INTEL_ICELAKE_BM", "INTEL_SKYLAKE_BM", "AMD_VM", diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_shape_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_shape_config_details.go index b96eefbc86..2f742eb83c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_shape_config_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_shape_config_details.go @@ -33,6 +33,11 @@ type InstanceConfigurationLaunchInstanceShapeConfigDetails struct { // The total number of OCPUs available to the instance. Ocpus *float32 `mandatory:"false" json:"ocpus"` + // The total number of VCPUs available to the instance. This can be used instead of OCPUs, + // in which case the actual number of OCPUs will be calculated based on this value + // and the actual hardware. This must be a multiple of 2. + Vcpus *int `mandatory:"false" json:"vcpus"` + // The total amount of memory available to the instance, in gigabytes. MemoryInGBs *float32 `mandatory:"false" json:"memoryInGBs"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_paravirtualized_attach_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_paravirtualized_attach_volume_details.go index 331eb9dc97..699c4fee8d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_paravirtualized_attach_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_paravirtualized_attach_volume_details.go @@ -45,22 +45,22 @@ type InstanceConfigurationParavirtualizedAttachVolumeDetails struct { IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m InstanceConfigurationParavirtualizedAttachVolumeDetails) GetDisplayName() *string { return m.DisplayName } -//GetIsReadOnly returns IsReadOnly +// GetIsReadOnly returns IsReadOnly func (m InstanceConfigurationParavirtualizedAttachVolumeDetails) GetIsReadOnly() *bool { return m.IsReadOnly } -//GetDevice returns Device +// GetDevice returns Device func (m InstanceConfigurationParavirtualizedAttachVolumeDetails) GetDevice() *string { return m.Device } -//GetIsShareable returns IsShareable +// GetIsShareable returns IsShareable func (m InstanceConfigurationParavirtualizedAttachVolumeDetails) GetIsShareable() *bool { return m.IsShareable } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool.go index 4fea0a086a..a9271f29e0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool.go @@ -66,6 +66,14 @@ type InstancePool struct { // The load balancers attached to the instance pool. LoadBalancers []InstancePoolLoadBalancerAttachment `mandatory:"false" json:"loadBalancers"` + + // A user-friendly formatter for the instance pool's instances. Instance displaynames follow the format. + // The formatter does not retroactively change instance's displaynames, only instance displaynames in the future follow the format + InstanceDisplayNameFormatter *string `mandatory:"false" json:"instanceDisplayNameFormatter"` + + // A user-friendly formatter for the instance pool's instances. Instance hostnames follow the format. + // The formatter does not retroactively change instance's hostnames, only instance hostnames in the future follow the format + InstanceHostnameFormatter *string `mandatory:"false" json:"instanceHostnameFormatter"` } func (m InstancePool) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_configuration.go index 30cb32c2d5..2aeeac0df9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_configuration.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_configuration.go @@ -28,8 +28,9 @@ type InstancePoolPlacementConfiguration struct { // Example: `Uocm:PHX-AD-1` AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet to place instances. - PrimarySubnetId *string `mandatory:"true" json:"primarySubnetId"` + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. This field is deprecated. + // Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. + PrimarySubnetId *string `mandatory:"false" json:"primarySubnetId"` // The fault domains to place instances. // If you don't provide any values, the system makes a best effort to distribute @@ -43,6 +44,8 @@ type InstancePoolPlacementConfiguration struct { // Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` FaultDomains []string `mandatory:"false" json:"faultDomains"` + PrimaryVnicSubnets *InstancePoolPlacementPrimarySubnet `mandatory:"false" json:"primaryVnicSubnets"` + // The set of secondary VNIC data for instances in the pool. SecondaryVnicSubnets []InstancePoolPlacementSecondaryVnicSubnet `mandatory:"false" json:"secondaryVnicSubnets"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_ipv6_address_ipv6_subnet_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_ipv6_address_ipv6_subnet_cidr_details.go new file mode 100644 index 0000000000..9e17ba2b16 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_ipv6_address_ipv6_subnet_cidr_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails Optional. Used to specify from which subnet prefixes an IPv6 address should be allocated, or to assign valid available IPv6 addresses. +type InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails struct { + + // Optional. Used to disambiguate which subnet prefix should be used to create an IPv6 allocation. + Ipv6SubnetCidr *string `mandatory:"false" json:"ipv6SubnetCidr"` +} + +func (m InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_primary_subnet.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_primary_subnet.go new file mode 100644 index 0000000000..6f17bc43a6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_primary_subnet.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolPlacementPrimarySubnet Details about the IPv6 primary subnet. +type InstancePoolPlacementPrimarySubnet struct { + + // The subnet OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled + // subnet. Default: False. When provided you may optionally provide an IPv6 prefix + // (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` + // is not provided then an IPv6 prefix is chosen + // for you. + IsAssignIpv6Ip *bool `mandatory:"false" json:"isAssignIpv6Ip"` + + // A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. + // You can provide only the prefix ranges and OCI will select an available + // address from the range. You can optionally choose to leave the prefix range empty + // and instead provide the specific IPv6 address that should be used from within that range. + Ipv6AddressIpv6SubnetCidrPairDetails []InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails `mandatory:"false" json:"ipv6AddressIpv6SubnetCidrPairDetails"` +} + +func (m InstancePoolPlacementPrimarySubnet) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolPlacementPrimarySubnet) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_secondary_vnic_subnet.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_secondary_vnic_subnet.go index 1d7792d42d..83553fad3b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_secondary_vnic_subnet.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_secondary_vnic_subnet.go @@ -27,6 +27,19 @@ type InstancePoolPlacementSecondaryVnicSubnet struct { // The subnet OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. SubnetId *string `mandatory:"true" json:"subnetId"` + // Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled + // subnet. Default: False. When provided you may optionally provide an IPv6 prefix + // (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` + // is not provided then an IPv6 prefix is chosen + // for you. + IsAssignIpv6Ip *bool `mandatory:"false" json:"isAssignIpv6Ip"` + + // A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. + // You can provide only the prefix ranges and OCI will select an available + // address from the range. You can optionally choose to leave the prefix range empty + // and instead provide the specific IPv6 address that should be used from within that range. + Ipv6AddressIpv6SubnetCidrPairDetails []InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails `mandatory:"false" json:"ipv6AddressIpv6SubnetCidrPairDetails"` + // The display name of the VNIC. This is also used to match against the instance configuration defined // secondary VNIC. DisplayName *string `mandatory:"false" json:"displayName"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_subnet_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_subnet_details.go new file mode 100644 index 0000000000..324f8fbbc4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_subnet_details.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolPlacementSubnetDetails Base details about the IPv6 subnet. +type InstancePoolPlacementSubnetDetails struct { + + // The subnet OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled + // subnet. Default: False. When provided you may optionally provide an IPv6 prefix + // (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` + // is not provided then an IPv6 prefix is chosen + // for you. + IsAssignIpv6Ip *bool `mandatory:"false" json:"isAssignIpv6Ip"` + + // A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. + // You can provide only the prefix ranges and OCI will select an available + // address from the range. You can optionally choose to leave the prefix range empty + // and instead provide the specific IPv6 address that should be used from within that range. + Ipv6AddressIpv6SubnetCidrPairDetails []InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails `mandatory:"false" json:"ipv6AddressIpv6SubnetCidrPairDetails"` +} + +func (m InstancePoolPlacementSubnetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolPlacementSubnetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_shape_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_shape_config.go index 93fb0e6892..273b35809c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_shape_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_shape_config.go @@ -65,6 +65,11 @@ type InstanceShapeConfig struct { // A short description of the local disks available to this instance. // If the instance does not have any local disks, this field is `null`. LocalDiskDescription *string `mandatory:"false" json:"localDiskDescription"` + + // The total number of VCPUs available to the instance. This can be used instead of OCPUs, + // in which case the actual number of OCPUs will be calculated based on this value + // and the actual hardware. This must be a multiple of 2. + Vcpus *int `mandatory:"false" json:"vcpus"` } func (m InstanceShapeConfig) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_image_filter_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_image_filter_details.go new file mode 100644 index 0000000000..e46fda27b8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_image_filter_details.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceSourceImageFilterDetails These are the criteria for selecting an image. This is required if imageId is not specified. +type InstanceSourceImageFilterDetails struct { + + // The OCID of the compartment containing images to search + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Filter based on these defined tags. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + DefinedTagsFilter map[string]map[string]interface{} `mandatory:"false" json:"definedTagsFilter"` + + // The image's operating system. + // Example: `Oracle Linux` + OperatingSystem *string `mandatory:"false" json:"operatingSystem"` + + // The image's operating system version. + // Example: `7.2` + OperatingSystemVersion *string `mandatory:"false" json:"operatingSystemVersion"` +} + +func (m InstanceSourceImageFilterDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceSourceImageFilterDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_via_image_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_via_image_details.go index 19c373185a..cde9009ba3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_via_image_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_via_image_details.go @@ -25,12 +25,12 @@ import ( // InstanceSourceViaImageDetails The representation of InstanceSourceViaImageDetails type InstanceSourceViaImageDetails struct { - // The OCID of the image used to boot the instance. - ImageId *string `mandatory:"true" json:"imageId"` - // The size of the boot volume in GBs. Minimum value is 50 GB and maximum value is 32,768 GB (32 TB). BootVolumeSizeInGBs *int64 `mandatory:"false" json:"bootVolumeSizeInGBs"` + // The OCID of the image used to boot the instance. + ImageId *string `mandatory:"false" json:"imageId"` + // The OCID of the Vault service key to assign as the master encryption key for the boot volume. KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` @@ -43,6 +43,8 @@ type InstanceSourceViaImageDetails struct { // * `30`-`120`: Represents the Ultra High Performance option. // For volumes with the auto-tuned performance feature enabled, this is set to the default (minimum) VPUs/GB. BootVolumeVpusPerGB *int64 `mandatory:"false" json:"bootVolumeVpusPerGB"` + + InstanceSourceImageFilterDetails *InstanceSourceImageFilterDetails `mandatory:"false" json:"instanceSourceImageFilterDetails"` } func (m InstanceSourceViaImageDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_icelake_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_icelake_bm_launch_instance_platform_config.go index dc70a275a8..68afa5c5a4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_icelake_bm_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_icelake_bm_launch_instance_platform_config.go @@ -57,26 +57,29 @@ type IntelIcelakeBmLaunchInstancePlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m IntelIcelakeBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m IntelIcelakeBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m IntelIcelakeBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m IntelIcelakeBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_icelake_bm_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_icelake_bm_platform_config.go index 38a278545a..ff9aad1e22 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_icelake_bm_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_icelake_bm_platform_config.go @@ -57,26 +57,29 @@ type IntelIcelakeBmPlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket IntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m IntelIcelakeBmPlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m IntelIcelakeBmPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m IntelIcelakeBmPlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m IntelIcelakeBmPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_skylake_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_skylake_bm_launch_instance_platform_config.go index 9a651b94a9..3085ea516a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_skylake_bm_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_skylake_bm_launch_instance_platform_config.go @@ -37,24 +37,49 @@ type IntelSkylakeBmLaunchInstancePlatformConfig struct { // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m IntelSkylakeBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m IntelSkylakeBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m IntelSkylakeBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m IntelSkylakeBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } @@ -68,6 +93,9 @@ func (m IntelSkylakeBmLaunchInstancePlatformConfig) String() string { // Not recommended for calling this function directly func (m IntelSkylakeBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) @@ -88,3 +116,45 @@ func (m IntelSkylakeBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, return json.Marshal(&s) } + +// IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" +) + +var mappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS1": IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +var mappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps1": IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +// GetIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS1", + "NPS2", + } +} + +// GetMappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_skylake_bm_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_skylake_bm_platform_config.go index 2f066a349f..203a553da0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_skylake_bm_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_skylake_bm_platform_config.go @@ -37,24 +37,49 @@ type IntelSkylakeBmPlatformConfig struct { // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m IntelSkylakeBmPlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m IntelSkylakeBmPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m IntelSkylakeBmPlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m IntelSkylakeBmPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } @@ -68,6 +93,9 @@ func (m IntelSkylakeBmPlatformConfig) String() string { // Not recommended for calling this function directly func (m IntelSkylakeBmPlatformConfig) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) @@ -88,3 +116,45 @@ func (m IntelSkylakeBmPlatformConfig) MarshalJSON() (buff []byte, e error) { return json.Marshal(&s) } + +// IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum +const ( + IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps1 IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum = "NPS1" + IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps2 IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum = "NPS2" +) + +var mappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum = map[string]IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum{ + "NPS1": IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps1, + "NPS2": IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps2, +} + +var mappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum{ + "nps1": IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps1, + "nps2": IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps2, +} + +// GetIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum +func GetIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumValues() []IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum { + values := make([]IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum +func GetIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS1", + "NPS2", + } +} + +// GetMappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum(val string) (IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_launch_instance_platform_config.go index 88db02b9e5..bb67eaf7a9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_launch_instance_platform_config.go @@ -38,22 +38,22 @@ type IntelVmLaunchInstancePlatformConfig struct { IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m IntelVmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m IntelVmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m IntelVmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m IntelVmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_platform_config.go index 31e452065e..f80035c0e0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_platform_config.go @@ -38,22 +38,22 @@ type IntelVmPlatformConfig struct { IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m IntelVmPlatformConfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m IntelVmPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m IntelVmPlatformConfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m IntelVmPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection.go index 6e8022daf9..667c22add5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection.go @@ -100,6 +100,9 @@ type IpSecConnection struct { // The date and time the IPSec connection was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The transport type used for the IPSec connection. + TransportType IpSecConnectionTransportTypeEnum `mandatory:"false" json:"transportType,omitempty"` } func (m IpSecConnection) String() string { @@ -118,6 +121,9 @@ func (m IpSecConnection) ValidateEnumValue() (bool, error) { if _, ok := GetMappingIpSecConnectionCpeLocalIdentifierTypeEnum(string(m.CpeLocalIdentifierType)); !ok && m.CpeLocalIdentifierType != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CpeLocalIdentifierType: %s. Supported values are: %s.", m.CpeLocalIdentifierType, strings.Join(GetIpSecConnectionCpeLocalIdentifierTypeEnumStringValues(), ","))) } + if _, ok := GetMappingIpSecConnectionTransportTypeEnum(string(m.TransportType)); !ok && m.TransportType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TransportType: %s. Supported values are: %s.", m.TransportType, strings.Join(GetIpSecConnectionTransportTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -215,3 +221,45 @@ func GetMappingIpSecConnectionCpeLocalIdentifierTypeEnum(val string) (IpSecConne enum, ok := mappingIpSecConnectionCpeLocalIdentifierTypeEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// IpSecConnectionTransportTypeEnum Enum with underlying type: string +type IpSecConnectionTransportTypeEnum string + +// Set of constants representing the allowable values for IpSecConnectionTransportTypeEnum +const ( + IpSecConnectionTransportTypeInternet IpSecConnectionTransportTypeEnum = "INTERNET" + IpSecConnectionTransportTypeFastconnect IpSecConnectionTransportTypeEnum = "FASTCONNECT" +) + +var mappingIpSecConnectionTransportTypeEnum = map[string]IpSecConnectionTransportTypeEnum{ + "INTERNET": IpSecConnectionTransportTypeInternet, + "FASTCONNECT": IpSecConnectionTransportTypeFastconnect, +} + +var mappingIpSecConnectionTransportTypeEnumLowerCase = map[string]IpSecConnectionTransportTypeEnum{ + "internet": IpSecConnectionTransportTypeInternet, + "fastconnect": IpSecConnectionTransportTypeFastconnect, +} + +// GetIpSecConnectionTransportTypeEnumValues Enumerates the set of values for IpSecConnectionTransportTypeEnum +func GetIpSecConnectionTransportTypeEnumValues() []IpSecConnectionTransportTypeEnum { + values := make([]IpSecConnectionTransportTypeEnum, 0) + for _, v := range mappingIpSecConnectionTransportTypeEnum { + values = append(values, v) + } + return values +} + +// GetIpSecConnectionTransportTypeEnumStringValues Enumerates the set of values in String for IpSecConnectionTransportTypeEnum +func GetIpSecConnectionTransportTypeEnumStringValues() []string { + return []string{ + "INTERNET", + "FASTCONNECT", + } +} + +// GetMappingIpSecConnectionTransportTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpSecConnectionTransportTypeEnum(val string) (IpSecConnectionTransportTypeEnum, bool) { + enum, ok := mappingIpSecConnectionTransportTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_device_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_device_config.go index 16c99636d2..ca5759bac7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_device_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_device_config.go @@ -22,8 +22,8 @@ import ( ) // IpSecConnectionDeviceConfig Deprecated. For tunnel information, instead see: -// * IPSecConnectionTunnel -// * IPSecConnectionTunnelSharedSecret +// - IPSecConnectionTunnel +// - IPSecConnectionTunnelSharedSecret type IpSecConnectionDeviceConfig struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the IPSec connection. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_tunnel.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_tunnel.go index 644b056fd8..12c1784ce6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_tunnel.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_tunnel.go @@ -92,6 +92,9 @@ type IpSecConnectionTunnel struct { PhaseOneDetails *TunnelPhaseOneDetails `mandatory:"false" json:"phaseOneDetails"` PhaseTwoDetails *TunnelPhaseTwoDetails `mandatory:"false" json:"phaseTwoDetails"` + + // The list of virtual circuit OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)s over which your network can reach this tunnel. + AssociatedVirtualCircuits []string `mandatory:"false" json:"associatedVirtualCircuits"` } func (m IpSecConnectionTunnel) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ipsec_tunnel_drg_attachment_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipsec_tunnel_drg_attachment_network_details.go index abba23f021..6279c404d2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/ipsec_tunnel_drg_attachment_network_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipsec_tunnel_drg_attachment_network_details.go @@ -26,13 +26,16 @@ import ( type IpsecTunnelDrgAttachmentNetworkDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` // The IPSec connection that contains the attached IPSec tunnel. IpsecConnectionId *string `mandatory:"false" json:"ipsecConnectionId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual circuit's DRG attachment. + TransportAttachmentId *string `mandatory:"false" json:"transportAttachmentId"` } -//GetId returns Id +// GetId returns Id func (m IpsecTunnelDrgAttachmentNetworkDetails) GetId() *string { return m.Id } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6.go index f3a88d0cfd..3c090bd759 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6.go @@ -40,7 +40,7 @@ type Ipv6 struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPv6. Id *string `mandatory:"true" json:"id"` - // The IPv6 address of the `IPv6` object. The address is within the IPv6 CIDR block of the VNIC's subnet + // The IPv6 address of the `IPv6` object. The address is within the IPv6 prefix of the VNIC's subnet // (see the `ipv6CidrBlock` attribute for the Subnet object. // Example: `2001:0db8:0123:1111:abcd:ef01:2345:6789` IpAddress *string `mandatory:"true" json:"ipAddress"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6_address_ipv6_subnet_cidr_pair_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6_address_ipv6_subnet_cidr_pair_details.go new file mode 100644 index 0000000000..14564d6fc1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6_address_ipv6_subnet_cidr_pair_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Ipv6AddressIpv6SubnetCidrPairDetails Details to assign an IPv6 subnet prefix and IPv6 address on VNIC creation. +type Ipv6AddressIpv6SubnetCidrPairDetails struct { + + // The IPv6 prefix allocated to the subnet. + Ipv6SubnetCidr *string `mandatory:"false" json:"ipv6SubnetCidr"` + + // An IPv6 address of your choice. Must be an available IPv6 address within the subnet's prefix. + // If an IPv6 address is not provided: + // - Oracle will automatically assign an IPv6 address from the subnet's IPv6 prefix if and only if there is only one IPv6 prefix on the subnet. + // - Oracle will automatically assign an IPv6 address from the subnet's IPv6 Oracle GUA prefix if it exists on the subnet. + Ipv6Address *string `mandatory:"false" json:"ipv6Address"` +} + +func (m Ipv6AddressIpv6SubnetCidrPairDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Ipv6AddressIpv6SubnetCidrPairDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_details.go index 4ab62bb273..afc16e27a9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_details.go @@ -33,11 +33,6 @@ type LaunchInstanceDetails struct { // The OCID of the compartment. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The shape of an instance. The shape determines the number of CPUs, amount of memory, - // and other resources allocated to the instance. - // You can enumerate all available shapes by calling ListShapes. - Shape *string `mandatory:"true" json:"shape"` - // The OCID of the compute capacity reservation this instance is launched under. // You can opt out of all default reservations by specifying an empty string as input for this field. // For more information, see Capacity Reservations (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm#default). @@ -83,7 +78,8 @@ type LaunchInstanceDetails struct { // Example: `{"Department": "Finance"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) that the instance will be created in. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the + // compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) that the instance will be created in. ComputeClusterId *string `mandatory:"false" json:"computeClusterId"` // Deprecated. Instead use `hostnameLabel` in @@ -110,9 +106,9 @@ type LaunchInstanceDetails struct { // over iSCSI the same way as the default iPXE script, use the // following iSCSI IP address: 169.254.0.2, and boot volume IQN: // iqn.2015-02.oracle.boot. - // If your instance boot volume type is paravirtualized, + // If your instance boot volume attachment type is paravirtualized, // the boot volume is attached to the instance through virtio-scsi and no iPXE script is used. - // If your instance boot volume type is paravirtualized + // If your instance boot volume attachment type is paravirtualized // and you use custom iPXE to network boot into your instance, // the primary boot volume is attached as a data volume through virtio-scsi drive. // For more information about the Bring Your Own Image feature of @@ -168,6 +164,11 @@ type LaunchInstanceDetails struct { AgentConfig *LaunchInstanceAgentConfigDetails `mandatory:"false" json:"agentConfig"` + // The shape of an instance. The shape determines the number of CPUs, amount of memory, + // and other resources allocated to the instance. + // You can enumerate all available shapes by calling ListShapes. + Shape *string `mandatory:"false" json:"shape"` + ShapeConfig *LaunchInstanceShapeConfigDetails `mandatory:"false" json:"shapeConfig"` SourceDetails InstanceSourceDetails `mandatory:"false" json:"sourceDetails"` @@ -181,6 +182,9 @@ type LaunchInstanceDetails struct { IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` PlatformConfig LaunchInstancePlatformConfig `mandatory:"false" json:"platformConfig"` + + // The OCID of the Instance Configuration containing instance launch details. Any other fields supplied in this instance launch request will override the details stored in the Instance Configuration for this instance launch. + InstanceConfigurationId *string `mandatory:"false" json:"instanceConfigurationId"` } func (m LaunchInstanceDetails) String() string { @@ -220,14 +224,15 @@ func (m *LaunchInstanceDetails) UnmarshalJSON(data []byte) (e error) { PreemptibleInstanceConfig *PreemptibleInstanceConfigDetails `json:"preemptibleInstanceConfig"` Metadata map[string]string `json:"metadata"` AgentConfig *LaunchInstanceAgentConfigDetails `json:"agentConfig"` + Shape *string `json:"shape"` ShapeConfig *LaunchInstanceShapeConfigDetails `json:"shapeConfig"` SourceDetails instancesourcedetails `json:"sourceDetails"` SubnetId *string `json:"subnetId"` IsPvEncryptionInTransitEnabled *bool `json:"isPvEncryptionInTransitEnabled"` PlatformConfig launchinstanceplatformconfig `json:"platformConfig"` + InstanceConfigurationId *string `json:"instanceConfigurationId"` AvailabilityDomain *string `json:"availabilityDomain"` CompartmentId *string `json:"compartmentId"` - Shape *string `json:"shape"` }{} e = json.Unmarshal(data, &model) @@ -271,6 +276,8 @@ func (m *LaunchInstanceDetails) UnmarshalJSON(data []byte) (e error) { m.AgentConfig = model.AgentConfig + m.Shape = model.Shape + m.ShapeConfig = model.ShapeConfig nn, e = model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) @@ -297,11 +304,11 @@ func (m *LaunchInstanceDetails) UnmarshalJSON(data []byte) (e error) { m.PlatformConfig = nil } + m.InstanceConfigurationId = model.InstanceConfigurationId + m.AvailabilityDomain = model.AvailabilityDomain m.CompartmentId = model.CompartmentId - m.Shape = model.Shape - return } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_platform_config.go index 7f153ac86e..dac7676b44 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_platform_config.go @@ -113,6 +113,10 @@ func (m *launchinstanceplatformconfig) UnmarshalPolymorphicJSON(data []byte) (in mm := AmdMilanBmLaunchInstancePlatformConfig{} err = json.Unmarshal(data, &mm) return mm, err + case "GENERIC_BM": + mm := GenericBmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err case "AMD_MILAN_BM_GPU": mm := AmdMilanBmGpuLaunchInstancePlatformConfig{} err = json.Unmarshal(data, &mm) @@ -123,22 +127,22 @@ func (m *launchinstanceplatformconfig) UnmarshalPolymorphicJSON(data []byte) (in } } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m launchinstanceplatformconfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m launchinstanceplatformconfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m launchinstanceplatformconfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m launchinstanceplatformconfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } @@ -168,6 +172,7 @@ const ( LaunchInstancePlatformConfigTypeAmdMilanBmGpu LaunchInstancePlatformConfigTypeEnum = "AMD_MILAN_BM_GPU" LaunchInstancePlatformConfigTypeAmdRomeBm LaunchInstancePlatformConfigTypeEnum = "AMD_ROME_BM" LaunchInstancePlatformConfigTypeAmdRomeBmGpu LaunchInstancePlatformConfigTypeEnum = "AMD_ROME_BM_GPU" + LaunchInstancePlatformConfigTypeGenericBm LaunchInstancePlatformConfigTypeEnum = "GENERIC_BM" LaunchInstancePlatformConfigTypeIntelIcelakeBm LaunchInstancePlatformConfigTypeEnum = "INTEL_ICELAKE_BM" LaunchInstancePlatformConfigTypeIntelSkylakeBm LaunchInstancePlatformConfigTypeEnum = "INTEL_SKYLAKE_BM" LaunchInstancePlatformConfigTypeAmdVm LaunchInstancePlatformConfigTypeEnum = "AMD_VM" @@ -179,6 +184,7 @@ var mappingLaunchInstancePlatformConfigTypeEnum = map[string]LaunchInstancePlatf "AMD_MILAN_BM_GPU": LaunchInstancePlatformConfigTypeAmdMilanBmGpu, "AMD_ROME_BM": LaunchInstancePlatformConfigTypeAmdRomeBm, "AMD_ROME_BM_GPU": LaunchInstancePlatformConfigTypeAmdRomeBmGpu, + "GENERIC_BM": LaunchInstancePlatformConfigTypeGenericBm, "INTEL_ICELAKE_BM": LaunchInstancePlatformConfigTypeIntelIcelakeBm, "INTEL_SKYLAKE_BM": LaunchInstancePlatformConfigTypeIntelSkylakeBm, "AMD_VM": LaunchInstancePlatformConfigTypeAmdVm, @@ -190,6 +196,7 @@ var mappingLaunchInstancePlatformConfigTypeEnumLowerCase = map[string]LaunchInst "amd_milan_bm_gpu": LaunchInstancePlatformConfigTypeAmdMilanBmGpu, "amd_rome_bm": LaunchInstancePlatformConfigTypeAmdRomeBm, "amd_rome_bm_gpu": LaunchInstancePlatformConfigTypeAmdRomeBmGpu, + "generic_bm": LaunchInstancePlatformConfigTypeGenericBm, "intel_icelake_bm": LaunchInstancePlatformConfigTypeIntelIcelakeBm, "intel_skylake_bm": LaunchInstancePlatformConfigTypeIntelSkylakeBm, "amd_vm": LaunchInstancePlatformConfigTypeAmdVm, @@ -212,6 +219,7 @@ func GetLaunchInstancePlatformConfigTypeEnumStringValues() []string { "AMD_MILAN_BM_GPU", "AMD_ROME_BM", "AMD_ROME_BM_GPU", + "GENERIC_BM", "INTEL_ICELAKE_BM", "INTEL_SKYLAKE_BM", "AMD_VM", diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_shape_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_shape_config_details.go index 83c1c8d868..3e6dd16711 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_shape_config_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_shape_config_details.go @@ -32,6 +32,11 @@ type LaunchInstanceShapeConfigDetails struct { // The total number of OCPUs available to the instance. Ocpus *float32 `mandatory:"false" json:"ocpus"` + // The total number of VCPUs available to the instance. This can be used instead of OCPUs, + // in which case the actual number of OCPUs will be calculated based on this value + // and the actual hardware. This must be a multiple of 2. + Vcpus *int `mandatory:"false" json:"vcpus"` + // The total amount of memory available to the instance, in gigabytes. MemoryInGBs *float32 `mandatory:"false" json:"memoryInGBs"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instances_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instances_request_response.go index 012f887fe1..93622dcbc7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instances_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instances_request_response.go @@ -29,8 +29,8 @@ type ListInstancesRequest struct { CapacityReservationId *string `mandatory:"false" contributesTo:"query" name:"capacityReservationId"` // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. - // A compute cluster is a remote direct memory access (RDMA) network group. - // For more information, see Compute Clusters (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). + // A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory + // access (RDMA) network group. ComputeClusterId *string `mandatory:"false" contributesTo:"query" name:"computeClusterId"` // A filter to return only resources that match the given display name exactly. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuit_associated_tunnels_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuit_associated_tunnels_request_response.go new file mode 100644 index 0000000000..6653c3e7c2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuit_associated_tunnels_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVirtualCircuitAssociatedTunnelsRequest wrapper for the ListVirtualCircuitAssociatedTunnels operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVirtualCircuitAssociatedTunnels.go.html to see an example of how to use ListVirtualCircuitAssociatedTunnelsRequest. +type ListVirtualCircuitAssociatedTunnelsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual circuit. + VirtualCircuitId *string `mandatory:"true" contributesTo:"path" name:"virtualCircuitId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVirtualCircuitAssociatedTunnelsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVirtualCircuitAssociatedTunnelsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVirtualCircuitAssociatedTunnelsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVirtualCircuitAssociatedTunnelsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVirtualCircuitAssociatedTunnelsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVirtualCircuitAssociatedTunnelsResponse wrapper for the ListVirtualCircuitAssociatedTunnels operation +type ListVirtualCircuitAssociatedTunnelsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VirtualCircuitAssociatedTunnelDetails instances + Items []VirtualCircuitAssociatedTunnelDetails `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListVirtualCircuitAssociatedTunnelsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVirtualCircuitAssociatedTunnelsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/loop_back_drg_attachment_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/loop_back_drg_attachment_network_details.go new file mode 100644 index 0000000000..f42cebfe1e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/loop_back_drg_attachment_network_details.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LoopBackDrgAttachmentNetworkDetails Specifies the loopback attachment on the DRG. A loopback attachment can be used to terminate a virtual circuit that is carrying an IPSec tunnel, routing traffic directly to the IPSec tunnel attachment where the tunnel can terminate. +type LoopBackDrgAttachmentNetworkDetails struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. + Id *string `mandatory:"false" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the target IPSec tunnel attachment. + Ids []string `mandatory:"false" json:"ids"` +} + +// GetId returns Id +func (m LoopBackDrgAttachmentNetworkDetails) GetId() *string { + return m.Id +} + +func (m LoopBackDrgAttachmentNetworkDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LoopBackDrgAttachmentNetworkDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m LoopBackDrgAttachmentNetworkDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeLoopBackDrgAttachmentNetworkDetails LoopBackDrgAttachmentNetworkDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeLoopBackDrgAttachmentNetworkDetails + }{ + "LOOPBACK", + (MarshalTypeLoopBackDrgAttachmentNetworkDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_properties.go index 1469d1bae8..0f64214fd6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_properties.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_properties.go @@ -31,6 +31,9 @@ type MacsecProperties struct { // Type of encryption cipher suite to use for the MACsec connection. EncryptionCipher MacsecEncryptionCipherEnum `mandatory:"false" json:"encryptionCipher,omitempty"` + + // Indicates whether unencrypted traffic is allowed if MACsec Key Agreement protocol (MKA) fails. + IsUnprotectedTrafficAllowed *bool `mandatory:"false" json:"isUnprotectedTrafficAllowed"` } func (m MacsecProperties) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/network_security_group.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/network_security_group.go index 50182e72d5..cd91b8916f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/network_security_group.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/network_security_group.go @@ -25,9 +25,10 @@ import ( // Vnic in a VCN. Compare NSGs with SecurityList, // which provide virtual firewall rules to all the VNICs in a *subnet*. // A network security group consists of two items: -// * The set of Vnic that all have the same security rule needs (for +// - The set of Vnic that all have the same security rule needs (for // example, a group of Compute instances all running the same application) -// * A set of NSG SecurityRule that apply to the VNICs in the group +// - A set of NSG SecurityRule that apply to the VNICs in the group +// // After creating an NSG, you can add VNICs and security rules to it. For example, when you create // an instance, you can specify one or more NSGs to add the instance to (see // CreateVnicDetails). Or you can add an existing @@ -43,9 +44,10 @@ import ( // **Important:** Oracle Cloud Infrastructure Compute service images automatically include firewall rules (for example, // Linux iptables, Windows firewall). If there are issues with some type of access to an instance, // make sure all of the following are set correctly: -// * Any security rules in any NSGs the instance's VNIC belongs to -// * Any SecurityList associated with the instance's subnet -// * The instance's OS firewall rules +// - Any security rules in any NSGs the instance's VNIC belongs to +// - Any SecurityList associated with the instance's subnet +// - The instance's OS firewall rules +// // To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, // talk to an administrator. If you're an administrator who needs to write policies to give users access, see // Getting Started with Policies (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/networking_topology.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/networking_topology.go index 9247f678d3..66ec91fe66 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/networking_topology.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/networking_topology.go @@ -23,6 +23,8 @@ import ( ) // NetworkingTopology Defines the representation of a virtual network topology for a region. +// See Network Visualizer Documentation (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/network_visualizer.htm) for more information, including +// conventions and pictures of symbols. type NetworkingTopology struct { // Lists entities comprising the virtual network topology. @@ -31,21 +33,31 @@ type NetworkingTopology struct { // Lists relationships between entities in the virtual network topology. Relationships []TopologyEntityRelationship `mandatory:"true" json:"relationships"` + // Lists entities that are limited during ingestion. + // The values for the items in the list are the entity type names of the limitedEntities. + // Example: `vcn` + LimitedEntities []string `mandatory:"true" json:"limitedEntities"` + // Records when the virtual network topology was created, in RFC3339 (https://tools.ietf.org/html/rfc3339) format for date and time. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` } -//GetEntities returns Entities +// GetEntities returns Entities func (m NetworkingTopology) GetEntities() []interface{} { return m.Entities } -//GetRelationships returns Relationships +// GetRelationships returns Relationships func (m NetworkingTopology) GetRelationships() []TopologyEntityRelationship { return m.Relationships } -//GetTimeCreated returns TimeCreated +// GetLimitedEntities returns LimitedEntities +func (m NetworkingTopology) GetLimitedEntities() []string { + return m.LimitedEntities +} + +// GetTimeCreated returns TimeCreated func (m NetworkingTopology) GetTimeCreated() *common.SDKTime { return m.TimeCreated } @@ -83,9 +95,10 @@ func (m NetworkingTopology) MarshalJSON() (buff []byte, e error) { // UnmarshalJSON unmarshals from json func (m *NetworkingTopology) UnmarshalJSON(data []byte) (e error) { model := struct { - Entities []interface{} `json:"entities"` - Relationships []topologyentityrelationship `json:"relationships"` - TimeCreated *common.SDKTime `json:"timeCreated"` + Entities []interface{} `json:"entities"` + Relationships []topologyentityrelationship `json:"relationships"` + LimitedEntities []string `json:"limitedEntities"` + TimeCreated *common.SDKTime `json:"timeCreated"` }{} e = json.Unmarshal(data, &model) @@ -94,10 +107,7 @@ func (m *NetworkingTopology) UnmarshalJSON(data []byte) (e error) { } var nn interface{} m.Entities = make([]interface{}, len(model.Entities)) - for i, n := range model.Entities { - m.Entities[i] = n - } - + copy(m.Entities, model.Entities) m.Relationships = make([]TopologyEntityRelationship, len(model.Relationships)) for i, n := range model.Relationships { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -110,7 +120,8 @@ func (m *NetworkingTopology) UnmarshalJSON(data []byte) (e error) { m.Relationships[i] = nil } } - + m.LimitedEntities = make([]string, len(model.LimitedEntities)) + copy(m.LimitedEntities, model.LimitedEntities) m.TimeCreated = model.TimeCreated return diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/paravirtualized_volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/paravirtualized_volume_attachment.go index 5136083ef8..20ec86e078 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/paravirtualized_volume_attachment.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/paravirtualized_volume_attachment.go @@ -75,72 +75,72 @@ type ParavirtualizedVolumeAttachment struct { IscsiLoginState VolumeAttachmentIscsiLoginStateEnum `mandatory:"false" json:"iscsiLoginState,omitempty"` } -//GetAvailabilityDomain returns AvailabilityDomain +// GetAvailabilityDomain returns AvailabilityDomain func (m ParavirtualizedVolumeAttachment) GetAvailabilityDomain() *string { return m.AvailabilityDomain } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m ParavirtualizedVolumeAttachment) GetCompartmentId() *string { return m.CompartmentId } -//GetDevice returns Device +// GetDevice returns Device func (m ParavirtualizedVolumeAttachment) GetDevice() *string { return m.Device } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m ParavirtualizedVolumeAttachment) GetDisplayName() *string { return m.DisplayName } -//GetId returns Id +// GetId returns Id func (m ParavirtualizedVolumeAttachment) GetId() *string { return m.Id } -//GetInstanceId returns InstanceId +// GetInstanceId returns InstanceId func (m ParavirtualizedVolumeAttachment) GetInstanceId() *string { return m.InstanceId } -//GetIsReadOnly returns IsReadOnly +// GetIsReadOnly returns IsReadOnly func (m ParavirtualizedVolumeAttachment) GetIsReadOnly() *bool { return m.IsReadOnly } -//GetIsShareable returns IsShareable +// GetIsShareable returns IsShareable func (m ParavirtualizedVolumeAttachment) GetIsShareable() *bool { return m.IsShareable } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m ParavirtualizedVolumeAttachment) GetLifecycleState() VolumeAttachmentLifecycleStateEnum { return m.LifecycleState } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m ParavirtualizedVolumeAttachment) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetVolumeId returns VolumeId +// GetVolumeId returns VolumeId func (m ParavirtualizedVolumeAttachment) GetVolumeId() *string { return m.VolumeId } -//GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled +// GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled func (m ParavirtualizedVolumeAttachment) GetIsPvEncryptionInTransitEnabled() *bool { return m.IsPvEncryptionInTransitEnabled } -//GetIsMultipath returns IsMultipath +// GetIsMultipath returns IsMultipath func (m ParavirtualizedVolumeAttachment) GetIsMultipath() *bool { return m.IsMultipath } -//GetIscsiLoginState returns IscsiLoginState +// GetIscsiLoginState returns IscsiLoginState func (m ParavirtualizedVolumeAttachment) GetIscsiLoginState() VolumeAttachmentIscsiLoginStateEnum { return m.IscsiLoginState } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/platform_config.go index ab71b961d2..5081a5093f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/platform_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/platform_config.go @@ -104,6 +104,10 @@ func (m *platformconfig) UnmarshalPolymorphicJSON(data []byte) (interface{}, err mm := IntelVmPlatformConfig{} err = json.Unmarshal(data, &mm) return mm, err + case "GENERIC_BM": + mm := GenericBmPlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err case "AMD_MILAN_BM_GPU": mm := AmdMilanBmGpuPlatformConfig{} err = json.Unmarshal(data, &mm) @@ -114,22 +118,22 @@ func (m *platformconfig) UnmarshalPolymorphicJSON(data []byte) (interface{}, err } } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m platformconfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m platformconfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m platformconfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m platformconfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } @@ -159,6 +163,7 @@ const ( PlatformConfigTypeAmdMilanBmGpu PlatformConfigTypeEnum = "AMD_MILAN_BM_GPU" PlatformConfigTypeAmdRomeBm PlatformConfigTypeEnum = "AMD_ROME_BM" PlatformConfigTypeAmdRomeBmGpu PlatformConfigTypeEnum = "AMD_ROME_BM_GPU" + PlatformConfigTypeGenericBm PlatformConfigTypeEnum = "GENERIC_BM" PlatformConfigTypeIntelIcelakeBm PlatformConfigTypeEnum = "INTEL_ICELAKE_BM" PlatformConfigTypeIntelSkylakeBm PlatformConfigTypeEnum = "INTEL_SKYLAKE_BM" PlatformConfigTypeAmdVm PlatformConfigTypeEnum = "AMD_VM" @@ -170,6 +175,7 @@ var mappingPlatformConfigTypeEnum = map[string]PlatformConfigTypeEnum{ "AMD_MILAN_BM_GPU": PlatformConfigTypeAmdMilanBmGpu, "AMD_ROME_BM": PlatformConfigTypeAmdRomeBm, "AMD_ROME_BM_GPU": PlatformConfigTypeAmdRomeBmGpu, + "GENERIC_BM": PlatformConfigTypeGenericBm, "INTEL_ICELAKE_BM": PlatformConfigTypeIntelIcelakeBm, "INTEL_SKYLAKE_BM": PlatformConfigTypeIntelSkylakeBm, "AMD_VM": PlatformConfigTypeAmdVm, @@ -181,6 +187,7 @@ var mappingPlatformConfigTypeEnumLowerCase = map[string]PlatformConfigTypeEnum{ "amd_milan_bm_gpu": PlatformConfigTypeAmdMilanBmGpu, "amd_rome_bm": PlatformConfigTypeAmdRomeBm, "amd_rome_bm_gpu": PlatformConfigTypeAmdRomeBmGpu, + "generic_bm": PlatformConfigTypeGenericBm, "intel_icelake_bm": PlatformConfigTypeIntelIcelakeBm, "intel_skylake_bm": PlatformConfigTypeIntelSkylakeBm, "amd_vm": PlatformConfigTypeAmdVm, @@ -203,6 +210,7 @@ func GetPlatformConfigTypeEnumStringValues() []string { "AMD_MILAN_BM_GPU", "AMD_ROME_BM", "AMD_ROME_BM_GPU", + "GENERIC_BM", "INTEL_ICELAKE_BM", "INTEL_SKYLAKE_BM", "AMD_VM", diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remote_peering_connection_drg_attachment_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remote_peering_connection_drg_attachment_network_details.go index 6cc8745510..edf8a4b030 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/remote_peering_connection_drg_attachment_network_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remote_peering_connection_drg_attachment_network_details.go @@ -26,10 +26,10 @@ import ( type RemotePeeringConnectionDrgAttachmentNetworkDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` } -//GetId returns Id +// GetId returns Id func (m RemotePeeringConnectionDrgAttachmentNetworkDetails) GetId() *string { return m.Id } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv6_subnet_cidr_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv6_subnet_cidr_request_response.go index 07d1ecb6fa..8f96012df9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv6_subnet_cidr_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv6_subnet_cidr_request_response.go @@ -21,7 +21,7 @@ type RemoveIpv6SubnetCidrRequest struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` - // Details object for removing an IPv6 SUBNET CIDR. + // Details object for removing an IPv6 SUBNET prefix. RemoveSubnetIpv6CidrDetails `contributesTo:"body"` // A token that uniquely identifies a request so it can be retried in case of a timeout or diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv6_vcn_cidr_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv6_vcn_cidr_request_response.go index d7a2d2795f..41d7d3009a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv6_vcn_cidr_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv6_vcn_cidr_request_response.go @@ -37,7 +37,7 @@ type RemoveIpv6VcnCidrRequest struct { // will be updated or deleted only if the etag you provide matches the resource's current etag value. IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - // Details object for removing a VCN ipv6 CIDR. + // Details object for removing a VCN IPv6 prefix. RemoveVcnIpv6CidrDetails `contributesTo:"body"` // Metadata about the request. This information will not be transmitted to the service, but diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_subnet_ipv6_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_subnet_ipv6_cidr_details.go index 0a7c52928d..a8d0ef6c0b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_subnet_ipv6_cidr_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_subnet_ipv6_cidr_details.go @@ -21,10 +21,10 @@ import ( "strings" ) -// RemoveSubnetIpv6CidrDetails Details object for removing an IPv6 CIDR Block from a Subnet. +// RemoveSubnetIpv6CidrDetails Details object for removing an IPv6 prefix from a subnet. type RemoveSubnetIpv6CidrDetails struct { - // This field is not required and should only be specified when removing an IPv6 CIDR + // This field is not required and should only be specified when removing an IPv6 prefix // from a subnet's IPv6 address space. // SeeIPv6 Addresses (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). // Example: `2001:0db8:0123::/64` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/route_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/route_rule.go index b8c3788f2f..24d391c489 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/route_rule.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/route_rule.go @@ -34,15 +34,15 @@ type RouteRule struct { // `cidrBlock` and `destination` will be rejected. // A destination IP address range in CIDR notation. Matching packets will // be routed to the indicated network entity (the target). - // Cannot be an IPv6 CIDR. + // Cannot be an IPv6 prefix. // Example: `0.0.0.0/0` CidrBlock *string `mandatory:"false" json:"cidrBlock"` // Conceptually, this is the range of IP addresses used for matching when routing // traffic. Required if you provide a `destinationType`. // Allowed values: - // * IP address range in CIDR notation. Can be an IPv4 or IPv6 CIDR. For example: `192.168.1.0/24` - // or `2001:0db8:0123:45::/56`. If you set this to an IPv6 CIDR, the route rule's target + // * IP address range in CIDR notation. Can be an IPv4 CIDR block or IPv6 prefix. For example: `192.168.1.0/24` + // or `2001:0db8:0123:45::/56`. If you set this to an IPv6 prefix, the route rule's target // can only be a DRG or internet gateway. // IPv6 addressing is supported for all commercial and government regions. // See IPv6 Addresses (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_platform_config_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_platform_config_options.go index 1f9bc035cc..0016fbb3c0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_platform_config_options.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_platform_config_options.go @@ -76,6 +76,7 @@ const ( ShapePlatformConfigOptionsTypeAmdMilanBmGpu ShapePlatformConfigOptionsTypeEnum = "AMD_MILAN_BM_GPU" ShapePlatformConfigOptionsTypeAmdRomeBm ShapePlatformConfigOptionsTypeEnum = "AMD_ROME_BM" ShapePlatformConfigOptionsTypeAmdRomeBmGpu ShapePlatformConfigOptionsTypeEnum = "AMD_ROME_BM_GPU" + ShapePlatformConfigOptionsTypeGenericBm ShapePlatformConfigOptionsTypeEnum = "GENERIC_BM" ShapePlatformConfigOptionsTypeIntelIcelakeBm ShapePlatformConfigOptionsTypeEnum = "INTEL_ICELAKE_BM" ShapePlatformConfigOptionsTypeIntelSkylakeBm ShapePlatformConfigOptionsTypeEnum = "INTEL_SKYLAKE_BM" ShapePlatformConfigOptionsTypeAmdVm ShapePlatformConfigOptionsTypeEnum = "AMD_VM" @@ -87,6 +88,7 @@ var mappingShapePlatformConfigOptionsTypeEnum = map[string]ShapePlatformConfigOp "AMD_MILAN_BM_GPU": ShapePlatformConfigOptionsTypeAmdMilanBmGpu, "AMD_ROME_BM": ShapePlatformConfigOptionsTypeAmdRomeBm, "AMD_ROME_BM_GPU": ShapePlatformConfigOptionsTypeAmdRomeBmGpu, + "GENERIC_BM": ShapePlatformConfigOptionsTypeGenericBm, "INTEL_ICELAKE_BM": ShapePlatformConfigOptionsTypeIntelIcelakeBm, "INTEL_SKYLAKE_BM": ShapePlatformConfigOptionsTypeIntelSkylakeBm, "AMD_VM": ShapePlatformConfigOptionsTypeAmdVm, @@ -98,6 +100,7 @@ var mappingShapePlatformConfigOptionsTypeEnumLowerCase = map[string]ShapePlatfor "amd_milan_bm_gpu": ShapePlatformConfigOptionsTypeAmdMilanBmGpu, "amd_rome_bm": ShapePlatformConfigOptionsTypeAmdRomeBm, "amd_rome_bm_gpu": ShapePlatformConfigOptionsTypeAmdRomeBmGpu, + "generic_bm": ShapePlatformConfigOptionsTypeGenericBm, "intel_icelake_bm": ShapePlatformConfigOptionsTypeIntelIcelakeBm, "intel_skylake_bm": ShapePlatformConfigOptionsTypeIntelSkylakeBm, "amd_vm": ShapePlatformConfigOptionsTypeAmdVm, @@ -120,6 +123,7 @@ func GetShapePlatformConfigOptionsTypeEnumStringValues() []string { "AMD_MILAN_BM_GPU", "AMD_ROME_BM", "AMD_ROME_BM_GPU", + "GENERIC_BM", "INTEL_ICELAKE_BM", "INTEL_SKYLAKE_BM", "AMD_VM", diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/subnet.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/subnet.go index 21052ae6f4..89d5d11a04 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/subnet.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/subnet.go @@ -92,12 +92,12 @@ type Subnet struct { // Example: `{"Department": "Finance"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - // For an IPv6-enabled subnet, this is the IPv6 CIDR block for the subnet's IP address space. + // For an IPv6-enabled subnet, this is the IPv6 prefix for the subnet's IP address space. // The subnet size is always /64. See IPv6 Addresses (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). // Example: `2001:0db8:0123:1111::/64` Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` - // The list of all IPv6 CIDR blocks (Oracle allocated IPv6 GUA, ULA or private IPv6 CIDR blocks, BYOIPv6 CIDR blocks) for the subnet. + // The list of all IPv6 prefixes (Oracle allocated IPv6 GUA, ULA or private IPv6 prefixes, BYOIPv6 prefixes) for the subnet. Ipv6CidrBlocks []string `mandatory:"false" json:"ipv6CidrBlocks"` // For an IPv6-enabled subnet, this is the IPv6 address of the virtual router. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/subnet_topology.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/subnet_topology.go index e91ef7f32e..4524681a66 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/subnet_topology.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/subnet_topology.go @@ -23,6 +23,8 @@ import ( ) // SubnetTopology Defines the visualization of a subnet in a VCN. +// See Network Visualizer Documentation (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/network_visualizer.htm) for more information, including +// conventions and pictures of symbols. type SubnetTopology struct { // Lists entities comprising the virtual network topology. @@ -31,6 +33,11 @@ type SubnetTopology struct { // Lists relationships between entities in the virtual network topology. Relationships []TopologyEntityRelationship `mandatory:"true" json:"relationships"` + // Lists entities that are limited during ingestion. + // The values for the items in the list are the entity type names of the limitedEntities. + // Example: `vcn` + LimitedEntities []string `mandatory:"true" json:"limitedEntities"` + // Records when the virtual network topology was created, in RFC3339 (https://tools.ietf.org/html/rfc3339) format for date and time. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` @@ -38,17 +45,22 @@ type SubnetTopology struct { SubnetId *string `mandatory:"false" json:"subnetId"` } -//GetEntities returns Entities +// GetEntities returns Entities func (m SubnetTopology) GetEntities() []interface{} { return m.Entities } -//GetRelationships returns Relationships +// GetRelationships returns Relationships func (m SubnetTopology) GetRelationships() []TopologyEntityRelationship { return m.Relationships } -//GetTimeCreated returns TimeCreated +// GetLimitedEntities returns LimitedEntities +func (m SubnetTopology) GetLimitedEntities() []string { + return m.LimitedEntities +} + +// GetTimeCreated returns TimeCreated func (m SubnetTopology) GetTimeCreated() *common.SDKTime { return m.TimeCreated } @@ -86,10 +98,11 @@ func (m SubnetTopology) MarshalJSON() (buff []byte, e error) { // UnmarshalJSON unmarshals from json func (m *SubnetTopology) UnmarshalJSON(data []byte) (e error) { model := struct { - SubnetId *string `json:"subnetId"` - Entities []interface{} `json:"entities"` - Relationships []topologyentityrelationship `json:"relationships"` - TimeCreated *common.SDKTime `json:"timeCreated"` + SubnetId *string `json:"subnetId"` + Entities []interface{} `json:"entities"` + Relationships []topologyentityrelationship `json:"relationships"` + LimitedEntities []string `json:"limitedEntities"` + TimeCreated *common.SDKTime `json:"timeCreated"` }{} e = json.Unmarshal(data, &model) @@ -100,10 +113,7 @@ func (m *SubnetTopology) UnmarshalJSON(data []byte) (e error) { m.SubnetId = model.SubnetId m.Entities = make([]interface{}, len(model.Entities)) - for i, n := range model.Entities { - m.Entities[i] = n - } - + copy(m.Entities, model.Entities) m.Relationships = make([]TopologyEntityRelationship, len(model.Relationships)) for i, n := range model.Relationships { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -116,7 +126,8 @@ func (m *SubnetTopology) UnmarshalJSON(data []byte) (e error) { m.Relationships[i] = nil } } - + m.LimitedEntities = make([]string, len(model.LimitedEntities)) + copy(m.LimitedEntities, model.LimitedEntities) m.TimeCreated = model.TimeCreated return diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology.go index 1b9601aaba..fcb44993cb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology.go @@ -31,16 +31,22 @@ type Topology interface { // Lists relationships between entities in the virtual network topology. GetRelationships() []TopologyEntityRelationship + // Lists entities that are limited during ingestion. + // The values for the items in the list are the entity type names of the limitedEntities. + // Example: `vcn` + GetLimitedEntities() []string + // Records when the virtual network topology was created, in RFC3339 (https://tools.ietf.org/html/rfc3339) format for date and time. GetTimeCreated() *common.SDKTime } type topology struct { - JsonData []byte - Entities []interface{} `mandatory:"true" json:"entities"` - Relationships json.RawMessage `mandatory:"true" json:"relationships"` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - Type string `json:"type"` + JsonData []byte + Entities []interface{} `mandatory:"true" json:"entities"` + Relationships json.RawMessage `mandatory:"true" json:"relationships"` + LimitedEntities []string `mandatory:"true" json:"limitedEntities"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + Type string `json:"type"` } // UnmarshalJSON unmarshals json @@ -56,6 +62,7 @@ func (m *topology) UnmarshalJSON(data []byte) error { } m.Entities = s.Model.Entities m.Relationships = s.Model.Relationships + m.LimitedEntities = s.Model.LimitedEntities m.TimeCreated = s.Model.TimeCreated m.Type = s.Model.Type @@ -89,17 +96,22 @@ func (m *topology) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetEntities returns Entities +// GetEntities returns Entities func (m topology) GetEntities() []interface{} { return m.Entities } -//GetRelationships returns Relationships +// GetRelationships returns Relationships func (m topology) GetRelationships() json.RawMessage { return m.Relationships } -//GetTimeCreated returns TimeCreated +// GetLimitedEntities returns LimitedEntities +func (m topology) GetLimitedEntities() []string { + return m.LimitedEntities +} + +// GetTimeCreated returns TimeCreated func (m topology) GetTimeCreated() *common.SDKTime { return m.TimeCreated } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_associated_with_entity_relationship.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_associated_with_entity_relationship.go index c7feaa0a87..d7dad14f3d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_associated_with_entity_relationship.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_associated_with_entity_relationship.go @@ -37,12 +37,12 @@ type TopologyAssociatedWithEntityRelationship struct { AssociatedWithDetails *TopologyAssociatedWithRelationshipDetails `mandatory:"false" json:"associatedWithDetails"` } -//GetId1 returns Id1 +// GetId1 returns Id1 func (m TopologyAssociatedWithEntityRelationship) GetId1() *string { return m.Id1 } -//GetId2 returns Id2 +// GetId2 returns Id2 func (m TopologyAssociatedWithEntityRelationship) GetId2() *string { return m.Id2 } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_contains_entity_relationship.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_contains_entity_relationship.go index c531e35021..22de1c1c49 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_contains_entity_relationship.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_contains_entity_relationship.go @@ -35,12 +35,12 @@ type TopologyContainsEntityRelationship struct { Id2 *string `mandatory:"true" json:"id2"` } -//GetId1 returns Id1 +// GetId1 returns Id1 func (m TopologyContainsEntityRelationship) GetId1() *string { return m.Id1 } -//GetId2 returns Id2 +// GetId2 returns Id2 func (m TopologyContainsEntityRelationship) GetId2() *string { return m.Id2 } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_entity_relationship.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_entity_relationship.go index f216da3856..e5611ad183 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_entity_relationship.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_entity_relationship.go @@ -84,12 +84,12 @@ func (m *topologyentityrelationship) UnmarshalPolymorphicJSON(data []byte) (inte } } -//GetId1 returns Id1 +// GetId1 returns Id1 func (m topologyentityrelationship) GetId1() *string { return m.Id1 } -//GetId2 returns Id2 +// GetId2 returns Id2 func (m topologyentityrelationship) GetId2() *string { return m.Id2 } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_routes_to_entity_relationship.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_routes_to_entity_relationship.go index 6f2512e711..67c0d148ed 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_routes_to_entity_relationship.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_routes_to_entity_relationship.go @@ -36,12 +36,12 @@ type TopologyRoutesToEntityRelationship struct { RouteRuleDetails *TopologyRoutesToRelationshipDetails `mandatory:"true" json:"routeRuleDetails"` } -//GetId1 returns Id1 +// GetId1 returns Id1 func (m TopologyRoutesToEntityRelationship) GetId1() *string { return m.Id1 } -//GetId2 returns Id2 +// GetId2 returns Id2 func (m TopologyRoutesToEntityRelationship) GetId2() *string { return m.Id2 } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_config.go index a417eb1d70..fc69f2355c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_config.go @@ -22,8 +22,8 @@ import ( ) // TunnelConfig Deprecated. For tunnel information, instead see: -// * IPSecConnectionTunnel -// * IPSecConnectionTunnelSharedSecret +// - IPSecConnectionTunnel +// - IPSecConnectionTunnelSharedSecret type TunnelConfig struct { // The IP address of Oracle's VPN headend. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_cpe_device_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_cpe_device_config.go index 1a83014b11..426c3f5170 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_cpe_device_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_cpe_device_config.go @@ -26,10 +26,10 @@ import ( // The answers correlate to the questions that are specific to the CPE device type (see the // `parameters` attribute of CpeDeviceShapeDetail). // See these related operations: -// * GetTunnelCpeDeviceConfig -// * GetTunnelCpeDeviceConfigContent -// * GetIpsecCpeDeviceConfigContent -// * GetCpeDeviceConfigContent +// - GetTunnelCpeDeviceConfig +// - GetTunnelCpeDeviceConfigContent +// - GetIpsecCpeDeviceConfigContent +// - GetCpeDeviceConfigContent type TunnelCpeDeviceConfig struct { TunnelCpeDeviceConfigParameter []CpeDeviceConfigAnswer `mandatory:"false" json:"tunnelCpeDeviceConfigParameter"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_backup_details.go index 39e4ce80be..0b0d5202f4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_backup_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_backup_details.go @@ -37,6 +37,12 @@ type UpdateBootVolumeBackupDetails struct { // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). // Example: `{"Department": "Finance"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID of the Vault service key which is the master encryption key for the volume backup. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` } func (m UpdateBootVolumeBackupDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_details.go index 71e9211fcf..4d802fe9fb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_details.go @@ -111,10 +111,7 @@ func (m *UpdateBootVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.IsAutoTuneEnabled = model.IsAutoTuneEnabled m.BootVolumeReplicas = make([]BootVolumeReplicaDetails, len(model.BootVolumeReplicas)) - for i, n := range model.BootVolumeReplicas { - m.BootVolumeReplicas[i] = n - } - + copy(m.BootVolumeReplicas, model.BootVolumeReplicas) m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) for i, n := range model.AutotunePolicies { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -127,6 +124,5 @@ func (m *UpdateBootVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.AutotunePolicies[i] = nil } } - return } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_capture_filter_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_capture_filter_details.go index 8a865626d7..d197f076ab 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_capture_filter_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_capture_filter_details.go @@ -21,7 +21,7 @@ import ( "strings" ) -// UpdateCaptureFilterDetails These details can be included in a request to update a capture filter. A capture filter contains a set of rules governing what traffic a VTAP mirrors. +// UpdateCaptureFilterDetails These details can be included in a request to update a capture filter. A capture filter contains a set of rules governing what traffic a VTAP mirrors or a VCN flow log collects. type UpdateCaptureFilterDetails struct { // Defined tags for this resource. Each key is predefined and scoped to a diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cluster_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cluster_network_details.go index 24a16ba02b..7b4d56a416 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cluster_network_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cluster_network_details.go @@ -21,7 +21,7 @@ import ( "strings" ) -// UpdateClusterNetworkDetails The data to update a cluster network. +// UpdateClusterNetworkDetails The data to update a cluster network with instance pools (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). type UpdateClusterNetworkDetails struct { // Defined tags for this resource. Each key is predefined and scoped to a diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_cluster_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_cluster_details.go index 8ca5f1cc1c..d2905514ff 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_cluster_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_cluster_details.go @@ -21,7 +21,8 @@ import ( "strings" ) -// UpdateComputeClusterDetails The data to update a compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm), which is a remote direct memory access (RDMA) network group. +// UpdateComputeClusterDetails The data to update a compute cluster. A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) +// is a remote direct memory access (RDMA) network group. type UpdateComputeClusterDetails struct { // A user-friendly name. Does not have to be unique, and it's changeable. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_cluster_request_response.go index 4d5a2d5cf4..87b46041ab 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_cluster_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_cluster_request_response.go @@ -19,8 +19,8 @@ import ( type UpdateComputeClusterRequest struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. - // A compute cluster is a remote direct memory access (RDMA) network group. - // For more information, see Compute Clusters (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). + // A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory + // access (RDMA) network group. ComputeClusterId *string `mandatory:"true" contributesTo:"path" name:"computeClusterId"` // Details for updating the compute cluster. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dhcp_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dhcp_details.go index 99358111fb..4b59271862 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dhcp_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dhcp_details.go @@ -97,7 +97,6 @@ func (m *UpdateDhcpDetails) UnmarshalJSON(data []byte) (e error) { m.Options[i] = nil } } - m.DomainNameType = model.DomainNameType return diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_statement_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_statement_details.go index edec535c5f..feffb2f3be 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_statement_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_statement_details.go @@ -76,7 +76,6 @@ func (m *UpdateDrgRouteDistributionStatementDetails) UnmarshalJSON(data []byte) m.MatchCriteria[i] = nil } } - m.Priority = model.Priority m.Id = model.Id diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_rule_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_rule_details.go index be403f680c..917fb27ad4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_rule_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_rule_details.go @@ -29,7 +29,7 @@ type UpdateDrgRouteRuleDetails struct { // The range of IP addresses used for matching when routing traffic. // Potential values: - // * IP address range in CIDR notation. Can be an IPv4 or IPv6 CIDR. For example: `192.168.1.0/24` + // * IP address range in CIDR notation. Can be an IPv4 CIDR block or IPv6 prefix. For example: `192.168.1.0/24` // or `2001:0db8:0123:45::/56`. Destination *string `mandatory:"false" json:"destination"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_details.go index e693420517..11188f5172 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_details.go @@ -54,6 +54,14 @@ type UpdateInstancePoolDetails struct { // use the CreateComputeCapacityReport // operation. Size *int `mandatory:"false" json:"size"` + + // A user-friendly formatter for the instance pool's instances. Instance displaynames follow the format. + // The formatter does not retroactively change instance's displaynames, only instance displaynames in the future follow the format + InstanceDisplayNameFormatter *string `mandatory:"false" json:"instanceDisplayNameFormatter"` + + // A user-friendly formatter for the instance pool's instances. Instance hostnames follow the format. + // The formatter does not retroactively change instance's hostnames, only instance hostnames in the future follow the format + InstanceHostnameFormatter *string `mandatory:"false" json:"instanceHostnameFormatter"` } func (m UpdateInstancePoolDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_placement_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_placement_configuration_details.go index 387118e028..99d7da6cac 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_placement_configuration_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_placement_configuration_details.go @@ -28,10 +28,6 @@ type UpdateInstancePoolPlacementConfigurationDetails struct { // Example: `Uocm:PHX-AD-1` AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet to place - // instances. - PrimarySubnetId *string `mandatory:"true" json:"primarySubnetId"` - // The fault domains to place instances. // If you don't provide any values, the system makes a best effort to distribute // instances across all fault domains based on capacity. @@ -44,7 +40,13 @@ type UpdateInstancePoolPlacementConfigurationDetails struct { // Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` FaultDomains []string `mandatory:"false" json:"faultDomains"` - // The set of subnet OCIDs for secondary VNICs for instances in the pool. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. This field is deprecated. + // Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. + PrimarySubnetId *string `mandatory:"false" json:"primarySubnetId"` + + PrimaryVnicSubnets *InstancePoolPlacementPrimarySubnet `mandatory:"false" json:"primaryVnicSubnets"` + + // The set of secondary VNIC data for instances in the pool. SecondaryVnicSubnets []InstancePoolPlacementSecondaryVnicSubnet `mandatory:"false" json:"secondaryVnicSubnets"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_shape_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_shape_config_details.go index 49f6a97ad2..2e31fcb303 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_shape_config_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_shape_config_details.go @@ -33,6 +33,11 @@ type UpdateInstanceShapeConfigDetails struct { // The total number of OCPUs available to the instance. Ocpus *float32 `mandatory:"false" json:"ocpus"` + // The total number of VCPUs available to the instance. This can be used instead of OCPUs, + // in which case the actual number of OCPUs will be calculated based on this value + // and the actual hardware. This must be a multiple of 2. + Vcpus *int `mandatory:"false" json:"vcpus"` + // The total amount of memory available to the instance, in gigabytes. MemoryInGBs *float32 `mandatory:"false" json:"memoryInGBs"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_macsec_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_macsec_properties.go index 69300026e3..d3183fe381 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_macsec_properties.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_macsec_properties.go @@ -31,6 +31,9 @@ type UpdateMacsecProperties struct { // Type of encryption cipher suite to use for the MACsec connection. EncryptionCipher MacsecEncryptionCipherEnum `mandatory:"false" json:"encryptionCipher,omitempty"` + + // Indicates whether unencrypted traffic is allowed if MACsec Key Agreement protocol (MKA) fails. + IsUnprotectedTrafficAllowed *bool `mandatory:"false" json:"isUnprotectedTrafficAllowed"` } func (m UpdateMacsecProperties) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_subnet_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_subnet_details.go index ea69580cda..f3f94b72d3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_subnet_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_subnet_details.go @@ -60,19 +60,19 @@ type UpdateSubnetDetails struct { // Example: `172.16.0.0/16` CidrBlock *string `mandatory:"false" json:"cidrBlock"` - // This is the IPv6 CIDR block for the subnet's IP address space. + // This is the IPv6 prefix for the subnet's IP address space. // The subnet size is always /64. // See IPv6 Addresses (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). - // The provided CIDR must maintain the following rules - - // a. The IPv6 CIDR block is valid and correctly formatted. - // b. The IPv6 CIDR is within the parent VCN IPv6 range. + // The provided prefix must maintain the following rules - + // a. The IPv6 prefix is valid and correctly formatted. + // b. The IPv6 prefix is within the parent VCN IPv6 range. // Example: `2001:0db8:0123:1111::/64` Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` - // The list of all IPv6 CIDR blocks (Oracle allocated IPv6 GUA, ULA or private IPv6 CIDR blocks, BYOIPv6 CIDR blocks) for the subnet that meets the following criteria: - // - The CIDR blocks must be valid. - // - Multiple CIDR blocks must not overlap each other or the on-premises network CIDR block. - // - The number of CIDR blocks must not exceed the limit of IPv6 CIDR blocks allowed to a subnet. + // The list of all IPv6 prefixes (Oracle allocated IPv6 GUA, ULA or private IPv6 prefix, BYOIPv6 prefixes) for the subnet that meets the following criteria: + // - The prefixes must be valid. + // - Multiple prefixes must not overlap each other or the on-premises network prefix. + // - The number of prefixes must not exceed the limit of IPv6 prefixes allowed to a subnet. Ipv6CidrBlocks []string `mandatory:"false" json:"ipv6CidrBlocks"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_virtual_circuit_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_virtual_circuit_details.go index 01de83e2e6..206135c092 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_virtual_circuit_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_virtual_circuit_details.go @@ -49,6 +49,9 @@ type UpdateVirtualCircuitDetails struct { // Set to `true` to enable BFD for IPv4 BGP peering, or set to `false` to disable BFD. If this is not set, the default is `false`. IsBfdEnabled *bool `mandatory:"false" json:"isBfdEnabled"` + // Set to `true` for the virtual circuit to carry only encrypted traffic, or set to `false` for the virtual circuit to carry unencrypted traffic. If this is not set, the default is `false`. + IsTransportMode *bool `mandatory:"false" json:"isTransportMode"` + // Deprecated. Instead use `customerAsn`. // If you specify values for both, the request will be rejected. CustomerBgpAsn *int `mandatory:"false" json:"customerBgpAsn"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_details.go index 4111bafe57..6280b1a233 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_details.go @@ -37,6 +37,12 @@ type UpdateVolumeBackupDetails struct { // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). // Example: `{"Department": "Finance"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID of the Vault service key which is the master encryption key for the volume backup. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` } func (m UpdateVolumeBackupDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_details.go index c963ba858e..b842072411 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_details.go @@ -112,10 +112,7 @@ func (m *UpdateVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.IsAutoTuneEnabled = model.IsAutoTuneEnabled m.BlockVolumeReplicas = make([]BlockVolumeReplicaDetails, len(model.BlockVolumeReplicas)) - for i, n := range model.BlockVolumeReplicas { - m.BlockVolumeReplicas[i] = n - } - + copy(m.BlockVolumeReplicas, model.BlockVolumeReplicas) m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) for i, n := range model.AutotunePolicies { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -128,6 +125,5 @@ func (m *UpdateVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.AutotunePolicies[i] = nil } } - return } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn.go index 6a2e20a5a5..882f033412 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn.go @@ -44,10 +44,10 @@ type Vcn struct { // The VCN's current state. LifecycleState VcnLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - // The list of BYOIPv6 CIDR blocks required to create a VCN that uses BYOIPv6 ranges. + // The list of BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 ranges. Byoipv6CidrBlocks []string `mandatory:"false" json:"byoipv6CidrBlocks"` - // For an IPv6-enabled VCN, this is the list of Private IPv6 CIDR blocks for the VCN's IP address space. + // For an IPv6-enabled VCN, this is the list of Private IPv6 prefixes for the VCN's IP address space. Ipv6PrivateCidrBlocks []string `mandatory:"false" json:"ipv6PrivateCidrBlocks"` // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the VCN's default set of DHCP options. @@ -85,8 +85,8 @@ type Vcn struct { // Example: `{"Department": "Finance"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - // For an IPv6-enabled VCN, this is the list of IPv6 CIDR blocks for the VCN's IP address space. - // The CIDRs are provided by Oracle and the sizes are always /56. + // For an IPv6-enabled VCN, this is the list of IPv6 prefixes for the VCN's IP address space. + // The prefixes are provided by Oracle and the sizes are always /56. Ipv6CidrBlocks []string `mandatory:"false" json:"ipv6CidrBlocks"` // The date and time the VCN was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_create_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_create_details.go index 2ca250a4dc..c4a6f201ac 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_create_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_create_details.go @@ -26,7 +26,7 @@ import ( type VcnDrgAttachmentNetworkCreateDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` // This is the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table that is used to route the traffic as it enters a VCN through this attachment. // For information about why you would associate a route table with a DRG attachment, see @@ -41,7 +41,7 @@ type VcnDrgAttachmentNetworkCreateDetails struct { VcnRouteType VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum `mandatory:"false" json:"vcnRouteType,omitempty"` } -//GetId returns Id +// GetId returns Id func (m VcnDrgAttachmentNetworkCreateDetails) GetId() *string { return m.Id } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_details.go index af79d8efd1..da0c5fbc23 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_details.go @@ -26,7 +26,7 @@ import ( type VcnDrgAttachmentNetworkDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the DRG attachment is using. // For information about why you would associate a route table with a DRG attachment, see: @@ -39,7 +39,7 @@ type VcnDrgAttachmentNetworkDetails struct { VcnRouteType VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum `mandatory:"false" json:"vcnRouteType,omitempty"` } -//GetId returns Id +// GetId returns Id func (m VcnDrgAttachmentNetworkDetails) GetId() *string { return m.Id } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_topology.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_topology.go index 83b6d6dd77..33a578d35d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_topology.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_topology.go @@ -23,6 +23,8 @@ import ( ) // VcnTopology Defines the representation of a virtual network topology for a VCN. +// See Network Visualizer Documentation (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/network_visualizer.htm) for more information, including +// conventions and pictures of symbols. type VcnTopology struct { // Lists entities comprising the virtual network topology. @@ -31,6 +33,11 @@ type VcnTopology struct { // Lists relationships between entities in the virtual network topology. Relationships []TopologyEntityRelationship `mandatory:"true" json:"relationships"` + // Lists entities that are limited during ingestion. + // The values for the items in the list are the entity type names of the limitedEntities. + // Example: `vcn` + LimitedEntities []string `mandatory:"true" json:"limitedEntities"` + // Records when the virtual network topology was created, in RFC3339 (https://tools.ietf.org/html/rfc3339) format for date and time. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` @@ -38,17 +45,22 @@ type VcnTopology struct { VcnId *string `mandatory:"false" json:"vcnId"` } -//GetEntities returns Entities +// GetEntities returns Entities func (m VcnTopology) GetEntities() []interface{} { return m.Entities } -//GetRelationships returns Relationships +// GetRelationships returns Relationships func (m VcnTopology) GetRelationships() []TopologyEntityRelationship { return m.Relationships } -//GetTimeCreated returns TimeCreated +// GetLimitedEntities returns LimitedEntities +func (m VcnTopology) GetLimitedEntities() []string { + return m.LimitedEntities +} + +// GetTimeCreated returns TimeCreated func (m VcnTopology) GetTimeCreated() *common.SDKTime { return m.TimeCreated } @@ -86,10 +98,11 @@ func (m VcnTopology) MarshalJSON() (buff []byte, e error) { // UnmarshalJSON unmarshals from json func (m *VcnTopology) UnmarshalJSON(data []byte) (e error) { model := struct { - VcnId *string `json:"vcnId"` - Entities []interface{} `json:"entities"` - Relationships []topologyentityrelationship `json:"relationships"` - TimeCreated *common.SDKTime `json:"timeCreated"` + VcnId *string `json:"vcnId"` + Entities []interface{} `json:"entities"` + Relationships []topologyentityrelationship `json:"relationships"` + LimitedEntities []string `json:"limitedEntities"` + TimeCreated *common.SDKTime `json:"timeCreated"` }{} e = json.Unmarshal(data, &model) @@ -100,10 +113,7 @@ func (m *VcnTopology) UnmarshalJSON(data []byte) (e error) { m.VcnId = model.VcnId m.Entities = make([]interface{}, len(model.Entities)) - for i, n := range model.Entities { - m.Entities[i] = n - } - + copy(m.Entities, model.Entities) m.Relationships = make([]TopologyEntityRelationship, len(model.Relationships)) for i, n := range model.Relationships { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -116,7 +126,8 @@ func (m *VcnTopology) UnmarshalJSON(data []byte) (e error) { m.Relationships[i] = nil } } - + m.LimitedEntities = make([]string, len(model.LimitedEntities)) + copy(m.LimitedEntities, model.LimitedEntities) m.TimeCreated = model.TimeCreated return diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit.go index fd02c7ab38..11e9c7ec19 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit.go @@ -75,6 +75,9 @@ type VirtualCircuit struct { // Set to `true` to enable BFD for IPv4 BGP peering, or set to `false` to disable BFD. If this is not set, the default is `false`. IsBfdEnabled *bool `mandatory:"false" json:"isBfdEnabled"` + // Set to `true` for the virtual circuit to carry only encrypted traffic, or set to `false` for the virtual circuit to carry unencrypted traffic. If this is not set, the default is `false`. + IsTransportMode *bool `mandatory:"false" json:"isTransportMode"` + // Deprecated. Instead use `customerAsn`. // If you specify values for both, the request will be rejected. CustomerBgpAsn *int `mandatory:"false" json:"customerBgpAsn"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_associated_tunnel_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_associated_tunnel_details.go new file mode 100644 index 0000000000..cc07c03f49 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_associated_tunnel_details.go @@ -0,0 +1,92 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualCircuitAssociatedTunnelDetails Detailed private tunnel info associated with the virtual circuit. +type VirtualCircuitAssociatedTunnelDetails struct { + + // The type of the tunnel associated with the virtual circuit. + TunnelType VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum `mandatory:"true" json:"tunnelType"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec tunnel associated with the virtual circuit. + TunnelId *string `mandatory:"true" json:"tunnelId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of IPSec connection associated with the virtual circuit. + IpsecConnectionId *string `mandatory:"false" json:"ipsecConnectionId"` +} + +func (m VirtualCircuitAssociatedTunnelDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualCircuitAssociatedTunnelDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum(string(m.TunnelType)); !ok && m.TunnelType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TunnelType: %s. Supported values are: %s.", m.TunnelType, strings.Join(GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum Enum with underlying type: string +type VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum string + +// Set of constants representing the allowable values for VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum +const ( + VirtualCircuitAssociatedTunnelDetailsTunnelTypeIpsec VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum = "IPSEC" +) + +var mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum = map[string]VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum{ + "IPSEC": VirtualCircuitAssociatedTunnelDetailsTunnelTypeIpsec, +} + +var mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumLowerCase = map[string]VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum{ + "ipsec": VirtualCircuitAssociatedTunnelDetailsTunnelTypeIpsec, +} + +// GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumValues Enumerates the set of values for VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum +func GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumValues() []VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum { + values := make([]VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum, 0) + for _, v := range mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumStringValues Enumerates the set of values in String for VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum +func GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumStringValues() []string { + return []string{ + "IPSEC", + } +} + +// GetMappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum(val string) (VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum, bool) { + enum, ok := mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_drg_attachment_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_drg_attachment_network_details.go index 20c7d163df..8d399a4c60 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_drg_attachment_network_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_drg_attachment_network_details.go @@ -26,10 +26,14 @@ import ( type VirtualCircuitDrgAttachmentNetworkDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` + + // Boolean flag that determines wether all traffic over the virtual circuits is encrypted. + // Example: `true` + TransportOnlyMode *bool `mandatory:"false" json:"transportOnlyMode"` } -//GetId returns Id +// GetId returns Id func (m VirtualCircuitDrgAttachmentNetworkDetails) GetId() *string { return m.Id } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vnic.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vnic.go index 2f3eea8654..fd115b12bc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/vnic.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vnic.go @@ -128,6 +128,10 @@ type Vnic struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet the VNIC is in. SubnetId *string `mandatory:"false" json:"subnetId"` + + // List of IPv6 addresses assigned to the VNIC. + // Example: `2001:DB8::` + Ipv6Addresses []string `mandatory:"false" json:"ipv6Addresses"` } func (m Vnic) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume.go index 40fdb1458e..79a69063ac 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume.go @@ -189,10 +189,7 @@ func (m *Volume) UnmarshalJSON(data []byte) (e error) { m.AutoTunedVpusPerGB = model.AutoTunedVpusPerGB m.BlockVolumeReplicas = make([]BlockVolumeReplicaInfo, len(model.BlockVolumeReplicas)) - for i, n := range model.BlockVolumeReplicas { - m.BlockVolumeReplicas[i] = n - } - + copy(m.BlockVolumeReplicas, model.BlockVolumeReplicas) m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) for i, n := range model.AutotunePolicies { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -205,7 +202,6 @@ func (m *Volume) UnmarshalJSON(data []byte) (e error) { m.AutotunePolicies[i] = nil } } - m.AvailabilityDomain = model.AvailabilityDomain m.CompartmentId = model.CompartmentId diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_attachment.go index d323c80376..2a7cb793c3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_attachment.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_attachment.go @@ -83,13 +83,6 @@ type VolumeAttachment interface { type volumeattachment struct { JsonData []byte - AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - Id *string `mandatory:"true" json:"id"` - InstanceId *string `mandatory:"true" json:"instanceId"` - LifecycleState VolumeAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - VolumeId *string `mandatory:"true" json:"volumeId"` Device *string `mandatory:"false" json:"device"` DisplayName *string `mandatory:"false" json:"displayName"` IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` @@ -97,6 +90,13 @@ type volumeattachment struct { IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` IsMultipath *bool `mandatory:"false" json:"isMultipath"` IscsiLoginState VolumeAttachmentIscsiLoginStateEnum `mandatory:"false" json:"iscsiLoginState,omitempty"` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + Id *string `mandatory:"true" json:"id"` + InstanceId *string `mandatory:"true" json:"instanceId"` + LifecycleState VolumeAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + VolumeId *string `mandatory:"true" json:"volumeId"` AttachmentType string `json:"attachmentType"` } @@ -157,76 +157,76 @@ func (m *volumeattachment) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetAvailabilityDomain returns AvailabilityDomain -func (m volumeattachment) GetAvailabilityDomain() *string { - return m.AvailabilityDomain -} - -//GetCompartmentId returns CompartmentId -func (m volumeattachment) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetId returns Id -func (m volumeattachment) GetId() *string { - return m.Id -} - -//GetInstanceId returns InstanceId -func (m volumeattachment) GetInstanceId() *string { - return m.InstanceId -} - -//GetLifecycleState returns LifecycleState -func (m volumeattachment) GetLifecycleState() VolumeAttachmentLifecycleStateEnum { - return m.LifecycleState -} - -//GetTimeCreated returns TimeCreated -func (m volumeattachment) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetVolumeId returns VolumeId -func (m volumeattachment) GetVolumeId() *string { - return m.VolumeId -} - -//GetDevice returns Device +// GetDevice returns Device func (m volumeattachment) GetDevice() *string { return m.Device } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m volumeattachment) GetDisplayName() *string { return m.DisplayName } -//GetIsReadOnly returns IsReadOnly +// GetIsReadOnly returns IsReadOnly func (m volumeattachment) GetIsReadOnly() *bool { return m.IsReadOnly } -//GetIsShareable returns IsShareable +// GetIsShareable returns IsShareable func (m volumeattachment) GetIsShareable() *bool { return m.IsShareable } -//GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled +// GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled func (m volumeattachment) GetIsPvEncryptionInTransitEnabled() *bool { return m.IsPvEncryptionInTransitEnabled } -//GetIsMultipath returns IsMultipath +// GetIsMultipath returns IsMultipath func (m volumeattachment) GetIsMultipath() *bool { return m.IsMultipath } -//GetIscsiLoginState returns IscsiLoginState +// GetIscsiLoginState returns IscsiLoginState func (m volumeattachment) GetIscsiLoginState() VolumeAttachmentIscsiLoginStateEnum { return m.IscsiLoginState } +// GetAvailabilityDomain returns AvailabilityDomain +func (m volumeattachment) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetCompartmentId returns CompartmentId +func (m volumeattachment) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetId returns Id +func (m volumeattachment) GetId() *string { + return m.Id +} + +// GetInstanceId returns InstanceId +func (m volumeattachment) GetInstanceId() *string { + return m.InstanceId +} + +// GetLifecycleState returns LifecycleState +func (m volumeattachment) GetLifecycleState() VolumeAttachmentLifecycleStateEnum { + return m.LifecycleState +} + +// GetTimeCreated returns TimeCreated +func (m volumeattachment) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetVolumeId returns VolumeId +func (m volumeattachment) GetVolumeId() *string { + return m.VolumeId +} + func (m volumeattachment) String() string { return common.PointerString(m) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group.go index c74637f577..c55a66bcc7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group.go @@ -138,10 +138,7 @@ func (m *VolumeGroup) UnmarshalJSON(data []byte) (e error) { m.IsHydrated = model.IsHydrated m.VolumeGroupReplicas = make([]VolumeGroupReplicaInfo, len(model.VolumeGroupReplicas)) - for i, n := range model.VolumeGroupReplicas { - m.VolumeGroupReplicas[i] = n - } - + copy(m.VolumeGroupReplicas, model.VolumeGroupReplicas) m.AvailabilityDomain = model.AvailabilityDomain m.CompartmentId = model.CompartmentId @@ -157,10 +154,7 @@ func (m *VolumeGroup) UnmarshalJSON(data []byte) (e error) { m.TimeCreated = model.TimeCreated m.VolumeIds = make([]string, len(model.VolumeIds)) - for i, n := range model.VolumeIds { - m.VolumeIds[i] = n - } - + copy(m.VolumeIds, model.VolumeIds) return } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_outbound_connector_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_outbound_connector_compartment_details.go new file mode 100644 index 0000000000..bcc5b1ec07 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_outbound_connector_compartment_details.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeOutboundConnectorCompartmentDetails Details for changing the compartment of the outbound connector. +type ChangeOutboundConnectorCompartmentDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment + // to move the outbound connector to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeOutboundConnectorCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeOutboundConnectorCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_outbound_connector_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_outbound_connector_compartment_request_response.go new file mode 100644 index 0000000000..e40d9a0daf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_outbound_connector_compartment_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeOutboundConnectorCompartmentRequest wrapper for the ChangeOutboundConnectorCompartment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeOutboundConnectorCompartment.go.html to see an example of how to use ChangeOutboundConnectorCompartmentRequest. +type ChangeOutboundConnectorCompartmentRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + OutboundConnectorId *string `mandatory:"true" contributesTo:"path" name:"outboundConnectorId"` + + // Details for changing the compartment. + ChangeOutboundConnectorCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeOutboundConnectorCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeOutboundConnectorCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeOutboundConnectorCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeOutboundConnectorCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeOutboundConnectorCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeOutboundConnectorCompartmentResponse wrapper for the ChangeOutboundConnectorCompartment operation +type ChangeOutboundConnectorCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeOutboundConnectorCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeOutboundConnectorCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/client_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/client_options.go index 7a92f3039c..1b731cd1e2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/client_options.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/client_options.go @@ -56,6 +56,13 @@ type ClientOptions struct { // identitySquash for more details.) If unspecified defaults // to `65534`. AnonymousGid *int64 `mandatory:"false" json:"anonymousGid"` + + // Whether or not to enable anonymous access to the file system through this export in cases where a user isn't found in the LDAP server used for ID mapping. + // If true, and the user is not found in the LDAP directory, the operation uses the Squash UID and Squash GID. + IsAnonymousAccessAllowed *bool `mandatory:"false" json:"isAnonymousAccessAllowed"` + + // Array of allowed NFS authentication types. + AllowedAuth []ClientOptionsAllowedAuthEnum `mandatory:"false" json:"allowedAuth,omitempty"` } func (m ClientOptions) String() string { @@ -74,6 +81,12 @@ func (m ClientOptions) ValidateEnumValue() (bool, error) { if _, ok := GetMappingClientOptionsIdentitySquashEnum(string(m.IdentitySquash)); !ok && m.IdentitySquash != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdentitySquash: %s. Supported values are: %s.", m.IdentitySquash, strings.Join(GetClientOptionsIdentitySquashEnumStringValues(), ","))) } + for _, val := range m.AllowedAuth { + if _, ok := GetMappingClientOptionsAllowedAuthEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AllowedAuth: %s. Supported values are: %s.", val, strings.Join(GetClientOptionsAllowedAuthEnumStringValues(), ","))) + } + } + if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -167,3 +180,53 @@ func GetMappingClientOptionsIdentitySquashEnum(val string) (ClientOptionsIdentit enum, ok := mappingClientOptionsIdentitySquashEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// ClientOptionsAllowedAuthEnum Enum with underlying type: string +type ClientOptionsAllowedAuthEnum string + +// Set of constants representing the allowable values for ClientOptionsAllowedAuthEnum +const ( + ClientOptionsAllowedAuthSys ClientOptionsAllowedAuthEnum = "SYS" + ClientOptionsAllowedAuthKrb5 ClientOptionsAllowedAuthEnum = "KRB5" + ClientOptionsAllowedAuthKrb5i ClientOptionsAllowedAuthEnum = "KRB5I" + ClientOptionsAllowedAuthKrb5p ClientOptionsAllowedAuthEnum = "KRB5P" +) + +var mappingClientOptionsAllowedAuthEnum = map[string]ClientOptionsAllowedAuthEnum{ + "SYS": ClientOptionsAllowedAuthSys, + "KRB5": ClientOptionsAllowedAuthKrb5, + "KRB5I": ClientOptionsAllowedAuthKrb5i, + "KRB5P": ClientOptionsAllowedAuthKrb5p, +} + +var mappingClientOptionsAllowedAuthEnumLowerCase = map[string]ClientOptionsAllowedAuthEnum{ + "sys": ClientOptionsAllowedAuthSys, + "krb5": ClientOptionsAllowedAuthKrb5, + "krb5i": ClientOptionsAllowedAuthKrb5i, + "krb5p": ClientOptionsAllowedAuthKrb5p, +} + +// GetClientOptionsAllowedAuthEnumValues Enumerates the set of values for ClientOptionsAllowedAuthEnum +func GetClientOptionsAllowedAuthEnumValues() []ClientOptionsAllowedAuthEnum { + values := make([]ClientOptionsAllowedAuthEnum, 0) + for _, v := range mappingClientOptionsAllowedAuthEnum { + values = append(values, v) + } + return values +} + +// GetClientOptionsAllowedAuthEnumStringValues Enumerates the set of values in String for ClientOptionsAllowedAuthEnum +func GetClientOptionsAllowedAuthEnumStringValues() []string { + return []string{ + "SYS", + "KRB5", + "KRB5I", + "KRB5P", + } +} + +// GetMappingClientOptionsAllowedAuthEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingClientOptionsAllowedAuthEnum(val string) (ClientOptionsAllowedAuthEnum, bool) { + enum, ok := mappingClientOptionsAllowedAuthEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_export_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_export_details.go index affdc41b6e..b57d1be795 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_export_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_export_details.go @@ -53,6 +53,9 @@ type CreateExportDetails struct { // The export's `exportOptions` can be changed after creation // using the `UpdateExport` operation. ExportOptions []ClientOptions `mandatory:"false" json:"exportOptions"` + + // Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read. + IsIdmapGroupsForSysAuth *bool `mandatory:"false" json:"isIdmapGroupsForSysAuth"` } func (m CreateExportDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_kerberos_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_kerberos_details.go new file mode 100644 index 0000000000..d0e94ee689 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_kerberos_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateKerberosDetails Kerberos details needed to create configuration. +type CreateKerberosDetails struct { + + // The Kerberos realm that the mount target will join. + KerberosRealm *string `mandatory:"true" json:"kerberosRealm"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the keytab Secret in the Vault. + KeyTabSecretId *string `mandatory:"false" json:"keyTabSecretId"` + + // Version of the keytab Secret in the Vault to use. + CurrentKeyTabSecretVersion *int `mandatory:"false" json:"currentKeyTabSecretVersion"` + + // Version of the keytab Secret in the Vault to use as a backup. + BackupKeyTabSecretVersion *int `mandatory:"false" json:"backupKeyTabSecretVersion"` + + // Specifies whether to enable or disable Kerberos. + IsKerberosEnabled *bool `mandatory:"false" json:"isKerberosEnabled"` +} + +func (m CreateKerberosDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateKerberosDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_ldap_bind_account_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_ldap_bind_account_details.go new file mode 100644 index 0000000000..41d6e32fcb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_ldap_bind_account_details.go @@ -0,0 +1,113 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateLdapBindAccountDetails Account details for the LDAP bind account to be used by mount targets that use this outbound connector. +type CreateLdapBindAccountDetails struct { + + // The availability domain the outbound connector is in. May be unset + // as a blank or NULL value. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that contains the outbound connector. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Array of server endpoints to use when connecting with the LDAP bind account. + Endpoints []Endpoint `mandatory:"true" json:"endpoints"` + + // The LDAP Distinguished Name of the bind account. + BindDistinguishedName *string `mandatory:"true" json:"bindDistinguishedName"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My outbound connector` + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair + // with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the password for the LDAP bind account in the Vault. + PasswordSecretId *string `mandatory:"false" json:"passwordSecretId"` + + // Version of the password secret in the Vault to use. + PasswordSecretVersion *int `mandatory:"false" json:"passwordSecretVersion"` +} + +// GetAvailabilityDomain returns AvailabilityDomain +func (m CreateLdapBindAccountDetails) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetCompartmentId returns CompartmentId +func (m CreateLdapBindAccountDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDisplayName returns DisplayName +func (m CreateLdapBindAccountDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetFreeformTags returns FreeformTags +func (m CreateLdapBindAccountDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m CreateLdapBindAccountDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m CreateLdapBindAccountDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateLdapBindAccountDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateLdapBindAccountDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateLdapBindAccountDetails CreateLdapBindAccountDetails + s := struct { + DiscriminatorParam string `json:"connectorType"` + MarshalTypeCreateLdapBindAccountDetails + }{ + "LDAPBIND", + (MarshalTypeCreateLdapBindAccountDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_ldap_idmap_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_ldap_idmap_details.go new file mode 100644 index 0000000000..2e480eba9c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_ldap_idmap_details.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateLdapIdmapDetails Mount target details about the LDAP ID mapping configuration. +type CreateLdapIdmapDetails struct { + + // Schema type of the LDAP account. + SchemaType CreateLdapIdmapDetailsSchemaTypeEnum `mandatory:"false" json:"schemaType,omitempty"` + + // The amount of time that the mount target should allow an entry to persist in its cache before attempting to refresh the entry. + CacheRefreshIntervalSeconds *int `mandatory:"false" json:"cacheRefreshIntervalSeconds"` + + // The maximum amount of time the mount target is allowed to use a cached entry. + CacheLifetimeSeconds *int `mandatory:"false" json:"cacheLifetimeSeconds"` + + // The amount of time that a mount target will maintain information that a user is not found in the ID mapping configuration. + NegativeCacheLifetimeSeconds *int `mandatory:"false" json:"negativeCacheLifetimeSeconds"` + + // All LDAP searches are recursive starting at this user. + // Example: `CN=User,DC=domain,DC=com` + UserSearchBase *string `mandatory:"false" json:"userSearchBase"` + + // All LDAP searches are recursive starting at this group. + // Example: `CN=Group,DC=domain,DC=com` + GroupSearchBase *string `mandatory:"false" json:"groupSearchBase"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the first connector to use to communicate with the LDAP server. + OutboundConnector1Id *string `mandatory:"false" json:"outboundConnector1Id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the second connector to use to communicate with the LDAP server. + OutboundConnector2Id *string `mandatory:"false" json:"outboundConnector2Id"` +} + +func (m CreateLdapIdmapDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateLdapIdmapDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCreateLdapIdmapDetailsSchemaTypeEnum(string(m.SchemaType)); !ok && m.SchemaType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SchemaType: %s. Supported values are: %s.", m.SchemaType, strings.Join(GetCreateLdapIdmapDetailsSchemaTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateLdapIdmapDetailsSchemaTypeEnum Enum with underlying type: string +type CreateLdapIdmapDetailsSchemaTypeEnum string + +// Set of constants representing the allowable values for CreateLdapIdmapDetailsSchemaTypeEnum +const ( + CreateLdapIdmapDetailsSchemaTypeRfc2307 CreateLdapIdmapDetailsSchemaTypeEnum = "RFC2307" +) + +var mappingCreateLdapIdmapDetailsSchemaTypeEnum = map[string]CreateLdapIdmapDetailsSchemaTypeEnum{ + "RFC2307": CreateLdapIdmapDetailsSchemaTypeRfc2307, +} + +var mappingCreateLdapIdmapDetailsSchemaTypeEnumLowerCase = map[string]CreateLdapIdmapDetailsSchemaTypeEnum{ + "rfc2307": CreateLdapIdmapDetailsSchemaTypeRfc2307, +} + +// GetCreateLdapIdmapDetailsSchemaTypeEnumValues Enumerates the set of values for CreateLdapIdmapDetailsSchemaTypeEnum +func GetCreateLdapIdmapDetailsSchemaTypeEnumValues() []CreateLdapIdmapDetailsSchemaTypeEnum { + values := make([]CreateLdapIdmapDetailsSchemaTypeEnum, 0) + for _, v := range mappingCreateLdapIdmapDetailsSchemaTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreateLdapIdmapDetailsSchemaTypeEnumStringValues Enumerates the set of values in String for CreateLdapIdmapDetailsSchemaTypeEnum +func GetCreateLdapIdmapDetailsSchemaTypeEnumStringValues() []string { + return []string{ + "RFC2307", + } +} + +// GetMappingCreateLdapIdmapDetailsSchemaTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateLdapIdmapDetailsSchemaTypeEnum(val string) (CreateLdapIdmapDetailsSchemaTypeEnum, bool) { + enum, ok := mappingCreateLdapIdmapDetailsSchemaTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_mount_target_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_mount_target_details.go index 3c808e118d..1d82139aa6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_mount_target_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_mount_target_details.go @@ -66,12 +66,19 @@ type CreateMountTargetDetails struct { // Example: `10.0.3.3` IpAddress *string `mandatory:"false" json:"ipAddress"` + // The method used to map a Unix UID to secondary groups, if any. + IdmapType MountTargetIdmapTypeEnum `mandatory:"false" json:"idmapType,omitempty"` + + LdapIdmap *CreateLdapIdmapDetails `mandatory:"false" json:"ldapIdmap"` + // A list of Network Security Group OCIDs (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) associated with this mount target. // A maximum of 5 is allowed. // Setting this to an empty array after the list is created removes the mount target from all NSGs. // For more information about NSGs, see Security Rules (https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). NsgIds []string `mandatory:"false" json:"nsgIds"` + Kerberos *CreateKerberosDetails `mandatory:"false" json:"kerberos"` + // Free-form tags for this resource. Each tag is a simple key-value pair // with no predefined name, type, or namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -94,6 +101,9 @@ func (m CreateMountTargetDetails) String() string { func (m CreateMountTargetDetails) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingMountTargetIdmapTypeEnum(string(m.IdmapType)); !ok && m.IdmapType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdmapType: %s. Supported values are: %s.", m.IdmapType, strings.Join(GetMountTargetIdmapTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_outbound_connector_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_outbound_connector_details.go new file mode 100644 index 0000000000..8ed2bb4890 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_outbound_connector_details.go @@ -0,0 +1,137 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateOutboundConnectorDetails Details for creating the outbound connector. +type CreateOutboundConnectorDetails interface { + + // The availability domain the outbound connector is in. May be unset + // as a blank or NULL value. + // Example: `Uocm:PHX-AD-1` + GetAvailabilityDomain() *string + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that contains the outbound connector. + GetCompartmentId() *string + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My outbound connector` + GetDisplayName() *string + + // Free-form tags for this resource. Each tag is a simple key-value pair + // with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + GetFreeformTags() map[string]string + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + GetDefinedTags() map[string]map[string]interface{} +} + +type createoutboundconnectordetails struct { + JsonData []byte + DisplayName *string `mandatory:"false" json:"displayName"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + ConnectorType string `json:"connectorType"` +} + +// UnmarshalJSON unmarshals json +func (m *createoutboundconnectordetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercreateoutboundconnectordetails createoutboundconnectordetails + s := struct { + Model Unmarshalercreateoutboundconnectordetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.AvailabilityDomain = s.Model.AvailabilityDomain + m.CompartmentId = s.Model.CompartmentId + m.DisplayName = s.Model.DisplayName + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags + m.ConnectorType = s.Model.ConnectorType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *createoutboundconnectordetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.ConnectorType { + case "LDAPBIND": + mm := CreateLdapBindAccountDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for CreateOutboundConnectorDetails: %s.", m.ConnectorType) + return *m, nil + } +} + +// GetDisplayName returns DisplayName +func (m createoutboundconnectordetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetFreeformTags returns FreeformTags +func (m createoutboundconnectordetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m createoutboundconnectordetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetAvailabilityDomain returns AvailabilityDomain +func (m createoutboundconnectordetails) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetCompartmentId returns CompartmentId +func (m createoutboundconnectordetails) GetCompartmentId() *string { + return m.CompartmentId +} + +func (m createoutboundconnectordetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m createoutboundconnectordetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_outbound_connector_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_outbound_connector_request_response.go new file mode 100644 index 0000000000..bc022a0c3c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_outbound_connector_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateOutboundConnectorRequest wrapper for the CreateOutboundConnector operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateOutboundConnector.go.html to see an example of how to use CreateOutboundConnectorRequest. +type CreateOutboundConnectorRequest struct { + + // Details for creating a new outbound connector. + CreateOutboundConnectorDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateOutboundConnectorRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateOutboundConnectorRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateOutboundConnectorRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateOutboundConnectorRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateOutboundConnectorRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateOutboundConnectorResponse wrapper for the CreateOutboundConnector operation +type CreateOutboundConnectorResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OutboundConnector instance + OutboundConnector `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateOutboundConnectorResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateOutboundConnectorResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_outbound_connector_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_outbound_connector_request_response.go new file mode 100644 index 0000000000..2007f45798 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_outbound_connector_request_response.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteOutboundConnectorRequest wrapper for the DeleteOutboundConnector operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteOutboundConnector.go.html to see an example of how to use DeleteOutboundConnectorRequest. +type DeleteOutboundConnectorRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + OutboundConnectorId *string `mandatory:"true" contributesTo:"path" name:"outboundConnectorId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteOutboundConnectorRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteOutboundConnectorRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteOutboundConnectorRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteOutboundConnectorRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteOutboundConnectorRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteOutboundConnectorResponse wrapper for the DeleteOutboundConnector operation +type DeleteOutboundConnectorResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteOutboundConnectorResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteOutboundConnectorResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/endpoint.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/endpoint.go new file mode 100644 index 0000000000..691ef2d87b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/endpoint.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Endpoint Combination of DNS server name and port. +type Endpoint struct { + + // Name of the DNS server. + Hostname *string `mandatory:"true" json:"hostname"` + + // Port of the DNS server. + Port *int64 `mandatory:"true" json:"port"` +} + +func (m Endpoint) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Endpoint) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export.go index 75b53f6159..a6219b1399 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export.go @@ -29,12 +29,14 @@ import ( // complete path element sequence of the second export resource. // // For example, the following are acceptable: -// * /example and /path -// * /example1 and /example2 -// * /example and /example1 +// - /example and /path +// - /example1 and /example2 +// - /example and /example1 +// // The following examples are not acceptable: -// * /example and /example/path -// * / and /example +// - /example and /example/path +// - / and /example +// // Paths may not end in a slash (/). No path element can be a period (.) // or two periods in sequence (..). All path elements must be 255 bytes or less. // No two non-'DELETED' export resources in the same export set can @@ -87,6 +89,9 @@ type Export struct { // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read. + IsIdmapGroupsForSysAuth *bool `mandatory:"false" json:"isIdmapGroupsForSysAuth"` } func (m Export) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export_summary.go index f0f9ff335f..12d6d55d16 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export_summary.go @@ -40,6 +40,9 @@ type ExportSummary struct { // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read. + IsIdmapGroupsForSysAuth *bool `mandatory:"false" json:"isIdmapGroupsForSysAuth"` } func (m ExportSummary) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/file_system.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/file_system.go index caa4b71d36..b1eebb0b20 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/file_system.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/file_system.go @@ -87,7 +87,7 @@ type FileSystem struct { // Additional information about the current 'lifecycleState'. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - // Specifies whether the file system can be used as a target file system for replication. + // Specifies whether the file system can be used as a target file system for replication. The system sets this value to `true` if the file system is unexported, hasn't yet been specified as a target file system in any replication resource, and has no user snapshots. After the file system has been specified as a target in a replication, or if the file system contains user snapshots, the system sets this value to `false`. // For more information, see Using Replication (https://docs.cloud.oracle.com/iaas/Content/File/Tasks/using-replication.htm). IsTargetable *bool `mandatory:"false" json:"isTargetable"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filestorage_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filestorage_client.go index a6854fad93..697a91a7f6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filestorage_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filestorage_client.go @@ -27,6 +27,9 @@ type FileStorageClient struct { // NewFileStorageClientWithConfigurationProvider Creates a new default FileStorage client with the given configuration provider. // the configuration provider will be used for the default signer as well as reading the region func NewFileStorageClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client FileStorageClient, err error) { + if enabled := common.CheckForEnabledServices("filestorage"); !enabled { + return client, fmt.Errorf("the Alloy configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local alloy_config file configured the service you're targeting or contact the cloud provider on the availability of this service") + } provider, err := auth.GetGenericConfigurationProvider(configProvider) if err != nil { return client, err @@ -78,7 +81,7 @@ func (client *FileStorageClient) setConfigurationProvider(configProvider common. region, _ := configProvider.Region() client.SetRegion(region) if client.Host == "" { - return fmt.Errorf("Invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil @@ -91,7 +94,7 @@ func (client *FileStorageClient) ConfigurationProvider() *common.ConfigurationPr // ChangeFileSystemCompartment Moves a file system and its associated snapshots into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes) // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeFileSystemCompartment.go.html to see an example of how to use ChangeFileSystemCompartment API. func (client FileStorageClient) ChangeFileSystemCompartment(ctx context.Context, request ChangeFileSystemCompartmentRequest) (response ChangeFileSystemCompartmentResponse, err error) { @@ -148,7 +151,7 @@ func (client FileStorageClient) changeFileSystemCompartment(ctx context.Context, // ChangeFilesystemSnapshotPolicyCompartment Moves a file system snapshot policy into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeFilesystemSnapshotPolicyCompartment.go.html to see an example of how to use ChangeFilesystemSnapshotPolicyCompartment API. func (client FileStorageClient) ChangeFilesystemSnapshotPolicyCompartment(ctx context.Context, request ChangeFilesystemSnapshotPolicyCompartmentRequest) (response ChangeFilesystemSnapshotPolicyCompartmentResponse, err error) { @@ -203,9 +206,9 @@ func (client FileStorageClient) changeFilesystemSnapshotPolicyCompartment(ctx co return response, err } -// ChangeMountTargetCompartment Moves a mount target and its associated export set into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes) +// ChangeMountTargetCompartment Moves a mount target and its associated export set or share set into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes) // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeMountTargetCompartment.go.html to see an example of how to use ChangeMountTargetCompartment API. func (client FileStorageClient) ChangeMountTargetCompartment(ctx context.Context, request ChangeMountTargetCompartmentRequest) (response ChangeMountTargetCompartmentResponse, err error) { @@ -260,10 +263,69 @@ func (client FileStorageClient) changeMountTargetCompartment(ctx context.Context return response, err } +// ChangeOutboundConnectorCompartment Moves an outbound connector into a different compartment within the same tenancy. +// For information about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes) +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeOutboundConnectorCompartment.go.html to see an example of how to use ChangeOutboundConnectorCompartment API. +func (client FileStorageClient) ChangeOutboundConnectorCompartment(ctx context.Context, request ChangeOutboundConnectorCompartmentRequest) (response ChangeOutboundConnectorCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.changeOutboundConnectorCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeOutboundConnectorCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeOutboundConnectorCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeOutboundConnectorCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeOutboundConnectorCompartmentResponse") + } + return +} + +// changeOutboundConnectorCompartment implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) changeOutboundConnectorCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/outboundConnectors/{outboundConnectorId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangeOutboundConnectorCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/ChangeOutboundConnectorCompartment" + err = common.PostProcessServiceError(err, "FileStorage", "ChangeOutboundConnectorCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ChangeReplicationCompartment Moves a replication and its replication target into a different compartment within the same tenancy. // For information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeReplicationCompartment.go.html to see an example of how to use ChangeReplicationCompartment API. func (client FileStorageClient) ChangeReplicationCompartment(ctx context.Context, request ChangeReplicationCompartmentRequest) (response ChangeReplicationCompartmentResponse, err error) { @@ -321,7 +383,7 @@ func (client FileStorageClient) changeReplicationCompartment(ctx context.Context // CreateExport Creates a new export in the specified export set, path, and // file system. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateExport.go.html to see an example of how to use CreateExport API. func (client FileStorageClient) CreateExport(ctx context.Context, request CreateExportRequest) (response CreateExportResponse, err error) { @@ -406,7 +468,7 @@ func (client FileStorageClient) createExport(ctx context.Context, request common // You can also retrieve a resource's OCID by using a List API operation on that resource // type or by viewing the resource in the Console. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateFileSystem.go.html to see an example of how to use CreateFileSystem API. func (client FileStorageClient) CreateFileSystem(ctx context.Context, request CreateFileSystemRequest) (response CreateFileSystemResponse, err error) { @@ -471,7 +533,7 @@ func (client FileStorageClient) createFileSystem(ctx context.Context, request co // After you create a file system snapshot policy, you can associate it with // file systems. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateFilesystemSnapshotPolicy.go.html to see an example of how to use CreateFilesystemSnapshotPolicy API. func (client FileStorageClient) CreateFilesystemSnapshotPolicy(ctx context.Context, request CreateFilesystemSnapshotPolicyRequest) (response CreateFilesystemSnapshotPolicyResponse, err error) { @@ -560,7 +622,7 @@ func (client FileStorageClient) createFilesystemSnapshotPolicy(ctx context.Conte // You can also retrieve a resource's OCID by using a List API operation on that resource // type, or by viewing the resource in the Console. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateMountTarget.go.html to see an example of how to use CreateMountTarget API. func (client FileStorageClient) CreateMountTarget(ctx context.Context, request CreateMountTargetRequest) (response CreateMountTargetResponse, err error) { @@ -620,6 +682,84 @@ func (client FileStorageClient) createMountTarget(ctx context.Context, request c return response, err } +// CreateOutboundConnector Creates a new outbound connector in the specified compartment. +// You can associate an outbound connector with a mount target only when +// they exist in the same availability domain. +// For information about access control and compartments, see +// Overview of the IAM +// Service (https://docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). +// For information about availability domains, see Regions and +// Availability Domains (https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm). +// To get a list of availability domains, use the +// `ListAvailabilityDomains` operation in the Identity and Access +// Management Service API. +// All Oracle Cloud Infrastructure Services resources, including +// outbound connectors, get an Oracle-assigned, unique ID called an +// Oracle Cloud Identifier (OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)). +// When you create a resource, you can find its OCID in the response. +// You can also retrieve a resource's OCID by using a List API operation on that resource +// type, or by viewing the resource in the Console. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateOutboundConnector.go.html to see an example of how to use CreateOutboundConnector API. +func (client FileStorageClient) CreateOutboundConnector(ctx context.Context, request CreateOutboundConnectorRequest) (response CreateOutboundConnectorResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createOutboundConnector, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateOutboundConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateOutboundConnectorResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateOutboundConnectorResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateOutboundConnectorResponse") + } + return +} + +// createOutboundConnector implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) createOutboundConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/outboundConnectors", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateOutboundConnectorResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/CreateOutboundConnector" + err = common.PostProcessServiceError(err, "FileStorage", "CreateOutboundConnector", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &outboundconnector{}) + return response, err +} + // CreateReplication Creates a new replication in the specified compartment. // Replications are the primary resource that governs the policy of cross-region replication between source // and target file systems. Replications are associated with a secondary resource called a ReplicationTarget @@ -645,7 +785,7 @@ func (client FileStorageClient) createMountTarget(ctx context.Context, request c // You can also retrieve a resource's OCID by using a List API operation on that resource // type, or by viewing the resource in the Console. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateReplication.go.html to see an example of how to use CreateReplication API. func (client FileStorageClient) CreateReplication(ctx context.Context, request CreateReplicationRequest) (response CreateReplicationResponse, err error) { @@ -708,7 +848,7 @@ func (client FileStorageClient) createReplication(ctx context.Context, request c // CreateSnapshot Creates a new snapshot of the specified file system. You // can access the snapshot at `.snapshot/`. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateSnapshot.go.html to see an example of how to use CreateSnapshot API. func (client FileStorageClient) CreateSnapshot(ctx context.Context, request CreateSnapshotRequest) (response CreateSnapshotResponse, err error) { @@ -770,7 +910,7 @@ func (client FileStorageClient) createSnapshot(ctx context.Context, request comm // DeleteExport Deletes the specified export. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteExport.go.html to see an example of how to use DeleteExport API. func (client FileStorageClient) DeleteExport(ctx context.Context, request DeleteExportRequest) (response DeleteExportResponse, err error) { @@ -829,7 +969,7 @@ func (client FileStorageClient) deleteExport(ctx context.Context, request common // verify that no remaining export resources still reference it. Deleting a // file system also deletes all of its snapshots. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteFileSystem.go.html to see an example of how to use DeleteFileSystem API. func (client FileStorageClient) DeleteFileSystem(ctx context.Context, request DeleteFileSystemRequest) (response DeleteFileSystemResponse, err error) { @@ -886,7 +1026,7 @@ func (client FileStorageClient) deleteFileSystem(ctx context.Context, request co // DeleteFilesystemSnapshotPolicy Deletes the specified file system snapshot policy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteFilesystemSnapshotPolicy.go.html to see an example of how to use DeleteFilesystemSnapshotPolicy API. func (client FileStorageClient) DeleteFilesystemSnapshotPolicy(ctx context.Context, request DeleteFilesystemSnapshotPolicyRequest) (response DeleteFilesystemSnapshotPolicyResponse, err error) { @@ -944,7 +1084,7 @@ func (client FileStorageClient) deleteFilesystemSnapshotPolicy(ctx context.Conte // DeleteMountTarget Deletes the specified mount target. This operation also deletes the // mount target's VNICs. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteMountTarget.go.html to see an example of how to use DeleteMountTarget API. func (client FileStorageClient) DeleteMountTarget(ctx context.Context, request DeleteMountTargetRequest) (response DeleteMountTargetResponse, err error) { @@ -999,9 +1139,66 @@ func (client FileStorageClient) deleteMountTarget(ctx context.Context, request c return response, err } +// DeleteOutboundConnector Deletes the specified outbound connector. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteOutboundConnector.go.html to see an example of how to use DeleteOutboundConnector API. +func (client FileStorageClient) DeleteOutboundConnector(ctx context.Context, request DeleteOutboundConnectorRequest) (response DeleteOutboundConnectorResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteOutboundConnector, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteOutboundConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteOutboundConnectorResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteOutboundConnectorResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteOutboundConnectorResponse") + } + return +} + +// deleteOutboundConnector implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) deleteOutboundConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/outboundConnectors/{outboundConnectorId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteOutboundConnectorResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/DeleteOutboundConnector" + err = common.PostProcessServiceError(err, "FileStorage", "DeleteOutboundConnector", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteReplication Deletes the specified replication and the the associated replication target. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteReplication.go.html to see an example of how to use DeleteReplication API. func (client FileStorageClient) DeleteReplication(ctx context.Context, request DeleteReplicationRequest) (response DeleteReplicationResponse, err error) { @@ -1061,7 +1258,7 @@ func (client FileStorageClient) deleteReplication(ctx context.Context, request c // If there is any current delta being applied the delete operation is blocked until the current // delta has been completely applied. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteReplicationTarget.go.html to see an example of how to use DeleteReplicationTarget API. func (client FileStorageClient) DeleteReplicationTarget(ctx context.Context, request DeleteReplicationTargetRequest) (response DeleteReplicationTargetResponse, err error) { @@ -1118,7 +1315,7 @@ func (client FileStorageClient) deleteReplicationTarget(ctx context.Context, req // DeleteSnapshot Deletes the specified snapshot. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteSnapshot.go.html to see an example of how to use DeleteSnapshot API. func (client FileStorageClient) DeleteSnapshot(ctx context.Context, request DeleteSnapshotRequest) (response DeleteSnapshotResponse, err error) { @@ -1175,7 +1372,7 @@ func (client FileStorageClient) deleteSnapshot(ctx context.Context, request comm // EstimateReplication Provides estimates for replication created using specific file system. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/EstimateReplication.go.html to see an example of how to use EstimateReplication API. func (client FileStorageClient) EstimateReplication(ctx context.Context, request EstimateReplicationRequest) (response EstimateReplicationResponse, err error) { @@ -1232,7 +1429,7 @@ func (client FileStorageClient) estimateReplication(ctx context.Context, request // GetExport Gets the specified export's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetExport.go.html to see an example of how to use GetExport API. func (client FileStorageClient) GetExport(ctx context.Context, request GetExportRequest) (response GetExportResponse, err error) { @@ -1289,7 +1486,7 @@ func (client FileStorageClient) getExport(ctx context.Context, request common.OC // GetExportSet Gets the specified export set's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetExportSet.go.html to see an example of how to use GetExportSet API. func (client FileStorageClient) GetExportSet(ctx context.Context, request GetExportSetRequest) (response GetExportSetResponse, err error) { @@ -1346,7 +1543,7 @@ func (client FileStorageClient) getExportSet(ctx context.Context, request common // GetFileSystem Gets the specified file system's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetFileSystem.go.html to see an example of how to use GetFileSystem API. func (client FileStorageClient) GetFileSystem(ctx context.Context, request GetFileSystemRequest) (response GetFileSystemResponse, err error) { @@ -1403,7 +1600,7 @@ func (client FileStorageClient) getFileSystem(ctx context.Context, request commo // GetFilesystemSnapshotPolicy Gets the specified file system snapshot policy's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetFilesystemSnapshotPolicy.go.html to see an example of how to use GetFilesystemSnapshotPolicy API. func (client FileStorageClient) GetFilesystemSnapshotPolicy(ctx context.Context, request GetFilesystemSnapshotPolicyRequest) (response GetFilesystemSnapshotPolicyResponse, err error) { @@ -1460,7 +1657,7 @@ func (client FileStorageClient) getFilesystemSnapshotPolicy(ctx context.Context, // GetMountTarget Gets the specified mount target's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetMountTarget.go.html to see an example of how to use GetMountTarget API. func (client FileStorageClient) GetMountTarget(ctx context.Context, request GetMountTargetRequest) (response GetMountTargetResponse, err error) { @@ -1515,9 +1712,66 @@ func (client FileStorageClient) getMountTarget(ctx context.Context, request comm return response, err } +// GetOutboundConnector Gets the specified outbound connector's information. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetOutboundConnector.go.html to see an example of how to use GetOutboundConnector API. +func (client FileStorageClient) GetOutboundConnector(ctx context.Context, request GetOutboundConnectorRequest) (response GetOutboundConnectorResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getOutboundConnector, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetOutboundConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetOutboundConnectorResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetOutboundConnectorResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetOutboundConnectorResponse") + } + return +} + +// getOutboundConnector implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) getOutboundConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/outboundConnectors/{outboundConnectorId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetOutboundConnectorResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/GetOutboundConnector" + err = common.PostProcessServiceError(err, "FileStorage", "GetOutboundConnector", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &outboundconnector{}) + return response, err +} + // GetReplication Gets the specified replication's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetReplication.go.html to see an example of how to use GetReplication API. func (client FileStorageClient) GetReplication(ctx context.Context, request GetReplicationRequest) (response GetReplicationResponse, err error) { @@ -1574,7 +1828,7 @@ func (client FileStorageClient) getReplication(ctx context.Context, request comm // GetReplicationTarget Gets the specified replication target's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetReplicationTarget.go.html to see an example of how to use GetReplicationTarget API. func (client FileStorageClient) GetReplicationTarget(ctx context.Context, request GetReplicationTargetRequest) (response GetReplicationTargetResponse, err error) { @@ -1631,7 +1885,7 @@ func (client FileStorageClient) getReplicationTarget(ctx context.Context, reques // GetSnapshot Gets the specified snapshot's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetSnapshot.go.html to see an example of how to use GetSnapshot API. func (client FileStorageClient) GetSnapshot(ctx context.Context, request GetSnapshotRequest) (response GetSnapshotResponse, err error) { @@ -1688,7 +1942,7 @@ func (client FileStorageClient) getSnapshot(ctx context.Context, request common. // ListExportSets Lists the export set resources in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListExportSets.go.html to see an example of how to use ListExportSets API. func (client FileStorageClient) ListExportSets(ctx context.Context, request ListExportSetsRequest) (response ListExportSetsResponse, err error) { @@ -1747,7 +2001,7 @@ func (client FileStorageClient) listExportSets(ctx context.Context, request comm // set. You must specify an export set ID, a file system ID, and // / or a compartment ID. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListExports.go.html to see an example of how to use ListExports API. func (client FileStorageClient) ListExports(ctx context.Context, request ListExportsRequest) (response ListExportsResponse, err error) { @@ -1805,7 +2059,7 @@ func (client FileStorageClient) listExports(ctx context.Context, request common. // ListFileSystems Lists the file system resources in the specified compartment, or by the specified compartment and // file system snapshot policy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListFileSystems.go.html to see an example of how to use ListFileSystems API. func (client FileStorageClient) ListFileSystems(ctx context.Context, request ListFileSystemsRequest) (response ListFileSystemsResponse, err error) { @@ -1862,7 +2116,7 @@ func (client FileStorageClient) listFileSystems(ctx context.Context, request com // ListFilesystemSnapshotPolicies Lists file system snapshot policies in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListFilesystemSnapshotPolicies.go.html to see an example of how to use ListFilesystemSnapshotPolicies API. func (client FileStorageClient) ListFilesystemSnapshotPolicies(ctx context.Context, request ListFilesystemSnapshotPoliciesRequest) (response ListFilesystemSnapshotPoliciesResponse, err error) { @@ -1919,7 +2173,7 @@ func (client FileStorageClient) listFilesystemSnapshotPolicies(ctx context.Conte // ListMountTargets Lists the mount target resources in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListMountTargets.go.html to see an example of how to use ListMountTargets API. func (client FileStorageClient) ListMountTargets(ctx context.Context, request ListMountTargetsRequest) (response ListMountTargetsResponse, err error) { @@ -1974,9 +2228,82 @@ func (client FileStorageClient) listMountTargets(ctx context.Context, request co return response, err } +// listoutboundconnectorsummary allows to unmarshal list of polymorphic OutboundConnectorSummary +type listoutboundconnectorsummary []outboundconnectorsummary + +// UnmarshalPolymorphicJSON unmarshals polymorphic json list of items +func (m *listoutboundconnectorsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + res := make([]OutboundConnectorSummary, len(*m)) + for i, v := range *m { + nn, err := v.UnmarshalPolymorphicJSON(v.JsonData) + if err != nil { + return nil, err + } + res[i] = nn.(OutboundConnectorSummary) + } + return res, nil +} + +// ListOutboundConnectors Lists the outbound connector resources in the specified compartment. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListOutboundConnectors.go.html to see an example of how to use ListOutboundConnectors API. +func (client FileStorageClient) ListOutboundConnectors(ctx context.Context, request ListOutboundConnectorsRequest) (response ListOutboundConnectorsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listOutboundConnectors, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListOutboundConnectorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListOutboundConnectorsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListOutboundConnectorsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListOutboundConnectorsResponse") + } + return +} + +// listOutboundConnectors implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) listOutboundConnectors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/outboundConnectors", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListOutboundConnectorsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnectorSummary/ListOutboundConnectors" + err = common.PostProcessServiceError(err, "FileStorage", "ListOutboundConnectors", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &listoutboundconnectorsummary{}) + return response, err +} + // ListReplicationTargets Lists the replication target resources in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListReplicationTargets.go.html to see an example of how to use ListReplicationTargets API. func (client FileStorageClient) ListReplicationTargets(ctx context.Context, request ListReplicationTargetsRequest) (response ListReplicationTargetsResponse, err error) { @@ -2033,7 +2360,7 @@ func (client FileStorageClient) listReplicationTargets(ctx context.Context, requ // ListReplications Lists the replication resources in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListReplications.go.html to see an example of how to use ListReplications API. func (client FileStorageClient) ListReplications(ctx context.Context, request ListReplicationsRequest) (response ListReplicationsResponse, err error) { @@ -2091,8 +2418,10 @@ func (client FileStorageClient) listReplications(ctx context.Context, request co // ListSnapshots Lists snapshots of the specified file system, or by file system snapshot policy and compartment, // or by file system snapshot policy and file system. // If file system ID is not specified, a file system snapshot policy ID and compartment ID must be specified. +// Users can only sort by time created when listing snapshots by file system snapshot policy ID and compartment ID +// (sort by name is NOT supported for listing snapshots by policy and compartment). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListSnapshots.go.html to see an example of how to use ListSnapshots API. func (client FileStorageClient) ListSnapshots(ctx context.Context, request ListSnapshotsRequest) (response ListSnapshotsResponse, err error) { @@ -2153,7 +2482,7 @@ func (client FileStorageClient) listSnapshots(ctx context.Context, request commo // If the policy is already paused, or in the INACTIVE state, you cannot pause it again. You can't pause a policy // that is in a DELETING, DELETED, FAILED, CREATING or INACTIVE state; attempts to pause a policy in these states result in a 409 conflict error. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/PauseFilesystemSnapshotPolicy.go.html to see an example of how to use PauseFilesystemSnapshotPolicy API. func (client FileStorageClient) PauseFilesystemSnapshotPolicy(ctx context.Context, request PauseFilesystemSnapshotPolicyRequest) (response PauseFilesystemSnapshotPolicyResponse, err error) { @@ -2213,7 +2542,7 @@ func (client FileStorageClient) pauseFilesystemSnapshotPolicy(ctx context.Contex // policy will have snapshots created and deleted according to the schedules defined in the policy. // If the policy is already in the ACTIVE state, you cannot unpause it. You can't unpause a policy that is in a DELETING, DELETED, FAILED, CREATING, or ACTIVE state; attempts to unpause a policy in these states result in a 409 conflict error. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/UnpauseFilesystemSnapshotPolicy.go.html to see an example of how to use UnpauseFilesystemSnapshotPolicy API. func (client FileStorageClient) UnpauseFilesystemSnapshotPolicy(ctx context.Context, request UnpauseFilesystemSnapshotPolicyRequest) (response UnpauseFilesystemSnapshotPolicyResponse, err error) { @@ -2270,7 +2599,7 @@ func (client FileStorageClient) unpauseFilesystemSnapshotPolicy(ctx context.Cont // UpdateExport Updates the specified export's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/UpdateExport.go.html to see an example of how to use UpdateExport API. func (client FileStorageClient) UpdateExport(ctx context.Context, request UpdateExportRequest) (response UpdateExportResponse, err error) { @@ -2327,7 +2656,7 @@ func (client FileStorageClient) updateExport(ctx context.Context, request common // UpdateExportSet Updates the specified export set's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/UpdateExportSet.go.html to see an example of how to use UpdateExportSet API. func (client FileStorageClient) UpdateExportSet(ctx context.Context, request UpdateExportSetRequest) (response UpdateExportSetResponse, err error) { @@ -2385,7 +2714,7 @@ func (client FileStorageClient) updateExportSet(ctx context.Context, request com // UpdateFileSystem Updates the specified file system's information. // You can use this operation to rename a file system. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/UpdateFileSystem.go.html to see an example of how to use UpdateFileSystem API. func (client FileStorageClient) UpdateFileSystem(ctx context.Context, request UpdateFileSystemRequest) (response UpdateFileSystemResponse, err error) { @@ -2442,7 +2771,7 @@ func (client FileStorageClient) updateFileSystem(ctx context.Context, request co // UpdateFilesystemSnapshotPolicy Updates the specified file system snapshot policy's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/UpdateFilesystemSnapshotPolicy.go.html to see an example of how to use UpdateFilesystemSnapshotPolicy API. func (client FileStorageClient) UpdateFilesystemSnapshotPolicy(ctx context.Context, request UpdateFilesystemSnapshotPolicyRequest) (response UpdateFilesystemSnapshotPolicyResponse, err error) { @@ -2499,7 +2828,7 @@ func (client FileStorageClient) updateFilesystemSnapshotPolicy(ctx context.Conte // UpdateMountTarget Updates the specified mount target's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/UpdateMountTarget.go.html to see an example of how to use UpdateMountTarget API. func (client FileStorageClient) UpdateMountTarget(ctx context.Context, request UpdateMountTargetRequest) (response UpdateMountTargetResponse, err error) { @@ -2554,9 +2883,66 @@ func (client FileStorageClient) updateMountTarget(ctx context.Context, request c return response, err } +// UpdateOutboundConnector Updates the specified outbound connector's information. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/UpdateOutboundConnector.go.html to see an example of how to use UpdateOutboundConnector API. +func (client FileStorageClient) UpdateOutboundConnector(ctx context.Context, request UpdateOutboundConnectorRequest) (response UpdateOutboundConnectorResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateOutboundConnector, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateOutboundConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateOutboundConnectorResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateOutboundConnectorResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateOutboundConnectorResponse") + } + return +} + +// updateOutboundConnector implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) updateOutboundConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/outboundConnectors/{outboundConnectorId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateOutboundConnectorResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/UpdateOutboundConnector" + err = common.PostProcessServiceError(err, "FileStorage", "UpdateOutboundConnector", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &outboundconnector{}) + return response, err +} + // UpdateReplication Updates the information for the specified replication and its associated replication target. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/UpdateReplication.go.html to see an example of how to use UpdateReplication API. func (client FileStorageClient) UpdateReplication(ctx context.Context, request UpdateReplicationRequest) (response UpdateReplicationResponse, err error) { @@ -2613,7 +2999,7 @@ func (client FileStorageClient) updateReplication(ctx context.Context, request c // UpdateSnapshot Updates the specified snapshot's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/UpdateSnapshot.go.html to see an example of how to use UpdateSnapshot API. func (client FileStorageClient) UpdateSnapshot(ctx context.Context, request UpdateSnapshotRequest) (response UpdateSnapshotResponse, err error) { @@ -2667,3 +3053,62 @@ func (client FileStorageClient) updateSnapshot(ctx context.Context, request comm err = common.UnmarshalResponse(httpResponse, &response) return response, err } + +// ValidateKeyTabs Validates keytab contents for the secret details passed on the request or validte keytab contents associated with +// the mount target passed in the request. The keytabs are deserialized, the contents are validated for compatibility +// and the principal, key version number and encryption type of each entry is provided as part of the response. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ValidateKeyTabs.go.html to see an example of how to use ValidateKeyTabs API. +func (client FileStorageClient) ValidateKeyTabs(ctx context.Context, request ValidateKeyTabsRequest) (response ValidateKeyTabsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.validateKeyTabs, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ValidateKeyTabsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ValidateKeyTabsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ValidateKeyTabsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ValidateKeyTabsResponse") + } + return +} + +// validateKeyTabs implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) validateKeyTabs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/mountTargets/actions/validateKeyTabs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ValidateKeyTabsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/ValidateKeyTabs" + err = common.PostProcessServiceError(err, "FileStorage", "ValidateKeyTabs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/get_outbound_connector_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/get_outbound_connector_request_response.go new file mode 100644 index 0000000000..7ad18b25a0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/get_outbound_connector_request_response.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetOutboundConnectorRequest wrapper for the GetOutboundConnector operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetOutboundConnector.go.html to see an example of how to use GetOutboundConnectorRequest. +type GetOutboundConnectorRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + OutboundConnectorId *string `mandatory:"true" contributesTo:"path" name:"outboundConnectorId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetOutboundConnectorRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetOutboundConnectorRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetOutboundConnectorRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetOutboundConnectorRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetOutboundConnectorRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetOutboundConnectorResponse wrapper for the GetOutboundConnector operation +type GetOutboundConnectorResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OutboundConnector instance + OutboundConnector `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetOutboundConnectorResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetOutboundConnectorResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/kerberos.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/kerberos.go new file mode 100644 index 0000000000..7ba3a08a53 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/kerberos.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Kerberos Allows administrator to configure a mount target to interact with the administrator's Kerberos infrastructure. +type Kerberos struct { + + // The Kerberos realm that the mount target will join. + KerberosRealm *string `mandatory:"true" json:"kerberosRealm"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the keytab secret in the Vault. + KeyTabSecretId *string `mandatory:"false" json:"keyTabSecretId"` + + // Version of the keytab secret in the Vault to use. + CurrentKeyTabSecretVersion *int `mandatory:"false" json:"currentKeyTabSecretVersion"` + + // Version of the keytab secert in the Vault to use as a backup. + BackupKeyTabSecretVersion *int `mandatory:"false" json:"backupKeyTabSecretVersion"` + + // Specifies whether to enable or disable Kerberos. + IsKerberosEnabled *bool `mandatory:"false" json:"isKerberosEnabled"` +} + +func (m Kerberos) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Kerberos) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/kerberos_keytab_entry.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/kerberos_keytab_entry.go new file mode 100644 index 0000000000..ae81e89595 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/kerberos_keytab_entry.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// KerberosKeytabEntry Details of each keytab entry read from the keytab file. +type KerberosKeytabEntry struct { + + // Keytab principal. + Principal *string `mandatory:"true" json:"principal"` + + // Encryption type with with keytab was generated. + // Secure: aes128-cts-hmac-sha256-128 + // Secure: aes256-cts-hmac-sha384-192 + // Less Secure: aes128-cts-hmac-sha1-96 + // Less Secure: aes256-cts-hmac-sha1-96 + EncryptionType KerberosKeytabEntryEncryptionTypeEnum `mandatory:"true" json:"encryptionType"` + + // Kerberos KVNO (key version number) for key in keytab entry. + KeyVersionNumber *int64 `mandatory:"true" json:"keyVersionNumber"` +} + +func (m KerberosKeytabEntry) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m KerberosKeytabEntry) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingKerberosKeytabEntryEncryptionTypeEnum(string(m.EncryptionType)); !ok && m.EncryptionType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncryptionType: %s. Supported values are: %s.", m.EncryptionType, strings.Join(GetKerberosKeytabEntryEncryptionTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// KerberosKeytabEntryEncryptionTypeEnum Enum with underlying type: string +type KerberosKeytabEntryEncryptionTypeEnum string + +// Set of constants representing the allowable values for KerberosKeytabEntryEncryptionTypeEnum +const ( + KerberosKeytabEntryEncryptionTypeAes128CtsHmacSha256128 KerberosKeytabEntryEncryptionTypeEnum = "AES128_CTS_HMAC_SHA256_128" + KerberosKeytabEntryEncryptionTypeAes256CtsHmacSha384192 KerberosKeytabEntryEncryptionTypeEnum = "AES256_CTS_HMAC_SHA384_192" + KerberosKeytabEntryEncryptionTypeAes128CtsHmacSha196 KerberosKeytabEntryEncryptionTypeEnum = "AES128_CTS_HMAC_SHA1_96" + KerberosKeytabEntryEncryptionTypeAes256CtsHmacSha196 KerberosKeytabEntryEncryptionTypeEnum = "AES256_CTS_HMAC_SHA1_96" +) + +var mappingKerberosKeytabEntryEncryptionTypeEnum = map[string]KerberosKeytabEntryEncryptionTypeEnum{ + "AES128_CTS_HMAC_SHA256_128": KerberosKeytabEntryEncryptionTypeAes128CtsHmacSha256128, + "AES256_CTS_HMAC_SHA384_192": KerberosKeytabEntryEncryptionTypeAes256CtsHmacSha384192, + "AES128_CTS_HMAC_SHA1_96": KerberosKeytabEntryEncryptionTypeAes128CtsHmacSha196, + "AES256_CTS_HMAC_SHA1_96": KerberosKeytabEntryEncryptionTypeAes256CtsHmacSha196, +} + +var mappingKerberosKeytabEntryEncryptionTypeEnumLowerCase = map[string]KerberosKeytabEntryEncryptionTypeEnum{ + "aes128_cts_hmac_sha256_128": KerberosKeytabEntryEncryptionTypeAes128CtsHmacSha256128, + "aes256_cts_hmac_sha384_192": KerberosKeytabEntryEncryptionTypeAes256CtsHmacSha384192, + "aes128_cts_hmac_sha1_96": KerberosKeytabEntryEncryptionTypeAes128CtsHmacSha196, + "aes256_cts_hmac_sha1_96": KerberosKeytabEntryEncryptionTypeAes256CtsHmacSha196, +} + +// GetKerberosKeytabEntryEncryptionTypeEnumValues Enumerates the set of values for KerberosKeytabEntryEncryptionTypeEnum +func GetKerberosKeytabEntryEncryptionTypeEnumValues() []KerberosKeytabEntryEncryptionTypeEnum { + values := make([]KerberosKeytabEntryEncryptionTypeEnum, 0) + for _, v := range mappingKerberosKeytabEntryEncryptionTypeEnum { + values = append(values, v) + } + return values +} + +// GetKerberosKeytabEntryEncryptionTypeEnumStringValues Enumerates the set of values in String for KerberosKeytabEntryEncryptionTypeEnum +func GetKerberosKeytabEntryEncryptionTypeEnumStringValues() []string { + return []string{ + "AES128_CTS_HMAC_SHA256_128", + "AES256_CTS_HMAC_SHA384_192", + "AES128_CTS_HMAC_SHA1_96", + "AES256_CTS_HMAC_SHA1_96", + } +} + +// GetMappingKerberosKeytabEntryEncryptionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingKerberosKeytabEntryEncryptionTypeEnum(val string) (KerberosKeytabEntryEncryptionTypeEnum, bool) { + enum, ok := mappingKerberosKeytabEntryEncryptionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/key_tab_secret_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/key_tab_secret_details.go new file mode 100644 index 0000000000..3b66bf78f4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/key_tab_secret_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// KeyTabSecretDetails Secret details of keytabs in Vault. +type KeyTabSecretDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the keytab secret in the Vault. + KeyTabSecretId *string `mandatory:"true" json:"keyTabSecretId"` + + // Version of the keytab secret in the Vault to use. + CurrentKeyTabSecretVersion *int `mandatory:"true" json:"currentKeyTabSecretVersion"` + + // Version of the keytab secret in the Vault to use as a backup. + BackupKeyTabSecretVersion *int `mandatory:"false" json:"backupKeyTabSecretVersion"` +} + +func (m KeyTabSecretDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m KeyTabSecretDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account.go new file mode 100644 index 0000000000..0e0cff48e0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account.go @@ -0,0 +1,142 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LdapBindAccount Account details for the LDAP bind account used by the outbound connector. +type LdapBindAccount struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that contains the outbound connector. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My outbound connector` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The date and time the outbound connector was created + // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Array of server endpoints to use when connecting with the LDAP bind account. + Endpoints []Endpoint `mandatory:"true" json:"endpoints"` + + // The LDAP Distinguished Name of the account. + BindDistinguishedName *string `mandatory:"true" json:"bindDistinguishedName"` + + // The availability domain the outbound connector is in. May be unset + // as a blank or NULL value. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // Free-form tags for this resource. Each tag is a simple key-value pair + // with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the password for the LDAP bind account in the Vault. + PasswordSecretId *string `mandatory:"false" json:"passwordSecretId"` + + // Version of the password secret in the Vault to use. + PasswordSecretVersion *int `mandatory:"false" json:"passwordSecretVersion"` + + // The current state of this outbound connector. + LifecycleState OutboundConnectorLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetAvailabilityDomain returns AvailabilityDomain +func (m LdapBindAccount) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetCompartmentId returns CompartmentId +func (m LdapBindAccount) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetId returns Id +func (m LdapBindAccount) GetId() *string { + return m.Id +} + +// GetLifecycleState returns LifecycleState +func (m LdapBindAccount) GetLifecycleState() OutboundConnectorLifecycleStateEnum { + return m.LifecycleState +} + +// GetDisplayName returns DisplayName +func (m LdapBindAccount) GetDisplayName() *string { + return m.DisplayName +} + +// GetTimeCreated returns TimeCreated +func (m LdapBindAccount) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetFreeformTags returns FreeformTags +func (m LdapBindAccount) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m LdapBindAccount) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m LdapBindAccount) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LdapBindAccount) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingOutboundConnectorLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetOutboundConnectorLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m LdapBindAccount) MarshalJSON() (buff []byte, e error) { + type MarshalTypeLdapBindAccount LdapBindAccount + s := struct { + DiscriminatorParam string `json:"connectorType"` + MarshalTypeLdapBindAccount + }{ + "LDAPBIND", + (MarshalTypeLdapBindAccount)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account_summary.go new file mode 100644 index 0000000000..f822706e5f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account_summary.go @@ -0,0 +1,136 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LdapBindAccountSummary Summary information for the LDAP bind account used by the outbound connector. +type LdapBindAccountSummary struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that contains the outbound connector. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My outbound connector` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The date and time the outbound connector was created + // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Array of server endpoints to use when connecting with the LDAP bind account. + Endpoints []Endpoint `mandatory:"true" json:"endpoints"` + + // The LDAP Distinguished Name of the account. + BindDistinguishedName *string `mandatory:"true" json:"bindDistinguishedName"` + + // The availability domain the outbound connector is in. May be unset + // as a blank or NULL value. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // Free-form tags for this resource. Each tag is a simple key-value pair + // with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The current state of this outbound connector. + LifecycleState OutboundConnectorSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetAvailabilityDomain returns AvailabilityDomain +func (m LdapBindAccountSummary) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetCompartmentId returns CompartmentId +func (m LdapBindAccountSummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetId returns Id +func (m LdapBindAccountSummary) GetId() *string { + return m.Id +} + +// GetLifecycleState returns LifecycleState +func (m LdapBindAccountSummary) GetLifecycleState() OutboundConnectorSummaryLifecycleStateEnum { + return m.LifecycleState +} + +// GetDisplayName returns DisplayName +func (m LdapBindAccountSummary) GetDisplayName() *string { + return m.DisplayName +} + +// GetTimeCreated returns TimeCreated +func (m LdapBindAccountSummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetFreeformTags returns FreeformTags +func (m LdapBindAccountSummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m LdapBindAccountSummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m LdapBindAccountSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LdapBindAccountSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingOutboundConnectorSummaryLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetOutboundConnectorSummaryLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m LdapBindAccountSummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeLdapBindAccountSummary LdapBindAccountSummary + s := struct { + DiscriminatorParam string `json:"connectorType"` + MarshalTypeLdapBindAccountSummary + }{ + "LDAPBIND", + (MarshalTypeLdapBindAccountSummary)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_idmap.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_idmap.go new file mode 100644 index 0000000000..9be89ddfc3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_idmap.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LdapIdmap Mount target details about the LDAP ID mapping configuration. +type LdapIdmap struct { + + // Schema type of the LDAP account. + SchemaType LdapIdmapSchemaTypeEnum `mandatory:"false" json:"schemaType,omitempty"` + + // The amount of time that the mount target should allow an entry to persist in its cache before attempting to refresh the entry. + CacheRefreshIntervalSeconds *int `mandatory:"false" json:"cacheRefreshIntervalSeconds"` + + // The maximum amount of time the mount target is allowed to use a cached entry. + CacheLifetimeSeconds *int `mandatory:"false" json:"cacheLifetimeSeconds"` + + // The amount of time that a mount target will maintain information that a user is not found in the ID mapping configuration. + NegativeCacheLifetimeSeconds *int `mandatory:"false" json:"negativeCacheLifetimeSeconds"` + + // All LDAP searches are recursive starting at this user. + // Example: `CN=User,DC=domain,DC=com` + UserSearchBase *string `mandatory:"false" json:"userSearchBase"` + + // All LDAP searches are recursive starting at this group. + // Example: `CN=Group,DC=domain,DC=com` + GroupSearchBase *string `mandatory:"false" json:"groupSearchBase"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the first connector to use to communicate with the LDAP server. + OutboundConnector1Id *string `mandatory:"false" json:"outboundConnector1Id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the second connector to use to communicate with the LDAP server. + OutboundConnector2Id *string `mandatory:"false" json:"outboundConnector2Id"` +} + +func (m LdapIdmap) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LdapIdmap) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLdapIdmapSchemaTypeEnum(string(m.SchemaType)); !ok && m.SchemaType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SchemaType: %s. Supported values are: %s.", m.SchemaType, strings.Join(GetLdapIdmapSchemaTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// LdapIdmapSchemaTypeEnum Enum with underlying type: string +type LdapIdmapSchemaTypeEnum string + +// Set of constants representing the allowable values for LdapIdmapSchemaTypeEnum +const ( + LdapIdmapSchemaTypeRfc2307 LdapIdmapSchemaTypeEnum = "RFC2307" +) + +var mappingLdapIdmapSchemaTypeEnum = map[string]LdapIdmapSchemaTypeEnum{ + "RFC2307": LdapIdmapSchemaTypeRfc2307, +} + +var mappingLdapIdmapSchemaTypeEnumLowerCase = map[string]LdapIdmapSchemaTypeEnum{ + "rfc2307": LdapIdmapSchemaTypeRfc2307, +} + +// GetLdapIdmapSchemaTypeEnumValues Enumerates the set of values for LdapIdmapSchemaTypeEnum +func GetLdapIdmapSchemaTypeEnumValues() []LdapIdmapSchemaTypeEnum { + values := make([]LdapIdmapSchemaTypeEnum, 0) + for _, v := range mappingLdapIdmapSchemaTypeEnum { + values = append(values, v) + } + return values +} + +// GetLdapIdmapSchemaTypeEnumStringValues Enumerates the set of values in String for LdapIdmapSchemaTypeEnum +func GetLdapIdmapSchemaTypeEnumStringValues() []string { + return []string{ + "RFC2307", + } +} + +// GetMappingLdapIdmapSchemaTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLdapIdmapSchemaTypeEnum(val string) (LdapIdmapSchemaTypeEnum, bool) { + enum, ok := mappingLdapIdmapSchemaTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/list_outbound_connectors_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/list_outbound_connectors_request_response.go new file mode 100644 index 0000000000..963abe235a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/list_outbound_connectors_request_response.go @@ -0,0 +1,286 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListOutboundConnectorsRequest wrapper for the ListOutboundConnectors operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListOutboundConnectors.go.html to see an example of how to use ListOutboundConnectorsRequest. +type ListOutboundConnectorsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" contributesTo:"query" name:"availabilityDomain"` + + // For list pagination. The maximum number of results per page, + // or items to return in a paginated "List" call. + // 1 is the minimum, 1000 is the maximum. + // For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response + // header from the previous "List" call. + // For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Filter results by the specified lifecycle state. Must be a valid + // state for the resource type. + LifecycleState ListOutboundConnectorsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Example: `My resource` + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // Filter results by OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). Must be an OCID of the correct type for + // the resouce type. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The field to sort by. You can choose either value, but not both. + // By default, when you sort by time created, results are shown + // in descending order. When you sort by display name, results are + // shown in ascending order. + SortBy ListOutboundConnectorsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'asc' or 'desc', where 'asc' is + // ascending and 'desc' is descending. The default order is 'desc' + // except for numeric values. + SortOrder ListOutboundConnectorsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListOutboundConnectorsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListOutboundConnectorsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListOutboundConnectorsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListOutboundConnectorsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListOutboundConnectorsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListOutboundConnectorsLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetListOutboundConnectorsLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListOutboundConnectorsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListOutboundConnectorsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListOutboundConnectorsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListOutboundConnectorsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListOutboundConnectorsResponse wrapper for the ListOutboundConnectors operation +type ListOutboundConnectorsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []OutboundConnectorSummary instances + Items []OutboundConnectorSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, + // additional pages of results remain. + // For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListOutboundConnectorsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListOutboundConnectorsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListOutboundConnectorsLifecycleStateEnum Enum with underlying type: string +type ListOutboundConnectorsLifecycleStateEnum string + +// Set of constants representing the allowable values for ListOutboundConnectorsLifecycleStateEnum +const ( + ListOutboundConnectorsLifecycleStateCreating ListOutboundConnectorsLifecycleStateEnum = "CREATING" + ListOutboundConnectorsLifecycleStateActive ListOutboundConnectorsLifecycleStateEnum = "ACTIVE" + ListOutboundConnectorsLifecycleStateDeleting ListOutboundConnectorsLifecycleStateEnum = "DELETING" + ListOutboundConnectorsLifecycleStateDeleted ListOutboundConnectorsLifecycleStateEnum = "DELETED" + ListOutboundConnectorsLifecycleStateFailed ListOutboundConnectorsLifecycleStateEnum = "FAILED" +) + +var mappingListOutboundConnectorsLifecycleStateEnum = map[string]ListOutboundConnectorsLifecycleStateEnum{ + "CREATING": ListOutboundConnectorsLifecycleStateCreating, + "ACTIVE": ListOutboundConnectorsLifecycleStateActive, + "DELETING": ListOutboundConnectorsLifecycleStateDeleting, + "DELETED": ListOutboundConnectorsLifecycleStateDeleted, + "FAILED": ListOutboundConnectorsLifecycleStateFailed, +} + +var mappingListOutboundConnectorsLifecycleStateEnumLowerCase = map[string]ListOutboundConnectorsLifecycleStateEnum{ + "creating": ListOutboundConnectorsLifecycleStateCreating, + "active": ListOutboundConnectorsLifecycleStateActive, + "deleting": ListOutboundConnectorsLifecycleStateDeleting, + "deleted": ListOutboundConnectorsLifecycleStateDeleted, + "failed": ListOutboundConnectorsLifecycleStateFailed, +} + +// GetListOutboundConnectorsLifecycleStateEnumValues Enumerates the set of values for ListOutboundConnectorsLifecycleStateEnum +func GetListOutboundConnectorsLifecycleStateEnumValues() []ListOutboundConnectorsLifecycleStateEnum { + values := make([]ListOutboundConnectorsLifecycleStateEnum, 0) + for _, v := range mappingListOutboundConnectorsLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetListOutboundConnectorsLifecycleStateEnumStringValues Enumerates the set of values in String for ListOutboundConnectorsLifecycleStateEnum +func GetListOutboundConnectorsLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingListOutboundConnectorsLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListOutboundConnectorsLifecycleStateEnum(val string) (ListOutboundConnectorsLifecycleStateEnum, bool) { + enum, ok := mappingListOutboundConnectorsLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListOutboundConnectorsSortByEnum Enum with underlying type: string +type ListOutboundConnectorsSortByEnum string + +// Set of constants representing the allowable values for ListOutboundConnectorsSortByEnum +const ( + ListOutboundConnectorsSortByTimecreated ListOutboundConnectorsSortByEnum = "TIMECREATED" + ListOutboundConnectorsSortByDisplayname ListOutboundConnectorsSortByEnum = "DISPLAYNAME" +) + +var mappingListOutboundConnectorsSortByEnum = map[string]ListOutboundConnectorsSortByEnum{ + "TIMECREATED": ListOutboundConnectorsSortByTimecreated, + "DISPLAYNAME": ListOutboundConnectorsSortByDisplayname, +} + +var mappingListOutboundConnectorsSortByEnumLowerCase = map[string]ListOutboundConnectorsSortByEnum{ + "timecreated": ListOutboundConnectorsSortByTimecreated, + "displayname": ListOutboundConnectorsSortByDisplayname, +} + +// GetListOutboundConnectorsSortByEnumValues Enumerates the set of values for ListOutboundConnectorsSortByEnum +func GetListOutboundConnectorsSortByEnumValues() []ListOutboundConnectorsSortByEnum { + values := make([]ListOutboundConnectorsSortByEnum, 0) + for _, v := range mappingListOutboundConnectorsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListOutboundConnectorsSortByEnumStringValues Enumerates the set of values in String for ListOutboundConnectorsSortByEnum +func GetListOutboundConnectorsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListOutboundConnectorsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListOutboundConnectorsSortByEnum(val string) (ListOutboundConnectorsSortByEnum, bool) { + enum, ok := mappingListOutboundConnectorsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListOutboundConnectorsSortOrderEnum Enum with underlying type: string +type ListOutboundConnectorsSortOrderEnum string + +// Set of constants representing the allowable values for ListOutboundConnectorsSortOrderEnum +const ( + ListOutboundConnectorsSortOrderAsc ListOutboundConnectorsSortOrderEnum = "ASC" + ListOutboundConnectorsSortOrderDesc ListOutboundConnectorsSortOrderEnum = "DESC" +) + +var mappingListOutboundConnectorsSortOrderEnum = map[string]ListOutboundConnectorsSortOrderEnum{ + "ASC": ListOutboundConnectorsSortOrderAsc, + "DESC": ListOutboundConnectorsSortOrderDesc, +} + +var mappingListOutboundConnectorsSortOrderEnumLowerCase = map[string]ListOutboundConnectorsSortOrderEnum{ + "asc": ListOutboundConnectorsSortOrderAsc, + "desc": ListOutboundConnectorsSortOrderDesc, +} + +// GetListOutboundConnectorsSortOrderEnumValues Enumerates the set of values for ListOutboundConnectorsSortOrderEnum +func GetListOutboundConnectorsSortOrderEnumValues() []ListOutboundConnectorsSortOrderEnum { + values := make([]ListOutboundConnectorsSortOrderEnum, 0) + for _, v := range mappingListOutboundConnectorsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListOutboundConnectorsSortOrderEnumStringValues Enumerates the set of values in String for ListOutboundConnectorsSortOrderEnum +func GetListOutboundConnectorsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListOutboundConnectorsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListOutboundConnectorsSortOrderEnum(val string) (ListOutboundConnectorsSortOrderEnum, bool) { + enum, ok := mappingListOutboundConnectorsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/mount_target.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/mount_target.go index 7809e5c1b8..2447d28e92 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/mount_target.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/mount_target.go @@ -59,12 +59,19 @@ type MountTarget struct { // mount target. ExportSetId *string `mandatory:"false" json:"exportSetId"` + // The method used to map a Unix UID to secondary groups. If NONE, the mount target will not use the Unix UID for ID mapping. + IdmapType MountTargetIdmapTypeEnum `mandatory:"false" json:"idmapType,omitempty"` + + LdapIdmap *LdapIdmap `mandatory:"false" json:"ldapIdmap"` + // A list of Network Security Group OCIDs (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) associated with this mount target. // A maximum of 5 is allowed. // Setting this to an empty array after the list is created removes the mount target from all NSGs. // For more information about NSGs, see Security Rules (https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). NsgIds []string `mandatory:"false" json:"nsgIds"` + Kerberos *Kerberos `mandatory:"false" json:"kerberos"` + // Free-form tags for this resource. Each tag is a simple key-value pair // with no predefined name, type, or namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -90,6 +97,9 @@ func (m MountTarget) ValidateEnumValue() (bool, error) { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetMountTargetLifecycleStateEnumStringValues(), ","))) } + if _, ok := GetMappingMountTargetIdmapTypeEnum(string(m.IdmapType)); !ok && m.IdmapType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdmapType: %s. Supported values are: %s.", m.IdmapType, strings.Join(GetMountTargetIdmapTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -149,3 +159,45 @@ func GetMappingMountTargetLifecycleStateEnum(val string) (MountTargetLifecycleSt enum, ok := mappingMountTargetLifecycleStateEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// MountTargetIdmapTypeEnum Enum with underlying type: string +type MountTargetIdmapTypeEnum string + +// Set of constants representing the allowable values for MountTargetIdmapTypeEnum +const ( + MountTargetIdmapTypeLdap MountTargetIdmapTypeEnum = "LDAP" + MountTargetIdmapTypeNone MountTargetIdmapTypeEnum = "NONE" +) + +var mappingMountTargetIdmapTypeEnum = map[string]MountTargetIdmapTypeEnum{ + "LDAP": MountTargetIdmapTypeLdap, + "NONE": MountTargetIdmapTypeNone, +} + +var mappingMountTargetIdmapTypeEnumLowerCase = map[string]MountTargetIdmapTypeEnum{ + "ldap": MountTargetIdmapTypeLdap, + "none": MountTargetIdmapTypeNone, +} + +// GetMountTargetIdmapTypeEnumValues Enumerates the set of values for MountTargetIdmapTypeEnum +func GetMountTargetIdmapTypeEnumValues() []MountTargetIdmapTypeEnum { + values := make([]MountTargetIdmapTypeEnum, 0) + for _, v := range mappingMountTargetIdmapTypeEnum { + values = append(values, v) + } + return values +} + +// GetMountTargetIdmapTypeEnumStringValues Enumerates the set of values in String for MountTargetIdmapTypeEnum +func GetMountTargetIdmapTypeEnumStringValues() []string { + return []string{ + "LDAP", + "NONE", + } +} + +// GetMappingMountTargetIdmapTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMountTargetIdmapTypeEnum(val string) (MountTargetIdmapTypeEnum, bool) { + enum, ok := mappingMountTargetIdmapTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector.go new file mode 100644 index 0000000000..aec7e505f1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector.go @@ -0,0 +1,261 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OutboundConnector Outbound connectors are used to help File Storage communicate with an external server, such as an LDAP server. +// An outbound connector contains all the information needed to connect, authenticate, and gain authorization to perform the account's required functions. +type OutboundConnector interface { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that contains the outbound connector. + GetCompartmentId() *string + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + GetId() *string + + // The current state of this outbound connector. + GetLifecycleState() OutboundConnectorLifecycleStateEnum + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My outbound connector` + GetDisplayName() *string + + // The date and time the outbound connector was created + // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2016-08-25T21:10:29.600Z` + GetTimeCreated() *common.SDKTime + + // The availability domain the outbound connector is in. May be unset + // as a blank or NULL value. + // Example: `Uocm:PHX-AD-1` + GetAvailabilityDomain() *string + + // Free-form tags for this resource. Each tag is a simple key-value pair + // with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + GetFreeformTags() map[string]string + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + GetDefinedTags() map[string]map[string]interface{} +} + +type outboundconnector struct { + JsonData []byte + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + Id *string `mandatory:"true" json:"id"` + LifecycleState OutboundConnectorLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + DisplayName *string `mandatory:"true" json:"displayName"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + ConnectorType string `json:"connectorType"` +} + +// UnmarshalJSON unmarshals json +func (m *outboundconnector) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshaleroutboundconnector outboundconnector + s := struct { + Model Unmarshaleroutboundconnector + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.CompartmentId = s.Model.CompartmentId + m.Id = s.Model.Id + m.LifecycleState = s.Model.LifecycleState + m.DisplayName = s.Model.DisplayName + m.TimeCreated = s.Model.TimeCreated + m.AvailabilityDomain = s.Model.AvailabilityDomain + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags + m.ConnectorType = s.Model.ConnectorType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *outboundconnector) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.ConnectorType { + case "LDAPBIND": + mm := LdapBindAccount{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for OutboundConnector: %s.", m.ConnectorType) + return *m, nil + } +} + +// GetAvailabilityDomain returns AvailabilityDomain +func (m outboundconnector) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetFreeformTags returns FreeformTags +func (m outboundconnector) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m outboundconnector) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetCompartmentId returns CompartmentId +func (m outboundconnector) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetId returns Id +func (m outboundconnector) GetId() *string { + return m.Id +} + +// GetLifecycleState returns LifecycleState +func (m outboundconnector) GetLifecycleState() OutboundConnectorLifecycleStateEnum { + return m.LifecycleState +} + +// GetDisplayName returns DisplayName +func (m outboundconnector) GetDisplayName() *string { + return m.DisplayName +} + +// GetTimeCreated returns TimeCreated +func (m outboundconnector) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +func (m outboundconnector) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m outboundconnector) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingOutboundConnectorLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetOutboundConnectorLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// OutboundConnectorLifecycleStateEnum Enum with underlying type: string +type OutboundConnectorLifecycleStateEnum string + +// Set of constants representing the allowable values for OutboundConnectorLifecycleStateEnum +const ( + OutboundConnectorLifecycleStateCreating OutboundConnectorLifecycleStateEnum = "CREATING" + OutboundConnectorLifecycleStateActive OutboundConnectorLifecycleStateEnum = "ACTIVE" + OutboundConnectorLifecycleStateDeleting OutboundConnectorLifecycleStateEnum = "DELETING" + OutboundConnectorLifecycleStateDeleted OutboundConnectorLifecycleStateEnum = "DELETED" +) + +var mappingOutboundConnectorLifecycleStateEnum = map[string]OutboundConnectorLifecycleStateEnum{ + "CREATING": OutboundConnectorLifecycleStateCreating, + "ACTIVE": OutboundConnectorLifecycleStateActive, + "DELETING": OutboundConnectorLifecycleStateDeleting, + "DELETED": OutboundConnectorLifecycleStateDeleted, +} + +var mappingOutboundConnectorLifecycleStateEnumLowerCase = map[string]OutboundConnectorLifecycleStateEnum{ + "creating": OutboundConnectorLifecycleStateCreating, + "active": OutboundConnectorLifecycleStateActive, + "deleting": OutboundConnectorLifecycleStateDeleting, + "deleted": OutboundConnectorLifecycleStateDeleted, +} + +// GetOutboundConnectorLifecycleStateEnumValues Enumerates the set of values for OutboundConnectorLifecycleStateEnum +func GetOutboundConnectorLifecycleStateEnumValues() []OutboundConnectorLifecycleStateEnum { + values := make([]OutboundConnectorLifecycleStateEnum, 0) + for _, v := range mappingOutboundConnectorLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetOutboundConnectorLifecycleStateEnumStringValues Enumerates the set of values in String for OutboundConnectorLifecycleStateEnum +func GetOutboundConnectorLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "DELETING", + "DELETED", + } +} + +// GetMappingOutboundConnectorLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingOutboundConnectorLifecycleStateEnum(val string) (OutboundConnectorLifecycleStateEnum, bool) { + enum, ok := mappingOutboundConnectorLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// OutboundConnectorConnectorTypeEnum Enum with underlying type: string +type OutboundConnectorConnectorTypeEnum string + +// Set of constants representing the allowable values for OutboundConnectorConnectorTypeEnum +const ( + OutboundConnectorConnectorTypeLdapbind OutboundConnectorConnectorTypeEnum = "LDAPBIND" +) + +var mappingOutboundConnectorConnectorTypeEnum = map[string]OutboundConnectorConnectorTypeEnum{ + "LDAPBIND": OutboundConnectorConnectorTypeLdapbind, +} + +var mappingOutboundConnectorConnectorTypeEnumLowerCase = map[string]OutboundConnectorConnectorTypeEnum{ + "ldapbind": OutboundConnectorConnectorTypeLdapbind, +} + +// GetOutboundConnectorConnectorTypeEnumValues Enumerates the set of values for OutboundConnectorConnectorTypeEnum +func GetOutboundConnectorConnectorTypeEnumValues() []OutboundConnectorConnectorTypeEnum { + values := make([]OutboundConnectorConnectorTypeEnum, 0) + for _, v := range mappingOutboundConnectorConnectorTypeEnum { + values = append(values, v) + } + return values +} + +// GetOutboundConnectorConnectorTypeEnumStringValues Enumerates the set of values in String for OutboundConnectorConnectorTypeEnum +func GetOutboundConnectorConnectorTypeEnumStringValues() []string { + return []string{ + "LDAPBIND", + } +} + +// GetMappingOutboundConnectorConnectorTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingOutboundConnectorConnectorTypeEnum(val string) (OutboundConnectorConnectorTypeEnum, bool) { + enum, ok := mappingOutboundConnectorConnectorTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector_summary.go new file mode 100644 index 0000000000..4f35432a6b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector_summary.go @@ -0,0 +1,222 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OutboundConnectorSummary Summary information for an outbound connector. +type OutboundConnectorSummary interface { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that contains the outbound connector. + GetCompartmentId() *string + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + GetId() *string + + // The current state of this outbound connector. + GetLifecycleState() OutboundConnectorSummaryLifecycleStateEnum + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My outbound connector` + GetDisplayName() *string + + // The date and time the outbound connector was created + // in RFC 3339 (https://tools.ietf.org/rfc/rfc3339) timestamp format. + // Example: `2016-08-25T21:10:29.600Z` + GetTimeCreated() *common.SDKTime + + // The availability domain the outbound connector is in. May be unset + // as a blank or NULL value. + // Example: `Uocm:PHX-AD-1` + GetAvailabilityDomain() *string + + // Free-form tags for this resource. Each tag is a simple key-value pair + // with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + GetFreeformTags() map[string]string + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + GetDefinedTags() map[string]map[string]interface{} +} + +type outboundconnectorsummary struct { + JsonData []byte + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + Id *string `mandatory:"true" json:"id"` + LifecycleState OutboundConnectorSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + DisplayName *string `mandatory:"true" json:"displayName"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + ConnectorType string `json:"connectorType"` +} + +// UnmarshalJSON unmarshals json +func (m *outboundconnectorsummary) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshaleroutboundconnectorsummary outboundconnectorsummary + s := struct { + Model Unmarshaleroutboundconnectorsummary + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.CompartmentId = s.Model.CompartmentId + m.Id = s.Model.Id + m.LifecycleState = s.Model.LifecycleState + m.DisplayName = s.Model.DisplayName + m.TimeCreated = s.Model.TimeCreated + m.AvailabilityDomain = s.Model.AvailabilityDomain + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags + m.ConnectorType = s.Model.ConnectorType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *outboundconnectorsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.ConnectorType { + case "LDAPBIND": + mm := LdapBindAccountSummary{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for OutboundConnectorSummary: %s.", m.ConnectorType) + return *m, nil + } +} + +// GetAvailabilityDomain returns AvailabilityDomain +func (m outboundconnectorsummary) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetFreeformTags returns FreeformTags +func (m outboundconnectorsummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m outboundconnectorsummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetCompartmentId returns CompartmentId +func (m outboundconnectorsummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetId returns Id +func (m outboundconnectorsummary) GetId() *string { + return m.Id +} + +// GetLifecycleState returns LifecycleState +func (m outboundconnectorsummary) GetLifecycleState() OutboundConnectorSummaryLifecycleStateEnum { + return m.LifecycleState +} + +// GetDisplayName returns DisplayName +func (m outboundconnectorsummary) GetDisplayName() *string { + return m.DisplayName +} + +// GetTimeCreated returns TimeCreated +func (m outboundconnectorsummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +func (m outboundconnectorsummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m outboundconnectorsummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingOutboundConnectorSummaryLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetOutboundConnectorSummaryLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// OutboundConnectorSummaryLifecycleStateEnum Enum with underlying type: string +type OutboundConnectorSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for OutboundConnectorSummaryLifecycleStateEnum +const ( + OutboundConnectorSummaryLifecycleStateCreating OutboundConnectorSummaryLifecycleStateEnum = "CREATING" + OutboundConnectorSummaryLifecycleStateActive OutboundConnectorSummaryLifecycleStateEnum = "ACTIVE" + OutboundConnectorSummaryLifecycleStateDeleting OutboundConnectorSummaryLifecycleStateEnum = "DELETING" + OutboundConnectorSummaryLifecycleStateDeleted OutboundConnectorSummaryLifecycleStateEnum = "DELETED" +) + +var mappingOutboundConnectorSummaryLifecycleStateEnum = map[string]OutboundConnectorSummaryLifecycleStateEnum{ + "CREATING": OutboundConnectorSummaryLifecycleStateCreating, + "ACTIVE": OutboundConnectorSummaryLifecycleStateActive, + "DELETING": OutboundConnectorSummaryLifecycleStateDeleting, + "DELETED": OutboundConnectorSummaryLifecycleStateDeleted, +} + +var mappingOutboundConnectorSummaryLifecycleStateEnumLowerCase = map[string]OutboundConnectorSummaryLifecycleStateEnum{ + "creating": OutboundConnectorSummaryLifecycleStateCreating, + "active": OutboundConnectorSummaryLifecycleStateActive, + "deleting": OutboundConnectorSummaryLifecycleStateDeleting, + "deleted": OutboundConnectorSummaryLifecycleStateDeleted, +} + +// GetOutboundConnectorSummaryLifecycleStateEnumValues Enumerates the set of values for OutboundConnectorSummaryLifecycleStateEnum +func GetOutboundConnectorSummaryLifecycleStateEnumValues() []OutboundConnectorSummaryLifecycleStateEnum { + values := make([]OutboundConnectorSummaryLifecycleStateEnum, 0) + for _, v := range mappingOutboundConnectorSummaryLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetOutboundConnectorSummaryLifecycleStateEnumStringValues Enumerates the set of values in String for OutboundConnectorSummaryLifecycleStateEnum +func GetOutboundConnectorSummaryLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "DELETING", + "DELETED", + } +} + +// GetMappingOutboundConnectorSummaryLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingOutboundConnectorSummaryLifecycleStateEnum(val string) (OutboundConnectorSummaryLifecycleStateEnum, bool) { + enum, ok := mappingOutboundConnectorSummaryLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_export_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_export_details.go index aefd43fb71..499919c0f8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_export_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_export_details.go @@ -19,6 +19,9 @@ import ( // UpdateExportDetails Details for updating the export. type UpdateExportDetails struct { + // Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read. + IsIdmapGroupsForSysAuth *bool `mandatory:"false" json:"isIdmapGroupsForSysAuth"` + // New export options for the export. // **Setting to the empty array will make the export invisible to all clients.** // Leaving unset will leave the `exportOptions` unchanged. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_kerberos_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_kerberos_details.go new file mode 100644 index 0000000000..95d971facd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_kerberos_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateKerberosDetails Kerberos details needed to update configuration. +type UpdateKerberosDetails struct { + + // Kerberos realm that this mount target will join. + KerberosRealm *string `mandatory:"false" json:"kerberosRealm"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the keytab secret in the Vault. + KeyTabSecretId *string `mandatory:"false" json:"keyTabSecretId"` + + // Version of the keytab secret in the Vault to use. + CurrentKeyTabSecretVersion *int `mandatory:"false" json:"currentKeyTabSecretVersion"` + + // Version of the keytab secert in the Vault to use as a backup. + BackupKeyTabSecretVersion *int `mandatory:"false" json:"backupKeyTabSecretVersion"` + + // Specifies whether to enable or disable Kerberos. + IsKerberosEnabled *bool `mandatory:"false" json:"isKerberosEnabled"` +} + +func (m UpdateKerberosDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateKerberosDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_ldap_idmap_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_ldap_idmap_details.go new file mode 100644 index 0000000000..0fe4fec5cb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_ldap_idmap_details.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateLdapIdmapDetails Mount target details about the LDAP ID mapping configuration. +type UpdateLdapIdmapDetails struct { + + // Schema type of the LDAP account. + SchemaType UpdateLdapIdmapDetailsSchemaTypeEnum `mandatory:"false" json:"schemaType,omitempty"` + + // The amount of time that the mount target should allow an entry to persist in its cache before attempting to refresh the entry. + CacheRefreshIntervalSeconds *int `mandatory:"false" json:"cacheRefreshIntervalSeconds"` + + // The maximum amount of time the mount target is allowed to use a cached entry. + CacheLifetimeSeconds *int `mandatory:"false" json:"cacheLifetimeSeconds"` + + // The amount of time that a mount target will maintain information that a user is not found in the ID mapping configuration. + NegativeCacheLifetimeSeconds *int `mandatory:"false" json:"negativeCacheLifetimeSeconds"` + + // All LDAP searches are recursive starting at this user. + // Example: `CN=User,DC=domain,DC=com` + UserSearchBase *string `mandatory:"false" json:"userSearchBase"` + + // All LDAP searches are recursive starting at this group. + // Example: `CN=Group,DC=domain,DC=com` + GroupSearchBase *string `mandatory:"false" json:"groupSearchBase"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the first connector to use to communicate with the LDAP server. + OutboundConnector1Id *string `mandatory:"false" json:"outboundConnector1Id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the second connector to use to communicate with the LDAP server. + OutboundConnector2Id *string `mandatory:"false" json:"outboundConnector2Id"` +} + +func (m UpdateLdapIdmapDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateLdapIdmapDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateLdapIdmapDetailsSchemaTypeEnum(string(m.SchemaType)); !ok && m.SchemaType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SchemaType: %s. Supported values are: %s.", m.SchemaType, strings.Join(GetUpdateLdapIdmapDetailsSchemaTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateLdapIdmapDetailsSchemaTypeEnum Enum with underlying type: string +type UpdateLdapIdmapDetailsSchemaTypeEnum string + +// Set of constants representing the allowable values for UpdateLdapIdmapDetailsSchemaTypeEnum +const ( + UpdateLdapIdmapDetailsSchemaTypeRfc2307 UpdateLdapIdmapDetailsSchemaTypeEnum = "RFC2307" +) + +var mappingUpdateLdapIdmapDetailsSchemaTypeEnum = map[string]UpdateLdapIdmapDetailsSchemaTypeEnum{ + "RFC2307": UpdateLdapIdmapDetailsSchemaTypeRfc2307, +} + +var mappingUpdateLdapIdmapDetailsSchemaTypeEnumLowerCase = map[string]UpdateLdapIdmapDetailsSchemaTypeEnum{ + "rfc2307": UpdateLdapIdmapDetailsSchemaTypeRfc2307, +} + +// GetUpdateLdapIdmapDetailsSchemaTypeEnumValues Enumerates the set of values for UpdateLdapIdmapDetailsSchemaTypeEnum +func GetUpdateLdapIdmapDetailsSchemaTypeEnumValues() []UpdateLdapIdmapDetailsSchemaTypeEnum { + values := make([]UpdateLdapIdmapDetailsSchemaTypeEnum, 0) + for _, v := range mappingUpdateLdapIdmapDetailsSchemaTypeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateLdapIdmapDetailsSchemaTypeEnumStringValues Enumerates the set of values in String for UpdateLdapIdmapDetailsSchemaTypeEnum +func GetUpdateLdapIdmapDetailsSchemaTypeEnumStringValues() []string { + return []string{ + "RFC2307", + } +} + +// GetMappingUpdateLdapIdmapDetailsSchemaTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateLdapIdmapDetailsSchemaTypeEnum(val string) (UpdateLdapIdmapDetailsSchemaTypeEnum, bool) { + enum, ok := mappingUpdateLdapIdmapDetailsSchemaTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_mount_target_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_mount_target_details.go index adbc39773d..dd2f361a1c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_mount_target_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_mount_target_details.go @@ -24,12 +24,19 @@ type UpdateMountTargetDetails struct { // Example: `My mount target` DisplayName *string `mandatory:"false" json:"displayName"` + // The method used to map a Unix UID to secondary groups, if any. + IdmapType MountTargetIdmapTypeEnum `mandatory:"false" json:"idmapType,omitempty"` + + LdapIdmap *UpdateLdapIdmapDetails `mandatory:"false" json:"ldapIdmap"` + // A list of Network Security Group OCIDs (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) associated with this mount target. // A maximum of 5 is allowed. // Setting this to an empty array after the list is created removes the mount target from all NSGs. // For more information about NSGs, see Security Rules (https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). NsgIds []string `mandatory:"false" json:"nsgIds"` + Kerberos *UpdateKerberosDetails `mandatory:"false" json:"kerberos"` + // Free-form tags for this resource. Each tag is a simple key-value pair // with no predefined name, type, or namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -52,6 +59,9 @@ func (m UpdateMountTargetDetails) String() string { func (m UpdateMountTargetDetails) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingMountTargetIdmapTypeEnum(string(m.IdmapType)); !ok && m.IdmapType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdmapType: %s. Supported values are: %s.", m.IdmapType, strings.Join(GetMountTargetIdmapTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_outbound_connector_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_outbound_connector_details.go new file mode 100644 index 0000000000..f1f9dd4980 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_outbound_connector_details.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateOutboundConnectorDetails Details for updating the outbound connector. +type UpdateOutboundConnectorDetails struct { + + // A user-friendly name. Does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My Outbound Connector` + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair + // with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateOutboundConnectorDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateOutboundConnectorDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_outbound_connector_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_outbound_connector_request_response.go new file mode 100644 index 0000000000..6bd8d05316 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_outbound_connector_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateOutboundConnectorRequest wrapper for the UpdateOutboundConnector operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/UpdateOutboundConnector.go.html to see an example of how to use UpdateOutboundConnectorRequest. +type UpdateOutboundConnectorRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + OutboundConnectorId *string `mandatory:"true" contributesTo:"path" name:"outboundConnectorId"` + + // Details object for updating a outbound connector. + UpdateOutboundConnectorDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateOutboundConnectorRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateOutboundConnectorRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateOutboundConnectorRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateOutboundConnectorRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateOutboundConnectorRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateOutboundConnectorResponse wrapper for the UpdateOutboundConnector operation +type UpdateOutboundConnectorResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OutboundConnector instance + OutboundConnector `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateOutboundConnectorResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateOutboundConnectorResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/validate_key_tabs_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/validate_key_tabs_details.go new file mode 100644 index 0000000000..f4be19f663 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/validate_key_tabs_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ValidateKeyTabsDetails Validate keytabs request details. +type ValidateKeyTabsDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target whose keytabs are to be validated. + MountTargetId *string `mandatory:"false" json:"mountTargetId"` + + KeyTabSecretDetails *KeyTabSecretDetails `mandatory:"false" json:"keyTabSecretDetails"` +} + +func (m ValidateKeyTabsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ValidateKeyTabsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/validate_key_tabs_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/validate_key_tabs_request_response.go new file mode 100644 index 0000000000..302a1e4830 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/validate_key_tabs_request_response.go @@ -0,0 +1,90 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ValidateKeyTabsRequest wrapper for the ValidateKeyTabs operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ValidateKeyTabs.go.html to see an example of how to use ValidateKeyTabsRequest. +type ValidateKeyTabsRequest struct { + + // Keytab secret details or mount target ID for validating keytabs. + ValidateKeyTabsDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ValidateKeyTabsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ValidateKeyTabsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ValidateKeyTabsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ValidateKeyTabsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ValidateKeyTabsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ValidateKeyTabsResponse wrapper for the ValidateKeyTabs operation +type ValidateKeyTabsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ValidateKeyTabsResponseDetails instance + ValidateKeyTabsResponseDetails `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ValidateKeyTabsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ValidateKeyTabsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/validate_key_tabs_response_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/validate_key_tabs_response_details.go new file mode 100644 index 0000000000..b5e5b5d251 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/validate_key_tabs_response_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ValidateKeyTabsResponseDetails Validate keytabs response details. +type ValidateKeyTabsResponseDetails struct { + + // An array of keytab entries (principal, encryptionType, keyVersionNumber). + CurrentKerberosKeytabEntries []KerberosKeytabEntry `mandatory:"true" json:"currentKerberosKeytabEntries"` + + // An array of keytab entries (principal, encryptionType, keyVersionNumber). + BackupKerberosKeytabEntries []KerberosKeytabEntry `mandatory:"false" json:"backupKerberosKeytabEntries"` +} + +func (m ValidateKeyTabsResponseDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ValidateKeyTabsResponseDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/add_lock_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/add_lock_details.go index aef319ae9c..fa6cdd0d6e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/add_lock_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/add_lock_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/add_user_to_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/add_user_to_group_details.go index bef4292e56..d4ebf9043c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/add_user_to_group_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/add_user_to_group_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/allowed_domain_license_type_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/allowed_domain_license_type_summary.go index 669a1007c6..3acbe2c4b2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/allowed_domain_license_type_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/allowed_domain_license_type_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/api_key.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/api_key.go index f98591827d..b6a547aa48 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/api_key.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/api_key.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/auth_token.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/auth_token.go index 7322fd0bde..524862d8aa 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/auth_token.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/auth_token.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/authentication_policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/authentication_policy.go index ad9a9338f8..695784e342 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/authentication_policy.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/authentication_policy.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/availability_domain.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/availability_domain.go index 4365fddcab..306b0bc4f9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/availability_domain.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/availability_domain.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/base_tag_definition_validator.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/base_tag_definition_validator.go index 12eb34e6d6..f95e94e0fd 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/base_tag_definition_validator.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/base_tag_definition_validator.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_action_resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_action_resource.go index 17e5659868..7d0ab04358 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_action_resource.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_action_resource.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_action_resource_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_action_resource_type.go index 2e606203bf..3b56caf1ed 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_action_resource_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_action_resource_type.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_action_resource_type_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_action_resource_type_collection.go index 42cd884ba7..cb8f27da6e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_action_resource_type_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_action_resource_type_collection.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_delete_resources_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_delete_resources_details.go index ca20a5bac9..165ed8b57c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_delete_resources_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_delete_resources_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_delete_tags_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_delete_tags_details.go index 02dbc5e6e2..78eefe3fc3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_delete_tags_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_delete_tags_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_operation_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_operation_details.go index a54950d47d..e223f9fd58 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_operation_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_operation_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_resource.go index 366a359ce8..8a4dc1db81 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_resource.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_resource.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_tags_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_tags_details.go index 3f7da07f28..e3105ad5ef 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_tags_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_tags_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_tags_resource_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_tags_resource_type.go index 0ae4418175..5a5f4215c3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_tags_resource_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_tags_resource_type.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_tags_resource_type_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_tags_resource_type_collection.go index 2a22425c71..7fd92fefdc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_tags_resource_type_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_edit_tags_resource_type_collection.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_move_resources_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_move_resources_details.go index 682e76dfd8..ffbfa4f960 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_move_resources_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/bulk_move_resources_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_domain_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_domain_compartment_details.go index 8c3567c46e..8be119687e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_domain_compartment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_domain_compartment_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_domain_license_type_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_domain_license_type_details.go index 5a1318256c..189e38e69d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_domain_license_type_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_domain_license_type_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_tag_namespace_compartment_detail.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_tag_namespace_compartment_detail.go index 54de809cc1..547103000f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_tag_namespace_compartment_detail.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_tag_namespace_compartment_detail.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_tas_domain_license_type_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_tas_domain_license_type_details.go index a0153f5500..7039369700 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_tas_domain_license_type_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/change_tas_domain_license_type_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/compartment.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/compartment.go index 1d96c775b3..15bbf10e8c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/compartment.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/compartment.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_api_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_api_key_details.go index ffb239f2a7..c2f8024c71 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_api_key_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_api_key_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_auth_token_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_auth_token_details.go index 8240da08ce..c5b14962a0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_auth_token_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_auth_token_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_compartment_details.go index a33d171d27..90ebf8296c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_compartment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_compartment_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_customer_secret_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_customer_secret_key_details.go index 8d4b2cdb58..d62e535b3a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_customer_secret_key_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_customer_secret_key_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_db_credential_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_db_credential_details.go index a0288495e0..9c2038125f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_db_credential_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_db_credential_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_domain_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_domain_details.go index 86088bbe21..b88b1d32bc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_domain_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_domain_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_dynamic_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_dynamic_group_details.go index b16958681f..67e9d2b970 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_dynamic_group_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_dynamic_group_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_group_details.go index 6dea4e921b..c2067feb6c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_group_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_group_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_identity_provider_details.go index 8961f0b5a2..59b3400a31 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_identity_provider_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_identity_provider_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity @@ -50,12 +50,12 @@ type CreateIdentityProviderDetails interface { type createidentityproviderdetails struct { JsonData []byte + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` CompartmentId *string `mandatory:"true" json:"compartmentId"` Name *string `mandatory:"true" json:"name"` Description *string `mandatory:"true" json:"description"` ProductType CreateIdentityProviderDetailsProductTypeEnum `mandatory:"true" json:"productType"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` Protocol string `json:"protocol"` } @@ -100,36 +100,36 @@ func (m *createidentityproviderdetails) UnmarshalPolymorphicJSON(data []byte) (i } } -//GetCompartmentId returns CompartmentId +// GetFreeformTags returns FreeformTags +func (m createidentityproviderdetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m createidentityproviderdetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetCompartmentId returns CompartmentId func (m createidentityproviderdetails) GetCompartmentId() *string { return m.CompartmentId } -//GetName returns Name +// GetName returns Name func (m createidentityproviderdetails) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m createidentityproviderdetails) GetDescription() *string { return m.Description } -//GetProductType returns ProductType +// GetProductType returns ProductType func (m createidentityproviderdetails) GetProductType() CreateIdentityProviderDetailsProductTypeEnum { return m.ProductType } -//GetFreeformTags returns FreeformTags -func (m createidentityproviderdetails) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m createidentityproviderdetails) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - func (m createidentityproviderdetails) String() string { return common.PointerString(m) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_idp_group_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_idp_group_mapping_details.go index 9df6e1c8f6..ad3ec258ba 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_idp_group_mapping_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_idp_group_mapping_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_network_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_network_source_details.go index dae9148bd6..3d921097c3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_network_source_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_network_source_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_o_auth2_client_credential_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_o_auth2_client_credential_details.go index 0a3561e104..26b3488b39 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_o_auth2_client_credential_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_o_auth2_client_credential_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_policy_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_policy_details.go index f1c7a527e0..d762067f1c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_policy_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_policy_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_region_subscription_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_region_subscription_details.go index 45fafba318..2c874d71e1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_region_subscription_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_region_subscription_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_saml2_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_saml2_identity_provider_details.go index 933a84f23f..98abf7dc9e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_saml2_identity_provider_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_saml2_identity_provider_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity @@ -59,32 +59,32 @@ type CreateSaml2IdentityProviderDetails struct { ProductType CreateIdentityProviderDetailsProductTypeEnum `mandatory:"true" json:"productType"` } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m CreateSaml2IdentityProviderDetails) GetCompartmentId() *string { return m.CompartmentId } -//GetName returns Name +// GetName returns Name func (m CreateSaml2IdentityProviderDetails) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m CreateSaml2IdentityProviderDetails) GetDescription() *string { return m.Description } -//GetProductType returns ProductType +// GetProductType returns ProductType func (m CreateSaml2IdentityProviderDetails) GetProductType() CreateIdentityProviderDetailsProductTypeEnum { return m.ProductType } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m CreateSaml2IdentityProviderDetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m CreateSaml2IdentityProviderDetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_smtp_credential_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_smtp_credential_details.go index 34b253657f..ddaf5c8de2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_smtp_credential_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_smtp_credential_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_swift_password_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_swift_password_details.go index d93c017d11..2c7da1e7ab 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_swift_password_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_swift_password_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_tag_default_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_tag_default_details.go index 88ae858cc3..36401c0826 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_tag_default_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_tag_default_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_tag_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_tag_details.go index edf50cdffd..70a263f617 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_tag_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_tag_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_tag_namespace_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_tag_namespace_details.go index d3821f4d7a..cb234431b8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_tag_namespace_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_tag_namespace_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_user_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_user_details.go index 71b0a3ed92..61c95d7711 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_user_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/create_user_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/customer_secret_key.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/customer_secret_key.go index d00a08518f..189939c134 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/customer_secret_key.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/customer_secret_key.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/customer_secret_key_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/customer_secret_key_summary.go index 31fb76678a..ff3ca03014 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/customer_secret_key_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/customer_secret_key_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/db_credential.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/db_credential.go index d8b21aa576..675ddd35ea 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/db_credential.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/db_credential.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/db_credential_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/db_credential_summary.go index aa69f7cf7d..84e5482210 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/db_credential_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/db_credential_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/default_tag_definition_validator.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/default_tag_definition_validator.go index 582f26a7b6..6e9d565137 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/default_tag_definition_validator.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/default_tag_definition_validator.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain.go index 554673afc8..429068700b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain_replication.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain_replication.go index 71ec19755f..a08722bb26 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain_replication.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain_replication.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain_replication_states.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain_replication_states.go index 72685d1d17..c621645a1b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain_replication_states.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain_replication_states.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain_summary.go index c2adc27d35..2088bc49be 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/domain_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/dynamic_group.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/dynamic_group.go index 338e1a11a0..7e60d8b5b7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/dynamic_group.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/dynamic_group.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/enable_replication_to_region_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/enable_replication_to_region_details.go index 5603abb9a7..793c4ce9c6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/enable_replication_to_region_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/enable_replication_to_region_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/enum_tag_definition_validator.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/enum_tag_definition_validator.go index fd17817814..944c6270ec 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/enum_tag_definition_validator.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/enum_tag_definition_validator.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/fault_domain.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/fault_domain.go index b8c9981481..4fe3141942 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/fault_domain.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/fault_domain.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/fully_qualified_scope.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/fully_qualified_scope.go index 69e119f381..41e3a939b3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/fully_qualified_scope.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/fully_qualified_scope.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/group.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/group.go index a5deb7c5cc..578fa60c7d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/group.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/group.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request.go index 9b68c2f3f2..58e2186f4f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_error_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_error_summary.go index ab626a5c84..ede72c7d7c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_error_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_error_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_log_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_log_summary.go index 838d5b65f2..2356458636 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_log_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_log_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_resource.go index 392cff1a02..86a4788867 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_resource.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_resource.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_summary.go index 809fcb25e0..2cecea01d6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/iam_work_request_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/identity_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/identity_client.go index 1038f6a6b8..bd3e8b3b26 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/identity_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/identity_client.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity @@ -27,6 +27,9 @@ type IdentityClient struct { // NewIdentityClientWithConfigurationProvider Creates a new default Identity client with the given configuration provider. // the configuration provider will be used for the default signer as well as reading the region func NewIdentityClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client IdentityClient, err error) { + if enabled := common.CheckForEnabledServices("identity"); !enabled { + return client, fmt.Errorf("the Alloy configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local alloy_config file configured the service you're targeting or contact the cloud provider on the availability of this service") + } provider, err := auth.GetGenericConfigurationProvider(configProvider) if err != nil { return client, err @@ -78,7 +81,7 @@ func (client *IdentityClient) setConfigurationProvider(configProvider common.Con region, _ := configProvider.Region() client.SetRegion(region) if client.Host == "" { - return fmt.Errorf("Invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil @@ -95,7 +98,7 @@ func (client *IdentityClient) ConfigurationProvider() *common.ConfigurationProvi // To track the progress of the request, submitting an HTTP GET on the /iamWorkRequests/{iamWorkRequestsId} endpoint retrieves // the operation's status. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ActivateDomain.go.html to see an example of how to use ActivateDomain API. // A default retry strategy applies to this operation ActivateDomain() @@ -159,7 +162,7 @@ func (client IdentityClient) activateDomain(ctx context.Context, request common. // ActivateMfaTotpDevice Activates the specified MFA TOTP device for the user. Activation requires manual interaction with the Console. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ActivateMfaTotpDevice.go.html to see an example of how to use ActivateMfaTotpDevice API. // A default retry strategy applies to this operation ActivateMfaTotpDevice() @@ -223,7 +226,7 @@ func (client IdentityClient) activateMfaTotpDevice(ctx context.Context, request // AddTagDefaultLock Add a resource lock to a tag default. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/AddTagDefaultLock.go.html to see an example of how to use AddTagDefaultLock API. // A default retry strategy applies to this operation AddTagDefaultLock() @@ -287,7 +290,7 @@ func (client IdentityClient) addTagDefaultLock(ctx context.Context, request comm // AddTagNamespaceLock Add a resource lock to a tag namespace. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/AddTagNamespaceLock.go.html to see an example of how to use AddTagNamespaceLock API. // A default retry strategy applies to this operation AddTagNamespaceLock() @@ -353,7 +356,7 @@ func (client IdentityClient) addTagNamespaceLock(ctx context.Context, request co // After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the // object, first make sure its `lifecycleState` has changed to ACTIVE. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/AddUserToGroup.go.html to see an example of how to use AddUserToGroup API. // A default retry strategy applies to this operation AddUserToGroup() @@ -420,7 +423,7 @@ func (client IdentityClient) addUserToGroup(ctx context.Context, request common. // referencing the same tag in a compartment lower down the hierarchy. This set of tag defaults // includes all tag defaults from the current compartment back to the root compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/AssembleEffectiveTagSet.go.html to see an example of how to use AssembleEffectiveTagSet API. // A default retry strategy applies to this operation AssembleEffectiveTagSet() @@ -482,7 +485,7 @@ func (client IdentityClient) assembleEffectiveTagSet(ctx context.Context, reques // WorkRequest. Use the GetWorkRequest // API to monitor the status of the bulk action. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/BulkDeleteResources.go.html to see an example of how to use BulkDeleteResources API. // A default retry strategy applies to this operation BulkDeleteResources() @@ -547,11 +550,11 @@ func (client IdentityClient) bulkDeleteResources(ctx context.Context, request co // BulkDeleteTags Deletes the specified tag key definitions. This operation triggers a process that removes the // tags from all resources in your tenancy. The tag key definitions must be within the same tag namespace. // The following actions happen immediately: +// - If the tag is a cost-tracking tag, the tag no longer counts against your +// 10 cost-tracking tags limit, even if you do not disable the tag before running this operation. +// - If the tag is used with dynamic groups, the rules that contain the tag are no longer +// evaluated against the tag. // -// * If the tag is a cost-tracking tag, the tag no longer counts against your -// 10 cost-tracking tags limit, even if you do not disable the tag before running this operation. -// * If the tag is used with dynamic groups, the rules that contain the tag are no longer -// evaluated against the tag. // After you start this operation, the state of the tag changes to DELETING, and tag removal // from resources begins. This process can take up to 48 hours depending on the number of resources that // are tagged and the regions in which those resources reside. @@ -561,7 +564,7 @@ func (client IdentityClient) bulkDeleteResources(ctx context.Context, request co // In order to delete tags, you must first retire the tags. Use UpdateTag // to retire a tag. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/BulkDeleteTags.go.html to see an example of how to use BulkDeleteTags API. // A default retry strategy applies to this operation BulkDeleteTags() @@ -625,17 +628,18 @@ func (client IdentityClient) bulkDeleteTags(ctx context.Context, request common. // BulkEditTags Edits the specified list of tag key definitions for the selected resources. // This operation triggers a process that edits the tags on all selected resources. The possible actions are: -// * Add a defined tag when the tag does not already exist on the resource. -// * Update the value for a defined tag when the tag is present on the resource. -// * Add a defined tag when it does not already exist on the resource or update the value for a defined tag when the tag is present on the resource. -// * Remove a defined tag from a resource. The tag is removed from the resource regardless of the tag value. +// - Add a defined tag when the tag does not already exist on the resource. +// - Update the value for a defined tag when the tag is present on the resource. +// - Add a defined tag when it does not already exist on the resource or update the value for a defined tag when the tag is present on the resource. +// - Remove a defined tag from a resource. The tag is removed from the resource regardless of the tag value. +// // See BulkEditOperationDetails for more information. // The edits can include a combination of operations and tag sets. // However, multiple operations cannot apply to one key definition in the same request. // For example, if one request adds `tag set-1` to a resource and sets a tag value to `tag set-2`, // `tag set-1` and `tag set-2` cannot have any common tag definitions. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/BulkEditTags.go.html to see an example of how to use BulkEditTags API. // A default retry strategy applies to this operation BulkEditTags() @@ -703,7 +707,7 @@ func (client IdentityClient) bulkEditTags(ctx context.Context, request common.OC // compartments. This operation creates a WorkRequest. // Use the GetWorkRequest API to monitor the status of the bulk action. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/BulkMoveResources.go.html to see an example of how to use BulkMoveResources API. // A default retry strategy applies to this operation BulkMoveResources() @@ -768,9 +772,10 @@ func (client IdentityClient) bulkMoveResources(ctx context.Context, request comm // CascadeDeleteTagNamespace Deletes the specified tag namespace. This operation triggers a process that removes all of the tags // defined in the specified tag namespace from all resources in your tenancy and then deletes the tag namespace. // After you start the delete operation: -// * New tag key definitions cannot be created under the namespace. -// * The state of the tag namespace changes to DELETING. -// * Tag removal from the resources begins. +// - New tag key definitions cannot be created under the namespace. +// - The state of the tag namespace changes to DELETING. +// - Tag removal from the resources begins. +// // This process can take up to 48 hours depending on the number of tag definitions in the namespace, the number of resources // that are tagged, and the locations of the regions in which those resources reside. // After all tags are removed, the state changes to DELETED. You cannot restore a deleted tag namespace. After the deleted tag namespace @@ -779,7 +784,7 @@ func (client IdentityClient) bulkMoveResources(ctx context.Context, request comm // To delete a tag namespace, you must first retire it. Use UpdateTagNamespace // to retire a tag namespace. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CascadeDeleteTagNamespace.go.html to see an example of how to use CascadeDeleteTagNamespace API. // A default retry strategy applies to this operation CascadeDeleteTagNamespace() @@ -845,7 +850,7 @@ func (client IdentityClient) cascadeDeleteTagNamespace(ctx context.Context, requ // To track the progress of the request, submitting an HTTP GET on the /iamWorkRequests/{iamWorkRequestsId} endpoint retrieves // the operation's status. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ChangeDomainCompartment.go.html to see an example of how to use ChangeDomainCompartment API. // A default retry strategy applies to this operation ChangeDomainCompartment() @@ -915,7 +920,7 @@ func (client IdentityClient) changeDomainCompartment(ctx context.Context, reques // To track the progress of the request, submitting an HTTP GET on the /iamWorkRequests/{iamWorkRequestsId} endpoint retrieves // the operation's status. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ChangeDomainLicenseType.go.html to see an example of how to use ChangeDomainLicenseType API. // A default retry strategy applies to this operation ChangeDomainLicenseType() @@ -982,7 +987,7 @@ func (client IdentityClient) changeDomainLicenseType(ctx context.Context, reques // For more information about IAM policies, see Details for IAM (https://docs.cloud.oracle.com/Content/Identity/policyreference/iampolicyreference.htm). // Moving a tag namespace moves all the tag key definitions contained in the tag namespace. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ChangeTagNamespaceCompartment.go.html to see an example of how to use ChangeTagNamespaceCompartment API. // A default retry strategy applies to this operation ChangeTagNamespaceCompartment() @@ -1053,7 +1058,7 @@ func (client IdentityClient) changeTagNamespaceCompartment(ctx context.Context, // does not need to write a policy to give users this ability. To compare, administrators who have permission to the // tenancy can use this operation to create an auth token for any user, including themselves. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateAuthToken.go.html to see an example of how to use CreateAuthToken API. // A default retry strategy applies to this operation CreateAuthToken() @@ -1129,7 +1134,7 @@ func (client IdentityClient) createAuthToken(ctx context.Context, request common // After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the // object, first make sure its `lifecycleState` has changed to ACTIVE. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateCompartment.go.html to see an example of how to use CreateCompartment API. // A default retry strategy applies to this operation CreateCompartment() @@ -1201,7 +1206,7 @@ func (client IdentityClient) createCompartment(ctx context.Context, request comm // does not need to write a policy to give users this ability. To compare, administrators who have permission to the // tenancy can use this operation to create a secret key for any user, including themselves. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateCustomerSecretKey.go.html to see an example of how to use CreateCustomerSecretKey API. // A default retry strategy applies to this operation CreateCustomerSecretKey() @@ -1265,7 +1270,7 @@ func (client IdentityClient) createCustomerSecretKey(ctx context.Context, reques // CreateDbCredential Creates a new DB credential for the specified user. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateDbCredential.go.html to see an example of how to use CreateDbCredential API. // A default retry strategy applies to this operation CreateDbCredential() @@ -1334,7 +1339,7 @@ func (client IdentityClient) createDbCredential(ctx context.Context, request com // the operation's status. // After creating an `identity domain`, first make sure its `lifecycleState` changes from CREATING to ACTIVE before you use it. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateDomain.go.html to see an example of how to use CreateDomain API. // A default retry strategy applies to this operation CreateDomain() @@ -1411,7 +1416,7 @@ func (client IdentityClient) createDomain(ctx context.Context, request common.OC // After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the // object, first make sure its `lifecycleState` has changed to ACTIVE. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateDynamicGroup.go.html to see an example of how to use CreateDynamicGroup API. // A default retry strategy applies to this operation CreateDynamicGroup() @@ -1490,7 +1495,7 @@ func (client IdentityClient) createDynamicGroup(ctx context.Context, request com // See AddUserToGroup and // CreatePolicy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateGroup.go.html to see an example of how to use CreateGroup API. // A default retry strategy applies to this operation CreateGroup() @@ -1568,7 +1573,7 @@ func (client IdentityClient) createGroup(ctx context.Context, request common.OCI // be CREATING. Before using the object, first make sure its `lifecycleState` has // changed to ACTIVE. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateIdentityProvider.go.html to see an example of how to use CreateIdentityProvider API. // A default retry strategy applies to this operation CreateIdentityProvider() @@ -1634,7 +1639,7 @@ func (client IdentityClient) createIdentityProvider(ctx context.Context, request // Creates a single mapping between an IdP group and an IAM Service // Group. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateIdpGroupMapping.go.html to see an example of how to use CreateIdpGroupMapping API. // A default retry strategy applies to this operation CreateIdpGroupMapping() @@ -1698,7 +1703,7 @@ func (client IdentityClient) createIdpGroupMapping(ctx context.Context, request // CreateMfaTotpDevice Creates a new MFA TOTP device for the user. A user can have one MFA TOTP device. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateMfaTotpDevice.go.html to see an example of how to use CreateMfaTotpDevice API. // A default retry strategy applies to this operation CreateMfaTotpDevice() @@ -1777,7 +1782,7 @@ func (client IdentityClient) createMfaTotpDevice(ctx context.Context, request co // After your network resource is created, you can use it in policy to restrict access to only requests made from an allowed // IP address specified in your network source. For more information, see Managing Network Sources (https://docs.cloud.oracle.com/Content/Identity/Tasks/managingnetworksources.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateNetworkSource.go.html to see an example of how to use CreateNetworkSource API. // A default retry strategy applies to this operation CreateNetworkSource() @@ -1841,7 +1846,7 @@ func (client IdentityClient) createNetworkSource(ctx context.Context, request co // CreateOAuthClientCredential Creates Oauth token for the user // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateOAuthClientCredential.go.html to see an example of how to use CreateOAuthClientCredential API. // A default retry strategy applies to this operation CreateOAuthClientCredential() @@ -1916,7 +1921,7 @@ func (client IdentityClient) createOAuthClientCredential(ctx context.Context, re // **Note:** The user's Console login is the unique name you specified when you created the user // (see CreateUser). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateOrResetUIPassword.go.html to see an example of how to use CreateOrResetUIPassword API. // A default retry strategy applies to this operation CreateOrResetUIPassword() @@ -1991,7 +1996,7 @@ func (client IdentityClient) createOrResetUIPassword(ctx context.Context, reques // object, first make sure its `lifecycleState` has changed to ACTIVE. // New policies take effect typically within 10 seconds. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreatePolicy.go.html to see an example of how to use CreatePolicy API. // A default retry strategy applies to this operation CreatePolicy() @@ -2055,7 +2060,7 @@ func (client IdentityClient) createPolicy(ctx context.Context, request common.OC // CreateRegionSubscription Creates a subscription to a region for a tenancy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateRegionSubscription.go.html to see an example of how to use CreateRegionSubscription API. // A default retry strategy applies to this operation CreateRegionSubscription() @@ -2122,7 +2127,7 @@ func (client IdentityClient) createRegionSubscription(ctx context.Context, reque // have to be unique, and you can change it anytime with // UpdateSmtpCredential. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateSmtpCredential.go.html to see an example of how to use CreateSmtpCredential API. // A default retry strategy applies to this operation CreateSmtpCredential() @@ -2194,7 +2199,7 @@ func (client IdentityClient) createSmtpCredential(ctx context.Context, request c // does not need to write a policy to give users this ability. To compare, administrators who have permission to the // tenancy can use this operation to create a Swift password for any user, including themselves. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateSwiftPassword.go.html to see an example of how to use CreateSwiftPassword API. // A default retry strategy applies to this operation CreateSwiftPassword() @@ -2274,7 +2279,7 @@ func (client IdentityClient) createSwiftPassword(ctx context.Context, request co // * If a `validator` is set, the user applying the tag to a resource must select from a list // of values that you supply with EnumTagDefinitionValidator. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateTag.go.html to see an example of how to use CreateTag API. // A default retry strategy applies to this operation CreateTag() @@ -2343,7 +2348,7 @@ func (client IdentityClient) createTag(ctx context.Context, request common.OCIRe // * If the `isRequired` flag is set to "true", the value is set during resource creation. // * If the `isRequired` flag is set to "false", the value you enter is set during resource creation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateTagDefault.go.html to see an example of how to use CreateTagDefault API. // A default retry strategy applies to this operation CreateTagDefault() @@ -2417,7 +2422,7 @@ func (client IdentityClient) createTagDefault(ctx context.Context, request commo // It does not have to be unique, and you can change it with // UpdateTagNamespace. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateTagNamespace.go.html to see an example of how to use CreateTagNamespace API. // A default retry strategy applies to this operation CreateTagNamespace() @@ -2509,7 +2514,7 @@ func (client IdentityClient) createTagNamespace(ctx context.Context, request com // UploadApiKey). // **Important:** Make sure to inform the new user which compartment(s) they have access to. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/CreateUser.go.html to see an example of how to use CreateUser API. // A default retry strategy applies to this operation CreateUser() @@ -2579,7 +2584,7 @@ func (client IdentityClient) createUser(ctx context.Context, request common.OCIR // To track the progress of the request, submitting an HTTP GET on the /iamWorkRequests/{iamWorkRequestsId} endpoint retrieves // the operation's status. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeactivateDomain.go.html to see an example of how to use DeactivateDomain API. // A default retry strategy applies to this operation DeactivateDomain() @@ -2647,7 +2652,7 @@ func (client IdentityClient) deactivateDomain(ctx context.Context, request commo // To compare, administrators who have permission to the tenancy can use this operation to delete // a key for any user, including themselves. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteApiKey.go.html to see an example of how to use DeleteApiKey API. // A default retry strategy applies to this operation DeleteApiKey() @@ -2705,7 +2710,7 @@ func (client IdentityClient) deleteApiKey(ctx context.Context, request common.OC // DeleteAuthToken Deletes the specified auth token for the specified user. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteAuthToken.go.html to see an example of how to use DeleteAuthToken API. // A default retry strategy applies to this operation DeleteAuthToken() @@ -2763,7 +2768,7 @@ func (client IdentityClient) deleteAuthToken(ctx context.Context, request common // DeleteCompartment Deletes the specified compartment. The compartment must be empty. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteCompartment.go.html to see an example of how to use DeleteCompartment API. // A default retry strategy applies to this operation DeleteCompartment() @@ -2821,7 +2826,7 @@ func (client IdentityClient) deleteCompartment(ctx context.Context, request comm // DeleteCustomerSecretKey Deletes the specified secret key for the specified user. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteCustomerSecretKey.go.html to see an example of how to use DeleteCustomerSecretKey API. // A default retry strategy applies to this operation DeleteCustomerSecretKey() @@ -2879,7 +2884,7 @@ func (client IdentityClient) deleteCustomerSecretKey(ctx context.Context, reques // DeleteDbCredential Deletes the specified DB credential for the specified user. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteDbCredential.go.html to see an example of how to use DeleteDbCredential API. // A default retry strategy applies to this operation DeleteDbCredential() @@ -2943,7 +2948,7 @@ func (client IdentityClient) deleteDbCredential(ctx context.Context, request com // To track the progress of the request, submitting an HTTP GET on the /iamWorkRequests/{iamWorkRequestsId} endpoint retrieves // the operation's status. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteDomain.go.html to see an example of how to use DeleteDomain API. // A default retry strategy applies to this operation DeleteDomain() @@ -3001,7 +3006,7 @@ func (client IdentityClient) deleteDomain(ctx context.Context, request common.OC // DeleteDynamicGroup Deletes the specified dynamic group. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteDynamicGroup.go.html to see an example of how to use DeleteDynamicGroup API. // A default retry strategy applies to this operation DeleteDynamicGroup() @@ -3059,7 +3064,7 @@ func (client IdentityClient) deleteDynamicGroup(ctx context.Context, request com // DeleteGroup Deletes the specified group. The group must be empty. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteGroup.go.html to see an example of how to use DeleteGroup API. // A default retry strategy applies to this operation DeleteGroup() @@ -3119,7 +3124,7 @@ func (client IdentityClient) deleteGroup(ctx context.Context, request common.OCI // Deletes the specified identity provider. The identity provider must not have // any group mappings (see IdpGroupMapping). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteIdentityProvider.go.html to see an example of how to use DeleteIdentityProvider API. // A default retry strategy applies to this operation DeleteIdentityProvider() @@ -3178,7 +3183,7 @@ func (client IdentityClient) deleteIdentityProvider(ctx context.Context, request // DeleteIdpGroupMapping **Deprecated.** For more information, see Deprecated IAM Service APIs (https://docs.cloud.oracle.com/Content/Identity/Reference/deprecatediamapis.htm). // Deletes the specified group mapping. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteIdpGroupMapping.go.html to see an example of how to use DeleteIdpGroupMapping API. // A default retry strategy applies to this operation DeleteIdpGroupMapping() @@ -3236,7 +3241,7 @@ func (client IdentityClient) deleteIdpGroupMapping(ctx context.Context, request // DeleteMfaTotpDevice Deletes the specified MFA TOTP device for the specified user. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteMfaTotpDevice.go.html to see an example of how to use DeleteMfaTotpDevice API. // A default retry strategy applies to this operation DeleteMfaTotpDevice() @@ -3294,7 +3299,7 @@ func (client IdentityClient) deleteMfaTotpDevice(ctx context.Context, request co // DeleteNetworkSource Deletes the specified network source. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteNetworkSource.go.html to see an example of how to use DeleteNetworkSource API. // A default retry strategy applies to this operation DeleteNetworkSource() @@ -3352,7 +3357,7 @@ func (client IdentityClient) deleteNetworkSource(ctx context.Context, request co // DeleteOAuthClientCredential Delete Oauth token for the user // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteOAuthClientCredential.go.html to see an example of how to use DeleteOAuthClientCredential API. // A default retry strategy applies to this operation DeleteOAuthClientCredential() @@ -3410,7 +3415,7 @@ func (client IdentityClient) deleteOAuthClientCredential(ctx context.Context, re // DeletePolicy Deletes the specified policy. The deletion takes effect typically within 10 seconds. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeletePolicy.go.html to see an example of how to use DeletePolicy API. // A default retry strategy applies to this operation DeletePolicy() @@ -3468,7 +3473,7 @@ func (client IdentityClient) deletePolicy(ctx context.Context, request common.OC // DeleteSmtpCredential Deletes the specified SMTP credential for the specified user. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteSmtpCredential.go.html to see an example of how to use DeleteSmtpCredential API. // A default retry strategy applies to this operation DeleteSmtpCredential() @@ -3527,7 +3532,7 @@ func (client IdentityClient) deleteSmtpCredential(ctx context.Context, request c // DeleteSwiftPassword **Deprecated. Use DeleteAuthToken instead.** // Deletes the specified Swift password for the specified user. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteSwiftPassword.go.html to see an example of how to use DeleteSwiftPassword API. // A default retry strategy applies to this operation DeleteSwiftPassword() @@ -3586,10 +3591,11 @@ func (client IdentityClient) deleteSwiftPassword(ctx context.Context, request co // DeleteTag Deletes the specified tag definition. This operation triggers a process that removes the // tag from all resources in your tenancy. // These things happen immediately: -// * If the tag was a cost-tracking tag, it no longer counts against your 10 cost-tracking -// tags limit, whether you first disabled it or not. -// * If the tag was used with dynamic groups, none of the rules that contain the tag will -// be evaluated against the tag. +// - If the tag was a cost-tracking tag, it no longer counts against your 10 cost-tracking +// tags limit, whether you first disabled it or not. +// - If the tag was used with dynamic groups, none of the rules that contain the tag will +// be evaluated against the tag. +// // When you start the delete operation, the state of the tag changes to DELETING and tag removal // from resources begins. This can take up to 48 hours depending on the number of resources that // were tagged as well as the regions in which those resources reside. @@ -3599,7 +3605,7 @@ func (client IdentityClient) deleteSwiftPassword(ctx context.Context, request co // To delete a tag, you must first retire it. Use UpdateTag // to retire a tag. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteTag.go.html to see an example of how to use DeleteTag API. // A default retry strategy applies to this operation DeleteTag() @@ -3657,7 +3663,7 @@ func (client IdentityClient) deleteTag(ctx context.Context, request common.OCIRe // DeleteTagDefault Deletes the the specified tag default. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteTagDefault.go.html to see an example of how to use DeleteTagDefault API. // A default retry strategy applies to this operation DeleteTagDefault() @@ -3719,7 +3725,7 @@ func (client IdentityClient) deleteTagDefault(ctx context.Context, request commo // the tag definitions contained within that namespace. // Use DeleteTag to delete a tag definition. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteTagNamespace.go.html to see an example of how to use DeleteTagNamespace API. // A default retry strategy applies to this operation DeleteTagNamespace() @@ -3777,7 +3783,7 @@ func (client IdentityClient) deleteTagNamespace(ctx context.Context, request com // DeleteUser Deletes the specified user. The user must not be in any groups. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/DeleteUser.go.html to see an example of how to use DeleteUser API. // A default retry strategy applies to this operation DeleteUser() @@ -3842,7 +3848,7 @@ func (client IdentityClient) deleteUser(ctx context.Context, request common.OCIR // To track the progress of the request, submitting an HTTP GET on the /iamWorkRequests/{iamWorkRequestsId} endpoint retrieves // the operation's status. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/EnableReplicationToRegion.go.html to see an example of how to use EnableReplicationToRegion API. // A default retry strategy applies to this operation EnableReplicationToRegion() @@ -3906,7 +3912,7 @@ func (client IdentityClient) enableReplicationToRegion(ctx context.Context, requ // GenerateTotpSeed Generate seed for the MFA TOTP device. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GenerateTotpSeed.go.html to see an example of how to use GenerateTotpSeed API. // A default retry strategy applies to this operation GenerateTotpSeed() @@ -3963,10 +3969,10 @@ func (client IdentityClient) generateTotpSeed(ctx context.Context, request commo return response, err } -// GetAuthenticationPolicy Gets the authentication policy for the given tenancy. You must specify your tenant’s OCID as the value for +// GetAuthenticationPolicy Gets the authentication policy for the given tenancy. You must specify your tenant's OCID as the value for // the compartment ID (remember that the tenancy is simply the root compartment). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetAuthenticationPolicy.go.html to see an example of how to use GetAuthenticationPolicy API. // A default retry strategy applies to this operation GetAuthenticationPolicy() @@ -4030,7 +4036,7 @@ func (client IdentityClient) getAuthenticationPolicy(ctx context.Context, reques // call the ListInstances operation in the Cloud Compute // Service or the ListVolumes operation in Cloud Block Storage. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetCompartment.go.html to see an example of how to use GetCompartment API. // A default retry strategy applies to this operation GetCompartment() @@ -4088,7 +4094,7 @@ func (client IdentityClient) getCompartment(ctx context.Context, request common. // GetDomain (For tenancies that support identity domains) Gets the specified identity domain's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetDomain.go.html to see an example of how to use GetDomain API. // A default retry strategy applies to this operation GetDomain() @@ -4146,7 +4152,7 @@ func (client IdentityClient) getDomain(ctx context.Context, request common.OCIRe // GetDynamicGroup Gets the specified dynamic group's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetDynamicGroup.go.html to see an example of how to use GetDynamicGroup API. // A default retry strategy applies to this operation GetDynamicGroup() @@ -4207,7 +4213,7 @@ func (client IdentityClient) getDynamicGroup(ctx context.Context, request common // ListUserGroupMemberships and // provide the group's OCID as a query parameter in the request. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetGroup.go.html to see an example of how to use GetGroup API. // A default retry strategy applies to this operation GetGroup() @@ -4265,7 +4271,7 @@ func (client IdentityClient) getGroup(ctx context.Context, request common.OCIReq // GetIamWorkRequest Gets the details of a specified IAM work request. The workRequestID is returned in the opc-workrequest-id header for any asynchronous operation in the Identity and Access Management service. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetIamWorkRequest.go.html to see an example of how to use GetIamWorkRequest API. // A default retry strategy applies to this operation GetIamWorkRequest() @@ -4324,7 +4330,7 @@ func (client IdentityClient) getIamWorkRequest(ctx context.Context, request comm // GetIdentityProvider **Deprecated.** For more information, see Deprecated IAM Service APIs (https://docs.cloud.oracle.com/Content/Identity/Reference/deprecatediamapis.htm). // Gets the specified identity provider's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetIdentityProvider.go.html to see an example of how to use GetIdentityProvider API. // A default retry strategy applies to this operation GetIdentityProvider() @@ -4383,7 +4389,7 @@ func (client IdentityClient) getIdentityProvider(ctx context.Context, request co // GetIdpGroupMapping **Deprecated.** For more information, see Deprecated IAM Service APIs (https://docs.cloud.oracle.com/Content/Identity/Reference/deprecatediamapis.htm). // Gets the specified group mapping. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetIdpGroupMapping.go.html to see an example of how to use GetIdpGroupMapping API. // A default retry strategy applies to this operation GetIdpGroupMapping() @@ -4441,7 +4447,7 @@ func (client IdentityClient) getIdpGroupMapping(ctx context.Context, request com // GetMfaTotpDevice Get the specified MFA TOTP device for the specified user. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetMfaTotpDevice.go.html to see an example of how to use GetMfaTotpDevice API. // A default retry strategy applies to this operation GetMfaTotpDevice() @@ -4499,7 +4505,7 @@ func (client IdentityClient) getMfaTotpDevice(ctx context.Context, request commo // GetNetworkSource Gets the specified network source's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetNetworkSource.go.html to see an example of how to use GetNetworkSource API. // A default retry strategy applies to this operation GetNetworkSource() @@ -4557,7 +4563,7 @@ func (client IdentityClient) getNetworkSource(ctx context.Context, request commo // GetPolicy Gets the specified policy's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetPolicy.go.html to see an example of how to use GetPolicy API. // A default retry strategy applies to this operation GetPolicy() @@ -4615,7 +4621,7 @@ func (client IdentityClient) getPolicy(ctx context.Context, request common.OCIRe // GetStandardTagTemplate Retrieve the standard tag namespace template given the standard tag namespace name. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetStandardTagTemplate.go.html to see an example of how to use GetStandardTagTemplate API. // A default retry strategy applies to this operation GetStandardTagTemplate() @@ -4673,7 +4679,7 @@ func (client IdentityClient) getStandardTagTemplate(ctx context.Context, request // GetTag Gets the specified tag's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetTag.go.html to see an example of how to use GetTag API. // A default retry strategy applies to this operation GetTag() @@ -4731,7 +4737,7 @@ func (client IdentityClient) getTag(ctx context.Context, request common.OCIReque // GetTagDefault Retrieves the specified tag default. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetTagDefault.go.html to see an example of how to use GetTagDefault API. // A default retry strategy applies to this operation GetTagDefault() @@ -4789,7 +4795,7 @@ func (client IdentityClient) getTagDefault(ctx context.Context, request common.O // GetTagNamespace Gets the specified tag namespace's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetTagNamespace.go.html to see an example of how to use GetTagNamespace API. // A default retry strategy applies to this operation GetTagNamespace() @@ -4848,7 +4854,7 @@ func (client IdentityClient) getTagNamespace(ctx context.Context, request common // GetTaggingWorkRequest Gets details on a specified work request. The workRequestID is returned in the opc-workrequest-id header // for any asynchronous operation in tagging service. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetTaggingWorkRequest.go.html to see an example of how to use GetTaggingWorkRequest API. // A default retry strategy applies to this operation GetTaggingWorkRequest() @@ -4906,7 +4912,7 @@ func (client IdentityClient) getTaggingWorkRequest(ctx context.Context, request // GetTenancy Get the specified tenancy's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetTenancy.go.html to see an example of how to use GetTenancy API. // A default retry strategy applies to this operation GetTenancy() @@ -4964,7 +4970,7 @@ func (client IdentityClient) getTenancy(ctx context.Context, request common.OCIR // GetUser Gets the specified user's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetUser.go.html to see an example of how to use GetUser API. // A default retry strategy applies to this operation GetUser() @@ -5022,7 +5028,7 @@ func (client IdentityClient) getUser(ctx context.Context, request common.OCIRequ // GetUserGroupMembership Gets the specified UserGroupMembership's information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetUserGroupMembership.go.html to see an example of how to use GetUserGroupMembership API. // A default retry strategy applies to this operation GetUserGroupMembership() @@ -5081,7 +5087,7 @@ func (client IdentityClient) getUserGroupMembership(ctx context.Context, request // GetUserUIPasswordInformation Gets the specified user's console password information. The returned object contains the user's OCID, // but not the password itself. The actual password is returned only when created or reset. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetUserUIPasswordInformation.go.html to see an example of how to use GetUserUIPasswordInformation API. // A default retry strategy applies to this operation GetUserUIPasswordInformation() @@ -5140,7 +5146,7 @@ func (client IdentityClient) getUserUIPasswordInformation(ctx context.Context, r // GetWorkRequest Gets details on a specified work request. The workRequestID is returned in the opc-workrequest-id header // for any asynchronous operation in the compartment service. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/GetWorkRequest.go.html to see an example of how to use GetWorkRequest API. // A default retry strategy applies to this operation GetWorkRequest() @@ -5199,7 +5205,7 @@ func (client IdentityClient) getWorkRequest(ctx context.Context, request common. // ImportStandardTags OCI will release Tag Namespaces that our customers can import. // These Tag Namespaces will provide Tags for our customers and Partners to provide consistency and enable data reporting. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ImportStandardTags.go.html to see an example of how to use ImportStandardTags API. // A default retry strategy applies to this operation ImportStandardTags() @@ -5266,7 +5272,7 @@ func (client IdentityClient) importStandardTags(ctx context.Context, request com // If `currentLicenseTypeName` is provided, then the request returns license types that the identity domain with the specified license // type name can change to. Otherwise, the request returns all valid license types currently supported. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListAllowedDomainLicenseTypes.go.html to see an example of how to use ListAllowedDomainLicenseTypes API. // A default retry strategy applies to this operation ListAllowedDomainLicenseTypes() @@ -5326,7 +5332,7 @@ func (client IdentityClient) listAllowedDomainLicenseTypes(ctx context.Context, // Every user has permission to use this API call for *their own user ID*. An administrator in your // organization does not need to write a policy to give users this ability. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListApiKeys.go.html to see an example of how to use ListApiKeys API. // A default retry strategy applies to this operation ListApiKeys() @@ -5385,7 +5391,7 @@ func (client IdentityClient) listApiKeys(ctx context.Context, request common.OCI // ListAuthTokens Lists the auth tokens for the specified user. The returned object contains the token's OCID, but not // the token itself. The actual token is returned only upon creation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListAuthTokens.go.html to see an example of how to use ListAuthTokens API. // A default retry strategy applies to this operation ListAuthTokens() @@ -5447,7 +5453,7 @@ func (client IdentityClient) listAuthTokens(ctx context.Context, request common. // Note that the order of the results returned can change if availability domains are added or removed; therefore, do not // create a dependency on the list order. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListAvailabilityDomains.go.html to see an example of how to use ListAvailabilityDomains API. // A default retry strategy applies to this operation ListAvailabilityDomains() @@ -5511,7 +5517,7 @@ func (client IdentityClient) listAvailabilityDomains(ctx context.Context, reques // require an OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) to identify a specific resource, but some resource-types, // such as buckets, require you to provide other identifying information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListBulkActionResourceTypes.go.html to see an example of how to use ListBulkActionResourceTypes API. // A default retry strategy applies to this operation ListBulkActionResourceTypes() @@ -5569,7 +5575,7 @@ func (client IdentityClient) listBulkActionResourceTypes(ctx context.Context, re // ListBulkEditTagsResourceTypes Lists the resource types that support bulk tag editing. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListBulkEditTagsResourceTypes.go.html to see an example of how to use ListBulkEditTagsResourceTypes API. // A default retry strategy applies to this operation ListBulkEditTagsResourceTypes() @@ -5640,7 +5646,7 @@ func (client IdentityClient) listBulkEditTagsResourceTypes(ctx context.Context, // set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ANY. // See Where to Get the Tenancy's OCID and User's OCID (https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#five). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListCompartments.go.html to see an example of how to use ListCompartments API. // A default retry strategy applies to this operation ListCompartments() @@ -5699,7 +5705,7 @@ func (client IdentityClient) listCompartments(ctx context.Context, request commo // ListCostTrackingTags Lists all the tags enabled for cost-tracking in the specified tenancy. For information about // cost-tracking tags, see Using Cost-tracking Tags (https://docs.cloud.oracle.com/Content/Tagging/Tasks/usingcosttrackingtags.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListCostTrackingTags.go.html to see an example of how to use ListCostTrackingTags API. // A default retry strategy applies to this operation ListCostTrackingTags() @@ -5758,7 +5764,7 @@ func (client IdentityClient) listCostTrackingTags(ctx context.Context, request c // ListCustomerSecretKeys Lists the secret keys for the specified user. The returned object contains the secret key's OCID, but not // the secret key itself. The actual secret key is returned only upon creation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListCustomerSecretKeys.go.html to see an example of how to use ListCustomerSecretKeys API. // A default retry strategy applies to this operation ListCustomerSecretKeys() @@ -5816,7 +5822,7 @@ func (client IdentityClient) listCustomerSecretKeys(ctx context.Context, request // ListDbCredentials Lists the DB credentials for the specified user. The returned object contains the credential's OCID // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListDbCredentials.go.html to see an example of how to use ListDbCredentials API. // A default retry strategy applies to this operation ListDbCredentials() @@ -5874,7 +5880,7 @@ func (client IdentityClient) listDbCredentials(ctx context.Context, request comm // ListDomains (For tenancies that support identity domains) Lists all identity domains within a tenancy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListDomains.go.html to see an example of how to use ListDomains API. // A default retry strategy applies to this operation ListDomains() @@ -5934,7 +5940,7 @@ func (client IdentityClient) listDomains(ctx context.Context, request common.OCI // the compartment ID (remember that the tenancy is simply the root compartment). // See Where to Get the Tenancy's OCID and User's OCID (https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#five). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListDynamicGroups.go.html to see an example of how to use ListDynamicGroups API. // A default retry strategy applies to this operation ListDynamicGroups() @@ -5994,7 +6000,7 @@ func (client IdentityClient) listDynamicGroups(ctx context.Context, request comm // of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). // See Where to Get the Tenancy's OCID and User's OCID (https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#five). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListFaultDomains.go.html to see an example of how to use ListFaultDomains API. // A default retry strategy applies to this operation ListFaultDomains() @@ -6054,7 +6060,7 @@ func (client IdentityClient) listFaultDomains(ctx context.Context, request commo // the compartment ID (remember that the tenancy is simply the root compartment). // See Where to Get the Tenancy's OCID and User's OCID (https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#five). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListGroups.go.html to see an example of how to use ListGroups API. // A default retry strategy applies to this operation ListGroups() @@ -6112,7 +6118,7 @@ func (client IdentityClient) listGroups(ctx context.Context, request common.OCIR // ListIamWorkRequestErrors Gets error details for a specified IAM work request. The workRequestID is returned in the opc-workrequest-id header for any asynchronous operation in the Identity and Access Management service. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListIamWorkRequestErrors.go.html to see an example of how to use ListIamWorkRequestErrors API. // A default retry strategy applies to this operation ListIamWorkRequestErrors() @@ -6170,7 +6176,7 @@ func (client IdentityClient) listIamWorkRequestErrors(ctx context.Context, reque // ListIamWorkRequestLogs Gets logs for a specified IAM work request. The workRequestID is returned in the opc-workrequest-id header for any asynchronous operation in the Identity and Access Management service. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListIamWorkRequestLogs.go.html to see an example of how to use ListIamWorkRequestLogs API. // A default retry strategy applies to this operation ListIamWorkRequestLogs() @@ -6228,7 +6234,7 @@ func (client IdentityClient) listIamWorkRequestLogs(ctx context.Context, request // ListIamWorkRequests Lists the IAM work requests in compartment. The workRequestID is returned in the opc-workrequest-id header for any asynchronous operation in the Identity and Access Management service. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListIamWorkRequests.go.html to see an example of how to use ListIamWorkRequests API. // A default retry strategy applies to this operation ListIamWorkRequests() @@ -6287,7 +6293,7 @@ func (client IdentityClient) listIamWorkRequests(ctx context.Context, request co // ListIdentityProviderGroups **Deprecated.** For more information, see Deprecated IAM Service APIs (https://docs.cloud.oracle.com/Content/Identity/Reference/deprecatediamapis.htm). // Lists the identity provider groups. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListIdentityProviderGroups.go.html to see an example of how to use ListIdentityProviderGroups API. // A default retry strategy applies to this operation ListIdentityProviderGroups() @@ -6365,7 +6371,7 @@ func (m *listidentityprovider) UnmarshalPolymorphicJSON(data []byte) (interface{ // compartment ID (remember that the tenancy is simply the root compartment). // See Where to Get the Tenancy's OCID and User's OCID (https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#five). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListIdentityProviders.go.html to see an example of how to use ListIdentityProviders API. // A default retry strategy applies to this operation ListIdentityProviders() @@ -6424,7 +6430,7 @@ func (client IdentityClient) listIdentityProviders(ctx context.Context, request // ListIdpGroupMappings **Deprecated.** For more information, see Deprecated IAM Service APIs (https://docs.cloud.oracle.com/Content/Identity/Reference/deprecatediamapis.htm). // Lists the group mappings for the specified identity provider. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListIdpGroupMappings.go.html to see an example of how to use ListIdpGroupMappings API. // A default retry strategy applies to this operation ListIdpGroupMappings() @@ -6483,7 +6489,7 @@ func (client IdentityClient) listIdpGroupMappings(ctx context.Context, request c // ListMfaTotpDevices Lists the MFA TOTP devices for the specified user. The returned object contains the device's OCID, but not // the seed. The seed is returned only upon creation or when the IAM service regenerates the MFA seed for the device. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListMfaTotpDevices.go.html to see an example of how to use ListMfaTotpDevices API. // A default retry strategy applies to this operation ListMfaTotpDevices() @@ -6543,7 +6549,7 @@ func (client IdentityClient) listMfaTotpDevices(ctx context.Context, request com // the compartment ID (remember that the tenancy is simply the root compartment). // See Where to Get the Tenancy's OCID and User's OCID (https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#five). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListNetworkSources.go.html to see an example of how to use ListNetworkSources API. // A default retry strategy applies to this operation ListNetworkSources() @@ -6601,7 +6607,7 @@ func (client IdentityClient) listNetworkSources(ctx context.Context, request com // ListOAuthClientCredentials List of Oauth tokens for the user // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListOAuthClientCredentials.go.html to see an example of how to use ListOAuthClientCredentials API. // A default retry strategy applies to this operation ListOAuthClientCredentials() @@ -6662,7 +6668,7 @@ func (client IdentityClient) listOAuthClientCredentials(ctx context.Context, req // To determine which policies apply to a particular group or compartment, you must view the individual // statements inside all your policies. There isn't a way to automatically obtain that information via the API. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListPolicies.go.html to see an example of how to use ListPolicies API. // A default retry strategy applies to this operation ListPolicies() @@ -6720,7 +6726,7 @@ func (client IdentityClient) listPolicies(ctx context.Context, request common.OC // ListRegionSubscriptions Lists the region subscriptions for the specified tenancy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListRegionSubscriptions.go.html to see an example of how to use ListRegionSubscriptions API. // A default retry strategy applies to this operation ListRegionSubscriptions() @@ -6778,7 +6784,7 @@ func (client IdentityClient) listRegionSubscriptions(ctx context.Context, reques // ListRegions Lists all the regions offered by Oracle Cloud Infrastructure. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListRegions.go.html to see an example of how to use ListRegions API. // A default retry strategy applies to this operation ListRegions() @@ -6827,7 +6833,7 @@ func (client IdentityClient) listRegions(ctx context.Context) (common.OCIRespons // ListSmtpCredentials Lists the SMTP credentials for the specified user. The returned object contains the credential's OCID, // the SMTP user name but not the SMTP password. The SMTP password is returned only upon creation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListSmtpCredentials.go.html to see an example of how to use ListSmtpCredentials API. // A default retry strategy applies to this operation ListSmtpCredentials() @@ -6885,7 +6891,7 @@ func (client IdentityClient) listSmtpCredentials(ctx context.Context, request co // ListStandardTagNamespaces Lists available standard tag namespaces that users can create. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListStandardTagNamespaces.go.html to see an example of how to use ListStandardTagNamespaces API. // A default retry strategy applies to this operation ListStandardTagNamespaces() @@ -6945,7 +6951,7 @@ func (client IdentityClient) listStandardTagNamespaces(ctx context.Context, requ // Lists the Swift passwords for the specified user. The returned object contains the password's OCID, but not // the password itself. The actual password is returned only upon creation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListSwiftPasswords.go.html to see an example of how to use ListSwiftPasswords API. // A default retry strategy applies to this operation ListSwiftPasswords() @@ -7003,7 +7009,7 @@ func (client IdentityClient) listSwiftPasswords(ctx context.Context, request com // ListTagDefaults Lists the tag defaults for tag definitions in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListTagDefaults.go.html to see an example of how to use ListTagDefaults API. // A default retry strategy applies to this operation ListTagDefaults() @@ -7061,7 +7067,7 @@ func (client IdentityClient) listTagDefaults(ctx context.Context, request common // ListTagNamespaces Lists the tag namespaces in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListTagNamespaces.go.html to see an example of how to use ListTagNamespaces API. // A default retry strategy applies to this operation ListTagNamespaces() @@ -7119,7 +7125,7 @@ func (client IdentityClient) listTagNamespaces(ctx context.Context, request comm // ListTaggingWorkRequestErrors Gets the errors for a work request. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListTaggingWorkRequestErrors.go.html to see an example of how to use ListTaggingWorkRequestErrors API. // A default retry strategy applies to this operation ListTaggingWorkRequestErrors() @@ -7177,7 +7183,7 @@ func (client IdentityClient) listTaggingWorkRequestErrors(ctx context.Context, r // ListTaggingWorkRequestLogs Gets the logs for a work request. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListTaggingWorkRequestLogs.go.html to see an example of how to use ListTaggingWorkRequestLogs API. // A default retry strategy applies to this operation ListTaggingWorkRequestLogs() @@ -7235,7 +7241,7 @@ func (client IdentityClient) listTaggingWorkRequestLogs(ctx context.Context, req // ListTaggingWorkRequests Lists the tagging work requests in compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListTaggingWorkRequests.go.html to see an example of how to use ListTaggingWorkRequests API. // A default retry strategy applies to this operation ListTaggingWorkRequests() @@ -7293,7 +7299,7 @@ func (client IdentityClient) listTaggingWorkRequests(ctx context.Context, reques // ListTags Lists the tag definitions in the specified tag namespace. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListTags.go.html to see an example of how to use ListTags API. // A default retry strategy applies to this operation ListTags() @@ -7359,7 +7365,7 @@ func (client IdentityClient) listTags(ctx context.Context, request common.OCIReq // If the answer is no, the response is an empty list. // - Although`userId` and `groupId` are not individually required, you must set one of them. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListUserGroupMemberships.go.html to see an example of how to use ListUserGroupMemberships API. // A default retry strategy applies to this operation ListUserGroupMemberships() @@ -7419,7 +7425,7 @@ func (client IdentityClient) listUserGroupMemberships(ctx context.Context, reque // compartment ID (remember that the tenancy is simply the root compartment). // See Where to Get the Tenancy's OCID and User's OCID (https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#five). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListUsers.go.html to see an example of how to use ListUsers API. // A default retry strategy applies to this operation ListUsers() @@ -7477,7 +7483,7 @@ func (client IdentityClient) listUsers(ctx context.Context, request common.OCIRe // ListWorkRequests Lists the work requests in compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. // A default retry strategy applies to this operation ListWorkRequests() @@ -7541,7 +7547,7 @@ func (client IdentityClient) listWorkRequests(ctx context.Context, request commo // are aware of the implications for the compartment contents before you move it. For more // information, see Moving a Compartment (https://docs.cloud.oracle.com/Content/Identity/compartments/managingcompartments.htm#MoveCompartment). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/MoveCompartment.go.html to see an example of how to use MoveCompartment API. // A default retry strategy applies to this operation MoveCompartment() @@ -7605,7 +7611,7 @@ func (client IdentityClient) moveCompartment(ctx context.Context, request common // RecoverCompartment Recover the compartment from DELETED state to ACTIVE state. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/RecoverCompartment.go.html to see an example of how to use RecoverCompartment API. // A default retry strategy applies to this operation RecoverCompartment() @@ -7664,7 +7670,7 @@ func (client IdentityClient) recoverCompartment(ctx context.Context, request com // RemoveTagDefaultLock Remove a resource lock from a tag default. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/RemoveTagDefaultLock.go.html to see an example of how to use RemoveTagDefaultLock API. // A default retry strategy applies to this operation RemoveTagDefaultLock() @@ -7728,7 +7734,7 @@ func (client IdentityClient) removeTagDefaultLock(ctx context.Context, request c // RemoveTagNamespaceLock Remove a resource lock from a tag namespace. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/RemoveTagNamespaceLock.go.html to see an example of how to use RemoveTagNamespaceLock API. // A default retry strategy applies to this operation RemoveTagNamespaceLock() @@ -7792,7 +7798,7 @@ func (client IdentityClient) removeTagNamespaceLock(ctx context.Context, request // RemoveUserFromGroup Removes a user from a group by deleting the corresponding `UserGroupMembership`. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/RemoveUserFromGroup.go.html to see an example of how to use RemoveUserFromGroup API. // A default retry strategy applies to this operation RemoveUserFromGroup() @@ -7850,7 +7856,7 @@ func (client IdentityClient) removeUserFromGroup(ctx context.Context, request co // ResetIdpScimClient Resets the OAuth2 client credentials for the SCIM client associated with this identity provider. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/ResetIdpScimClient.go.html to see an example of how to use ResetIdpScimClient API. // A default retry strategy applies to this operation ResetIdpScimClient() @@ -7909,7 +7915,7 @@ func (client IdentityClient) resetIdpScimClient(ctx context.Context, request com // UpdateAuthToken Updates the specified auth token's description. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateAuthToken.go.html to see an example of how to use UpdateAuthToken API. // A default retry strategy applies to this operation UpdateAuthToken() @@ -7968,7 +7974,7 @@ func (client IdentityClient) updateAuthToken(ctx context.Context, request common // UpdateAuthenticationPolicy Updates authentication policy for the specified tenancy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateAuthenticationPolicy.go.html to see an example of how to use UpdateAuthenticationPolicy API. // A default retry strategy applies to this operation UpdateAuthenticationPolicy() @@ -8027,7 +8033,7 @@ func (client IdentityClient) updateAuthenticationPolicy(ctx context.Context, req // UpdateCompartment Updates the specified compartment's description or name. You can't update the root compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateCompartment.go.html to see an example of how to use UpdateCompartment API. // A default retry strategy applies to this operation UpdateCompartment() @@ -8086,7 +8092,7 @@ func (client IdentityClient) updateCompartment(ctx context.Context, request comm // UpdateCustomerSecretKey Updates the specified secret key's description. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateCustomerSecretKey.go.html to see an example of how to use UpdateCustomerSecretKey API. // A default retry strategy applies to this operation UpdateCustomerSecretKey() @@ -8147,7 +8153,7 @@ func (client IdentityClient) updateCustomerSecretKey(ctx context.Context, reques // To track the progress of the request, submitting an HTTP GET on the /iamWorkRequests/{iamWorkRequestsId} endpoint retrieves // the operation's status. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateDomain.go.html to see an example of how to use UpdateDomain API. // A default retry strategy applies to this operation UpdateDomain() @@ -8206,7 +8212,7 @@ func (client IdentityClient) updateDomain(ctx context.Context, request common.OC // UpdateDynamicGroup Updates the specified dynamic group. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateDynamicGroup.go.html to see an example of how to use UpdateDynamicGroup API. // A default retry strategy applies to this operation UpdateDynamicGroup() @@ -8265,7 +8271,7 @@ func (client IdentityClient) updateDynamicGroup(ctx context.Context, request com // UpdateGroup Updates the specified group. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateGroup.go.html to see an example of how to use UpdateGroup API. // A default retry strategy applies to this operation UpdateGroup() @@ -8325,7 +8331,7 @@ func (client IdentityClient) updateGroup(ctx context.Context, request common.OCI // UpdateIdentityProvider **Deprecated.** For more information, see Deprecated IAM Service APIs (https://docs.cloud.oracle.com/Content/Identity/Reference/deprecatediamapis.htm). // Updates the specified identity provider. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateIdentityProvider.go.html to see an example of how to use UpdateIdentityProvider API. // A default retry strategy applies to this operation UpdateIdentityProvider() @@ -8385,7 +8391,7 @@ func (client IdentityClient) updateIdentityProvider(ctx context.Context, request // UpdateIdpGroupMapping **Deprecated.** For more information, see Deprecated IAM Service APIs (https://docs.cloud.oracle.com/Content/Identity/Reference/deprecatediamapis.htm). // Updates the specified group mapping. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateIdpGroupMapping.go.html to see an example of how to use UpdateIdpGroupMapping API. // A default retry strategy applies to this operation UpdateIdpGroupMapping() @@ -8444,7 +8450,7 @@ func (client IdentityClient) updateIdpGroupMapping(ctx context.Context, request // UpdateNetworkSource Updates the specified network source. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateNetworkSource.go.html to see an example of how to use UpdateNetworkSource API. // A default retry strategy applies to this operation UpdateNetworkSource() @@ -8503,7 +8509,7 @@ func (client IdentityClient) updateNetworkSource(ctx context.Context, request co // UpdateOAuthClientCredential Updates Oauth token for the user // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateOAuthClientCredential.go.html to see an example of how to use UpdateOAuthClientCredential API. // A default retry strategy applies to this operation UpdateOAuthClientCredential() @@ -8563,7 +8569,7 @@ func (client IdentityClient) updateOAuthClientCredential(ctx context.Context, re // UpdatePolicy Updates the specified policy. You can update the description or the policy statements themselves. // Policy changes take effect typically within 10 seconds. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdatePolicy.go.html to see an example of how to use UpdatePolicy API. // A default retry strategy applies to this operation UpdatePolicy() @@ -8622,7 +8628,7 @@ func (client IdentityClient) updatePolicy(ctx context.Context, request common.OC // UpdateSmtpCredential Updates the specified SMTP credential's description. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateSmtpCredential.go.html to see an example of how to use UpdateSmtpCredential API. // A default retry strategy applies to this operation UpdateSmtpCredential() @@ -8682,7 +8688,7 @@ func (client IdentityClient) updateSmtpCredential(ctx context.Context, request c // UpdateSwiftPassword **Deprecated. Use UpdateAuthToken instead.** // Updates the specified Swift password's description. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateSwiftPassword.go.html to see an example of how to use UpdateSwiftPassword API. // A default retry strategy applies to this operation UpdateSwiftPassword() @@ -8748,7 +8754,7 @@ func (client IdentityClient) updateSwiftPassword(ctx context.Context, request co // You cannot remove list values that appear in a TagDefault. To remove a list value that // appears in a TagDefault, first update the TagDefault to use a different value. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateTag.go.html to see an example of how to use UpdateTag API. // A default retry strategy applies to this operation UpdateTag() @@ -8811,7 +8817,7 @@ func (client IdentityClient) updateTag(ctx context.Context, request common.OCIRe // * If the `isRequired` flag is set to "true", the value is set during resource creation. // * If the `isRequired` flag is set to "false", the value you enter is set during resource creation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateTagDefault.go.html to see an example of how to use UpdateTagDefault API. // A default retry strategy applies to this operation UpdateTagDefault() @@ -8876,7 +8882,7 @@ func (client IdentityClient) updateTagDefault(ctx context.Context, request commo // Retiring Key Definitions and Namespace Definitions (https://docs.cloud.oracle.com/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm#retiringkeys). // You can't add a namespace with the same name as a retired namespace in the same tenancy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateTagNamespace.go.html to see an example of how to use UpdateTagNamespace API. // A default retry strategy applies to this operation UpdateTagNamespace() @@ -8935,7 +8941,7 @@ func (client IdentityClient) updateTagNamespace(ctx context.Context, request com // UpdateUser Updates the description of the specified user. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateUser.go.html to see an example of how to use UpdateUser API. // A default retry strategy applies to this operation UpdateUser() @@ -8994,7 +9000,7 @@ func (client IdentityClient) updateUser(ctx context.Context, request common.OCIR // UpdateUserCapabilities Updates the capabilities of the specified user. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateUserCapabilities.go.html to see an example of how to use UpdateUserCapabilities API. // A default retry strategy applies to this operation UpdateUserCapabilities() @@ -9053,7 +9059,7 @@ func (client IdentityClient) updateUserCapabilities(ctx context.Context, request // UpdateUserState Updates the state of the specified user. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UpdateUserState.go.html to see an example of how to use UpdateUserState API. // A default retry strategy applies to this operation UpdateUserState() @@ -9123,7 +9129,7 @@ func (client IdentityClient) updateUserState(ctx context.Context, request common // After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using // the object, first make sure its `lifecycleState` has changed to ACTIVE. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identity/UploadApiKey.go.html to see an example of how to use UploadApiKey API. // A default retry strategy applies to this operation UploadApiKey() diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/identity_provider.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/identity_provider.go index 5cedf37a9e..2737d6fc3f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/identity_provider.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/identity_provider.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity @@ -78,6 +78,9 @@ type IdentityProvider interface { type identityprovider struct { JsonData []byte + InactiveStatus *int64 `mandatory:"false" json:"inactiveStatus"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` Id *string `mandatory:"true" json:"id"` CompartmentId *string `mandatory:"true" json:"compartmentId"` Name *string `mandatory:"true" json:"name"` @@ -85,9 +88,6 @@ type identityprovider struct { ProductType *string `mandatory:"true" json:"productType"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` LifecycleState IdentityProviderLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - InactiveStatus *int64 `mandatory:"false" json:"inactiveStatus"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` Protocol string `json:"protocol"` } @@ -136,56 +136,56 @@ func (m *identityprovider) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetId returns Id +// GetInactiveStatus returns InactiveStatus +func (m identityprovider) GetInactiveStatus() *int64 { + return m.InactiveStatus +} + +// GetFreeformTags returns FreeformTags +func (m identityprovider) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m identityprovider) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetId returns Id func (m identityprovider) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m identityprovider) GetCompartmentId() *string { return m.CompartmentId } -//GetName returns Name +// GetName returns Name func (m identityprovider) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m identityprovider) GetDescription() *string { return m.Description } -//GetProductType returns ProductType +// GetProductType returns ProductType func (m identityprovider) GetProductType() *string { return m.ProductType } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m identityprovider) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m identityprovider) GetLifecycleState() IdentityProviderLifecycleStateEnum { return m.LifecycleState } -//GetInactiveStatus returns InactiveStatus -func (m identityprovider) GetInactiveStatus() *int64 { - return m.InactiveStatus -} - -//GetFreeformTags returns FreeformTags -func (m identityprovider) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m identityprovider) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - func (m identityprovider) String() string { return common.PointerString(m) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/identity_provider_group_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/identity_provider_group_summary.go index e96100b8f6..620dfb0245 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/identity_provider_group_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/identity_provider_group_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/idp_group_mapping.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/idp_group_mapping.go index 314e1c1951..04baf7402e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/idp_group_mapping.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/idp_group_mapping.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/import_standard_tags_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/import_standard_tags_details.go index f0be0ec5da..69987fe71b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/import_standard_tags_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/import_standard_tags_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/mfa_totp_device.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/mfa_totp_device.go index e9755af1ed..7f84785746 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/mfa_totp_device.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/mfa_totp_device.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/mfa_totp_device_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/mfa_totp_device_summary.go index 0bb456de10..317b2091f1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/mfa_totp_device_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/mfa_totp_device_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/mfa_totp_token.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/mfa_totp_token.go index 6ee38fd713..418a991562 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/mfa_totp_token.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/mfa_totp_token.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/move_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/move_compartment_details.go index 500e2d565f..2590d9f760 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/move_compartment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/move_compartment_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_policy.go index 5617a45f0f..2204424b0f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_policy.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_policy.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_sources.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_sources.go index c28137898b..d79d2367b5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_sources.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_sources.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity @@ -33,7 +33,7 @@ type NetworkSources struct { // The description you assign to the network source. Does not have to be unique, and it's changeable. Description *string `mandatory:"true" json:"description"` - // Date and time the group was created, in the format defined by RFC3339. + // Date and time the network source was created, in the format defined by RFC3339. // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_sources_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_sources_summary.go index aca4af101b..1979f0dd79 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_sources_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_sources_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity @@ -21,17 +21,25 @@ import ( type NetworkSourcesSummary struct { // The OCID of the network source. - Id *string `mandatory:"false" json:"id"` + Id *string `mandatory:"true" json:"id"` // The OCID of the tenancy (root compartment) containing the network source. - CompartmentId *string `mandatory:"false" json:"compartmentId"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` // The name you assign to the network source during creation. The name must be unique across // the tenancy and cannot be changed. - Name *string `mandatory:"false" json:"name"` + Name *string `mandatory:"true" json:"name"` // The description you assign to the network source. Does not have to be unique, and it's changeable. - Description *string `mandatory:"false" json:"description"` + Description *string `mandatory:"true" json:"description"` + + // The network source object's current state. After creating a network source, make sure its `lifecycleState` changes from CREATING to + // ACTIVE before using it. + LifecycleState NetworkSourcesLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Date and time the network source was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` // A list of allowed public IP addresses and CIDR ranges. PublicSourceList []string `mandatory:"false" json:"publicSourceList"` @@ -43,10 +51,6 @@ type NetworkSourcesSummary struct { // -- The services attribute has no effect and is reserved for use by Oracle. -- Services []string `mandatory:"false" json:"services"` - // Date and time the group was created, in the format defined by RFC3339. - // Example: `2016-08-25T21:10:29.600Z` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). // Example: `{"Department": "Finance"}` @@ -67,6 +71,9 @@ func (m NetworkSourcesSummary) String() string { // Not recommended for calling this function directly func (m NetworkSourcesSummary) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingNetworkSourcesLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetNetworkSourcesLifecycleStateEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_sources_virtual_source_list.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_sources_virtual_source_list.go index 316c703cd4..9b5396fbef 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_sources_virtual_source_list.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/network_sources_virtual_source_list.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/o_auth2_client_credential.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/o_auth2_client_credential.go index 95f3058673..31df174e3b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/o_auth2_client_credential.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/o_auth2_client_credential.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/o_auth2_client_credential_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/o_auth2_client_credential_summary.go index d04a2a5d7a..9cb5f6d4ff 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/o_auth2_client_credential_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/o_auth2_client_credential_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/password_policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/password_policy.go index 17b34d7ceb..eb3e24aaac 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/password_policy.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/password_policy.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/policy.go index 8e3e79cfa1..c286ea619f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/policy.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/policy.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity @@ -20,9 +20,10 @@ import ( // Overview of IAM (https://docs.cloud.oracle.com/Content/Identity/getstarted/identity-domains.htm). If you're new to policies, see // Get Started with Policies (https://docs.cloud.oracle.com/Content/Identity/policiesgs/get-started-with-policies.htm). // The word "policy" is used by people in different ways: -// * An individual statement written in the policy language -// * A collection of statements in a single, named "policy" document (which has an Oracle Cloud ID (OCID) assigned to it) -// * The overall body of policies your organization uses to control access to resources +// - An individual statement written in the policy language +// - A collection of statements in a single, named "policy" document (which has an Oracle Cloud ID (OCID) assigned to it) +// - The overall body of policies your organization uses to control access to resources +// // To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, // talk to an administrator. // **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/region.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/region.go index 0055f3a654..acfe665044 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/region.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/region.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/region_subscription.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/region_subscription.go index 2d667dd12a..c3ed81fbe2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/region_subscription.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/region_subscription.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/remove_lock_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/remove_lock_details.go index 1824dc67db..884fe2f40b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/remove_lock_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/remove_lock_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/replicated_region_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/replicated_region_details.go index ff69553c44..bda98e7a2a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/replicated_region_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/replicated_region_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity @@ -26,6 +26,9 @@ type ReplicatedRegionDetails struct { // Region-agnostic identity domain URL. Url *string `mandatory:"false" json:"url"` + // Region-specific identity domain URL. + RegionalUrl *string `mandatory:"false" json:"regionalUrl"` + // The IDCS-replicated region state. State ReplicatedRegionDetailsStateEnum `mandatory:"false" json:"state,omitempty"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/resource_lock.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/resource_lock.go index b9e6442479..4c7a7b4698 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/resource_lock.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/resource_lock.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/saml2_identity_provider.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/saml2_identity_provider.go index ee3acb43c7..66eb4de6f9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/saml2_identity_provider.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/saml2_identity_provider.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity @@ -88,52 +88,52 @@ type Saml2IdentityProvider struct { LifecycleState IdentityProviderLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` } -//GetId returns Id +// GetId returns Id func (m Saml2IdentityProvider) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m Saml2IdentityProvider) GetCompartmentId() *string { return m.CompartmentId } -//GetName returns Name +// GetName returns Name func (m Saml2IdentityProvider) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m Saml2IdentityProvider) GetDescription() *string { return m.Description } -//GetProductType returns ProductType +// GetProductType returns ProductType func (m Saml2IdentityProvider) GetProductType() *string { return m.ProductType } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m Saml2IdentityProvider) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m Saml2IdentityProvider) GetLifecycleState() IdentityProviderLifecycleStateEnum { return m.LifecycleState } -//GetInactiveStatus returns InactiveStatus +// GetInactiveStatus returns InactiveStatus func (m Saml2IdentityProvider) GetInactiveStatus() *int64 { return m.InactiveStatus } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m Saml2IdentityProvider) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m Saml2IdentityProvider) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/scim_client_credentials.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/scim_client_credentials.go index b82d43d6e1..09fd5bd0ef 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/scim_client_credentials.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/scim_client_credentials.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/smtp_credential.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/smtp_credential.go index 56e67f47aa..c3c641a94b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/smtp_credential.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/smtp_credential.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/smtp_credential_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/smtp_credential_summary.go index d67877bbe5..15a2681fc4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/smtp_credential_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/smtp_credential_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/standard_tag_definition_template.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/standard_tag_definition_template.go index adb4934c72..1d964fe008 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/standard_tag_definition_template.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/standard_tag_definition_template.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/standard_tag_namespace_template.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/standard_tag_namespace_template.go index c98b34627c..2600659d4c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/standard_tag_namespace_template.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/standard_tag_namespace_template.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/standard_tag_namespace_template_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/standard_tag_namespace_template_summary.go index dca1ef3aeb..f9ab31cc34 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/standard_tag_namespace_template_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/standard_tag_namespace_template_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/swift_password.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/swift_password.go index ac665c7915..178f956d23 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/swift_password.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/swift_password.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag.go index fdc23536d9..b2b827551b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_default.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_default.go index fe4b48c7ca..1fce7e6bef 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_default.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_default.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_default_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_default_summary.go index ced02c0d4b..026ef8a244 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_default_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_default_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_namespace.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_namespace.go index 8ce9c00740..e947d1a7be 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_namespace.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_namespace.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_namespace_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_namespace_summary.go index 585172c3bb..aff02986c5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_namespace_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_namespace_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_summary.go index 078a684465..92794747a3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tag_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request.go index 4923fc9605..40b0e9211d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request_error_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request_error_summary.go index 730d579b05..42a746bc2e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request_error_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request_error_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request_log_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request_log_summary.go index bb74deda37..77992f9f40 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request_log_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request_log_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request_summary.go index eff47404a5..58338fea19 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tagging_work_request_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tenancy.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tenancy.go index b05edaeec1..d8ebe40630 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/tenancy.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/tenancy.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/ui_password.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/ui_password.go index ac671e5fb7..274522d236 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/ui_password.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/ui_password.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/ui_password_information.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/ui_password_information.go index ef09f2d6cd..8ac43998da 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/ui_password_information.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/ui_password_information.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_auth_token_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_auth_token_details.go index 066b293136..39101c0a9e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_auth_token_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_auth_token_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_authentication_policy_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_authentication_policy_details.go index bedef178ad..43c84e89dd 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_authentication_policy_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_authentication_policy_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_compartment_details.go index a752ca475c..6cdb0749df 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_compartment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_compartment_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_customer_secret_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_customer_secret_key_details.go index ef1ebc1421..4aae5d77de 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_customer_secret_key_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_customer_secret_key_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_domain_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_domain_details.go index 2938f8eec2..f187c000b3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_domain_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_domain_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_dynamic_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_dynamic_group_details.go index 8048814ff7..12d7a0a4c9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_dynamic_group_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_dynamic_group_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_group_details.go index 4029e59d8e..4ec224800c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_group_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_group_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_identity_provider_details.go index 8611cfae71..9c7ab66351 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_identity_provider_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_identity_provider_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity @@ -80,17 +80,17 @@ func (m *updateidentityproviderdetails) UnmarshalPolymorphicJSON(data []byte) (i } } -//GetDescription returns Description +// GetDescription returns Description func (m updateidentityproviderdetails) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updateidentityproviderdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updateidentityproviderdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_idp_group_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_idp_group_mapping_details.go index a81bd5f000..3c50ae9b23 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_idp_group_mapping_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_idp_group_mapping_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_network_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_network_source_details.go index 615b0e4671..399075bfd3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_network_source_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_network_source_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_o_auth2_client_credential_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_o_auth2_client_credential_details.go index a6a7d39077..3de9a01410 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_o_auth2_client_credential_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_o_auth2_client_credential_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_policy_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_policy_details.go index 9c84165d67..a8deb400c6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_policy_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_policy_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_saml2_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_saml2_identity_provider_details.go index 42005d07c0..8ad3155632 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_saml2_identity_provider_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_saml2_identity_provider_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity @@ -45,17 +45,17 @@ type UpdateSaml2IdentityProviderDetails struct { FreeformAttributes map[string]string `mandatory:"false" json:"freeformAttributes"` } -//GetDescription returns Description +// GetDescription returns Description func (m UpdateSaml2IdentityProviderDetails) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m UpdateSaml2IdentityProviderDetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m UpdateSaml2IdentityProviderDetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_smtp_credential_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_smtp_credential_details.go index 1562a02c18..ae079c49cb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_smtp_credential_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_smtp_credential_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_state_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_state_details.go index ed1a7dfd5f..c2e299defe 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_state_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_state_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_swift_password_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_swift_password_details.go index bbc454f510..72ffc32235 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_swift_password_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_swift_password_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_tag_default_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_tag_default_details.go index 2af7d9c533..59f0cb9701 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_tag_default_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_tag_default_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_tag_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_tag_details.go index fe8b207080..01d37f7d8a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_tag_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_tag_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_tag_namespace_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_tag_namespace_details.go index 6b761a08ec..0fa1f0d34a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_tag_namespace_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_tag_namespace_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_user_capabilities_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_user_capabilities_details.go index 0d8f0ea684..36b80a7476 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_user_capabilities_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_user_capabilities_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_user_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_user_details.go index 01f6fae653..34007dd592 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_user_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/update_user_details.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/user.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/user.go index 9fa897b808..0f6231b8db 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/user.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/user.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/user_capabilities.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/user_capabilities.go index 6b7bcf95d5..91db05ebb8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/user_capabilities.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/user_capabilities.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/user_group_membership.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/user_group_membership.go index a206578576..c42ad0ad13 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/user_group_membership.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/user_group_membership.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request.go index ec0db38a95..2b8ec0a79c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_error.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_error.go index 599a4513ee..3e2d848b81 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_error.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_error.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_log_entry.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_log_entry.go index 49863ccf11..b741bfaf4a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_log_entry.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_log_entry.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_resource.go index 5c8151f6e5..d3d2c90da4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_resource.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_resource.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_summary.go index 86dce06ff6..23e6009283 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identity/work_request_summary.go @@ -4,7 +4,7 @@ // Identity and Access Management Service API // -// APIs for managing users, groups, compartments, policies, and identity domains. +// Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about tagging and service limits, see Tagging (https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm) and Service Limits (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains) (https://docs.cloud.oracle.com/iaas/Content/Identity/home.htm). // package identity diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/add_http_request_header_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/add_http_request_header_rule.go index 343654db2d..446b878496 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/add_http_request_header_rule.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/add_http_request_header_rule.go @@ -20,11 +20,11 @@ import ( // AddHttpRequestHeaderRule An object that represents the action of adding a header to a request. // This rule applies only to HTTP listeners. // **NOTES:** -// * If a matching header already exists in the request, the system removes all of its occurrences, and then adds the -// new header. -// * The system does not distinquish between underscore and dash characters in headers. That is, it treats -// `example_header_name` and `example-header-name` as identical. Oracle recommends that you do not rely on underscore -// or dash characters to uniquely distinguish header names. +// - If a matching header already exists in the request, the system removes all of its occurrences, and then adds the +// new header. +// - The system does not distinquish between underscore and dash characters in headers. That is, it treats +// `example_header_name` and `example-header-name` as identical. Oracle recommends that you do not rely on underscore +// or dash characters to uniquely distinguish header names. type AddHttpRequestHeaderRule struct { // A header name that conforms to RFC 7230. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/add_http_response_header_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/add_http_response_header_rule.go index 9a952b16ff..b6e8f9b64a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/add_http_response_header_rule.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/add_http_response_header_rule.go @@ -20,11 +20,11 @@ import ( // AddHttpResponseHeaderRule An object that represents the action of adding a header to a response. // This rule applies only to HTTP listeners. // **NOTES:** -// * If a matching header already exists in the response, the system removes all of its occurrences, and then adds the -// new header. -// * The system does not distinquish between underscore and dash characters in headers. That is, it treats -// `example_header_name` and `example-header-name` as identical. Oracle recommends that you do not rely on underscore -// or dash characters to uniquely distinguish header names. +// - If a matching header already exists in the response, the system removes all of its occurrences, and then adds the +// new header. +// - The system does not distinquish between underscore and dash characters in headers. That is, it treats +// `example_header_name` and `example-header-name` as identical. Oracle recommends that you do not rely on underscore +// or dash characters to uniquely distinguish header names. type AddHttpResponseHeaderRule struct { // A header name that conforms to RFC 7230. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/allow_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/allow_rule.go index bae6d2b8a7..a70560e5f5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/allow_rule.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/allow_rule.go @@ -24,9 +24,9 @@ import ( // * If you add access control rules, the load balancer denies any traffic that does not match the rules. // * Maximum of two match conditions can be specified in a rule. // * You can specify this rule only with the following `RuleCondition` combinations: -// * `SOURCE_IP_ADDRESS` -// * `SOURCE_VCN_ID` -// * `SOURCE_VCN_ID", "SOURCE_VCN_IP_ADDRESS` +// - `SOURCE_IP_ADDRESS` +// - `SOURCE_VCN_ID` +// - `SOURCE_VCN_ID", "SOURCE_VCN_IP_ADDRESS` type AllowRule struct { Conditions []RuleCondition `mandatory:"true" json:"conditions"` @@ -91,6 +91,5 @@ func (m *AllowRule) UnmarshalJSON(data []byte) (e error) { m.Conditions[i] = nil } } - return } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/create_rule_set_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/create_rule_set_details.go index afa9860796..bf8c147b1e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/create_rule_set_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/create_rule_set_details.go @@ -71,6 +71,5 @@ func (m *CreateRuleSetDetails) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/create_ssl_cipher_suite_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/create_ssl_cipher_suite_details.go index 03ea4503ed..a6003eefd5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/create_ssl_cipher_suite_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/create_ssl_cipher_suite_details.go @@ -27,151 +27,151 @@ import ( // cipher suites (https://docs.cloud.oracle.com/api/#/en/loadbalancer/20170115/SSLCipherSuite/CreateSSLCipherSuite) if the predefined cipher // suites do not meet your requirements. // -// * __oci-default-ssl-cipher-suite-v1__ -// "DHE-RSA-AES128-GCM-SHA256" -// "DHE-RSA-AES128-SHA256" -// "DHE-RSA-AES256-GCM-SHA384" -// "DHE-RSA-AES256-SHA256" -// "ECDHE-RSA-AES128-GCM-SHA256" -// "ECDHE-RSA-AES128-SHA256" -// "ECDHE-RSA-AES256-GCM-SHA384" -// "ECDHE-RSA-AES256-SHA384" -// * __oci-modern-ssl-cipher-suite-v1__ -// "AES128-GCM-SHA256" -// "AES128-SHA256" -// "AES256-GCM-SHA384" -// "AES256-SHA256" -// "DHE-RSA-AES128-GCM-SHA256" -// "DHE-RSA-AES128-SHA256" -// "DHE-RSA-AES256-GCM-SHA384" -// "DHE-RSA-AES256-SHA256" -// "ECDHE-ECDSA-AES128-GCM-SHA256" -// "ECDHE-ECDSA-AES128-SHA256" -// "ECDHE-ECDSA-AES256-GCM-SHA384" -// "ECDHE-ECDSA-AES256-SHA384" -// "ECDHE-RSA-AES128-GCM-SHA256" -// "ECDHE-RSA-AES128-SHA256" -// "ECDHE-RSA-AES256-GCM-SHA384" -// "ECDHE-RSA-AES256-SHA384" -// * __oci-compatible-ssl-cipher-suite-v1__ -// "AES128-GCM-SHA256" -// "AES128-SHA" -// "AES128-SHA256" -// "AES256-GCM-SHA384" -// "AES256-SHA" -// "AES256-SHA256" -// "DHE-RSA-AES128-GCM-SHA256" -// "DHE-RSA-AES128-SHA256" -// "DHE-RSA-AES256-GCM-SHA384" -// "DHE-RSA-AES256-SHA256" -// "ECDHE-ECDSA-AES128-GCM-SHA256" -// "ECDHE-ECDSA-AES128-SHA" -// "ECDHE-ECDSA-AES128-SHA256" -// "ECDHE-ECDSA-AES256-GCM-SHA384" -// "ECDHE-ECDSA-AES256-SHA" -// "ECDHE-ECDSA-AES256-SHA384" -// "ECDHE-RSA-AES128-GCM-SHA256" -// "ECDHE-RSA-AES128-SHA" -// "ECDHE-RSA-AES128-SHA256" -// "ECDHE-RSA-AES256-GCM-SHA384" -// "ECDHE-RSA-AES256-SHA" -// "ECDHE-RSA-AES256-SHA384" -// * __oci-wider-compatible-ssl-cipher-suite-v1__ -// "AES128-GCM-SHA256" -// "AES128-SHA" -// "AES128-SHA256" -// "AES256-GCM-SHA384" -// "AES256-SHA" -// "AES256-SHA256" -// "CAMELLIA128-SHA" -// "CAMELLIA256-SHA" -// "DES-CBC3-SHA" -// "DH-DSS-AES128-GCM-SHA256" -// "DH-DSS-AES128-SHA" -// "DH-DSS-AES128-SHA256" -// "DH-DSS-AES256-GCM-SHA384" -// "DH-DSS-AES256-SHA" -// "DH-DSS-AES256-SHA256" -// "DH-DSS-CAMELLIA128-SHA" -// "DH-DSS-CAMELLIA256-SHA" -// "DH-DSS-DES-CBC3-SHAv" -// "DH-DSS-SEED-SHA" -// "DH-RSA-AES128-GCM-SHA256" -// "DH-RSA-AES128-SHA" -// "DH-RSA-AES128-SHA256" -// "DH-RSA-AES256-GCM-SHA384" -// "DH-RSA-AES256-SHA" -// "DH-RSA-AES256-SHA256" -// "DH-RSA-CAMELLIA128-SHA" -// "DH-RSA-CAMELLIA256-SHA" -// "DH-RSA-DES-CBC3-SHA" -// "DH-RSA-SEED-SHA" -// "DHE-DSS-AES128-GCM-SHA256" -// "DHE-DSS-AES128-SHA" -// "DHE-DSS-AES128-SHA256" -// "DHE-DSS-AES256-GCM-SHA384" -// "DHE-DSS-AES256-SHA" -// "DHE-DSS-AES256-SHA256" -// "DHE-DSS-CAMELLIA128-SHA" -// "DHE-DSS-CAMELLIA256-SHA" -// "DHE-DSS-DES-CBC3-SHA" -// "DHE-DSS-SEED-SHA" -// "DHE-RSA-AES128-GCM-SHA256" -// "DHE-RSA-AES128-SHA" -// "DHE-RSA-AES128-SHA256" -// "DHE-RSA-AES256-GCM-SHA384" -// "DHE-RSA-AES256-SHA" -// "DHE-RSA-AES256-SHA256" -// "DHE-RSA-CAMELLIA128-SHA" -// "DHE-RSA-CAMELLIA256-SHA" -// "DHE-RSA-DES-CBC3-SHA" -// "DHE-RSA-SEED-SHA" -// "ECDH-ECDSA-AES128-GCM-SHA256" -// "ECDH-ECDSA-AES128-SHA" -// "ECDH-ECDSA-AES128-SHA256" -// "ECDH-ECDSA-AES256-GCM-SHA384" -// "ECDH-ECDSA-AES256-SHA" -// "ECDH-ECDSA-AES256-SHA384" -// "ECDH-ECDSA-DES-CBC3-SHA" -// "ECDH-ECDSA-RC4-SHA" -// "ECDH-RSA-AES128-GCM-SHA256" -// "ECDH-RSA-AES128-SHA" -// "ECDH-RSA-AES128-SHA256" -// "ECDH-RSA-AES256-GCM-SHA384" -// "ECDH-RSA-AES256-SHA" -// "ECDH-RSA-AES256-SHA384" -// "ECDH-RSA-DES-CBC3-SHA" -// "ECDH-RSA-RC4-SHA" -// "ECDHE-ECDSA-AES128-GCM-SHA256" -// "ECDHE-ECDSA-AES128-SHA" -// "ECDHE-ECDSA-AES128-SHA256" -// "ECDHE-ECDSA-AES256-GCM-SHA384" -// "ECDHE-ECDSA-AES256-SHA" -// "ECDHE-ECDSA-AES256-SHA384" -// "ECDHE-ECDSA-DES-CBC3-SHA" -// "ECDHE-ECDSA-RC4-SHA" -// "ECDHE-RSA-AES128-GCM-SHA256" -// "ECDHE-RSA-AES128-SHA" -// "ECDHE-RSA-AES128-SHA256" -// "ECDHE-RSA-AES256-GCM-SHA384" -// "ECDHE-RSA-AES256-SHA" -// "ECDHE-RSA-AES256-SHA384" -// "ECDHE-RSA-DES-CBC3-SHA" -// "ECDHE-RSA-RC4-SHA" -// "IDEA-CBC-SHA" -// "KRB5-DES-CBC3-MD5" -// "KRB5-DES-CBC3-SHA" -// "KRB5-IDEA-CBC-MD5" -// "KRB5-IDEA-CBC-SHA" -// "KRB5-RC4-MD5" -// "KRB5-RC4-SHA" -// "PSK-3DES-EDE-CBC-SHA" -// "PSK-AES128-CBC-SHA" -// "PSK-AES256-CBC-SHA" -// "PSK-RC4-SHA" -// "RC4-MD5" -// "RC4-SHA" -// "SEED-SHA" +// - __oci-default-ssl-cipher-suite-v1__ +// "DHE-RSA-AES128-GCM-SHA256" +// "DHE-RSA-AES128-SHA256" +// "DHE-RSA-AES256-GCM-SHA384" +// "DHE-RSA-AES256-SHA256" +// "ECDHE-RSA-AES128-GCM-SHA256" +// "ECDHE-RSA-AES128-SHA256" +// "ECDHE-RSA-AES256-GCM-SHA384" +// "ECDHE-RSA-AES256-SHA384" +// - __oci-modern-ssl-cipher-suite-v1__ +// "AES128-GCM-SHA256" +// "AES128-SHA256" +// "AES256-GCM-SHA384" +// "AES256-SHA256" +// "DHE-RSA-AES128-GCM-SHA256" +// "DHE-RSA-AES128-SHA256" +// "DHE-RSA-AES256-GCM-SHA384" +// "DHE-RSA-AES256-SHA256" +// "ECDHE-ECDSA-AES128-GCM-SHA256" +// "ECDHE-ECDSA-AES128-SHA256" +// "ECDHE-ECDSA-AES256-GCM-SHA384" +// "ECDHE-ECDSA-AES256-SHA384" +// "ECDHE-RSA-AES128-GCM-SHA256" +// "ECDHE-RSA-AES128-SHA256" +// "ECDHE-RSA-AES256-GCM-SHA384" +// "ECDHE-RSA-AES256-SHA384" +// - __oci-compatible-ssl-cipher-suite-v1__ +// "AES128-GCM-SHA256" +// "AES128-SHA" +// "AES128-SHA256" +// "AES256-GCM-SHA384" +// "AES256-SHA" +// "AES256-SHA256" +// "DHE-RSA-AES128-GCM-SHA256" +// "DHE-RSA-AES128-SHA256" +// "DHE-RSA-AES256-GCM-SHA384" +// "DHE-RSA-AES256-SHA256" +// "ECDHE-ECDSA-AES128-GCM-SHA256" +// "ECDHE-ECDSA-AES128-SHA" +// "ECDHE-ECDSA-AES128-SHA256" +// "ECDHE-ECDSA-AES256-GCM-SHA384" +// "ECDHE-ECDSA-AES256-SHA" +// "ECDHE-ECDSA-AES256-SHA384" +// "ECDHE-RSA-AES128-GCM-SHA256" +// "ECDHE-RSA-AES128-SHA" +// "ECDHE-RSA-AES128-SHA256" +// "ECDHE-RSA-AES256-GCM-SHA384" +// "ECDHE-RSA-AES256-SHA" +// "ECDHE-RSA-AES256-SHA384" +// - __oci-wider-compatible-ssl-cipher-suite-v1__ +// "AES128-GCM-SHA256" +// "AES128-SHA" +// "AES128-SHA256" +// "AES256-GCM-SHA384" +// "AES256-SHA" +// "AES256-SHA256" +// "CAMELLIA128-SHA" +// "CAMELLIA256-SHA" +// "DES-CBC3-SHA" +// "DH-DSS-AES128-GCM-SHA256" +// "DH-DSS-AES128-SHA" +// "DH-DSS-AES128-SHA256" +// "DH-DSS-AES256-GCM-SHA384" +// "DH-DSS-AES256-SHA" +// "DH-DSS-AES256-SHA256" +// "DH-DSS-CAMELLIA128-SHA" +// "DH-DSS-CAMELLIA256-SHA" +// "DH-DSS-DES-CBC3-SHAv" +// "DH-DSS-SEED-SHA" +// "DH-RSA-AES128-GCM-SHA256" +// "DH-RSA-AES128-SHA" +// "DH-RSA-AES128-SHA256" +// "DH-RSA-AES256-GCM-SHA384" +// "DH-RSA-AES256-SHA" +// "DH-RSA-AES256-SHA256" +// "DH-RSA-CAMELLIA128-SHA" +// "DH-RSA-CAMELLIA256-SHA" +// "DH-RSA-DES-CBC3-SHA" +// "DH-RSA-SEED-SHA" +// "DHE-DSS-AES128-GCM-SHA256" +// "DHE-DSS-AES128-SHA" +// "DHE-DSS-AES128-SHA256" +// "DHE-DSS-AES256-GCM-SHA384" +// "DHE-DSS-AES256-SHA" +// "DHE-DSS-AES256-SHA256" +// "DHE-DSS-CAMELLIA128-SHA" +// "DHE-DSS-CAMELLIA256-SHA" +// "DHE-DSS-DES-CBC3-SHA" +// "DHE-DSS-SEED-SHA" +// "DHE-RSA-AES128-GCM-SHA256" +// "DHE-RSA-AES128-SHA" +// "DHE-RSA-AES128-SHA256" +// "DHE-RSA-AES256-GCM-SHA384" +// "DHE-RSA-AES256-SHA" +// "DHE-RSA-AES256-SHA256" +// "DHE-RSA-CAMELLIA128-SHA" +// "DHE-RSA-CAMELLIA256-SHA" +// "DHE-RSA-DES-CBC3-SHA" +// "DHE-RSA-SEED-SHA" +// "ECDH-ECDSA-AES128-GCM-SHA256" +// "ECDH-ECDSA-AES128-SHA" +// "ECDH-ECDSA-AES128-SHA256" +// "ECDH-ECDSA-AES256-GCM-SHA384" +// "ECDH-ECDSA-AES256-SHA" +// "ECDH-ECDSA-AES256-SHA384" +// "ECDH-ECDSA-DES-CBC3-SHA" +// "ECDH-ECDSA-RC4-SHA" +// "ECDH-RSA-AES128-GCM-SHA256" +// "ECDH-RSA-AES128-SHA" +// "ECDH-RSA-AES128-SHA256" +// "ECDH-RSA-AES256-GCM-SHA384" +// "ECDH-RSA-AES256-SHA" +// "ECDH-RSA-AES256-SHA384" +// "ECDH-RSA-DES-CBC3-SHA" +// "ECDH-RSA-RC4-SHA" +// "ECDHE-ECDSA-AES128-GCM-SHA256" +// "ECDHE-ECDSA-AES128-SHA" +// "ECDHE-ECDSA-AES128-SHA256" +// "ECDHE-ECDSA-AES256-GCM-SHA384" +// "ECDHE-ECDSA-AES256-SHA" +// "ECDHE-ECDSA-AES256-SHA384" +// "ECDHE-ECDSA-DES-CBC3-SHA" +// "ECDHE-ECDSA-RC4-SHA" +// "ECDHE-RSA-AES128-GCM-SHA256" +// "ECDHE-RSA-AES128-SHA" +// "ECDHE-RSA-AES128-SHA256" +// "ECDHE-RSA-AES256-GCM-SHA384" +// "ECDHE-RSA-AES256-SHA" +// "ECDHE-RSA-AES256-SHA384" +// "ECDHE-RSA-DES-CBC3-SHA" +// "ECDHE-RSA-RC4-SHA" +// "IDEA-CBC-SHA" +// "KRB5-DES-CBC3-MD5" +// "KRB5-DES-CBC3-SHA" +// "KRB5-IDEA-CBC-MD5" +// "KRB5-IDEA-CBC-SHA" +// "KRB5-RC4-MD5" +// "KRB5-RC4-SHA" +// "PSK-3DES-EDE-CBC-SHA" +// "PSK-AES128-CBC-SHA" +// "PSK-AES256-CBC-SHA" +// "PSK-RC4-SHA" +// "RC4-MD5" +// "RC4-SHA" +// "SEED-SHA" type CreateSslCipherSuiteDetails struct { // A friendly name for the SSL cipher suite. It must be unique and it cannot be changed. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/extend_http_request_header_value_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/extend_http_request_header_value_rule.go index e6f49c9a92..c6cafdbfe1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/extend_http_request_header_value_rule.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/extend_http_request_header_value_rule.go @@ -20,12 +20,12 @@ import ( // ExtendHttpRequestHeaderValueRule An object that represents the action of modifying a request header value. This rule applies only to HTTP listeners. // This rule adds a prefix, a suffix, or both to the header value. // **NOTES:** -// * This rule requires a value for a prefix, suffix, or both. -// * The system does not support this rule for headers with multiple values. -// * The system does not distinquish between underscore and dash characters in headers. That is, it treats -// `example_header_name` and `example-header-name` as identical. If two such headers appear in a request, the system -// applies the action to the first header it finds. The affected header cannot be determined in advance. Oracle -// recommends that you do not rely on underscore or dash characters to uniquely distinguish header names. +// - This rule requires a value for a prefix, suffix, or both. +// - The system does not support this rule for headers with multiple values. +// - The system does not distinquish between underscore and dash characters in headers. That is, it treats +// `example_header_name` and `example-header-name` as identical. If two such headers appear in a request, the system +// applies the action to the first header it finds. The affected header cannot be determined in advance. Oracle +// recommends that you do not rely on underscore or dash characters to uniquely distinguish header names. type ExtendHttpRequestHeaderValueRule struct { // A header name that conforms to RFC 7230. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/extend_http_response_header_value_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/extend_http_response_header_value_rule.go index 8c8d81fb58..b075bcb0d0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/extend_http_response_header_value_rule.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/extend_http_response_header_value_rule.go @@ -20,12 +20,12 @@ import ( // ExtendHttpResponseHeaderValueRule An object that represents the action of modifying a response header value. This rule applies only to HTTP listeners. // This rule adds a prefix, a suffix, or both to the header value. // **NOTES:** -// * This rule requires a value for a prefix, suffix, or both. -// * The system does not support this rule for headers with multiple values. -// * The system does not distinquish between underscore and dash characters in headers. That is, it treats -// `example_header_name` and `example-header-name` as identical. If two such headers appear in a request, the system -// applies the action to the first header it finds. The affected header cannot be determined in advance. Oracle -// recommends that you do not rely on underscore or dash characters to uniquely distinguish header names. +// - This rule requires a value for a prefix, suffix, or both. +// - The system does not support this rule for headers with multiple values. +// - The system does not distinquish between underscore and dash characters in headers. That is, it treats +// `example_header_name` and `example-header-name` as identical. If two such headers appear in a request, the system +// applies the action to the first header it finds. The affected header cannot be determined in advance. Oracle +// recommends that you do not rely on underscore or dash characters to uniquely distinguish header names. type ExtendHttpResponseHeaderValueRule struct { // A header name that conforms to RFC 7230. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/loadbalancer_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/loadbalancer_client.go index 54dadd41e1..964035f22b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/loadbalancer_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/loadbalancer_client.go @@ -27,6 +27,9 @@ type LoadBalancerClient struct { // NewLoadBalancerClientWithConfigurationProvider Creates a new default LoadBalancer client with the given configuration provider. // the configuration provider will be used for the default signer as well as reading the region func NewLoadBalancerClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client LoadBalancerClient, err error) { + if enabled := common.CheckForEnabledServices("loadbalancer"); !enabled { + return client, fmt.Errorf("the Alloy configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local alloy_config file configured the service you're targeting or contact the cloud provider on the availability of this service") + } provider, err := auth.GetGenericConfigurationProvider(configProvider) if err != nil { return client, err @@ -78,7 +81,7 @@ func (client *LoadBalancerClient) setConfigurationProvider(configProvider common region, _ := configProvider.Region() client.SetRegion(region) if client.Host == "" { - return fmt.Errorf("Invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil @@ -92,7 +95,7 @@ func (client *LoadBalancerClient) ConfigurationProvider() *common.ConfigurationP // ChangeLoadBalancerCompartment Moves a load balancer into a different compartment within the same tenancy. For information about moving resources // between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ChangeLoadBalancerCompartment.go.html to see an example of how to use ChangeLoadBalancerCompartment API. func (client LoadBalancerClient) ChangeLoadBalancerCompartment(ctx context.Context, request ChangeLoadBalancerCompartmentRequest) (response ChangeLoadBalancerCompartmentResponse, err error) { @@ -154,7 +157,7 @@ func (client LoadBalancerClient) changeLoadBalancerCompartment(ctx context.Conte // CreateBackend Adds a backend server to a backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/CreateBackend.go.html to see an example of how to use CreateBackend API. func (client LoadBalancerClient) CreateBackend(ctx context.Context, request CreateBackendRequest) (response CreateBackendResponse, err error) { @@ -216,7 +219,7 @@ func (client LoadBalancerClient) createBackend(ctx context.Context, request comm // CreateBackendSet Adds a backend set to a load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/CreateBackendSet.go.html to see an example of how to use CreateBackendSet API. func (client LoadBalancerClient) CreateBackendSet(ctx context.Context, request CreateBackendSetRequest) (response CreateBackendSetResponse, err error) { @@ -278,7 +281,7 @@ func (client LoadBalancerClient) createBackendSet(ctx context.Context, request c // CreateCertificate Creates an asynchronous request to add an SSL certificate bundle. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/CreateCertificate.go.html to see an example of how to use CreateCertificate API. func (client LoadBalancerClient) CreateCertificate(ctx context.Context, request CreateCertificateRequest) (response CreateCertificateResponse, err error) { @@ -341,7 +344,7 @@ func (client LoadBalancerClient) createCertificate(ctx context.Context, request // CreateHostname Adds a hostname resource to the specified load balancer. For more information, see // Managing Request Routing (https://docs.cloud.oracle.com/Content/Balance/Tasks/managingrequest.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/CreateHostname.go.html to see an example of how to use CreateHostname API. func (client LoadBalancerClient) CreateHostname(ctx context.Context, request CreateHostnameRequest) (response CreateHostnameResponse, err error) { @@ -403,7 +406,7 @@ func (client LoadBalancerClient) createHostname(ctx context.Context, request com // CreateListener Adds a listener to a load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/CreateListener.go.html to see an example of how to use CreateListener API. func (client LoadBalancerClient) CreateListener(ctx context.Context, request CreateListenerRequest) (response CreateListenerResponse, err error) { @@ -485,7 +488,7 @@ func (client LoadBalancerClient) createListener(ctx context.Context, request com // When you create a load balancer, the system assigns an IP address. // To get the IP address, use the GetLoadBalancer operation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/CreateLoadBalancer.go.html to see an example of how to use CreateLoadBalancer API. func (client LoadBalancerClient) CreateLoadBalancer(ctx context.Context, request CreateLoadBalancerRequest) (response CreateLoadBalancerResponse, err error) { @@ -548,7 +551,7 @@ func (client LoadBalancerClient) createLoadBalancer(ctx context.Context, request // CreatePathRouteSet Adds a path route set to a load balancer. For more information, see // Managing Request Routing (https://docs.cloud.oracle.com/Content/Balance/Tasks/managingrequest.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/CreatePathRouteSet.go.html to see an example of how to use CreatePathRouteSet API. func (client LoadBalancerClient) CreatePathRouteSet(ctx context.Context, request CreatePathRouteSetRequest) (response CreatePathRouteSetResponse, err error) { @@ -611,7 +614,7 @@ func (client LoadBalancerClient) createPathRouteSet(ctx context.Context, request // CreateRoutingPolicy Adds a routing policy to a load balancer. For more information, see // Managing Request Routing (https://docs.cloud.oracle.com/Content/Balance/Tasks/managingrequest.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/CreateRoutingPolicy.go.html to see an example of how to use CreateRoutingPolicy API. func (client LoadBalancerClient) CreateRoutingPolicy(ctx context.Context, request CreateRoutingPolicyRequest) (response CreateRoutingPolicyResponse, err error) { @@ -674,7 +677,7 @@ func (client LoadBalancerClient) createRoutingPolicy(ctx context.Context, reques // CreateRuleSet Creates a new rule set associated with the specified load balancer. For more information, see // Managing Rule Sets (https://docs.cloud.oracle.com/Content/Balance/Tasks/managingrulesets.htm). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/CreateRuleSet.go.html to see an example of how to use CreateRuleSet API. func (client LoadBalancerClient) CreateRuleSet(ctx context.Context, request CreateRuleSetRequest) (response CreateRuleSetResponse, err error) { @@ -736,7 +739,7 @@ func (client LoadBalancerClient) createRuleSet(ctx context.Context, request comm // CreateSSLCipherSuite Creates a custom SSL cipher suite. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/CreateSSLCipherSuite.go.html to see an example of how to use CreateSSLCipherSuite API. func (client LoadBalancerClient) CreateSSLCipherSuite(ctx context.Context, request CreateSSLCipherSuiteRequest) (response CreateSSLCipherSuiteResponse, err error) { @@ -798,7 +801,7 @@ func (client LoadBalancerClient) createSSLCipherSuite(ctx context.Context, reque // DeleteBackend Removes a backend server from a given load balancer and backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/DeleteBackend.go.html to see an example of how to use DeleteBackend API. func (client LoadBalancerClient) DeleteBackend(ctx context.Context, request DeleteBackendRequest) (response DeleteBackendResponse, err error) { @@ -856,7 +859,7 @@ func (client LoadBalancerClient) deleteBackend(ctx context.Context, request comm // DeleteBackendSet Deletes the specified backend set. Note that deleting a backend set removes its backend servers from the load balancer. // Before you can delete a backend set, you must remove it from any active listeners. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/DeleteBackendSet.go.html to see an example of how to use DeleteBackendSet API. func (client LoadBalancerClient) DeleteBackendSet(ctx context.Context, request DeleteBackendSetRequest) (response DeleteBackendSetResponse, err error) { @@ -913,7 +916,7 @@ func (client LoadBalancerClient) deleteBackendSet(ctx context.Context, request c // DeleteCertificate Deletes an SSL certificate bundle from a load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/DeleteCertificate.go.html to see an example of how to use DeleteCertificate API. func (client LoadBalancerClient) DeleteCertificate(ctx context.Context, request DeleteCertificateRequest) (response DeleteCertificateResponse, err error) { @@ -970,7 +973,7 @@ func (client LoadBalancerClient) deleteCertificate(ctx context.Context, request // DeleteHostname Deletes a hostname resource from the specified load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/DeleteHostname.go.html to see an example of how to use DeleteHostname API. func (client LoadBalancerClient) DeleteHostname(ctx context.Context, request DeleteHostnameRequest) (response DeleteHostnameResponse, err error) { @@ -1027,7 +1030,7 @@ func (client LoadBalancerClient) deleteHostname(ctx context.Context, request com // DeleteListener Deletes a listener from a load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/DeleteListener.go.html to see an example of how to use DeleteListener API. func (client LoadBalancerClient) DeleteListener(ctx context.Context, request DeleteListenerRequest) (response DeleteListenerResponse, err error) { @@ -1084,7 +1087,7 @@ func (client LoadBalancerClient) deleteListener(ctx context.Context, request com // DeleteLoadBalancer Stops a load balancer and removes it from service. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/DeleteLoadBalancer.go.html to see an example of how to use DeleteLoadBalancer API. func (client LoadBalancerClient) DeleteLoadBalancer(ctx context.Context, request DeleteLoadBalancerRequest) (response DeleteLoadBalancerResponse, err error) { @@ -1143,7 +1146,7 @@ func (client LoadBalancerClient) deleteLoadBalancer(ctx context.Context, request // To delete a path route rule from a path route set, use the // UpdatePathRouteSet operation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/DeletePathRouteSet.go.html to see an example of how to use DeletePathRouteSet API. func (client LoadBalancerClient) DeletePathRouteSet(ctx context.Context, request DeletePathRouteSetRequest) (response DeletePathRouteSetResponse, err error) { @@ -1202,7 +1205,7 @@ func (client LoadBalancerClient) deletePathRouteSet(ctx context.Context, request // To delete a routing rule from a routing policy, use the // UpdateRoutingPolicy operation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/DeleteRoutingPolicy.go.html to see an example of how to use DeleteRoutingPolicy API. func (client LoadBalancerClient) DeleteRoutingPolicy(ctx context.Context, request DeleteRoutingPolicyRequest) (response DeleteRoutingPolicyResponse, err error) { @@ -1261,7 +1264,7 @@ func (client LoadBalancerClient) deleteRoutingPolicy(ctx context.Context, reques // To delete a rule from a rule set, use the // UpdateRuleSet operation. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/DeleteRuleSet.go.html to see an example of how to use DeleteRuleSet API. func (client LoadBalancerClient) DeleteRuleSet(ctx context.Context, request DeleteRuleSetRequest) (response DeleteRuleSetResponse, err error) { @@ -1318,7 +1321,7 @@ func (client LoadBalancerClient) deleteRuleSet(ctx context.Context, request comm // DeleteSSLCipherSuite Deletes an SSL cipher suite from a load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/DeleteSSLCipherSuite.go.html to see an example of how to use DeleteSSLCipherSuite API. func (client LoadBalancerClient) DeleteSSLCipherSuite(ctx context.Context, request DeleteSSLCipherSuiteRequest) (response DeleteSSLCipherSuiteResponse, err error) { @@ -1375,7 +1378,7 @@ func (client LoadBalancerClient) deleteSSLCipherSuite(ctx context.Context, reque // GetBackend Gets the specified backend server's configuration information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/GetBackend.go.html to see an example of how to use GetBackend API. func (client LoadBalancerClient) GetBackend(ctx context.Context, request GetBackendRequest) (response GetBackendResponse, err error) { @@ -1432,7 +1435,7 @@ func (client LoadBalancerClient) getBackend(ctx context.Context, request common. // GetBackendHealth Gets the current health status of the specified backend server. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/GetBackendHealth.go.html to see an example of how to use GetBackendHealth API. func (client LoadBalancerClient) GetBackendHealth(ctx context.Context, request GetBackendHealthRequest) (response GetBackendHealthResponse, err error) { @@ -1489,7 +1492,7 @@ func (client LoadBalancerClient) getBackendHealth(ctx context.Context, request c // GetBackendSet Gets the specified backend set's configuration information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/GetBackendSet.go.html to see an example of how to use GetBackendSet API. func (client LoadBalancerClient) GetBackendSet(ctx context.Context, request GetBackendSetRequest) (response GetBackendSetResponse, err error) { @@ -1546,7 +1549,7 @@ func (client LoadBalancerClient) getBackendSet(ctx context.Context, request comm // GetBackendSetHealth Gets the health status for the specified backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/GetBackendSetHealth.go.html to see an example of how to use GetBackendSetHealth API. func (client LoadBalancerClient) GetBackendSetHealth(ctx context.Context, request GetBackendSetHealthRequest) (response GetBackendSetHealthResponse, err error) { @@ -1603,7 +1606,7 @@ func (client LoadBalancerClient) getBackendSetHealth(ctx context.Context, reques // GetHealthChecker Gets the health check policy information for a given load balancer and backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/GetHealthChecker.go.html to see an example of how to use GetHealthChecker API. func (client LoadBalancerClient) GetHealthChecker(ctx context.Context, request GetHealthCheckerRequest) (response GetHealthCheckerResponse, err error) { @@ -1660,7 +1663,7 @@ func (client LoadBalancerClient) getHealthChecker(ctx context.Context, request c // GetHostname Gets the specified hostname resource's configuration information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/GetHostname.go.html to see an example of how to use GetHostname API. func (client LoadBalancerClient) GetHostname(ctx context.Context, request GetHostnameRequest) (response GetHostnameResponse, err error) { @@ -1717,7 +1720,7 @@ func (client LoadBalancerClient) getHostname(ctx context.Context, request common // GetLoadBalancer Gets the specified load balancer's configuration information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/GetLoadBalancer.go.html to see an example of how to use GetLoadBalancer API. func (client LoadBalancerClient) GetLoadBalancer(ctx context.Context, request GetLoadBalancerRequest) (response GetLoadBalancerResponse, err error) { @@ -1774,7 +1777,7 @@ func (client LoadBalancerClient) getLoadBalancer(ctx context.Context, request co // GetLoadBalancerHealth Gets the health status for the specified load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/GetLoadBalancerHealth.go.html to see an example of how to use GetLoadBalancerHealth API. func (client LoadBalancerClient) GetLoadBalancerHealth(ctx context.Context, request GetLoadBalancerHealthRequest) (response GetLoadBalancerHealthResponse, err error) { @@ -1831,7 +1834,7 @@ func (client LoadBalancerClient) getLoadBalancerHealth(ctx context.Context, requ // GetPathRouteSet Gets the specified path route set's configuration information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/GetPathRouteSet.go.html to see an example of how to use GetPathRouteSet API. func (client LoadBalancerClient) GetPathRouteSet(ctx context.Context, request GetPathRouteSetRequest) (response GetPathRouteSetResponse, err error) { @@ -1888,7 +1891,7 @@ func (client LoadBalancerClient) getPathRouteSet(ctx context.Context, request co // GetRoutingPolicy Gets the specified routing policy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/GetRoutingPolicy.go.html to see an example of how to use GetRoutingPolicy API. func (client LoadBalancerClient) GetRoutingPolicy(ctx context.Context, request GetRoutingPolicyRequest) (response GetRoutingPolicyResponse, err error) { @@ -1945,7 +1948,7 @@ func (client LoadBalancerClient) getRoutingPolicy(ctx context.Context, request c // GetRuleSet Gets the specified set of rules. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/GetRuleSet.go.html to see an example of how to use GetRuleSet API. func (client LoadBalancerClient) GetRuleSet(ctx context.Context, request GetRuleSetRequest) (response GetRuleSetResponse, err error) { @@ -2002,7 +2005,7 @@ func (client LoadBalancerClient) getRuleSet(ctx context.Context, request common. // GetSSLCipherSuite Gets the specified SSL cipher suite's configuration information. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/GetSSLCipherSuite.go.html to see an example of how to use GetSSLCipherSuite API. func (client LoadBalancerClient) GetSSLCipherSuite(ctx context.Context, request GetSSLCipherSuiteRequest) (response GetSSLCipherSuiteResponse, err error) { @@ -2059,7 +2062,7 @@ func (client LoadBalancerClient) getSSLCipherSuite(ctx context.Context, request // GetWorkRequest Gets the details of a work request. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/GetWorkRequest.go.html to see an example of how to use GetWorkRequest API. func (client LoadBalancerClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { @@ -2116,7 +2119,7 @@ func (client LoadBalancerClient) getWorkRequest(ctx context.Context, request com // ListBackendSets Lists all backend sets associated with a given load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ListBackendSets.go.html to see an example of how to use ListBackendSets API. func (client LoadBalancerClient) ListBackendSets(ctx context.Context, request ListBackendSetsRequest) (response ListBackendSetsResponse, err error) { @@ -2173,7 +2176,7 @@ func (client LoadBalancerClient) listBackendSets(ctx context.Context, request co // ListBackends Lists the backend servers for a given load balancer and backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ListBackends.go.html to see an example of how to use ListBackends API. func (client LoadBalancerClient) ListBackends(ctx context.Context, request ListBackendsRequest) (response ListBackendsResponse, err error) { @@ -2230,7 +2233,7 @@ func (client LoadBalancerClient) listBackends(ctx context.Context, request commo // ListCertificates Lists all SSL certificates bundles associated with a given load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ListCertificates.go.html to see an example of how to use ListCertificates API. func (client LoadBalancerClient) ListCertificates(ctx context.Context, request ListCertificatesRequest) (response ListCertificatesResponse, err error) { @@ -2287,7 +2290,7 @@ func (client LoadBalancerClient) listCertificates(ctx context.Context, request c // ListHostnames Lists all hostname resources associated with the specified load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ListHostnames.go.html to see an example of how to use ListHostnames API. func (client LoadBalancerClient) ListHostnames(ctx context.Context, request ListHostnamesRequest) (response ListHostnamesResponse, err error) { @@ -2349,7 +2352,7 @@ func (client LoadBalancerClient) listHostnames(ctx context.Context, request comm // * Request header rules // * Response header rules // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ListListenerRules.go.html to see an example of how to use ListListenerRules API. func (client LoadBalancerClient) ListListenerRules(ctx context.Context, request ListListenerRulesRequest) (response ListListenerRulesResponse, err error) { @@ -2406,7 +2409,7 @@ func (client LoadBalancerClient) listListenerRules(ctx context.Context, request // ListLoadBalancerHealths Lists the summary health statuses for all load balancers in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ListLoadBalancerHealths.go.html to see an example of how to use ListLoadBalancerHealths API. func (client LoadBalancerClient) ListLoadBalancerHealths(ctx context.Context, request ListLoadBalancerHealthsRequest) (response ListLoadBalancerHealthsResponse, err error) { @@ -2463,7 +2466,7 @@ func (client LoadBalancerClient) listLoadBalancerHealths(ctx context.Context, re // ListLoadBalancers Lists all load balancers in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ListLoadBalancers.go.html to see an example of how to use ListLoadBalancers API. func (client LoadBalancerClient) ListLoadBalancers(ctx context.Context, request ListLoadBalancersRequest) (response ListLoadBalancersResponse, err error) { @@ -2520,7 +2523,7 @@ func (client LoadBalancerClient) listLoadBalancers(ctx context.Context, request // ListPathRouteSets Lists all path route sets associated with the specified load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ListPathRouteSets.go.html to see an example of how to use ListPathRouteSets API. func (client LoadBalancerClient) ListPathRouteSets(ctx context.Context, request ListPathRouteSetsRequest) (response ListPathRouteSetsResponse, err error) { @@ -2577,7 +2580,7 @@ func (client LoadBalancerClient) listPathRouteSets(ctx context.Context, request // ListPolicies Lists the available load balancer policies. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ListPolicies.go.html to see an example of how to use ListPolicies API. func (client LoadBalancerClient) ListPolicies(ctx context.Context, request ListPoliciesRequest) (response ListPoliciesResponse, err error) { @@ -2634,7 +2637,7 @@ func (client LoadBalancerClient) listPolicies(ctx context.Context, request commo // ListProtocols Lists all supported traffic protocols. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ListProtocols.go.html to see an example of how to use ListProtocols API. func (client LoadBalancerClient) ListProtocols(ctx context.Context, request ListProtocolsRequest) (response ListProtocolsResponse, err error) { @@ -2691,7 +2694,7 @@ func (client LoadBalancerClient) listProtocols(ctx context.Context, request comm // ListRoutingPolicies Lists all routing policies associated with the specified load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ListRoutingPolicies.go.html to see an example of how to use ListRoutingPolicies API. func (client LoadBalancerClient) ListRoutingPolicies(ctx context.Context, request ListRoutingPoliciesRequest) (response ListRoutingPoliciesResponse, err error) { @@ -2748,7 +2751,7 @@ func (client LoadBalancerClient) listRoutingPolicies(ctx context.Context, reques // ListRuleSets Lists all rule sets associated with the specified load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ListRuleSets.go.html to see an example of how to use ListRuleSets API. func (client LoadBalancerClient) ListRuleSets(ctx context.Context, request ListRuleSetsRequest) (response ListRuleSetsResponse, err error) { @@ -2805,7 +2808,7 @@ func (client LoadBalancerClient) listRuleSets(ctx context.Context, request commo // ListSSLCipherSuites Lists all SSL cipher suites associated with the specified load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ListSSLCipherSuites.go.html to see an example of how to use ListSSLCipherSuites API. func (client LoadBalancerClient) ListSSLCipherSuites(ctx context.Context, request ListSSLCipherSuitesRequest) (response ListSSLCipherSuitesResponse, err error) { @@ -2862,7 +2865,7 @@ func (client LoadBalancerClient) listSSLCipherSuites(ctx context.Context, reques // ListShapes Lists the valid load balancer shapes. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ListShapes.go.html to see an example of how to use ListShapes API. func (client LoadBalancerClient) ListShapes(ctx context.Context, request ListShapesRequest) (response ListShapesResponse, err error) { @@ -2919,7 +2922,7 @@ func (client LoadBalancerClient) listShapes(ctx context.Context, request common. // ListWorkRequests Lists the work requests for a given load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. func (client LoadBalancerClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { @@ -2976,7 +2979,7 @@ func (client LoadBalancerClient) listWorkRequests(ctx context.Context, request c // UpdateBackend Updates the configuration of a backend server within the specified backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/UpdateBackend.go.html to see an example of how to use UpdateBackend API. func (client LoadBalancerClient) UpdateBackend(ctx context.Context, request UpdateBackendRequest) (response UpdateBackendResponse, err error) { @@ -3038,7 +3041,7 @@ func (client LoadBalancerClient) updateBackend(ctx context.Context, request comm // UpdateBackendSet Updates a backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/UpdateBackendSet.go.html to see an example of how to use UpdateBackendSet API. func (client LoadBalancerClient) UpdateBackendSet(ctx context.Context, request UpdateBackendSetRequest) (response UpdateBackendSetResponse, err error) { @@ -3100,7 +3103,7 @@ func (client LoadBalancerClient) updateBackendSet(ctx context.Context, request c // UpdateHealthChecker Updates the health check policy for a given load balancer and backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/UpdateHealthChecker.go.html to see an example of how to use UpdateHealthChecker API. func (client LoadBalancerClient) UpdateHealthChecker(ctx context.Context, request UpdateHealthCheckerRequest) (response UpdateHealthCheckerResponse, err error) { @@ -3163,7 +3166,7 @@ func (client LoadBalancerClient) updateHealthChecker(ctx context.Context, reques // UpdateHostname Overwrites an existing hostname resource on the specified load balancer. Use this operation to change a // virtual hostname. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/UpdateHostname.go.html to see an example of how to use UpdateHostname API. func (client LoadBalancerClient) UpdateHostname(ctx context.Context, request UpdateHostnameRequest) (response UpdateHostnameResponse, err error) { @@ -3225,7 +3228,7 @@ func (client LoadBalancerClient) updateHostname(ctx context.Context, request com // UpdateListener Updates a listener for a given load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/UpdateListener.go.html to see an example of how to use UpdateListener API. func (client LoadBalancerClient) UpdateListener(ctx context.Context, request UpdateListenerRequest) (response UpdateListenerResponse, err error) { @@ -3287,7 +3290,7 @@ func (client LoadBalancerClient) updateListener(ctx context.Context, request com // UpdateLoadBalancer Updates a load balancer's configuration. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/UpdateLoadBalancer.go.html to see an example of how to use UpdateLoadBalancer API. func (client LoadBalancerClient) UpdateLoadBalancer(ctx context.Context, request UpdateLoadBalancerRequest) (response UpdateLoadBalancerResponse, err error) { @@ -3354,7 +3357,7 @@ func (client LoadBalancerClient) updateLoadBalancer(ctx context.Context, request // start accepting larger bandwidth and when reshaping to a smaller one, the LB will be accepting smaller // bandwidth. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/UpdateLoadBalancerShape.go.html to see an example of how to use UpdateLoadBalancerShape API. func (client LoadBalancerClient) UpdateLoadBalancerShape(ctx context.Context, request UpdateLoadBalancerShapeRequest) (response UpdateLoadBalancerShapeResponse, err error) { @@ -3416,7 +3419,7 @@ func (client LoadBalancerClient) updateLoadBalancerShape(ctx context.Context, re // UpdateNetworkSecurityGroups Updates the network security groups associated with the specified load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/UpdateNetworkSecurityGroups.go.html to see an example of how to use UpdateNetworkSecurityGroups API. func (client LoadBalancerClient) UpdateNetworkSecurityGroups(ctx context.Context, request UpdateNetworkSecurityGroupsRequest) (response UpdateNetworkSecurityGroupsResponse, err error) { @@ -3482,7 +3485,7 @@ func (client LoadBalancerClient) updateNetworkSecurityGroups(ctx context.Context // UpdatePathRouteSetDetails object must include // both the new path route rule to add and the existing path route rules to retain. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/UpdatePathRouteSet.go.html to see an example of how to use UpdatePathRouteSet API. func (client LoadBalancerClient) UpdatePathRouteSet(ctx context.Context, request UpdatePathRouteSetRequest) (response UpdatePathRouteSetResponse, err error) { @@ -3546,7 +3549,7 @@ func (client LoadBalancerClient) updatePathRouteSet(ctx context.Context, request // routing policy rules in a routing policy. // To add a new routing rule to a routing policy, the body must include both the new routing rule to add and the existing rules to retain. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/UpdateRoutingPolicy.go.html to see an example of how to use UpdateRoutingPolicy API. func (client LoadBalancerClient) UpdateRoutingPolicy(ctx context.Context, request UpdateRoutingPolicyRequest) (response UpdateRoutingPolicyResponse, err error) { @@ -3610,7 +3613,7 @@ func (client LoadBalancerClient) updateRoutingPolicy(ctx context.Context, reques // the rules in a rule set. // To add a new rule to a set, the body must include both the new rule to add and the existing rules to retain. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/UpdateRuleSet.go.html to see an example of how to use UpdateRuleSet API. func (client LoadBalancerClient) UpdateRuleSet(ctx context.Context, request UpdateRuleSetRequest) (response UpdateRuleSetResponse, err error) { @@ -3672,7 +3675,7 @@ func (client LoadBalancerClient) updateRuleSet(ctx context.Context, request comm // UpdateSSLCipherSuite Updates an existing SSL cipher suite for the specified load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loadbalancer/UpdateSSLCipherSuite.go.html to see an example of how to use UpdateSSLCipherSuite API. func (client LoadBalancerClient) UpdateSSLCipherSuite(ctx context.Context, request UpdateSSLCipherSuiteRequest) (response UpdateSSLCipherSuiteResponse, err error) { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/redirect_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/redirect_rule.go index 8668c5e9d7..a980ec1c1c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/redirect_rule.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/redirect_rule.go @@ -21,12 +21,12 @@ import ( // object is configured for a particular listener and a designated path. // The default response code is `302 Found`. // **NOTES:** -// * This rule applies only to HTTP listeners. -// * You can specify this rule only with the RuleCondition -// type `PATH`. -// * A listener can have only one RedirectRule object for a given original path. The -// PathMatchCondition `attributeValue` specifies the -// original path. +// - This rule applies only to HTTP listeners. +// - You can specify this rule only with the RuleCondition +// type `PATH`. +// - A listener can have only one RedirectRule object for a given original path. The +// PathMatchCondition `attributeValue` specifies the +// original path. type RedirectRule struct { Conditions []RuleCondition `mandatory:"true" json:"conditions"` @@ -104,6 +104,5 @@ func (m *RedirectRule) UnmarshalJSON(data []byte) (e error) { m.Conditions[i] = nil } } - return } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/routing_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/routing_rule.go index 2cf73d072d..de15b27853 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/routing_rule.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/routing_rule.go @@ -76,6 +76,5 @@ func (m *RoutingRule) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - return } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/rule_set.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/rule_set.go index abcd7a88f3..7943284cc0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/rule_set.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/rule_set.go @@ -73,6 +73,5 @@ func (m *RuleSet) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/rule_set_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/rule_set_details.go index 8a9e365383..3dd2080a28 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/rule_set_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/rule_set_details.go @@ -63,6 +63,5 @@ func (m *RuleSetDetails) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/ssl_cipher_suite.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/ssl_cipher_suite.go index a02cd8629d..d34e8ad0dd 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/ssl_cipher_suite.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/ssl_cipher_suite.go @@ -27,151 +27,151 @@ import ( // cipher suites (https://docs.cloud.oracle.com/api/#/en/loadbalancer/20170115/SSLCipherSuite/CreateSSLCipherSuite) if the predefined cipher // suites do not meet your requirements. // -// * __oci-default-ssl-cipher-suite-v1__ -// "DHE-RSA-AES128-GCM-SHA256" -// "DHE-RSA-AES128-SHA256" -// "DHE-RSA-AES256-GCM-SHA384" -// "DHE-RSA-AES256-SHA256" -// "ECDHE-RSA-AES128-GCM-SHA256" -// "ECDHE-RSA-AES128-SHA256" -// "ECDHE-RSA-AES256-GCM-SHA384" -// "ECDHE-RSA-AES256-SHA384" -// * __oci-modern-ssl-cipher-suite-v1__ -// "AES128-GCM-SHA256" -// "AES128-SHA256" -// "AES256-GCM-SHA384" -// "AES256-SHA256" -// "DHE-RSA-AES128-GCM-SHA256" -// "DHE-RSA-AES128-SHA256" -// "DHE-RSA-AES256-GCM-SHA384" -// "DHE-RSA-AES256-SHA256" -// "ECDHE-ECDSA-AES128-GCM-SHA256" -// "ECDHE-ECDSA-AES128-SHA256" -// "ECDHE-ECDSA-AES256-GCM-SHA384" -// "ECDHE-ECDSA-AES256-SHA384" -// "ECDHE-RSA-AES128-GCM-SHA256" -// "ECDHE-RSA-AES128-SHA256" -// "ECDHE-RSA-AES256-GCM-SHA384" -// "ECDHE-RSA-AES256-SHA384" -// * __oci-compatible-ssl-cipher-suite-v1__ -// "AES128-GCM-SHA256" -// "AES128-SHA" -// "AES128-SHA256" -// "AES256-GCM-SHA384" -// "AES256-SHA" -// "AES256-SHA256" -// "DHE-RSA-AES128-GCM-SHA256" -// "DHE-RSA-AES128-SHA256" -// "DHE-RSA-AES256-GCM-SHA384" -// "DHE-RSA-AES256-SHA256" -// "ECDHE-ECDSA-AES128-GCM-SHA256" -// "ECDHE-ECDSA-AES128-SHA" -// "ECDHE-ECDSA-AES128-SHA256" -// "ECDHE-ECDSA-AES256-GCM-SHA384" -// "ECDHE-ECDSA-AES256-SHA" -// "ECDHE-ECDSA-AES256-SHA384" -// "ECDHE-RSA-AES128-GCM-SHA256" -// "ECDHE-RSA-AES128-SHA" -// "ECDHE-RSA-AES128-SHA256" -// "ECDHE-RSA-AES256-GCM-SHA384" -// "ECDHE-RSA-AES256-SHA" -// "ECDHE-RSA-AES256-SHA384" -// * __oci-wider-compatible-ssl-cipher-suite-v1__ -// "AES128-GCM-SHA256" -// "AES128-SHA" -// "AES128-SHA256" -// "AES256-GCM-SHA384" -// "AES256-SHA" -// "AES256-SHA256" -// "CAMELLIA128-SHA" -// "CAMELLIA256-SHA" -// "DES-CBC3-SHA" -// "DH-DSS-AES128-GCM-SHA256" -// "DH-DSS-AES128-SHA" -// "DH-DSS-AES128-SHA256" -// "DH-DSS-AES256-GCM-SHA384" -// "DH-DSS-AES256-SHA" -// "DH-DSS-AES256-SHA256" -// "DH-DSS-CAMELLIA128-SHA" -// "DH-DSS-CAMELLIA256-SHA" -// "DH-DSS-DES-CBC3-SHAv" -// "DH-DSS-SEED-SHA" -// "DH-RSA-AES128-GCM-SHA256" -// "DH-RSA-AES128-SHA" -// "DH-RSA-AES128-SHA256" -// "DH-RSA-AES256-GCM-SHA384" -// "DH-RSA-AES256-SHA" -// "DH-RSA-AES256-SHA256" -// "DH-RSA-CAMELLIA128-SHA" -// "DH-RSA-CAMELLIA256-SHA" -// "DH-RSA-DES-CBC3-SHA" -// "DH-RSA-SEED-SHA" -// "DHE-DSS-AES128-GCM-SHA256" -// "DHE-DSS-AES128-SHA" -// "DHE-DSS-AES128-SHA256" -// "DHE-DSS-AES256-GCM-SHA384" -// "DHE-DSS-AES256-SHA" -// "DHE-DSS-AES256-SHA256" -// "DHE-DSS-CAMELLIA128-SHA" -// "DHE-DSS-CAMELLIA256-SHA" -// "DHE-DSS-DES-CBC3-SHA" -// "DHE-DSS-SEED-SHA" -// "DHE-RSA-AES128-GCM-SHA256" -// "DHE-RSA-AES128-SHA" -// "DHE-RSA-AES128-SHA256" -// "DHE-RSA-AES256-GCM-SHA384" -// "DHE-RSA-AES256-SHA" -// "DHE-RSA-AES256-SHA256" -// "DHE-RSA-CAMELLIA128-SHA" -// "DHE-RSA-CAMELLIA256-SHA" -// "DHE-RSA-DES-CBC3-SHA" -// "DHE-RSA-SEED-SHA" -// "ECDH-ECDSA-AES128-GCM-SHA256" -// "ECDH-ECDSA-AES128-SHA" -// "ECDH-ECDSA-AES128-SHA256" -// "ECDH-ECDSA-AES256-GCM-SHA384" -// "ECDH-ECDSA-AES256-SHA" -// "ECDH-ECDSA-AES256-SHA384" -// "ECDH-ECDSA-DES-CBC3-SHA" -// "ECDH-ECDSA-RC4-SHA" -// "ECDH-RSA-AES128-GCM-SHA256" -// "ECDH-RSA-AES128-SHA" -// "ECDH-RSA-AES128-SHA256" -// "ECDH-RSA-AES256-GCM-SHA384" -// "ECDH-RSA-AES256-SHA" -// "ECDH-RSA-AES256-SHA384" -// "ECDH-RSA-DES-CBC3-SHA" -// "ECDH-RSA-RC4-SHA" -// "ECDHE-ECDSA-AES128-GCM-SHA256" -// "ECDHE-ECDSA-AES128-SHA" -// "ECDHE-ECDSA-AES128-SHA256" -// "ECDHE-ECDSA-AES256-GCM-SHA384" -// "ECDHE-ECDSA-AES256-SHA" -// "ECDHE-ECDSA-AES256-SHA384" -// "ECDHE-ECDSA-DES-CBC3-SHA" -// "ECDHE-ECDSA-RC4-SHA" -// "ECDHE-RSA-AES128-GCM-SHA256" -// "ECDHE-RSA-AES128-SHA" -// "ECDHE-RSA-AES128-SHA256" -// "ECDHE-RSA-AES256-GCM-SHA384" -// "ECDHE-RSA-AES256-SHA" -// "ECDHE-RSA-AES256-SHA384" -// "ECDHE-RSA-DES-CBC3-SHA" -// "ECDHE-RSA-RC4-SHA" -// "IDEA-CBC-SHA" -// "KRB5-DES-CBC3-MD5" -// "KRB5-DES-CBC3-SHA" -// "KRB5-IDEA-CBC-MD5" -// "KRB5-IDEA-CBC-SHA" -// "KRB5-RC4-MD5" -// "KRB5-RC4-SHA" -// "PSK-3DES-EDE-CBC-SHA" -// "PSK-AES128-CBC-SHA" -// "PSK-AES256-CBC-SHA" -// "PSK-RC4-SHA" -// "RC4-MD5" -// "RC4-SHA" -// "SEED-SHA" +// - __oci-default-ssl-cipher-suite-v1__ +// "DHE-RSA-AES128-GCM-SHA256" +// "DHE-RSA-AES128-SHA256" +// "DHE-RSA-AES256-GCM-SHA384" +// "DHE-RSA-AES256-SHA256" +// "ECDHE-RSA-AES128-GCM-SHA256" +// "ECDHE-RSA-AES128-SHA256" +// "ECDHE-RSA-AES256-GCM-SHA384" +// "ECDHE-RSA-AES256-SHA384" +// - __oci-modern-ssl-cipher-suite-v1__ +// "AES128-GCM-SHA256" +// "AES128-SHA256" +// "AES256-GCM-SHA384" +// "AES256-SHA256" +// "DHE-RSA-AES128-GCM-SHA256" +// "DHE-RSA-AES128-SHA256" +// "DHE-RSA-AES256-GCM-SHA384" +// "DHE-RSA-AES256-SHA256" +// "ECDHE-ECDSA-AES128-GCM-SHA256" +// "ECDHE-ECDSA-AES128-SHA256" +// "ECDHE-ECDSA-AES256-GCM-SHA384" +// "ECDHE-ECDSA-AES256-SHA384" +// "ECDHE-RSA-AES128-GCM-SHA256" +// "ECDHE-RSA-AES128-SHA256" +// "ECDHE-RSA-AES256-GCM-SHA384" +// "ECDHE-RSA-AES256-SHA384" +// - __oci-compatible-ssl-cipher-suite-v1__ +// "AES128-GCM-SHA256" +// "AES128-SHA" +// "AES128-SHA256" +// "AES256-GCM-SHA384" +// "AES256-SHA" +// "AES256-SHA256" +// "DHE-RSA-AES128-GCM-SHA256" +// "DHE-RSA-AES128-SHA256" +// "DHE-RSA-AES256-GCM-SHA384" +// "DHE-RSA-AES256-SHA256" +// "ECDHE-ECDSA-AES128-GCM-SHA256" +// "ECDHE-ECDSA-AES128-SHA" +// "ECDHE-ECDSA-AES128-SHA256" +// "ECDHE-ECDSA-AES256-GCM-SHA384" +// "ECDHE-ECDSA-AES256-SHA" +// "ECDHE-ECDSA-AES256-SHA384" +// "ECDHE-RSA-AES128-GCM-SHA256" +// "ECDHE-RSA-AES128-SHA" +// "ECDHE-RSA-AES128-SHA256" +// "ECDHE-RSA-AES256-GCM-SHA384" +// "ECDHE-RSA-AES256-SHA" +// "ECDHE-RSA-AES256-SHA384" +// - __oci-wider-compatible-ssl-cipher-suite-v1__ +// "AES128-GCM-SHA256" +// "AES128-SHA" +// "AES128-SHA256" +// "AES256-GCM-SHA384" +// "AES256-SHA" +// "AES256-SHA256" +// "CAMELLIA128-SHA" +// "CAMELLIA256-SHA" +// "DES-CBC3-SHA" +// "DH-DSS-AES128-GCM-SHA256" +// "DH-DSS-AES128-SHA" +// "DH-DSS-AES128-SHA256" +// "DH-DSS-AES256-GCM-SHA384" +// "DH-DSS-AES256-SHA" +// "DH-DSS-AES256-SHA256" +// "DH-DSS-CAMELLIA128-SHA" +// "DH-DSS-CAMELLIA256-SHA" +// "DH-DSS-DES-CBC3-SHAv" +// "DH-DSS-SEED-SHA" +// "DH-RSA-AES128-GCM-SHA256" +// "DH-RSA-AES128-SHA" +// "DH-RSA-AES128-SHA256" +// "DH-RSA-AES256-GCM-SHA384" +// "DH-RSA-AES256-SHA" +// "DH-RSA-AES256-SHA256" +// "DH-RSA-CAMELLIA128-SHA" +// "DH-RSA-CAMELLIA256-SHA" +// "DH-RSA-DES-CBC3-SHA" +// "DH-RSA-SEED-SHA" +// "DHE-DSS-AES128-GCM-SHA256" +// "DHE-DSS-AES128-SHA" +// "DHE-DSS-AES128-SHA256" +// "DHE-DSS-AES256-GCM-SHA384" +// "DHE-DSS-AES256-SHA" +// "DHE-DSS-AES256-SHA256" +// "DHE-DSS-CAMELLIA128-SHA" +// "DHE-DSS-CAMELLIA256-SHA" +// "DHE-DSS-DES-CBC3-SHA" +// "DHE-DSS-SEED-SHA" +// "DHE-RSA-AES128-GCM-SHA256" +// "DHE-RSA-AES128-SHA" +// "DHE-RSA-AES128-SHA256" +// "DHE-RSA-AES256-GCM-SHA384" +// "DHE-RSA-AES256-SHA" +// "DHE-RSA-AES256-SHA256" +// "DHE-RSA-CAMELLIA128-SHA" +// "DHE-RSA-CAMELLIA256-SHA" +// "DHE-RSA-DES-CBC3-SHA" +// "DHE-RSA-SEED-SHA" +// "ECDH-ECDSA-AES128-GCM-SHA256" +// "ECDH-ECDSA-AES128-SHA" +// "ECDH-ECDSA-AES128-SHA256" +// "ECDH-ECDSA-AES256-GCM-SHA384" +// "ECDH-ECDSA-AES256-SHA" +// "ECDH-ECDSA-AES256-SHA384" +// "ECDH-ECDSA-DES-CBC3-SHA" +// "ECDH-ECDSA-RC4-SHA" +// "ECDH-RSA-AES128-GCM-SHA256" +// "ECDH-RSA-AES128-SHA" +// "ECDH-RSA-AES128-SHA256" +// "ECDH-RSA-AES256-GCM-SHA384" +// "ECDH-RSA-AES256-SHA" +// "ECDH-RSA-AES256-SHA384" +// "ECDH-RSA-DES-CBC3-SHA" +// "ECDH-RSA-RC4-SHA" +// "ECDHE-ECDSA-AES128-GCM-SHA256" +// "ECDHE-ECDSA-AES128-SHA" +// "ECDHE-ECDSA-AES128-SHA256" +// "ECDHE-ECDSA-AES256-GCM-SHA384" +// "ECDHE-ECDSA-AES256-SHA" +// "ECDHE-ECDSA-AES256-SHA384" +// "ECDHE-ECDSA-DES-CBC3-SHA" +// "ECDHE-ECDSA-RC4-SHA" +// "ECDHE-RSA-AES128-GCM-SHA256" +// "ECDHE-RSA-AES128-SHA" +// "ECDHE-RSA-AES128-SHA256" +// "ECDHE-RSA-AES256-GCM-SHA384" +// "ECDHE-RSA-AES256-SHA" +// "ECDHE-RSA-AES256-SHA384" +// "ECDHE-RSA-DES-CBC3-SHA" +// "ECDHE-RSA-RC4-SHA" +// "IDEA-CBC-SHA" +// "KRB5-DES-CBC3-MD5" +// "KRB5-DES-CBC3-SHA" +// "KRB5-IDEA-CBC-MD5" +// "KRB5-IDEA-CBC-SHA" +// "KRB5-RC4-MD5" +// "KRB5-RC4-SHA" +// "PSK-3DES-EDE-CBC-SHA" +// "PSK-AES128-CBC-SHA" +// "PSK-AES256-CBC-SHA" +// "PSK-RC4-SHA" +// "RC4-MD5" +// "RC4-SHA" +// "SEED-SHA" type SslCipherSuite struct { // A friendly name for the SSL cipher suite. It must be unique and it cannot be changed. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/ssl_cipher_suite_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/ssl_cipher_suite_details.go index 9ec440fa18..6b47b7c92c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/ssl_cipher_suite_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/ssl_cipher_suite_details.go @@ -27,151 +27,151 @@ import ( // cipher suites (https://docs.cloud.oracle.com/api/#/en/loadbalancer/20170115/SSLCipherSuite/CreateSSLCipherSuite) if the predefined cipher // suites do not meet your requirements. // -// * __oci-default-ssl-cipher-suite-v1__ -// "DHE-RSA-AES128-GCM-SHA256" -// "DHE-RSA-AES128-SHA256" -// "DHE-RSA-AES256-GCM-SHA384" -// "DHE-RSA-AES256-SHA256" -// "ECDHE-RSA-AES128-GCM-SHA256" -// "ECDHE-RSA-AES128-SHA256" -// "ECDHE-RSA-AES256-GCM-SHA384" -// "ECDHE-RSA-AES256-SHA384" -// * __oci-modern-ssl-cipher-suite-v1__ -// "AES128-GCM-SHA256" -// "AES128-SHA256" -// "AES256-GCM-SHA384" -// "AES256-SHA256" -// "DHE-RSA-AES128-GCM-SHA256" -// "DHE-RSA-AES128-SHA256" -// "DHE-RSA-AES256-GCM-SHA384" -// "DHE-RSA-AES256-SHA256" -// "ECDHE-ECDSA-AES128-GCM-SHA256" -// "ECDHE-ECDSA-AES128-SHA256" -// "ECDHE-ECDSA-AES256-GCM-SHA384" -// "ECDHE-ECDSA-AES256-SHA384" -// "ECDHE-RSA-AES128-GCM-SHA256" -// "ECDHE-RSA-AES128-SHA256" -// "ECDHE-RSA-AES256-GCM-SHA384" -// "ECDHE-RSA-AES256-SHA384" -// * __oci-compatible-ssl-cipher-suite-v1__ -// "AES128-GCM-SHA256" -// "AES128-SHA" -// "AES128-SHA256" -// "AES256-GCM-SHA384" -// "AES256-SHA" -// "AES256-SHA256" -// "DHE-RSA-AES128-GCM-SHA256" -// "DHE-RSA-AES128-SHA256" -// "DHE-RSA-AES256-GCM-SHA384" -// "DHE-RSA-AES256-SHA256" -// "ECDHE-ECDSA-AES128-GCM-SHA256" -// "ECDHE-ECDSA-AES128-SHA" -// "ECDHE-ECDSA-AES128-SHA256" -// "ECDHE-ECDSA-AES256-GCM-SHA384" -// "ECDHE-ECDSA-AES256-SHA" -// "ECDHE-ECDSA-AES256-SHA384" -// "ECDHE-RSA-AES128-GCM-SHA256" -// "ECDHE-RSA-AES128-SHA" -// "ECDHE-RSA-AES128-SHA256" -// "ECDHE-RSA-AES256-GCM-SHA384" -// "ECDHE-RSA-AES256-SHA" -// "ECDHE-RSA-AES256-SHA384" -// * __oci-wider-compatible-ssl-cipher-suite-v1__ -// "AES128-GCM-SHA256" -// "AES128-SHA" -// "AES128-SHA256" -// "AES256-GCM-SHA384" -// "AES256-SHA" -// "AES256-SHA256" -// "CAMELLIA128-SHA" -// "CAMELLIA256-SHA" -// "DES-CBC3-SHA" -// "DH-DSS-AES128-GCM-SHA256" -// "DH-DSS-AES128-SHA" -// "DH-DSS-AES128-SHA256" -// "DH-DSS-AES256-GCM-SHA384" -// "DH-DSS-AES256-SHA" -// "DH-DSS-AES256-SHA256" -// "DH-DSS-CAMELLIA128-SHA" -// "DH-DSS-CAMELLIA256-SHA" -// "DH-DSS-DES-CBC3-SHAv" -// "DH-DSS-SEED-SHA" -// "DH-RSA-AES128-GCM-SHA256" -// "DH-RSA-AES128-SHA" -// "DH-RSA-AES128-SHA256" -// "DH-RSA-AES256-GCM-SHA384" -// "DH-RSA-AES256-SHA" -// "DH-RSA-AES256-SHA256" -// "DH-RSA-CAMELLIA128-SHA" -// "DH-RSA-CAMELLIA256-SHA" -// "DH-RSA-DES-CBC3-SHA" -// "DH-RSA-SEED-SHA" -// "DHE-DSS-AES128-GCM-SHA256" -// "DHE-DSS-AES128-SHA" -// "DHE-DSS-AES128-SHA256" -// "DHE-DSS-AES256-GCM-SHA384" -// "DHE-DSS-AES256-SHA" -// "DHE-DSS-AES256-SHA256" -// "DHE-DSS-CAMELLIA128-SHA" -// "DHE-DSS-CAMELLIA256-SHA" -// "DHE-DSS-DES-CBC3-SHA" -// "DHE-DSS-SEED-SHA" -// "DHE-RSA-AES128-GCM-SHA256" -// "DHE-RSA-AES128-SHA" -// "DHE-RSA-AES128-SHA256" -// "DHE-RSA-AES256-GCM-SHA384" -// "DHE-RSA-AES256-SHA" -// "DHE-RSA-AES256-SHA256" -// "DHE-RSA-CAMELLIA128-SHA" -// "DHE-RSA-CAMELLIA256-SHA" -// "DHE-RSA-DES-CBC3-SHA" -// "DHE-RSA-SEED-SHA" -// "ECDH-ECDSA-AES128-GCM-SHA256" -// "ECDH-ECDSA-AES128-SHA" -// "ECDH-ECDSA-AES128-SHA256" -// "ECDH-ECDSA-AES256-GCM-SHA384" -// "ECDH-ECDSA-AES256-SHA" -// "ECDH-ECDSA-AES256-SHA384" -// "ECDH-ECDSA-DES-CBC3-SHA" -// "ECDH-ECDSA-RC4-SHA" -// "ECDH-RSA-AES128-GCM-SHA256" -// "ECDH-RSA-AES128-SHA" -// "ECDH-RSA-AES128-SHA256" -// "ECDH-RSA-AES256-GCM-SHA384" -// "ECDH-RSA-AES256-SHA" -// "ECDH-RSA-AES256-SHA384" -// "ECDH-RSA-DES-CBC3-SHA" -// "ECDH-RSA-RC4-SHA" -// "ECDHE-ECDSA-AES128-GCM-SHA256" -// "ECDHE-ECDSA-AES128-SHA" -// "ECDHE-ECDSA-AES128-SHA256" -// "ECDHE-ECDSA-AES256-GCM-SHA384" -// "ECDHE-ECDSA-AES256-SHA" -// "ECDHE-ECDSA-AES256-SHA384" -// "ECDHE-ECDSA-DES-CBC3-SHA" -// "ECDHE-ECDSA-RC4-SHA" -// "ECDHE-RSA-AES128-GCM-SHA256" -// "ECDHE-RSA-AES128-SHA" -// "ECDHE-RSA-AES128-SHA256" -// "ECDHE-RSA-AES256-GCM-SHA384" -// "ECDHE-RSA-AES256-SHA" -// "ECDHE-RSA-AES256-SHA384" -// "ECDHE-RSA-DES-CBC3-SHA" -// "ECDHE-RSA-RC4-SHA" -// "IDEA-CBC-SHA" -// "KRB5-DES-CBC3-MD5" -// "KRB5-DES-CBC3-SHA" -// "KRB5-IDEA-CBC-MD5" -// "KRB5-IDEA-CBC-SHA" -// "KRB5-RC4-MD5" -// "KRB5-RC4-SHA" -// "PSK-3DES-EDE-CBC-SHA" -// "PSK-AES128-CBC-SHA" -// "PSK-AES256-CBC-SHA" -// "PSK-RC4-SHA" -// "RC4-MD5" -// "RC4-SHA" -// "SEED-SHA" +// - __oci-default-ssl-cipher-suite-v1__ +// "DHE-RSA-AES128-GCM-SHA256" +// "DHE-RSA-AES128-SHA256" +// "DHE-RSA-AES256-GCM-SHA384" +// "DHE-RSA-AES256-SHA256" +// "ECDHE-RSA-AES128-GCM-SHA256" +// "ECDHE-RSA-AES128-SHA256" +// "ECDHE-RSA-AES256-GCM-SHA384" +// "ECDHE-RSA-AES256-SHA384" +// - __oci-modern-ssl-cipher-suite-v1__ +// "AES128-GCM-SHA256" +// "AES128-SHA256" +// "AES256-GCM-SHA384" +// "AES256-SHA256" +// "DHE-RSA-AES128-GCM-SHA256" +// "DHE-RSA-AES128-SHA256" +// "DHE-RSA-AES256-GCM-SHA384" +// "DHE-RSA-AES256-SHA256" +// "ECDHE-ECDSA-AES128-GCM-SHA256" +// "ECDHE-ECDSA-AES128-SHA256" +// "ECDHE-ECDSA-AES256-GCM-SHA384" +// "ECDHE-ECDSA-AES256-SHA384" +// "ECDHE-RSA-AES128-GCM-SHA256" +// "ECDHE-RSA-AES128-SHA256" +// "ECDHE-RSA-AES256-GCM-SHA384" +// "ECDHE-RSA-AES256-SHA384" +// - __oci-compatible-ssl-cipher-suite-v1__ +// "AES128-GCM-SHA256" +// "AES128-SHA" +// "AES128-SHA256" +// "AES256-GCM-SHA384" +// "AES256-SHA" +// "AES256-SHA256" +// "DHE-RSA-AES128-GCM-SHA256" +// "DHE-RSA-AES128-SHA256" +// "DHE-RSA-AES256-GCM-SHA384" +// "DHE-RSA-AES256-SHA256" +// "ECDHE-ECDSA-AES128-GCM-SHA256" +// "ECDHE-ECDSA-AES128-SHA" +// "ECDHE-ECDSA-AES128-SHA256" +// "ECDHE-ECDSA-AES256-GCM-SHA384" +// "ECDHE-ECDSA-AES256-SHA" +// "ECDHE-ECDSA-AES256-SHA384" +// "ECDHE-RSA-AES128-GCM-SHA256" +// "ECDHE-RSA-AES128-SHA" +// "ECDHE-RSA-AES128-SHA256" +// "ECDHE-RSA-AES256-GCM-SHA384" +// "ECDHE-RSA-AES256-SHA" +// "ECDHE-RSA-AES256-SHA384" +// - __oci-wider-compatible-ssl-cipher-suite-v1__ +// "AES128-GCM-SHA256" +// "AES128-SHA" +// "AES128-SHA256" +// "AES256-GCM-SHA384" +// "AES256-SHA" +// "AES256-SHA256" +// "CAMELLIA128-SHA" +// "CAMELLIA256-SHA" +// "DES-CBC3-SHA" +// "DH-DSS-AES128-GCM-SHA256" +// "DH-DSS-AES128-SHA" +// "DH-DSS-AES128-SHA256" +// "DH-DSS-AES256-GCM-SHA384" +// "DH-DSS-AES256-SHA" +// "DH-DSS-AES256-SHA256" +// "DH-DSS-CAMELLIA128-SHA" +// "DH-DSS-CAMELLIA256-SHA" +// "DH-DSS-DES-CBC3-SHAv" +// "DH-DSS-SEED-SHA" +// "DH-RSA-AES128-GCM-SHA256" +// "DH-RSA-AES128-SHA" +// "DH-RSA-AES128-SHA256" +// "DH-RSA-AES256-GCM-SHA384" +// "DH-RSA-AES256-SHA" +// "DH-RSA-AES256-SHA256" +// "DH-RSA-CAMELLIA128-SHA" +// "DH-RSA-CAMELLIA256-SHA" +// "DH-RSA-DES-CBC3-SHA" +// "DH-RSA-SEED-SHA" +// "DHE-DSS-AES128-GCM-SHA256" +// "DHE-DSS-AES128-SHA" +// "DHE-DSS-AES128-SHA256" +// "DHE-DSS-AES256-GCM-SHA384" +// "DHE-DSS-AES256-SHA" +// "DHE-DSS-AES256-SHA256" +// "DHE-DSS-CAMELLIA128-SHA" +// "DHE-DSS-CAMELLIA256-SHA" +// "DHE-DSS-DES-CBC3-SHA" +// "DHE-DSS-SEED-SHA" +// "DHE-RSA-AES128-GCM-SHA256" +// "DHE-RSA-AES128-SHA" +// "DHE-RSA-AES128-SHA256" +// "DHE-RSA-AES256-GCM-SHA384" +// "DHE-RSA-AES256-SHA" +// "DHE-RSA-AES256-SHA256" +// "DHE-RSA-CAMELLIA128-SHA" +// "DHE-RSA-CAMELLIA256-SHA" +// "DHE-RSA-DES-CBC3-SHA" +// "DHE-RSA-SEED-SHA" +// "ECDH-ECDSA-AES128-GCM-SHA256" +// "ECDH-ECDSA-AES128-SHA" +// "ECDH-ECDSA-AES128-SHA256" +// "ECDH-ECDSA-AES256-GCM-SHA384" +// "ECDH-ECDSA-AES256-SHA" +// "ECDH-ECDSA-AES256-SHA384" +// "ECDH-ECDSA-DES-CBC3-SHA" +// "ECDH-ECDSA-RC4-SHA" +// "ECDH-RSA-AES128-GCM-SHA256" +// "ECDH-RSA-AES128-SHA" +// "ECDH-RSA-AES128-SHA256" +// "ECDH-RSA-AES256-GCM-SHA384" +// "ECDH-RSA-AES256-SHA" +// "ECDH-RSA-AES256-SHA384" +// "ECDH-RSA-DES-CBC3-SHA" +// "ECDH-RSA-RC4-SHA" +// "ECDHE-ECDSA-AES128-GCM-SHA256" +// "ECDHE-ECDSA-AES128-SHA" +// "ECDHE-ECDSA-AES128-SHA256" +// "ECDHE-ECDSA-AES256-GCM-SHA384" +// "ECDHE-ECDSA-AES256-SHA" +// "ECDHE-ECDSA-AES256-SHA384" +// "ECDHE-ECDSA-DES-CBC3-SHA" +// "ECDHE-ECDSA-RC4-SHA" +// "ECDHE-RSA-AES128-GCM-SHA256" +// "ECDHE-RSA-AES128-SHA" +// "ECDHE-RSA-AES128-SHA256" +// "ECDHE-RSA-AES256-GCM-SHA384" +// "ECDHE-RSA-AES256-SHA" +// "ECDHE-RSA-AES256-SHA384" +// "ECDHE-RSA-DES-CBC3-SHA" +// "ECDHE-RSA-RC4-SHA" +// "IDEA-CBC-SHA" +// "KRB5-DES-CBC3-MD5" +// "KRB5-DES-CBC3-SHA" +// "KRB5-IDEA-CBC-MD5" +// "KRB5-IDEA-CBC-SHA" +// "KRB5-RC4-MD5" +// "KRB5-RC4-SHA" +// "PSK-3DES-EDE-CBC-SHA" +// "PSK-AES128-CBC-SHA" +// "PSK-AES256-CBC-SHA" +// "PSK-RC4-SHA" +// "RC4-MD5" +// "RC4-SHA" +// "SEED-SHA" type SslCipherSuiteDetails struct { // A friendly name for the SSL cipher suite. It must be unique and it cannot be changed. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/update_rule_set_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/update_rule_set_details.go index abc79560a3..dc5d907251 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/update_rule_set_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/update_rule_set_details.go @@ -63,6 +63,5 @@ func (m *UpdateRuleSetDetails) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/monitoring/monitoring_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/monitoring/monitoring_client.go index ba575012f5..b6b8f51aff 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/monitoring/monitoring_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/monitoring/monitoring_client.go @@ -28,6 +28,9 @@ type MonitoringClient struct { // NewMonitoringClientWithConfigurationProvider Creates a new default Monitoring client with the given configuration provider. // the configuration provider will be used for the default signer as well as reading the region func NewMonitoringClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client MonitoringClient, err error) { + if enabled := common.CheckForEnabledServices("monitoring"); !enabled { + return client, fmt.Errorf("the Alloy configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local alloy_config file configured the service you're targeting or contact the cloud provider on the availability of this service") + } provider, err := auth.GetGenericConfigurationProvider(configProvider) if err != nil { return client, err @@ -79,7 +82,7 @@ func (client *MonitoringClient) setConfigurationProvider(configProvider common.C region, _ := configProvider.Region() client.SetRegion(region) if client.Host == "" { - return fmt.Errorf("Invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil @@ -93,7 +96,7 @@ func (client *MonitoringClient) ConfigurationProvider() *common.ConfigurationPro // ChangeAlarmCompartment Moves an alarm into a different compartment within the same tenancy. // For information about moving resources between compartments, see Moving Resources Between Compartments (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/monitoring/ChangeAlarmCompartment.go.html to see an example of how to use ChangeAlarmCompartment API. func (client MonitoringClient) ChangeAlarmCompartment(ctx context.Context, request ChangeAlarmCompartmentRequest) (response ChangeAlarmCompartmentResponse, err error) { @@ -159,7 +162,7 @@ func (client MonitoringClient) changeAlarmCompartment(ctx context.Context, reque // Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, // or transactions, per second (TPS) for a given tenancy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/monitoring/CreateAlarm.go.html to see an example of how to use CreateAlarm API. func (client MonitoringClient) CreateAlarm(ctx context.Context, request CreateAlarmRequest) (response CreateAlarmResponse, err error) { @@ -225,7 +228,7 @@ func (client MonitoringClient) createAlarm(ctx context.Context, request common.O // Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, // or transactions, per second (TPS) for a given tenancy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/monitoring/DeleteAlarm.go.html to see an example of how to use DeleteAlarm API. func (client MonitoringClient) DeleteAlarm(ctx context.Context, request DeleteAlarmRequest) (response DeleteAlarmResponse, err error) { @@ -286,7 +289,7 @@ func (client MonitoringClient) deleteAlarm(ctx context.Context, request common.O // Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, // or transactions, per second (TPS) for a given tenancy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/monitoring/GetAlarm.go.html to see an example of how to use GetAlarm API. func (client MonitoringClient) GetAlarm(ctx context.Context, request GetAlarmRequest) (response GetAlarmResponse, err error) { @@ -347,7 +350,7 @@ func (client MonitoringClient) getAlarm(ctx context.Context, request common.OCIR // Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, // or transactions, per second (TPS) for a given tenancy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/monitoring/GetAlarmHistory.go.html to see an example of how to use GetAlarmHistory API. func (client MonitoringClient) GetAlarmHistory(ctx context.Context, request GetAlarmHistoryRequest) (response GetAlarmHistoryResponse, err error) { @@ -408,7 +411,7 @@ func (client MonitoringClient) getAlarmHistory(ctx context.Context, request comm // Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, // or transactions, per second (TPS) for a given tenancy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/monitoring/ListAlarms.go.html to see an example of how to use ListAlarms API. func (client MonitoringClient) ListAlarms(ctx context.Context, request ListAlarmsRequest) (response ListAlarmsResponse, err error) { @@ -472,7 +475,7 @@ func (client MonitoringClient) listAlarms(ctx context.Context, request common.OC // Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, // or transactions, per second (TPS) for a given tenancy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/monitoring/ListAlarmsStatus.go.html to see an example of how to use ListAlarmsStatus API. func (client MonitoringClient) ListAlarmsStatus(ctx context.Context, request ListAlarmsStatusRequest) (response ListAlarmsStatusResponse, err error) { @@ -532,7 +535,7 @@ func (client MonitoringClient) listAlarmsStatus(ctx context.Context, request com // For important limits information, see Limits on Monitoring (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits). // Transactions Per Second (TPS) per-tenancy limit for this operation: 10. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/monitoring/ListMetrics.go.html to see an example of how to use ListMetrics API. func (client MonitoringClient) ListMetrics(ctx context.Context, request ListMetricsRequest) (response ListMetricsResponse, err error) { @@ -601,7 +604,7 @@ func (client MonitoringClient) listMetrics(ctx context.Context, request common.O // The endpoints for this operation differ from other Monitoring operations. Replace the string `telemetry` with `telemetry-ingestion` in the endpoint, as in the following example: // https://telemetry-ingestion.eu-frankfurt-1.oraclecloud.com // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/monitoring/PostMetricData.go.html to see an example of how to use PostMetricData API. func (client MonitoringClient) PostMetricData(ctx context.Context, request PostMetricDataRequest) (response PostMetricDataResponse, err error) { @@ -662,7 +665,7 @@ func (client MonitoringClient) postMetricData(ctx context.Context, request commo // Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, // or transactions, per second (TPS) for a given tenancy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/monitoring/RemoveAlarmSuppression.go.html to see an example of how to use RemoveAlarmSuppression API. func (client MonitoringClient) RemoveAlarmSuppression(ctx context.Context, request RemoveAlarmSuppressionRequest) (response RemoveAlarmSuppressionResponse, err error) { @@ -720,14 +723,16 @@ func (client MonitoringClient) removeAlarmSuppression(ctx context.Context, reque // RetrieveDimensionStates Lists the current alarm status of each metric stream, where status is derived from the metric stream's last associated transition. // Optionally filter by status value and one or more dimension key-value pairs. // This operation is only valid for alarms that have notifications per dimension enabled (`isNotificationsPerMetricDimensionEnabled=true`). -// If `isNotificationsPerMetricDimensionEnabled` for the alarm is false or null, then no results are returned. +// +// If `isNotificationsPerMetricDimensionEnabled` for the alarm is false or null, then no results are returned. +// // For important limits information, see Limits on Monitoring (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits). // -// This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations. -// Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, -// or transactions, per second (TPS) for a given tenancy. +// This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations. +// Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, +// or transactions, per second (TPS) for a given tenancy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/monitoring/RetrieveDimensionStates.go.html to see an example of how to use RetrieveDimensionStates API. func (client MonitoringClient) RetrieveDimensionStates(ctx context.Context, request RetrieveDimensionStatesRequest) (response RetrieveDimensionStatesResponse, err error) { @@ -787,7 +792,7 @@ func (client MonitoringClient) retrieveDimensionStates(ctx context.Context, requ // For important limits information, see Limits on Monitoring (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits). // Transactions Per Second (TPS) per-tenancy limit for this operation: 10. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/monitoring/SummarizeMetricsData.go.html to see an example of how to use SummarizeMetricsData API. func (client MonitoringClient) SummarizeMetricsData(ctx context.Context, request SummarizeMetricsDataRequest) (response SummarizeMetricsDataResponse, err error) { @@ -848,7 +853,7 @@ func (client MonitoringClient) summarizeMetricsData(ctx context.Context, request // Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, // or transactions, per second (TPS) for a given tenancy. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/monitoring/UpdateAlarm.go.html to see an example of how to use UpdateAlarm API. func (client MonitoringClient) UpdateAlarm(ctx context.Context, request UpdateAlarmRequest) (response UpdateAlarmResponse, err error) { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/networkloadbalancer_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/networkloadbalancer_client.go index 9de7eac613..c48dbd0a52 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/networkloadbalancer_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/networkloadbalancer_client.go @@ -26,6 +26,9 @@ type NetworkLoadBalancerClient struct { // NewNetworkLoadBalancerClientWithConfigurationProvider Creates a new default NetworkLoadBalancer client with the given configuration provider. // the configuration provider will be used for the default signer as well as reading the region func NewNetworkLoadBalancerClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client NetworkLoadBalancerClient, err error) { + if enabled := common.CheckForEnabledServices("networkloadbalancer"); !enabled { + return client, fmt.Errorf("the Alloy configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local alloy_config file configured the service you're targeting or contact the cloud provider on the availability of this service") + } provider, err := auth.GetGenericConfigurationProvider(configProvider) if err != nil { return client, err @@ -77,7 +80,7 @@ func (client *NetworkLoadBalancerClient) setConfigurationProvider(configProvider region, _ := configProvider.Region() client.SetRegion(region) if client.Host == "" { - return fmt.Errorf("Invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil @@ -91,7 +94,7 @@ func (client *NetworkLoadBalancerClient) ConfigurationProvider() *common.Configu // ChangeNetworkLoadBalancerCompartment Moves a network load balancer into a different compartment within the same tenancy. For information about moving resources // between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/ChangeNetworkLoadBalancerCompartment.go.html to see an example of how to use ChangeNetworkLoadBalancerCompartment API. func (client NetworkLoadBalancerClient) ChangeNetworkLoadBalancerCompartment(ctx context.Context, request ChangeNetworkLoadBalancerCompartmentRequest) (response ChangeNetworkLoadBalancerCompartmentResponse, err error) { @@ -153,7 +156,7 @@ func (client NetworkLoadBalancerClient) changeNetworkLoadBalancerCompartment(ctx // CreateBackend Adds a backend server to a backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/CreateBackend.go.html to see an example of how to use CreateBackend API. func (client NetworkLoadBalancerClient) CreateBackend(ctx context.Context, request CreateBackendRequest) (response CreateBackendResponse, err error) { @@ -215,7 +218,7 @@ func (client NetworkLoadBalancerClient) createBackend(ctx context.Context, reque // CreateBackendSet Adds a backend set to a network load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/CreateBackendSet.go.html to see an example of how to use CreateBackendSet API. func (client NetworkLoadBalancerClient) CreateBackendSet(ctx context.Context, request CreateBackendSetRequest) (response CreateBackendSetResponse, err error) { @@ -277,7 +280,7 @@ func (client NetworkLoadBalancerClient) createBackendSet(ctx context.Context, re // CreateListener Adds a listener to a network load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/CreateListener.go.html to see an example of how to use CreateListener API. func (client NetworkLoadBalancerClient) CreateListener(ctx context.Context, request CreateListenerRequest) (response CreateListenerResponse, err error) { @@ -339,7 +342,7 @@ func (client NetworkLoadBalancerClient) createListener(ctx context.Context, requ // CreateNetworkLoadBalancer Creates a network load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/CreateNetworkLoadBalancer.go.html to see an example of how to use CreateNetworkLoadBalancer API. func (client NetworkLoadBalancerClient) CreateNetworkLoadBalancer(ctx context.Context, request CreateNetworkLoadBalancerRequest) (response CreateNetworkLoadBalancerResponse, err error) { @@ -401,7 +404,7 @@ func (client NetworkLoadBalancerClient) createNetworkLoadBalancer(ctx context.Co // DeleteBackend Removes a backend server from a given network load balancer and backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/DeleteBackend.go.html to see an example of how to use DeleteBackend API. func (client NetworkLoadBalancerClient) DeleteBackend(ctx context.Context, request DeleteBackendRequest) (response DeleteBackendResponse, err error) { @@ -459,7 +462,7 @@ func (client NetworkLoadBalancerClient) deleteBackend(ctx context.Context, reque // DeleteBackendSet Deletes the specified backend set. Note that deleting a backend set removes its backend servers from the network load balancer. // Before you can delete a backend set, you must remove it from any active listeners. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/DeleteBackendSet.go.html to see an example of how to use DeleteBackendSet API. func (client NetworkLoadBalancerClient) DeleteBackendSet(ctx context.Context, request DeleteBackendSetRequest) (response DeleteBackendSetResponse, err error) { @@ -516,7 +519,7 @@ func (client NetworkLoadBalancerClient) deleteBackendSet(ctx context.Context, re // DeleteListener Deletes a listener from a network load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/DeleteListener.go.html to see an example of how to use DeleteListener API. func (client NetworkLoadBalancerClient) DeleteListener(ctx context.Context, request DeleteListenerRequest) (response DeleteListenerResponse, err error) { @@ -573,7 +576,7 @@ func (client NetworkLoadBalancerClient) deleteListener(ctx context.Context, requ // DeleteNetworkLoadBalancer Deletes a network load balancer resource by identifier. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/DeleteNetworkLoadBalancer.go.html to see an example of how to use DeleteNetworkLoadBalancer API. func (client NetworkLoadBalancerClient) DeleteNetworkLoadBalancer(ctx context.Context, request DeleteNetworkLoadBalancerRequest) (response DeleteNetworkLoadBalancerResponse, err error) { @@ -630,7 +633,7 @@ func (client NetworkLoadBalancerClient) deleteNetworkLoadBalancer(ctx context.Co // GetBackend Retrieves the configuration information for the specified backend server. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/GetBackend.go.html to see an example of how to use GetBackend API. func (client NetworkLoadBalancerClient) GetBackend(ctx context.Context, request GetBackendRequest) (response GetBackendResponse, err error) { @@ -687,7 +690,7 @@ func (client NetworkLoadBalancerClient) getBackend(ctx context.Context, request // GetBackendHealth Retrieves the current health status of the specified backend server. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/GetBackendHealth.go.html to see an example of how to use GetBackendHealth API. func (client NetworkLoadBalancerClient) GetBackendHealth(ctx context.Context, request GetBackendHealthRequest) (response GetBackendHealthResponse, err error) { @@ -744,7 +747,7 @@ func (client NetworkLoadBalancerClient) getBackendHealth(ctx context.Context, re // GetBackendSet Retrieves the configuration information for the specified backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/GetBackendSet.go.html to see an example of how to use GetBackendSet API. func (client NetworkLoadBalancerClient) GetBackendSet(ctx context.Context, request GetBackendSetRequest) (response GetBackendSetResponse, err error) { @@ -801,7 +804,7 @@ func (client NetworkLoadBalancerClient) getBackendSet(ctx context.Context, reque // GetBackendSetHealth Retrieves the health status for the specified backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/GetBackendSetHealth.go.html to see an example of how to use GetBackendSetHealth API. func (client NetworkLoadBalancerClient) GetBackendSetHealth(ctx context.Context, request GetBackendSetHealthRequest) (response GetBackendSetHealthResponse, err error) { @@ -858,7 +861,7 @@ func (client NetworkLoadBalancerClient) getBackendSetHealth(ctx context.Context, // GetHealthChecker Retrieves the health check policy information for a given network load balancer and backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/GetHealthChecker.go.html to see an example of how to use GetHealthChecker API. func (client NetworkLoadBalancerClient) GetHealthChecker(ctx context.Context, request GetHealthCheckerRequest) (response GetHealthCheckerResponse, err error) { @@ -920,7 +923,7 @@ func (client NetworkLoadBalancerClient) getHealthChecker(ctx context.Context, re // GetListener Retrieves listener properties associated with a given network load balancer and listener name. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/GetListener.go.html to see an example of how to use GetListener API. func (client NetworkLoadBalancerClient) GetListener(ctx context.Context, request GetListenerRequest) (response GetListenerResponse, err error) { @@ -977,7 +980,7 @@ func (client NetworkLoadBalancerClient) getListener(ctx context.Context, request // GetNetworkLoadBalancer Retrieves network load balancer configuration information by identifier. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/GetNetworkLoadBalancer.go.html to see an example of how to use GetNetworkLoadBalancer API. func (client NetworkLoadBalancerClient) GetNetworkLoadBalancer(ctx context.Context, request GetNetworkLoadBalancerRequest) (response GetNetworkLoadBalancerResponse, err error) { @@ -1034,7 +1037,7 @@ func (client NetworkLoadBalancerClient) getNetworkLoadBalancer(ctx context.Conte // GetNetworkLoadBalancerHealth Retrieves the health status for the specified network load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/GetNetworkLoadBalancerHealth.go.html to see an example of how to use GetNetworkLoadBalancerHealth API. func (client NetworkLoadBalancerClient) GetNetworkLoadBalancerHealth(ctx context.Context, request GetNetworkLoadBalancerHealthRequest) (response GetNetworkLoadBalancerHealthResponse, err error) { @@ -1091,7 +1094,7 @@ func (client NetworkLoadBalancerClient) getNetworkLoadBalancerHealth(ctx context // GetWorkRequest Retrieves the details of the work request with the given identifier. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/GetWorkRequest.go.html to see an example of how to use GetWorkRequest API. func (client NetworkLoadBalancerClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { @@ -1148,7 +1151,7 @@ func (client NetworkLoadBalancerClient) getWorkRequest(ctx context.Context, requ // ListBackendSets Lists all backend sets associated with a given network load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/ListBackendSets.go.html to see an example of how to use ListBackendSets API. func (client NetworkLoadBalancerClient) ListBackendSets(ctx context.Context, request ListBackendSetsRequest) (response ListBackendSetsResponse, err error) { @@ -1205,7 +1208,7 @@ func (client NetworkLoadBalancerClient) listBackendSets(ctx context.Context, req // ListBackends Lists the backend servers for a given network load balancer and backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/ListBackends.go.html to see an example of how to use ListBackends API. func (client NetworkLoadBalancerClient) ListBackends(ctx context.Context, request ListBackendsRequest) (response ListBackendsResponse, err error) { @@ -1262,7 +1265,7 @@ func (client NetworkLoadBalancerClient) listBackends(ctx context.Context, reques // ListListeners Lists all listeners associated with a given network load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/ListListeners.go.html to see an example of how to use ListListeners API. func (client NetworkLoadBalancerClient) ListListeners(ctx context.Context, request ListListenersRequest) (response ListListenersResponse, err error) { @@ -1319,7 +1322,7 @@ func (client NetworkLoadBalancerClient) listListeners(ctx context.Context, reque // ListNetworkLoadBalancerHealths Lists the summary health statuses for all network load balancers in the specified compartment. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/ListNetworkLoadBalancerHealths.go.html to see an example of how to use ListNetworkLoadBalancerHealths API. func (client NetworkLoadBalancerClient) ListNetworkLoadBalancerHealths(ctx context.Context, request ListNetworkLoadBalancerHealthsRequest) (response ListNetworkLoadBalancerHealthsResponse, err error) { @@ -1376,7 +1379,7 @@ func (client NetworkLoadBalancerClient) listNetworkLoadBalancerHealths(ctx conte // ListNetworkLoadBalancers Returns a list of network load balancers. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/ListNetworkLoadBalancers.go.html to see an example of how to use ListNetworkLoadBalancers API. func (client NetworkLoadBalancerClient) ListNetworkLoadBalancers(ctx context.Context, request ListNetworkLoadBalancersRequest) (response ListNetworkLoadBalancersResponse, err error) { @@ -1433,7 +1436,7 @@ func (client NetworkLoadBalancerClient) listNetworkLoadBalancers(ctx context.Con // ListNetworkLoadBalancersPolicies Lists the available network load balancer policies. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/ListNetworkLoadBalancersPolicies.go.html to see an example of how to use ListNetworkLoadBalancersPolicies API. func (client NetworkLoadBalancerClient) ListNetworkLoadBalancersPolicies(ctx context.Context, request ListNetworkLoadBalancersPoliciesRequest) (response ListNetworkLoadBalancersPoliciesResponse, err error) { @@ -1491,7 +1494,7 @@ func (client NetworkLoadBalancerClient) listNetworkLoadBalancersPolicies(ctx con // ListNetworkLoadBalancersProtocols This API has been deprecated so it won't return the updated list of supported protocls. // Lists all supported traffic protocols. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/ListNetworkLoadBalancersProtocols.go.html to see an example of how to use ListNetworkLoadBalancersProtocols API. func (client NetworkLoadBalancerClient) ListNetworkLoadBalancersProtocols(ctx context.Context, request ListNetworkLoadBalancersProtocolsRequest) (response ListNetworkLoadBalancersProtocolsResponse, err error) { @@ -1548,7 +1551,7 @@ func (client NetworkLoadBalancerClient) listNetworkLoadBalancersProtocols(ctx co // ListWorkRequestErrors Return a (paginated) list of errors for a given work request. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. func (client NetworkLoadBalancerClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { @@ -1605,7 +1608,7 @@ func (client NetworkLoadBalancerClient) listWorkRequestErrors(ctx context.Contex // ListWorkRequestLogs Returns a (paginated) list of logs for a given work request. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. func (client NetworkLoadBalancerClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { @@ -1662,7 +1665,7 @@ func (client NetworkLoadBalancerClient) listWorkRequestLogs(ctx context.Context, // ListWorkRequests Lists all work requests. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. func (client NetworkLoadBalancerClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { @@ -1719,7 +1722,7 @@ func (client NetworkLoadBalancerClient) listWorkRequests(ctx context.Context, re // UpdateBackend Updates the configuration of a backend server within the specified backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/UpdateBackend.go.html to see an example of how to use UpdateBackend API. func (client NetworkLoadBalancerClient) UpdateBackend(ctx context.Context, request UpdateBackendRequest) (response UpdateBackendResponse, err error) { @@ -1781,7 +1784,7 @@ func (client NetworkLoadBalancerClient) updateBackend(ctx context.Context, reque // UpdateBackendSet Updates a backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/UpdateBackendSet.go.html to see an example of how to use UpdateBackendSet API. func (client NetworkLoadBalancerClient) UpdateBackendSet(ctx context.Context, request UpdateBackendSetRequest) (response UpdateBackendSetResponse, err error) { @@ -1843,7 +1846,7 @@ func (client NetworkLoadBalancerClient) updateBackendSet(ctx context.Context, re // UpdateHealthChecker Updates the health check policy for a given network load balancer and backend set. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/UpdateHealthChecker.go.html to see an example of how to use UpdateHealthChecker API. func (client NetworkLoadBalancerClient) UpdateHealthChecker(ctx context.Context, request UpdateHealthCheckerRequest) (response UpdateHealthCheckerResponse, err error) { @@ -1905,7 +1908,7 @@ func (client NetworkLoadBalancerClient) updateHealthChecker(ctx context.Context, // UpdateListener Updates a listener for a given network load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/UpdateListener.go.html to see an example of how to use UpdateListener API. func (client NetworkLoadBalancerClient) UpdateListener(ctx context.Context, request UpdateListenerRequest) (response UpdateListenerResponse, err error) { @@ -1967,7 +1970,7 @@ func (client NetworkLoadBalancerClient) updateListener(ctx context.Context, requ // UpdateNetworkLoadBalancer Updates the network load balancer // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/UpdateNetworkLoadBalancer.go.html to see an example of how to use UpdateNetworkLoadBalancer API. func (client NetworkLoadBalancerClient) UpdateNetworkLoadBalancer(ctx context.Context, request UpdateNetworkLoadBalancerRequest) (response UpdateNetworkLoadBalancerResponse, err error) { @@ -2024,7 +2027,7 @@ func (client NetworkLoadBalancerClient) updateNetworkLoadBalancer(ctx context.Co // UpdateNetworkSecurityGroups Updates the network security groups associated with the specified network load balancer. // -// See also +// # See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/networkloadbalancer/UpdateNetworkSecurityGroups.go.html to see an example of how to use UpdateNetworkSecurityGroups API. func (client NetworkLoadBalancerClient) UpdateNetworkSecurityGroups(ctx context.Context, request UpdateNetworkSecurityGroupsRequest) (response UpdateNetworkSecurityGroupsResponse, err error) { diff --git a/vendor/golang.org/x/sync/semaphore/semaphore.go b/vendor/golang.org/x/sync/semaphore/semaphore.go new file mode 100644 index 0000000000..30f632c577 --- /dev/null +++ b/vendor/golang.org/x/sync/semaphore/semaphore.go @@ -0,0 +1,136 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package semaphore provides a weighted semaphore implementation. +package semaphore // import "golang.org/x/sync/semaphore" + +import ( + "container/list" + "context" + "sync" +) + +type waiter struct { + n int64 + ready chan<- struct{} // Closed when semaphore acquired. +} + +// NewWeighted creates a new weighted semaphore with the given +// maximum combined weight for concurrent access. +func NewWeighted(n int64) *Weighted { + w := &Weighted{size: n} + return w +} + +// Weighted provides a way to bound concurrent access to a resource. +// The callers can request access with a given weight. +type Weighted struct { + size int64 + cur int64 + mu sync.Mutex + waiters list.List +} + +// Acquire acquires the semaphore with a weight of n, blocking until resources +// are available or ctx is done. On success, returns nil. On failure, returns +// ctx.Err() and leaves the semaphore unchanged. +// +// If ctx is already done, Acquire may still succeed without blocking. +func (s *Weighted) Acquire(ctx context.Context, n int64) error { + s.mu.Lock() + if s.size-s.cur >= n && s.waiters.Len() == 0 { + s.cur += n + s.mu.Unlock() + return nil + } + + if n > s.size { + // Don't make other Acquire calls block on one that's doomed to fail. + s.mu.Unlock() + <-ctx.Done() + return ctx.Err() + } + + ready := make(chan struct{}) + w := waiter{n: n, ready: ready} + elem := s.waiters.PushBack(w) + s.mu.Unlock() + + select { + case <-ctx.Done(): + err := ctx.Err() + s.mu.Lock() + select { + case <-ready: + // Acquired the semaphore after we were canceled. Rather than trying to + // fix up the queue, just pretend we didn't notice the cancelation. + err = nil + default: + isFront := s.waiters.Front() == elem + s.waiters.Remove(elem) + // If we're at the front and there're extra tokens left, notify other waiters. + if isFront && s.size > s.cur { + s.notifyWaiters() + } + } + s.mu.Unlock() + return err + + case <-ready: + return nil + } +} + +// TryAcquire acquires the semaphore with a weight of n without blocking. +// On success, returns true. On failure, returns false and leaves the semaphore unchanged. +func (s *Weighted) TryAcquire(n int64) bool { + s.mu.Lock() + success := s.size-s.cur >= n && s.waiters.Len() == 0 + if success { + s.cur += n + } + s.mu.Unlock() + return success +} + +// Release releases the semaphore with a weight of n. +func (s *Weighted) Release(n int64) { + s.mu.Lock() + s.cur -= n + if s.cur < 0 { + s.mu.Unlock() + panic("semaphore: released more than held") + } + s.notifyWaiters() + s.mu.Unlock() +} + +func (s *Weighted) notifyWaiters() { + for { + next := s.waiters.Front() + if next == nil { + break // No more waiters blocked. + } + + w := next.Value.(waiter) + if s.size-s.cur < w.n { + // Not enough tokens for the next waiter. We could keep going (to try to + // find a waiter with a smaller request), but under load that could cause + // starvation for large requests; instead, we leave all remaining waiters + // blocked. + // + // Consider a semaphore used as a read-write lock, with N tokens, N + // readers, and one writer. Each reader can Acquire(1) to obtain a read + // lock. The writer can Acquire(N) to obtain a write lock, excluding all + // of the readers. If we allow the readers to jump ahead in the queue, + // the writer will starve — there is always one token available for every + // reader. + break + } + + s.cur += w.n + s.waiters.Remove(next) + close(w.ready) + } +} diff --git a/vendor/golang.org/x/sys/unix/ioctl_signed.go b/vendor/golang.org/x/sys/unix/ioctl_signed.go new file mode 100644 index 0000000000..7def9580e6 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ioctl_signed.go @@ -0,0 +1,70 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build aix || solaris +// +build aix solaris + +package unix + +import ( + "unsafe" +) + +// ioctl itself should not be exposed directly, but additional get/set +// functions for specific types are permissible. + +// IoctlSetInt performs an ioctl operation which sets an integer value +// on fd, using the specified request number. +func IoctlSetInt(fd int, req int, value int) error { + return ioctl(fd, req, uintptr(value)) +} + +// IoctlSetPointerInt performs an ioctl operation which sets an +// integer value on fd, using the specified request number. The ioctl +// argument is called with a pointer to the integer value, rather than +// passing the integer value directly. +func IoctlSetPointerInt(fd int, req int, value int) error { + v := int32(value) + return ioctlPtr(fd, req, unsafe.Pointer(&v)) +} + +// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. +// +// To change fd's window size, the req argument should be TIOCSWINSZ. +func IoctlSetWinsize(fd int, req int, value *Winsize) error { + // TODO: if we get the chance, remove the req parameter and + // hardcode TIOCSWINSZ. + return ioctlPtr(fd, req, unsafe.Pointer(value)) +} + +// IoctlSetTermios performs an ioctl on fd with a *Termios. +// +// The req value will usually be TCSETA or TIOCSETA. +func IoctlSetTermios(fd int, req int, value *Termios) error { + // TODO: if we get the chance, remove the req parameter. + return ioctlPtr(fd, req, unsafe.Pointer(value)) +} + +// IoctlGetInt performs an ioctl operation which gets an integer value +// from fd, using the specified request number. +// +// A few ioctl requests use the return value as an output parameter; +// for those, IoctlRetInt should be used instead of this function. +func IoctlGetInt(fd int, req int) (int, error) { + var value int + err := ioctlPtr(fd, req, unsafe.Pointer(&value)) + return value, err +} + +func IoctlGetWinsize(fd int, req int) (*Winsize, error) { + var value Winsize + err := ioctlPtr(fd, req, unsafe.Pointer(&value)) + return &value, err +} + +func IoctlGetTermios(fd int, req int) (*Termios, error) { + var value Termios + err := ioctlPtr(fd, req, unsafe.Pointer(&value)) + return &value, err +} diff --git a/vendor/golang.org/x/sys/unix/ioctl.go b/vendor/golang.org/x/sys/unix/ioctl_unsigned.go similarity index 92% rename from vendor/golang.org/x/sys/unix/ioctl.go rename to vendor/golang.org/x/sys/unix/ioctl_unsigned.go index 7ce8dd406f..649913d1ea 100644 --- a/vendor/golang.org/x/sys/unix/ioctl.go +++ b/vendor/golang.org/x/sys/unix/ioctl_unsigned.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build aix || darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd hurd linux netbsd openbsd solaris +//go:build darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd +// +build darwin dragonfly freebsd hurd linux netbsd openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ioctl_zos.go b/vendor/golang.org/x/sys/unix/ioctl_zos.go index 6532f09af2..cdc21bf76d 100644 --- a/vendor/golang.org/x/sys/unix/ioctl_zos.go +++ b/vendor/golang.org/x/sys/unix/ioctl_zos.go @@ -17,14 +17,14 @@ import ( // IoctlSetInt performs an ioctl operation which sets an integer value // on fd, using the specified request number. -func IoctlSetInt(fd int, req uint, value int) error { +func IoctlSetInt(fd int, req int, value int) error { return ioctl(fd, req, uintptr(value)) } // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. // // To change fd's window size, the req argument should be TIOCSWINSZ. -func IoctlSetWinsize(fd int, req uint, value *Winsize) error { +func IoctlSetWinsize(fd int, req int, value *Winsize) error { // TODO: if we get the chance, remove the req parameter and // hardcode TIOCSWINSZ. return ioctlPtr(fd, req, unsafe.Pointer(value)) @@ -33,7 +33,7 @@ func IoctlSetWinsize(fd int, req uint, value *Winsize) error { // IoctlSetTermios performs an ioctl on fd with a *Termios. // // The req value is expected to be TCSETS, TCSETSW, or TCSETSF -func IoctlSetTermios(fd int, req uint, value *Termios) error { +func IoctlSetTermios(fd int, req int, value *Termios) error { if (req != TCSETS) && (req != TCSETSW) && (req != TCSETSF) { return ENOSYS } @@ -47,13 +47,13 @@ func IoctlSetTermios(fd int, req uint, value *Termios) error { // // A few ioctl requests use the return value as an output parameter; // for those, IoctlRetInt should be used instead of this function. -func IoctlGetInt(fd int, req uint) (int, error) { +func IoctlGetInt(fd int, req int) (int, error) { var value int err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return value, err } -func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { +func IoctlGetWinsize(fd int, req int) (*Winsize, error) { var value Winsize err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return &value, err @@ -62,7 +62,7 @@ func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { // IoctlGetTermios performs an ioctl on fd with a *Termios. // // The req value is expected to be TCGETS -func IoctlGetTermios(fd int, req uint) (*Termios, error) { +func IoctlGetTermios(fd int, req int) (*Termios, error) { var value Termios if req != TCGETS { return &value, ENOSYS diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 7456d9ddde..be0423e685 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -66,6 +66,7 @@ includes_Darwin=' #include #include #include +#include #include #include #include @@ -203,6 +204,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -517,10 +519,11 @@ ccflags="$@" $2 ~ /^LOCK_(SH|EX|NB|UN)$/ || $2 ~ /^LO_(KEY|NAME)_SIZE$/ || $2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ || - $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT)_/ || + $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ || $2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ || $2 ~ /^NFC_.*_(MAX)?SIZE$/ || $2 ~ /^RAW_PAYLOAD_/ || + $2 ~ /^[US]F_/ || $2 ~ /^TP_STATUS_/ || $2 ~ /^FALLOC_/ || $2 ~ /^ICMPV?6?_(FILTER|SEC)/ || diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go index d9f5544ccf..c406ae00f4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_aix.go +++ b/vendor/golang.org/x/sys/unix/syscall_aix.go @@ -408,8 +408,8 @@ func (w WaitStatus) CoreDump() bool { return w&0x80 == 0x80 } func (w WaitStatus) TrapCause() int { return -1 } -//sys ioctl(fd int, req uint, arg uintptr) (err error) -//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = ioctl +//sys ioctl(fd int, req int, arg uintptr) (err error) +//sys ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = ioctl // fcntl must never be called with cmd=F_DUP2FD because it doesn't work on AIX // There is no way to create a custom fcntl and to keep //sys fcntl easily, diff --git a/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go index e92a0be163..f2871fa953 100644 --- a/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go +++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go @@ -8,7 +8,6 @@ package unix //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64 -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64 //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go index 16eed17098..75718ec0f1 100644 --- a/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go +++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go @@ -8,7 +8,6 @@ package unix //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64 diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go index 7064d6ebab..206921504c 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -613,6 +613,7 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) { //sys Rmdir(path string) (err error) //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) +//sys Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) //sys Setegid(egid int) (err error) //sysnb Seteuid(euid int) (err error) //sysnb Setgid(gid int) (err error) @@ -622,7 +623,6 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) { //sys Setprivexec(flag int) (err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setreuid(ruid int, euid int) (err error) -//sysnb Setrlimit(which int, lim *Rlimit) (err error) //sysnb Setsid() (pid int, err error) //sysnb Settimeofday(tp *Timeval) (err error) //sysnb Setuid(uid int) (err error) @@ -676,7 +676,6 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) { // Kqueue_from_portset_np // Kqueue_portset // Getattrlist -// Setattrlist // Getdirentriesattr // Searchfs // Delete diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go index 221efc26bc..d4ce988e72 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go @@ -326,7 +326,6 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sysnb Setreuid(ruid int, euid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error) -//sysnb Setrlimit(which int, lim *Rlimit) (err error) //sysnb Setsid() (pid int, err error) //sysnb Settimeofday(tp *Timeval) (err error) //sysnb Setuid(uid int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go index 5bdde03e4a..afb10106f6 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go @@ -433,7 +433,6 @@ func Dup3(oldfd, newfd, flags int) error { //sysnb Setreuid(ruid int, euid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error) -//sysnb Setrlimit(which int, lim *Rlimit) (err error) //sysnb Setsid() (pid int, err error) //sysnb Settimeofday(tp *Timeval) (err error) //sysnb Setuid(uid int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 9735331530..fbaeb5fff1 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -1873,7 +1873,6 @@ func Getpgrp() (pid int) { //sys OpenTree(dfd int, fileName string, flags uint) (r int, err error) //sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) //sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT -//sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64 //sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) //sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6 //sys read(fd int, p []byte) (n int, err error) @@ -1887,6 +1886,15 @@ func Getpgrp() (pid int) { //sysnb Settimeofday(tv *Timeval) (err error) //sys Setns(fd int, nstype int) (err error) +//go:linkname syscall_prlimit syscall.prlimit +func syscall_prlimit(pid, resource int, newlimit, old *syscall.Rlimit) error + +func Prlimit(pid, resource int, newlimit, old *Rlimit) error { + // Just call the syscall version, because as of Go 1.21 + // it will affect starting a new process. + return syscall_prlimit(pid, resource, (*syscall.Rlimit)(newlimit), (*syscall.Rlimit)(old)) +} + // PrctlRetInt performs a prctl operation specified by option and further // optional arguments arg2 through arg5 depending on option. It returns a // non-negative integer that is returned by the prctl syscall. diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go index ff5b5899d6..c7d9945ea1 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go @@ -97,33 +97,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { return } -//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT - -func Setrlimit(resource int, rlim *Rlimit) (err error) { - err = Prlimit(0, resource, rlim, nil) - if err != ENOSYS { - return err - } - - rl := rlimit32{} - if rlim.Cur == rlimInf64 { - rl.Cur = rlimInf32 - } else if rlim.Cur < uint64(rlimInf32) { - rl.Cur = uint32(rlim.Cur) - } else { - return EINVAL - } - if rlim.Max == rlimInf64 { - rl.Max = rlimInf32 - } else if rlim.Max < uint64(rlimInf32) { - rl.Max = uint32(rlim.Max) - } else { - return EINVAL - } - - return setrlimit(resource, &rl) -} - func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { newoffset, errno := seek(fd, offset, whence) if errno != 0 { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go index 9b27035329..5b21fcfd75 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go @@ -46,7 +46,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sys Shutdown(fd int, how int) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go index 856ad1d635..da2986415a 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go @@ -171,33 +171,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { return } -//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT - -func Setrlimit(resource int, rlim *Rlimit) (err error) { - err = Prlimit(0, resource, rlim, nil) - if err != ENOSYS { - return err - } - - rl := rlimit32{} - if rlim.Cur == rlimInf64 { - rl.Cur = rlimInf32 - } else if rlim.Cur < uint64(rlimInf32) { - rl.Cur = uint32(rlim.Cur) - } else { - return EINVAL - } - if rlim.Max == rlimInf64 { - rl.Max = rlimInf32 - } else if rlim.Max < uint64(rlimInf32) { - rl.Max = uint32(rlim.Max) - } else { - return EINVAL - } - - return setrlimit(resource, &rl) -} - func (r *PtraceRegs) PC() uint64 { return uint64(r.Uregs[15]) } func (r *PtraceRegs) SetPC(pc uint64) { r.Uregs[15] = uint32(pc) } diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go index 6422704bc5..a81f5742b8 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go @@ -39,7 +39,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) -//sysnb setrlimit(resource int, rlim *Rlimit) (err error) //sys Shutdown(fd int, how int) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) @@ -143,15 +142,6 @@ func Getrlimit(resource int, rlim *Rlimit) error { return getrlimit(resource, rlim) } -// Setrlimit prefers the prlimit64 system call. See issue 38604. -func Setrlimit(resource int, rlim *Rlimit) error { - err := Prlimit(0, resource, rlim, nil) - if err != ENOSYS { - return err - } - return setrlimit(resource, rlim) -} - func (r *PtraceRegs) PC() uint64 { return r.Pc } func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc } diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go index 59dab510e9..69d2d7c3db 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go @@ -126,11 +126,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { return } -func Setrlimit(resource int, rlim *Rlimit) (err error) { - err = Prlimit(0, resource, rlim, nil) - return -} - func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) { if tv == nil { return utimensat(dirfd, path, nil, 0) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go index bfef09a39e..76d564095e 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go @@ -37,7 +37,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sys Shutdown(fd int, how int) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Statfs(path string, buf *Statfs_t) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go index ab30250966..aae7f0ffd3 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go @@ -151,33 +151,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { return } -//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT - -func Setrlimit(resource int, rlim *Rlimit) (err error) { - err = Prlimit(0, resource, rlim, nil) - if err != ENOSYS { - return err - } - - rl := rlimit32{} - if rlim.Cur == rlimInf64 { - rl.Cur = rlimInf32 - } else if rlim.Cur < uint64(rlimInf32) { - rl.Cur = uint32(rlim.Cur) - } else { - return EINVAL - } - if rlim.Max == rlimInf64 { - rl.Max = rlimInf32 - } else if rlim.Max < uint64(rlimInf32) { - rl.Max = uint32(rlim.Max) - } else { - return EINVAL - } - - return setrlimit(resource, &rl) -} - func (r *PtraceRegs) PC() uint64 { return r.Epc } func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc } diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go index eac1cf1acc..66eff19a32 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go @@ -159,33 +159,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { return } -//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT - -func Setrlimit(resource int, rlim *Rlimit) (err error) { - err = Prlimit(0, resource, rlim, nil) - if err != ENOSYS { - return err - } - - rl := rlimit32{} - if rlim.Cur == rlimInf64 { - rl.Cur = rlimInf32 - } else if rlim.Cur < uint64(rlimInf32) { - rl.Cur = uint32(rlim.Cur) - } else { - return EINVAL - } - if rlim.Max == rlimInf64 { - rl.Max = rlimInf32 - } else if rlim.Max < uint64(rlimInf32) { - rl.Max = uint32(rlim.Max) - } else { - return EINVAL - } - - return setrlimit(resource, &rl) -} - func (r *PtraceRegs) PC() uint32 { return r.Nip } func (r *PtraceRegs) SetPC(pc uint32) { r.Nip = pc } diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go index 4df56616b8..806aa2574d 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go @@ -34,7 +34,6 @@ package unix //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sys Shutdown(fd int, how int) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Stat(path string, stat *Stat_t) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go index 5f4243dea2..35851ef70b 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go @@ -38,7 +38,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sys Shutdown(fd int, how int) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go index d0a7d40668..2f89e8f5de 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go @@ -34,7 +34,6 @@ import ( //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Stat(path string, stat *Stat_t) (err error) //sys Statfs(path string, buf *Statfs_t) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go index f5c793be26..7ca064ae76 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go @@ -31,7 +31,6 @@ package unix //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sys Shutdown(fd int, how int) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Stat(path string, stat *Stat_t) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go index e66865dccb..018d7d4782 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go @@ -340,7 +340,6 @@ func Statvfs(path string, buf *Statvfs_t) (err error) { //sys Setpriority(which int, who int, prio int) (err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setreuid(ruid int, euid int) (err error) -//sysnb Setrlimit(which int, lim *Rlimit) (err error) //sysnb Setsid() (pid int, err error) //sysnb Settimeofday(tp *Timeval) (err error) //sysnb Setuid(uid int) (err error) @@ -501,7 +500,6 @@ func Statvfs(path string, buf *Statvfs_t) (err error) { // compat_43_osendmsg // compat_43_osethostid // compat_43_osethostname -// compat_43_osetrlimit // compat_43_osigblock // compat_43_osigsetmask // compat_43_osigstack diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index 5e9de23ae3..f9c7a9663c 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -294,7 +294,6 @@ func Uname(uname *Utsname) error { //sysnb Setreuid(ruid int, euid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error) -//sysnb Setrlimit(which int, lim *Rlimit) (err error) //sysnb Setrtable(rtable int) (err error) //sysnb Setsid() (pid int, err error) //sysnb Settimeofday(tp *Timeval) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go index d3444b64d6..b600a289d3 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -545,24 +545,24 @@ func Minor(dev uint64) uint32 { * Expose the ioctl function */ -//sys ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) = libc.ioctl -//sys ioctlPtrRet(fd int, req uint, arg unsafe.Pointer) (ret int, err error) = libc.ioctl +//sys ioctlRet(fd int, req int, arg uintptr) (ret int, err error) = libc.ioctl +//sys ioctlPtrRet(fd int, req int, arg unsafe.Pointer) (ret int, err error) = libc.ioctl -func ioctl(fd int, req uint, arg uintptr) (err error) { +func ioctl(fd int, req int, arg uintptr) (err error) { _, err = ioctlRet(fd, req, arg) return err } -func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { +func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) { _, err = ioctlPtrRet(fd, req, arg) return err } -func IoctlSetTermio(fd int, req uint, value *Termio) error { +func IoctlSetTermio(fd int, req int, value *Termio) error { return ioctlPtr(fd, req, unsafe.Pointer(value)) } -func IoctlGetTermio(fd int, req uint) (*Termio, error) { +func IoctlGetTermio(fd int, req int) (*Termio, error) { var value Termio err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return &value, err @@ -665,7 +665,6 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Setpriority(which int, who int, prio int) (err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setreuid(ruid int, euid int) (err error) -//sysnb Setrlimit(which int, lim *Rlimit) (err error) //sysnb Setsid() (pid int, err error) //sysnb Setuid(uid int) (err error) //sys Shutdown(s int, how int) (err error) = libsocket.shutdown @@ -1080,11 +1079,11 @@ func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags return retCl, retData, flags, nil } -func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) { +func IoctlSetIntRetInt(fd int, req int, arg int) (int, error) { return ioctlRet(fd, req, uintptr(arg)) } -func IoctlSetString(fd int, req uint, val string) error { +func IoctlSetString(fd int, req int, val string) error { bs := make([]byte, len(val)+1) copy(bs[:len(bs)-1], val) err := ioctlPtr(fd, req, unsafe.Pointer(&bs[0])) @@ -1120,7 +1119,7 @@ func (l *Lifreq) GetLifruUint() uint { return *(*uint)(unsafe.Pointer(&l.Lifru[0])) } -func IoctlLifreq(fd int, req uint, l *Lifreq) error { +func IoctlLifreq(fd int, req int, l *Lifreq) error { return ioctlPtr(fd, req, unsafe.Pointer(l)) } @@ -1131,6 +1130,6 @@ func (s *Strioctl) SetInt(i int) { s.Dp = (*int8)(unsafe.Pointer(&i)) } -func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) { +func IoctlSetStrioctlRetInt(fd int, req int, s *Strioctl) (int, error) { return ioctlPtrRet(fd, req, unsafe.Pointer(s)) } diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go index 00f0aa3758..8e48c29ec3 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -587,3 +587,10 @@ func emptyIovecs(iov []Iovec) bool { } return true } + +// Setrlimit sets a resource limit. +func Setrlimit(resource int, rlim *Rlimit) error { + // Just call the syscall version, because as of Go 1.21 + // it will affect starting a new process. + return syscall.Setrlimit(resource, (*syscall.Rlimit)(rlim)) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go index b295497ae4..d3d49ec3ed 100644 --- a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go @@ -212,8 +212,8 @@ func (cmsg *Cmsghdr) SetLen(length int) { //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___SENDMSG_A //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) = SYS_MMAP //sys munmap(addr uintptr, length uintptr) (err error) = SYS_MUNMAP -//sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL -//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL +//sys ioctl(fd int, req int, arg uintptr) (err error) = SYS_IOCTL +//sys ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = SYS_IOCTL //sys Access(path string, mode uint32) (err error) = SYS___ACCESS_A //sys Chdir(path string) (err error) = SYS___CHDIR_A diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go index 476a1c7e77..1430076271 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go @@ -1270,6 +1270,16 @@ const ( SEEK_END = 0x2 SEEK_HOLE = 0x3 SEEK_SET = 0x0 + SF_APPEND = 0x40000 + SF_ARCHIVED = 0x10000 + SF_DATALESS = 0x40000000 + SF_FIRMLINK = 0x800000 + SF_IMMUTABLE = 0x20000 + SF_NOUNLINK = 0x100000 + SF_RESTRICTED = 0x80000 + SF_SETTABLE = 0x3fff0000 + SF_SUPPORTED = 0x9f0000 + SF_SYNTHETIC = 0xc0000000 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 @@ -1543,6 +1553,15 @@ const ( TIOCTIMESTAMP = 0x40107459 TIOCUCNTL = 0x80047466 TOSTOP = 0x400000 + UF_APPEND = 0x4 + UF_COMPRESSED = 0x20 + UF_DATAVAULT = 0x80 + UF_HIDDEN = 0x8000 + UF_IMMUTABLE = 0x2 + UF_NODUMP = 0x1 + UF_OPAQUE = 0x8 + UF_SETTABLE = 0xffff + UF_TRACKED = 0x40 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go index e36f5178d6..ab044a7427 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go @@ -1270,6 +1270,16 @@ const ( SEEK_END = 0x2 SEEK_HOLE = 0x3 SEEK_SET = 0x0 + SF_APPEND = 0x40000 + SF_ARCHIVED = 0x10000 + SF_DATALESS = 0x40000000 + SF_FIRMLINK = 0x800000 + SF_IMMUTABLE = 0x20000 + SF_NOUNLINK = 0x100000 + SF_RESTRICTED = 0x80000 + SF_SETTABLE = 0x3fff0000 + SF_SUPPORTED = 0x9f0000 + SF_SYNTHETIC = 0xc0000000 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 @@ -1543,6 +1553,15 @@ const ( TIOCTIMESTAMP = 0x40107459 TIOCUCNTL = 0x80047466 TOSTOP = 0x400000 + UF_APPEND = 0x4 + UF_COMPRESSED = 0x20 + UF_DATAVAULT = 0x80 + UF_HIDDEN = 0x8000 + UF_IMMUTABLE = 0x2 + UF_NODUMP = 0x1 + UF_OPAQUE = 0x8 + UF_SETTABLE = 0xffff + UF_TRACKED = 0x40 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index 398c37e52d..de936b677b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -2967,6 +2967,7 @@ const ( SOL_TCP = 0x6 SOL_TIPC = 0x10f SOL_TLS = 0x11a + SOL_UDP = 0x11 SOL_X25 = 0x106 SOL_XDP = 0x11b SOMAXCONN = 0x1000 @@ -3251,6 +3252,19 @@ const ( TRACEFS_MAGIC = 0x74726163 TS_COMM_LEN = 0x20 UDF_SUPER_MAGIC = 0x15013346 + UDP_CORK = 0x1 + UDP_ENCAP = 0x64 + UDP_ENCAP_ESPINUDP = 0x2 + UDP_ENCAP_ESPINUDP_NON_IKE = 0x1 + UDP_ENCAP_GTP0 = 0x4 + UDP_ENCAP_GTP1U = 0x5 + UDP_ENCAP_L2TPINUDP = 0x3 + UDP_GRO = 0x68 + UDP_NO_CHECK6_RX = 0x66 + UDP_NO_CHECK6_TX = 0x65 + UDP_SEGMENT = 0x67 + UDP_V4_FLOW = 0x2 + UDP_V6_FLOW = 0x6 UMOUNT_NOFOLLOW = 0x8 USBDEVICE_SUPER_MAGIC = 0x9fa2 UTIME_NOW = 0x3fffffff diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go index ef9dcd1bef..9a257219d7 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go @@ -124,7 +124,6 @@ int utime(uintptr_t, uintptr_t); unsigned long long getsystemcfg(int); int umount(uintptr_t); int getrlimit64(int, uintptr_t); -int setrlimit64(int, uintptr_t); long long lseek64(int, long long, int); uintptr_t mmap(uintptr_t, uintptr_t, int, int, int, long long); @@ -213,7 +212,7 @@ func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctl(fd int, req uint, arg uintptr) (err error) { +func ioctl(fd int, req int, arg uintptr) (err error) { r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(arg)) if r0 == -1 && er != nil { err = er @@ -223,7 +222,7 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { +func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) { r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(uintptr(arg))) if r0 == -1 && er != nil { err = er @@ -1464,16 +1463,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - r0, er := C.setrlimit64(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim)))) - if r0 == -1 && er != nil { - err = er - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Seek(fd int, offset int64, whence int) (off int64, err error) { r0, er := C.lseek64(C.int(fd), C.longlong(offset), C.int(whence)) off = int64(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go index f86a945923..6de80c20cf 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go @@ -93,8 +93,8 @@ func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, e1 := callioctl(fd, int(req), arg) +func ioctl(fd int, req int, arg uintptr) (err error) { + _, e1 := callioctl(fd, req, arg) if e1 != 0 { err = errnoErr(e1) } @@ -103,8 +103,8 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { - _, e1 := callioctl_ptr(fd, int(req), arg) +func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) { + _, e1 := callioctl_ptr(fd, req, arg) if e1 != 0 { err = errnoErr(e1) } @@ -1422,16 +1422,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, e1 := callsetrlimit(resource, uintptr(unsafe.Pointer(rlim))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Seek(fd int, offset int64, whence int) (off int64, err error) { r0, e1 := calllseek(fd, offset, whence) off = int64(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go index d32a84cae2..c4d50ae500 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go @@ -124,7 +124,6 @@ import ( //go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o" //go:cgo_import_dynamic libc_umount umount "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.a/shr_64.o" -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.a/shr_64.o" //go:cgo_import_dynamic libc_lseek lseek "libc.a/shr_64.o" //go:cgo_import_dynamic libc_mmap64 mmap64 "libc.a/shr_64.o" @@ -242,7 +241,6 @@ import ( //go:linkname libc_getsystemcfg libc_getsystemcfg //go:linkname libc_umount libc_umount //go:linkname libc_getrlimit libc_getrlimit -//go:linkname libc_setrlimit libc_setrlimit //go:linkname libc_lseek libc_lseek //go:linkname libc_mmap64 libc_mmap64 @@ -363,7 +361,6 @@ var ( libc_getsystemcfg, libc_umount, libc_getrlimit, - libc_setrlimit, libc_lseek, libc_mmap64 syscallFunc ) @@ -1179,13 +1176,6 @@ func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func callsetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) { - r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setrlimit)), 2, uintptr(resource), rlim, 0, 0, 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_lseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0) return diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go index d7d8baf819..6903d3b09e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go @@ -123,7 +123,6 @@ int utime(uintptr_t, uintptr_t); unsigned long long getsystemcfg(int); int umount(uintptr_t); int getrlimit(int, uintptr_t); -int setrlimit(int, uintptr_t); long long lseek(int, long long, int); uintptr_t mmap64(uintptr_t, uintptr_t, int, int, int, long long); @@ -131,6 +130,7 @@ uintptr_t mmap64(uintptr_t, uintptr_t, int, int, int, long long); import "C" import ( "syscall" + "unsafe" ) // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT @@ -1055,14 +1055,6 @@ func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func callsetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) { - r1 = uintptr(C.setrlimit(C.int(resource), C.uintptr_t(rlim))) - e1 = syscall.GetErrno() - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.lseek(C.int(fd), C.longlong(offset), C.int(whence))) e1 = syscall.GetErrno() diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go index a29ffdd566..4037ccf7a9 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go @@ -1992,6 +1992,31 @@ var libc_select_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(attrBuf) > 0 { + _p1 = unsafe.Pointer(&attrBuf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(attrlist)), uintptr(_p1), uintptr(len(attrBuf)), uintptr(options), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_setattrlist_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Setegid(egid int) (err error) { _, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) if e1 != 0 { @@ -2123,20 +2148,6 @@ var libc_setreuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) pid = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s index 95fe4c0eb9..4baaed0bc1 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s @@ -705,6 +705,11 @@ TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) +TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setattrlist(SB) +GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB) + TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) @@ -759,12 +764,6 @@ TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) - -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 -DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go index 2fd4590bb7..51d6f3fb25 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go @@ -1992,6 +1992,31 @@ var libc_select_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(attrBuf) > 0 { + _p1 = unsafe.Pointer(&attrBuf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(attrlist)), uintptr(_p1), uintptr(len(attrBuf)), uintptr(options), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_setattrlist_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Setegid(egid int) (err error) { _, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) if e1 != 0 { @@ -2123,20 +2148,6 @@ var libc_setreuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) pid = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s index efa5b4c987..c3b82c0379 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s @@ -705,6 +705,11 @@ TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) +TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setattrlist(SB) +GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB) + TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) @@ -759,12 +764,6 @@ TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) - -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 -DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go index 3b85134707..0eabac7ade 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go @@ -1410,16 +1410,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go index 1129065624..ee313eb007 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go @@ -1645,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go index 55f5abfe59..4c986e448e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go @@ -1645,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go index d39651c2b5..555216944a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go @@ -1645,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go index ddb7408680..67a226fbf5 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go @@ -1645,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go index 09a53a616c..f0b9ddaaa2 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go @@ -1645,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go index 430cb24de7..da63d9d782 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -1346,16 +1346,6 @@ func PivotRoot(newroot string, putold string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { - _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go index c81b0ad477..07b549cc25 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go @@ -411,16 +411,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func setrlimit(resource int, rlim *rlimit32) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func futimesat(dirfd int, path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go index 2206bce7f4..5f481bf83f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go @@ -334,16 +334,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go index edf6b39f16..824cd52c7f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go @@ -578,16 +578,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func setrlimit(resource int, rlim *rlimit32) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) { _, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32)) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go index 190609f214..e77aecfe98 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go @@ -289,16 +289,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go index 5f984cbb1c..961a3afb7b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go @@ -644,16 +644,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func setrlimit(resource int, rlim *rlimit32) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Alarm(seconds uint) (remaining uint, err error) { r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) remaining = uint(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go index 46fc380a40..ed05005e91 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go @@ -278,16 +278,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go index cbd0d4dadb..d365b718f3 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go @@ -278,16 +278,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go index 0c13d15f07..c3f1b8bbde 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go @@ -644,16 +644,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func setrlimit(resource int, rlim *rlimit32) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Alarm(seconds uint) (remaining uint, err error) { r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) remaining = uint(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go index e01432aed5..a6574cf98b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go @@ -624,16 +624,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func setrlimit(resource int, rlim *rlimit32) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func syncFileRange2(fd int, flags int, off int64, n int64) (err error) { _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n)) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go index 13c7ee7baf..f40990264f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -349,16 +349,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go index 02d0c0fd61..9dfcc29974 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -349,16 +349,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go index 9fee3b1d23..0b29239583 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go @@ -269,16 +269,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go index 647bbfecd6..6cde32237d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go @@ -319,16 +319,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) n = int64(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go index ada057f891..5253d65bf1 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go @@ -329,16 +329,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go index 8e1d9c8f66..cdb2af5ae0 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go @@ -1607,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go index 21c6950400..9d25f76b0b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go @@ -1607,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go index 298168f90a..d3f8035169 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go @@ -1607,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go index 68b8bd492f..887188a529 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go @@ -1607,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index 0b0f910e1a..6699a783e1 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s index 087444250c..04f0de34b2 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s @@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $4 -DATA ·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index 48ff5de75b..1e775fe057 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s index 5782cd1084..27b6f4df74 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s @@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 -DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go index 2452a641da..7f6427899a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s index cf310420c9..b797045fd2 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s @@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $4 -DATA ·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go index 5e35600a60..756ef7b173 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go @@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s index 484bb42e0a..a871266221 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s @@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 -DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go index b04cef1a19..7bc2e24eb9 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go @@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s index 55af27263a..05d4bffd79 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s @@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 -DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go index 47a07ee0c2..739be6217a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go @@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s index 4028255b0d..74a25f8d64 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s @@ -687,12 +687,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - CALL libc_setrlimit(SB) - RET -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 -DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setrtable(SB) RET diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go index 573378fdb9..7d95a19780 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go @@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s index e1fbd4dfa8..990be24574 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s @@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 -DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go index 4873a1e5d3..609d1c598a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go @@ -110,7 +110,6 @@ import ( //go:cgo_import_dynamic libc_setpriority setpriority "libc.so" //go:cgo_import_dynamic libc_setregid setregid "libc.so" //go:cgo_import_dynamic libc_setreuid setreuid "libc.so" -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" //go:cgo_import_dynamic libc_setsid setsid "libc.so" //go:cgo_import_dynamic libc_setuid setuid "libc.so" //go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so" @@ -250,7 +249,6 @@ import ( //go:linkname procSetpriority libc_setpriority //go:linkname procSetregid libc_setregid //go:linkname procSetreuid libc_setreuid -//go:linkname procSetrlimit libc_setrlimit //go:linkname procSetsid libc_setsid //go:linkname procSetuid libc_setuid //go:linkname procshutdown libc_shutdown @@ -391,7 +389,6 @@ var ( procSetpriority, procSetregid, procSetreuid, - procSetrlimit, procSetsid, procSetuid, procshutdown, @@ -646,7 +643,7 @@ func __minor(version int, dev uint64) (val uint) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) { +func ioctlRet(fd int, req int, arg uintptr) (ret int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0) ret = int(r0) if e1 != 0 { @@ -657,7 +654,7 @@ func ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctlPtrRet(fd int, req uint, arg unsafe.Pointer) (ret int, err error) { +func ioctlPtrRet(fd int, req int, arg unsafe.Pointer) (ret int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0) ret = int(r0) if e1 != 0 { @@ -1650,16 +1647,6 @@ func Setreuid(ruid int, euid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0) - if e1 != 0 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 0, 0, 0) pid = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go index 07bfe2ef9a..c31681743c 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go @@ -257,7 +257,7 @@ func munmap(addr uintptr, length uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctl(fd int, req uint, arg uintptr) (err error) { +func ioctl(fd int, req int, arg uintptr) (err error) { _, _, e1 := syscall_syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) @@ -267,7 +267,7 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { +func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) { _, _, e1 := syscall_syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go index e2a64f0991..690cefc3d0 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go @@ -151,6 +151,16 @@ type Dirent struct { _ [3]byte } +type Attrlist struct { + Bitmapcount uint16 + Reserved uint16 + Commonattr uint32 + Volattr uint32 + Dirattr uint32 + Fileattr uint32 + Forkattr uint32 +} + const ( PathMax = 0x400 ) @@ -610,6 +620,7 @@ const ( AT_REMOVEDIR = 0x80 AT_SYMLINK_FOLLOW = 0x40 AT_SYMLINK_NOFOLLOW = 0x20 + AT_EACCESS = 0x10 ) type PollFd struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go index 34aa775219..5bffc10eac 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go @@ -151,6 +151,16 @@ type Dirent struct { _ [3]byte } +type Attrlist struct { + Bitmapcount uint16 + Reserved uint16 + Commonattr uint32 + Volattr uint32 + Dirattr uint32 + Fileattr uint32 + Forkattr uint32 +} + const ( PathMax = 0x400 ) @@ -610,6 +620,7 @@ const ( AT_REMOVEDIR = 0x80 AT_SYMLINK_FOLLOW = 0x40 AT_SYMLINK_NOFOLLOW = 0x20 + AT_EACCESS = 0x10 ) type PollFd struct { diff --git a/vendor/golang.org/x/sys/windows/env_windows.go b/vendor/golang.org/x/sys/windows/env_windows.go index 92ac05ff4e..b8ad192506 100644 --- a/vendor/golang.org/x/sys/windows/env_windows.go +++ b/vendor/golang.org/x/sys/windows/env_windows.go @@ -37,14 +37,14 @@ func (token Token) Environ(inheritExisting bool) (env []string, err error) { return nil, err } defer DestroyEnvironmentBlock(block) - blockp := uintptr(unsafe.Pointer(block)) + blockp := unsafe.Pointer(block) for { - entry := UTF16PtrToString((*uint16)(unsafe.Pointer(blockp))) + entry := UTF16PtrToString((*uint16)(blockp)) if len(entry) == 0 { break } env = append(env, entry) - blockp += 2 * (uintptr(len(entry)) + 1) + blockp = unsafe.Add(blockp, 2*(len(entry)+1)) } return env, nil } diff --git a/vendor/golang.org/x/sys/windows/exec_windows.go b/vendor/golang.org/x/sys/windows/exec_windows.go index 75980fd44a..a52e0331d8 100644 --- a/vendor/golang.org/x/sys/windows/exec_windows.go +++ b/vendor/golang.org/x/sys/windows/exec_windows.go @@ -95,12 +95,17 @@ func ComposeCommandLine(args []string) string { // DecomposeCommandLine breaks apart its argument command line into unescaped parts using CommandLineToArgv, // as gathered from GetCommandLine, QUERY_SERVICE_CONFIG's BinaryPathName argument, or elsewhere that // command lines are passed around. +// DecomposeCommandLine returns error if commandLine contains NUL. func DecomposeCommandLine(commandLine string) ([]string, error) { if len(commandLine) == 0 { return []string{}, nil } + utf16CommandLine, err := UTF16FromString(commandLine) + if err != nil { + return nil, errorspkg.New("string with NUL passed to DecomposeCommandLine") + } var argc int32 - argv, err := CommandLineToArgv(StringToUTF16Ptr(commandLine), &argc) + argv, err := CommandLineToArgv(&utf16CommandLine[0], &argc) if err != nil { return nil, err } diff --git a/vendor/golang.org/x/sys/windows/service.go b/vendor/golang.org/x/sys/windows/service.go index f8deca8397..c964b6848d 100644 --- a/vendor/golang.org/x/sys/windows/service.go +++ b/vendor/golang.org/x/sys/windows/service.go @@ -141,6 +141,12 @@ const ( SERVICE_DYNAMIC_INFORMATION_LEVEL_START_REASON = 1 ) +type ENUM_SERVICE_STATUS struct { + ServiceName *uint16 + DisplayName *uint16 + ServiceStatus SERVICE_STATUS +} + type SERVICE_STATUS struct { ServiceType uint32 CurrentState uint32 @@ -245,3 +251,4 @@ type QUERY_SERVICE_LOCK_STATUS struct { //sys UnsubscribeServiceChangeNotifications(subscription uintptr) = sechost.UnsubscribeServiceChangeNotifications? //sys RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) = advapi32.RegisterServiceCtrlHandlerExW //sys QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInfo unsafe.Pointer) (err error) = advapi32.QueryServiceDynamicInformation? +//sys EnumDependentServices(service Handle, activityState uint32, services *ENUM_SERVICE_STATUS, buffSize uint32, bytesNeeded *uint32, servicesReturned *uint32) (err error) = advapi32.EnumDependentServicesW diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go index 857acf1032..88e62a6385 100644 --- a/vendor/golang.org/x/sys/windows/types_windows.go +++ b/vendor/golang.org/x/sys/windows/types_windows.go @@ -2220,19 +2220,23 @@ type JOBOBJECT_BASIC_UI_RESTRICTIONS struct { } const ( - // JobObjectInformationClass + // JobObjectInformationClass for QueryInformationJobObject and SetInformationJobObject JobObjectAssociateCompletionPortInformation = 7 + JobObjectBasicAccountingInformation = 1 + JobObjectBasicAndIoAccountingInformation = 8 JobObjectBasicLimitInformation = 2 + JobObjectBasicProcessIdList = 3 JobObjectBasicUIRestrictions = 4 JobObjectCpuRateControlInformation = 15 JobObjectEndOfJobTimeInformation = 6 JobObjectExtendedLimitInformation = 9 JobObjectGroupInformation = 11 JobObjectGroupInformationEx = 14 - JobObjectLimitViolationInformation2 = 35 + JobObjectLimitViolationInformation = 13 + JobObjectLimitViolationInformation2 = 34 JobObjectNetRateControlInformation = 32 JobObjectNotificationLimitInformation = 12 - JobObjectNotificationLimitInformation2 = 34 + JobObjectNotificationLimitInformation2 = 33 JobObjectSecurityLimitInformation = 5 ) diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 6d2a268534..a81ea2c700 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -86,6 +86,7 @@ var ( procDeleteService = modadvapi32.NewProc("DeleteService") procDeregisterEventSource = modadvapi32.NewProc("DeregisterEventSource") procDuplicateTokenEx = modadvapi32.NewProc("DuplicateTokenEx") + procEnumDependentServicesW = modadvapi32.NewProc("EnumDependentServicesW") procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW") procEqualSid = modadvapi32.NewProc("EqualSid") procFreeSid = modadvapi32.NewProc("FreeSid") @@ -734,6 +735,14 @@ func DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes return } +func EnumDependentServices(service Handle, activityState uint32, services *ENUM_SERVICE_STATUS, buffSize uint32, bytesNeeded *uint32, servicesReturned *uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procEnumDependentServicesW.Addr(), 6, uintptr(service), uintptr(activityState), uintptr(unsafe.Pointer(services)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned))) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) { r1, _, e1 := syscall.Syscall12(procEnumServicesStatusExW.Addr(), 10, uintptr(mgr), uintptr(infoLevel), uintptr(serviceType), uintptr(serviceState), uintptr(unsafe.Pointer(services)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)), uintptr(unsafe.Pointer(resumeHandle)), uintptr(unsafe.Pointer(groupName)), 0, 0) if r1 == 0 { diff --git a/vendor/k8s.io/client-go/discovery/fake/discovery.go b/vendor/k8s.io/client-go/discovery/fake/discovery.go new file mode 100644 index 0000000000..c78c256ef7 --- /dev/null +++ b/vendor/k8s.io/client-go/discovery/fake/discovery.go @@ -0,0 +1,171 @@ +/* +Copyright 2016 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 fake + +import ( + "fmt" + "net/http" + + openapi_v2 "github.com/google/gnostic/openapiv2" + + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/version" + "k8s.io/client-go/discovery" + "k8s.io/client-go/openapi" + kubeversion "k8s.io/client-go/pkg/version" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/testing" +) + +// FakeDiscovery implements discovery.DiscoveryInterface and sometimes calls testing.Fake.Invoke with an action, +// but doesn't respect the return value if any. There is a way to fake static values like ServerVersion by using the Faked... fields on the struct. +type FakeDiscovery struct { + *testing.Fake + FakedServerVersion *version.Info +} + +// ServerResourcesForGroupVersion returns the supported resources for a group +// and version. +func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) { + action := testing.ActionImpl{ + Verb: "get", + Resource: schema.GroupVersionResource{Resource: "resource"}, + } + c.Invokes(action, nil) + for _, resourceList := range c.Resources { + if resourceList.GroupVersion == groupVersion { + return resourceList, nil + } + } + return nil, &errors.StatusError{ + ErrStatus: metav1.Status{ + Status: metav1.StatusFailure, + Code: http.StatusNotFound, + Reason: metav1.StatusReasonNotFound, + Message: fmt.Sprintf("the server could not find the requested resource, GroupVersion %q not found", groupVersion), + }} +} + +// ServerGroupsAndResources returns the supported groups and resources for all groups and versions. +func (c *FakeDiscovery) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { + sgs, err := c.ServerGroups() + if err != nil { + return nil, nil, err + } + resultGroups := []*metav1.APIGroup{} + for i := range sgs.Groups { + resultGroups = append(resultGroups, &sgs.Groups[i]) + } + + action := testing.ActionImpl{ + Verb: "get", + Resource: schema.GroupVersionResource{Resource: "resource"}, + } + c.Invokes(action, nil) + return resultGroups, c.Resources, nil +} + +// ServerPreferredResources returns the supported resources with the version +// preferred by the server. +func (c *FakeDiscovery) ServerPreferredResources() ([]*metav1.APIResourceList, error) { + return nil, nil +} + +// ServerPreferredNamespacedResources returns the supported namespaced resources +// with the version preferred by the server. +func (c *FakeDiscovery) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) { + return nil, nil +} + +// ServerGroups returns the supported groups, with information like supported +// versions and the preferred version. +func (c *FakeDiscovery) ServerGroups() (*metav1.APIGroupList, error) { + action := testing.ActionImpl{ + Verb: "get", + Resource: schema.GroupVersionResource{Resource: "group"}, + } + c.Invokes(action, nil) + + groups := map[string]*metav1.APIGroup{} + + for _, res := range c.Resources { + gv, err := schema.ParseGroupVersion(res.GroupVersion) + if err != nil { + return nil, err + } + group := groups[gv.Group] + if group == nil { + group = &metav1.APIGroup{ + Name: gv.Group, + PreferredVersion: metav1.GroupVersionForDiscovery{ + GroupVersion: res.GroupVersion, + Version: gv.Version, + }, + } + groups[gv.Group] = group + } + + group.Versions = append(group.Versions, metav1.GroupVersionForDiscovery{ + GroupVersion: res.GroupVersion, + Version: gv.Version, + }) + } + + list := &metav1.APIGroupList{} + for _, apiGroup := range groups { + list.Groups = append(list.Groups, *apiGroup) + } + + return list, nil + +} + +// ServerVersion retrieves and parses the server's version. +func (c *FakeDiscovery) ServerVersion() (*version.Info, error) { + action := testing.ActionImpl{} + action.Verb = "get" + action.Resource = schema.GroupVersionResource{Resource: "version"} + c.Invokes(action, nil) + + if c.FakedServerVersion != nil { + return c.FakedServerVersion, nil + } + + versionInfo := kubeversion.Get() + return &versionInfo, nil +} + +// OpenAPISchema retrieves and parses the swagger API schema the server supports. +func (c *FakeDiscovery) OpenAPISchema() (*openapi_v2.Document, error) { + return &openapi_v2.Document{}, nil +} + +func (c *FakeDiscovery) OpenAPIV3() openapi.Client { + panic("unimplemented") +} + +// RESTClient returns a RESTClient that is used to communicate with API server +// by this client implementation. +func (c *FakeDiscovery) RESTClient() restclient.Interface { + return nil +} + +func (c *FakeDiscovery) WithLegacy() discovery.DiscoveryInterface { + panic("unimplemented") +} diff --git a/vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go b/vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go new file mode 100644 index 0000000000..f4d621941e --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go @@ -0,0 +1,428 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + clientset "k8s.io/client-go/kubernetes" + admissionregistrationv1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" + fakeadmissionregistrationv1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake" + admissionregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" + fakeadmissionregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake" + admissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" + fakeadmissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake" + internalv1alpha1 "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1" + fakeinternalv1alpha1 "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake" + appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1" + fakeappsv1 "k8s.io/client-go/kubernetes/typed/apps/v1/fake" + appsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" + fakeappsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake" + appsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" + fakeappsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake" + authenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1" + fakeauthenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1/fake" + authenticationv1alpha1 "k8s.io/client-go/kubernetes/typed/authentication/v1alpha1" + fakeauthenticationv1alpha1 "k8s.io/client-go/kubernetes/typed/authentication/v1alpha1/fake" + authenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" + fakeauthenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake" + authorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1" + fakeauthorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1/fake" + authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" + fakeauthorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake" + autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" + fakeautoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake" + autoscalingv2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2" + fakeautoscalingv2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake" + autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1" + fakeautoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake" + autoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2" + fakeautoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake" + batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1" + fakebatchv1 "k8s.io/client-go/kubernetes/typed/batch/v1/fake" + batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" + fakebatchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake" + certificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1" + fakecertificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1/fake" + certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" + fakecertificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake" + coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" + fakecoordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1/fake" + coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" + fakecoordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake" + corev1 "k8s.io/client-go/kubernetes/typed/core/v1" + fakecorev1 "k8s.io/client-go/kubernetes/typed/core/v1/fake" + discoveryv1 "k8s.io/client-go/kubernetes/typed/discovery/v1" + fakediscoveryv1 "k8s.io/client-go/kubernetes/typed/discovery/v1/fake" + discoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1" + fakediscoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake" + eventsv1 "k8s.io/client-go/kubernetes/typed/events/v1" + fakeeventsv1 "k8s.io/client-go/kubernetes/typed/events/v1/fake" + eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" + fakeeventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1/fake" + extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" + fakeextensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake" + flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + fakeflowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake" + flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" + fakeflowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake" + flowcontrolv1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2" + fakeflowcontrolv1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake" + flowcontrolv1beta3 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3" + fakeflowcontrolv1beta3 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake" + networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1" + fakenetworkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1/fake" + networkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" + fakenetworkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake" + networkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" + fakenetworkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake" + nodev1 "k8s.io/client-go/kubernetes/typed/node/v1" + fakenodev1 "k8s.io/client-go/kubernetes/typed/node/v1/fake" + nodev1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1" + fakenodev1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake" + nodev1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1" + fakenodev1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1/fake" + policyv1 "k8s.io/client-go/kubernetes/typed/policy/v1" + fakepolicyv1 "k8s.io/client-go/kubernetes/typed/policy/v1/fake" + policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" + fakepolicyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake" + rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1" + fakerbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1/fake" + rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" + fakerbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake" + rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" + fakerbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake" + resourcev1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1" + fakeresourcev1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake" + schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" + fakeschedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1/fake" + schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" + fakeschedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake" + schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + fakeschedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake" + storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" + fakestoragev1 "k8s.io/client-go/kubernetes/typed/storage/v1/fake" + storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" + fakestoragev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake" + storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" + fakestoragev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake" + "k8s.io/client-go/testing" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var ( + _ clientset.Interface = &Clientset{} + _ testing.FakeClient = &Clientset{} +) + +// AdmissionregistrationV1 retrieves the AdmissionregistrationV1Client +func (c *Clientset) AdmissionregistrationV1() admissionregistrationv1.AdmissionregistrationV1Interface { + return &fakeadmissionregistrationv1.FakeAdmissionregistrationV1{Fake: &c.Fake} +} + +// AdmissionregistrationV1alpha1 retrieves the AdmissionregistrationV1alpha1Client +func (c *Clientset) AdmissionregistrationV1alpha1() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface { + return &fakeadmissionregistrationv1alpha1.FakeAdmissionregistrationV1alpha1{Fake: &c.Fake} +} + +// AdmissionregistrationV1beta1 retrieves the AdmissionregistrationV1beta1Client +func (c *Clientset) AdmissionregistrationV1beta1() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface { + return &fakeadmissionregistrationv1beta1.FakeAdmissionregistrationV1beta1{Fake: &c.Fake} +} + +// InternalV1alpha1 retrieves the InternalV1alpha1Client +func (c *Clientset) InternalV1alpha1() internalv1alpha1.InternalV1alpha1Interface { + return &fakeinternalv1alpha1.FakeInternalV1alpha1{Fake: &c.Fake} +} + +// AppsV1 retrieves the AppsV1Client +func (c *Clientset) AppsV1() appsv1.AppsV1Interface { + return &fakeappsv1.FakeAppsV1{Fake: &c.Fake} +} + +// AppsV1beta1 retrieves the AppsV1beta1Client +func (c *Clientset) AppsV1beta1() appsv1beta1.AppsV1beta1Interface { + return &fakeappsv1beta1.FakeAppsV1beta1{Fake: &c.Fake} +} + +// AppsV1beta2 retrieves the AppsV1beta2Client +func (c *Clientset) AppsV1beta2() appsv1beta2.AppsV1beta2Interface { + return &fakeappsv1beta2.FakeAppsV1beta2{Fake: &c.Fake} +} + +// AuthenticationV1 retrieves the AuthenticationV1Client +func (c *Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface { + return &fakeauthenticationv1.FakeAuthenticationV1{Fake: &c.Fake} +} + +// AuthenticationV1alpha1 retrieves the AuthenticationV1alpha1Client +func (c *Clientset) AuthenticationV1alpha1() authenticationv1alpha1.AuthenticationV1alpha1Interface { + return &fakeauthenticationv1alpha1.FakeAuthenticationV1alpha1{Fake: &c.Fake} +} + +// AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client +func (c *Clientset) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface { + return &fakeauthenticationv1beta1.FakeAuthenticationV1beta1{Fake: &c.Fake} +} + +// AuthorizationV1 retrieves the AuthorizationV1Client +func (c *Clientset) AuthorizationV1() authorizationv1.AuthorizationV1Interface { + return &fakeauthorizationv1.FakeAuthorizationV1{Fake: &c.Fake} +} + +// AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client +func (c *Clientset) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface { + return &fakeauthorizationv1beta1.FakeAuthorizationV1beta1{Fake: &c.Fake} +} + +// AutoscalingV1 retrieves the AutoscalingV1Client +func (c *Clientset) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { + return &fakeautoscalingv1.FakeAutoscalingV1{Fake: &c.Fake} +} + +// AutoscalingV2 retrieves the AutoscalingV2Client +func (c *Clientset) AutoscalingV2() autoscalingv2.AutoscalingV2Interface { + return &fakeautoscalingv2.FakeAutoscalingV2{Fake: &c.Fake} +} + +// AutoscalingV2beta1 retrieves the AutoscalingV2beta1Client +func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface { + return &fakeautoscalingv2beta1.FakeAutoscalingV2beta1{Fake: &c.Fake} +} + +// AutoscalingV2beta2 retrieves the AutoscalingV2beta2Client +func (c *Clientset) AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface { + return &fakeautoscalingv2beta2.FakeAutoscalingV2beta2{Fake: &c.Fake} +} + +// BatchV1 retrieves the BatchV1Client +func (c *Clientset) BatchV1() batchv1.BatchV1Interface { + return &fakebatchv1.FakeBatchV1{Fake: &c.Fake} +} + +// BatchV1beta1 retrieves the BatchV1beta1Client +func (c *Clientset) BatchV1beta1() batchv1beta1.BatchV1beta1Interface { + return &fakebatchv1beta1.FakeBatchV1beta1{Fake: &c.Fake} +} + +// CertificatesV1 retrieves the CertificatesV1Client +func (c *Clientset) CertificatesV1() certificatesv1.CertificatesV1Interface { + return &fakecertificatesv1.FakeCertificatesV1{Fake: &c.Fake} +} + +// CertificatesV1beta1 retrieves the CertificatesV1beta1Client +func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { + return &fakecertificatesv1beta1.FakeCertificatesV1beta1{Fake: &c.Fake} +} + +// CoordinationV1beta1 retrieves the CoordinationV1beta1Client +func (c *Clientset) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { + return &fakecoordinationv1beta1.FakeCoordinationV1beta1{Fake: &c.Fake} +} + +// CoordinationV1 retrieves the CoordinationV1Client +func (c *Clientset) CoordinationV1() coordinationv1.CoordinationV1Interface { + return &fakecoordinationv1.FakeCoordinationV1{Fake: &c.Fake} +} + +// CoreV1 retrieves the CoreV1Client +func (c *Clientset) CoreV1() corev1.CoreV1Interface { + return &fakecorev1.FakeCoreV1{Fake: &c.Fake} +} + +// DiscoveryV1 retrieves the DiscoveryV1Client +func (c *Clientset) DiscoveryV1() discoveryv1.DiscoveryV1Interface { + return &fakediscoveryv1.FakeDiscoveryV1{Fake: &c.Fake} +} + +// DiscoveryV1beta1 retrieves the DiscoveryV1beta1Client +func (c *Clientset) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { + return &fakediscoveryv1beta1.FakeDiscoveryV1beta1{Fake: &c.Fake} +} + +// EventsV1 retrieves the EventsV1Client +func (c *Clientset) EventsV1() eventsv1.EventsV1Interface { + return &fakeeventsv1.FakeEventsV1{Fake: &c.Fake} +} + +// EventsV1beta1 retrieves the EventsV1beta1Client +func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { + return &fakeeventsv1beta1.FakeEventsV1beta1{Fake: &c.Fake} +} + +// ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client +func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { + return &fakeextensionsv1beta1.FakeExtensionsV1beta1{Fake: &c.Fake} +} + +// FlowcontrolV1alpha1 retrieves the FlowcontrolV1alpha1Client +func (c *Clientset) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { + return &fakeflowcontrolv1alpha1.FakeFlowcontrolV1alpha1{Fake: &c.Fake} +} + +// FlowcontrolV1beta1 retrieves the FlowcontrolV1beta1Client +func (c *Clientset) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface { + return &fakeflowcontrolv1beta1.FakeFlowcontrolV1beta1{Fake: &c.Fake} +} + +// FlowcontrolV1beta2 retrieves the FlowcontrolV1beta2Client +func (c *Clientset) FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface { + return &fakeflowcontrolv1beta2.FakeFlowcontrolV1beta2{Fake: &c.Fake} +} + +// FlowcontrolV1beta3 retrieves the FlowcontrolV1beta3Client +func (c *Clientset) FlowcontrolV1beta3() flowcontrolv1beta3.FlowcontrolV1beta3Interface { + return &fakeflowcontrolv1beta3.FakeFlowcontrolV1beta3{Fake: &c.Fake} +} + +// NetworkingV1 retrieves the NetworkingV1Client +func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface { + return &fakenetworkingv1.FakeNetworkingV1{Fake: &c.Fake} +} + +// NetworkingV1alpha1 retrieves the NetworkingV1alpha1Client +func (c *Clientset) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { + return &fakenetworkingv1alpha1.FakeNetworkingV1alpha1{Fake: &c.Fake} +} + +// NetworkingV1beta1 retrieves the NetworkingV1beta1Client +func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { + return &fakenetworkingv1beta1.FakeNetworkingV1beta1{Fake: &c.Fake} +} + +// NodeV1 retrieves the NodeV1Client +func (c *Clientset) NodeV1() nodev1.NodeV1Interface { + return &fakenodev1.FakeNodeV1{Fake: &c.Fake} +} + +// NodeV1alpha1 retrieves the NodeV1alpha1Client +func (c *Clientset) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface { + return &fakenodev1alpha1.FakeNodeV1alpha1{Fake: &c.Fake} +} + +// NodeV1beta1 retrieves the NodeV1beta1Client +func (c *Clientset) NodeV1beta1() nodev1beta1.NodeV1beta1Interface { + return &fakenodev1beta1.FakeNodeV1beta1{Fake: &c.Fake} +} + +// PolicyV1 retrieves the PolicyV1Client +func (c *Clientset) PolicyV1() policyv1.PolicyV1Interface { + return &fakepolicyv1.FakePolicyV1{Fake: &c.Fake} +} + +// PolicyV1beta1 retrieves the PolicyV1beta1Client +func (c *Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { + return &fakepolicyv1beta1.FakePolicyV1beta1{Fake: &c.Fake} +} + +// RbacV1 retrieves the RbacV1Client +func (c *Clientset) RbacV1() rbacv1.RbacV1Interface { + return &fakerbacv1.FakeRbacV1{Fake: &c.Fake} +} + +// RbacV1beta1 retrieves the RbacV1beta1Client +func (c *Clientset) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { + return &fakerbacv1beta1.FakeRbacV1beta1{Fake: &c.Fake} +} + +// RbacV1alpha1 retrieves the RbacV1alpha1Client +func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { + return &fakerbacv1alpha1.FakeRbacV1alpha1{Fake: &c.Fake} +} + +// ResourceV1alpha1 retrieves the ResourceV1alpha1Client +func (c *Clientset) ResourceV1alpha1() resourcev1alpha1.ResourceV1alpha1Interface { + return &fakeresourcev1alpha1.FakeResourceV1alpha1{Fake: &c.Fake} +} + +// SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client +func (c *Clientset) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { + return &fakeschedulingv1alpha1.FakeSchedulingV1alpha1{Fake: &c.Fake} +} + +// SchedulingV1beta1 retrieves the SchedulingV1beta1Client +func (c *Clientset) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { + return &fakeschedulingv1beta1.FakeSchedulingV1beta1{Fake: &c.Fake} +} + +// SchedulingV1 retrieves the SchedulingV1Client +func (c *Clientset) SchedulingV1() schedulingv1.SchedulingV1Interface { + return &fakeschedulingv1.FakeSchedulingV1{Fake: &c.Fake} +} + +// StorageV1beta1 retrieves the StorageV1beta1Client +func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { + return &fakestoragev1beta1.FakeStorageV1beta1{Fake: &c.Fake} +} + +// StorageV1 retrieves the StorageV1Client +func (c *Clientset) StorageV1() storagev1.StorageV1Interface { + return &fakestoragev1.FakeStorageV1{Fake: &c.Fake} +} + +// StorageV1alpha1 retrieves the StorageV1alpha1Client +func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { + return &fakestoragev1alpha1.FakeStorageV1alpha1{Fake: &c.Fake} +} diff --git a/vendor/k8s.io/client-go/kubernetes/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/fake/doc.go new file mode 100644 index 0000000000..9b99e71670 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/fake/register.go b/vendor/k8s.io/client-go/kubernetes/fake/register.go new file mode 100644 index 0000000000..30f42e25da --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/fake/register.go @@ -0,0 +1,154 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" + admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" + internalv1alpha1 "k8s.io/api/apiserverinternal/v1alpha1" + appsv1 "k8s.io/api/apps/v1" + appsv1beta1 "k8s.io/api/apps/v1beta1" + appsv1beta2 "k8s.io/api/apps/v1beta2" + authenticationv1 "k8s.io/api/authentication/v1" + authenticationv1alpha1 "k8s.io/api/authentication/v1alpha1" + authenticationv1beta1 "k8s.io/api/authentication/v1beta1" + authorizationv1 "k8s.io/api/authorization/v1" + authorizationv1beta1 "k8s.io/api/authorization/v1beta1" + autoscalingv1 "k8s.io/api/autoscaling/v1" + autoscalingv2 "k8s.io/api/autoscaling/v2" + autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1" + autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" + batchv1 "k8s.io/api/batch/v1" + batchv1beta1 "k8s.io/api/batch/v1beta1" + certificatesv1 "k8s.io/api/certificates/v1" + certificatesv1beta1 "k8s.io/api/certificates/v1beta1" + coordinationv1 "k8s.io/api/coordination/v1" + coordinationv1beta1 "k8s.io/api/coordination/v1beta1" + corev1 "k8s.io/api/core/v1" + discoveryv1 "k8s.io/api/discovery/v1" + discoveryv1beta1 "k8s.io/api/discovery/v1beta1" + eventsv1 "k8s.io/api/events/v1" + eventsv1beta1 "k8s.io/api/events/v1beta1" + extensionsv1beta1 "k8s.io/api/extensions/v1beta1" + flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1" + flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" + flowcontrolv1beta3 "k8s.io/api/flowcontrol/v1beta3" + networkingv1 "k8s.io/api/networking/v1" + networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" + nodev1 "k8s.io/api/node/v1" + nodev1alpha1 "k8s.io/api/node/v1alpha1" + nodev1beta1 "k8s.io/api/node/v1beta1" + policyv1 "k8s.io/api/policy/v1" + policyv1beta1 "k8s.io/api/policy/v1beta1" + rbacv1 "k8s.io/api/rbac/v1" + rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" + rbacv1beta1 "k8s.io/api/rbac/v1beta1" + resourcev1alpha1 "k8s.io/api/resource/v1alpha1" + schedulingv1 "k8s.io/api/scheduling/v1" + schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" + schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" + storagev1 "k8s.io/api/storage/v1" + storagev1alpha1 "k8s.io/api/storage/v1alpha1" + storagev1beta1 "k8s.io/api/storage/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + admissionregistrationv1.AddToScheme, + admissionregistrationv1alpha1.AddToScheme, + admissionregistrationv1beta1.AddToScheme, + internalv1alpha1.AddToScheme, + appsv1.AddToScheme, + appsv1beta1.AddToScheme, + appsv1beta2.AddToScheme, + authenticationv1.AddToScheme, + authenticationv1alpha1.AddToScheme, + authenticationv1beta1.AddToScheme, + authorizationv1.AddToScheme, + authorizationv1beta1.AddToScheme, + autoscalingv1.AddToScheme, + autoscalingv2.AddToScheme, + autoscalingv2beta1.AddToScheme, + autoscalingv2beta2.AddToScheme, + batchv1.AddToScheme, + batchv1beta1.AddToScheme, + certificatesv1.AddToScheme, + certificatesv1beta1.AddToScheme, + coordinationv1beta1.AddToScheme, + coordinationv1.AddToScheme, + corev1.AddToScheme, + discoveryv1.AddToScheme, + discoveryv1beta1.AddToScheme, + eventsv1.AddToScheme, + eventsv1beta1.AddToScheme, + extensionsv1beta1.AddToScheme, + flowcontrolv1alpha1.AddToScheme, + flowcontrolv1beta1.AddToScheme, + flowcontrolv1beta2.AddToScheme, + flowcontrolv1beta3.AddToScheme, + networkingv1.AddToScheme, + networkingv1alpha1.AddToScheme, + networkingv1beta1.AddToScheme, + nodev1.AddToScheme, + nodev1alpha1.AddToScheme, + nodev1beta1.AddToScheme, + policyv1.AddToScheme, + policyv1beta1.AddToScheme, + rbacv1.AddToScheme, + rbacv1beta1.AddToScheme, + rbacv1alpha1.AddToScheme, + resourcev1alpha1.AddToScheme, + schedulingv1alpha1.AddToScheme, + schedulingv1beta1.AddToScheme, + schedulingv1.AddToScheme, + storagev1beta1.AddToScheme, + storagev1.AddToScheme, + storagev1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_admissionregistration_client.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_admissionregistration_client.go new file mode 100644 index 0000000000..a5a570ad15 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_admissionregistration_client.go @@ -0,0 +1,44 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAdmissionregistrationV1 struct { + *testing.Fake +} + +func (c *FakeAdmissionregistrationV1) MutatingWebhookConfigurations() v1.MutatingWebhookConfigurationInterface { + return &FakeMutatingWebhookConfigurations{c} +} + +func (c *FakeAdmissionregistrationV1) ValidatingWebhookConfigurations() v1.ValidatingWebhookConfigurationInterface { + return &FakeValidatingWebhookConfigurations{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAdmissionregistrationV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_mutatingwebhookconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_mutatingwebhookconfiguration.go new file mode 100644 index 0000000000..bbd4cf007f --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_mutatingwebhookconfiguration.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsadmissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" + testing "k8s.io/client-go/testing" +) + +// FakeMutatingWebhookConfigurations implements MutatingWebhookConfigurationInterface +type FakeMutatingWebhookConfigurations struct { + Fake *FakeAdmissionregistrationV1 +} + +var mutatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1", Resource: "mutatingwebhookconfigurations"} + +var mutatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "MutatingWebhookConfiguration"} + +// Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any. +func (c *FakeMutatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(mutatingwebhookconfigurationsResource, name), &admissionregistrationv1.MutatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.MutatingWebhookConfiguration), err +} + +// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors. +func (c *FakeMutatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *admissionregistrationv1.MutatingWebhookConfigurationList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), &admissionregistrationv1.MutatingWebhookConfigurationList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &admissionregistrationv1.MutatingWebhookConfigurationList{ListMeta: obj.(*admissionregistrationv1.MutatingWebhookConfigurationList).ListMeta} + for _, item := range obj.(*admissionregistrationv1.MutatingWebhookConfigurationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations. +func (c *FakeMutatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(mutatingwebhookconfigurationsResource, opts)) +} + +// Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. +func (c *FakeMutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration, opts v1.CreateOptions) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &admissionregistrationv1.MutatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.MutatingWebhookConfiguration), err +} + +// Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. +func (c *FakeMutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration, opts v1.UpdateOptions) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &admissionregistrationv1.MutatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.MutatingWebhookConfiguration), err +} + +// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs. +func (c *FakeMutatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(mutatingwebhookconfigurationsResource, name, opts), &admissionregistrationv1.MutatingWebhookConfiguration{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOpts) + + _, err := c.Fake.Invokes(action, &admissionregistrationv1.MutatingWebhookConfigurationList{}) + return err +} + +// Patch applies the patch and returns the patched mutatingWebhookConfiguration. +func (c *FakeMutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, pt, data, subresources...), &admissionregistrationv1.MutatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.MutatingWebhookConfiguration), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied mutatingWebhookConfiguration. +func (c *FakeMutatingWebhookConfigurations) Apply(ctx context.Context, mutatingWebhookConfiguration *applyconfigurationsadmissionregistrationv1.MutatingWebhookConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { + if mutatingWebhookConfiguration == nil { + return nil, fmt.Errorf("mutatingWebhookConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(mutatingWebhookConfiguration) + if err != nil { + return nil, err + } + name := mutatingWebhookConfiguration.Name + if name == nil { + return nil, fmt.Errorf("mutatingWebhookConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, *name, types.ApplyPatchType, data), &admissionregistrationv1.MutatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.MutatingWebhookConfiguration), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingwebhookconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingwebhookconfiguration.go new file mode 100644 index 0000000000..ee769dd3cb --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingwebhookconfiguration.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsadmissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" + testing "k8s.io/client-go/testing" +) + +// FakeValidatingWebhookConfigurations implements ValidatingWebhookConfigurationInterface +type FakeValidatingWebhookConfigurations struct { + Fake *FakeAdmissionregistrationV1 +} + +var validatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1", Resource: "validatingwebhookconfigurations"} + +var validatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "ValidatingWebhookConfiguration"} + +// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any. +func (c *FakeValidatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(validatingwebhookconfigurationsResource, name), &admissionregistrationv1.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingWebhookConfiguration), err +} + +// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. +func (c *FakeValidatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *admissionregistrationv1.ValidatingWebhookConfigurationList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(validatingwebhookconfigurationsResource, validatingwebhookconfigurationsKind, opts), &admissionregistrationv1.ValidatingWebhookConfigurationList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &admissionregistrationv1.ValidatingWebhookConfigurationList{ListMeta: obj.(*admissionregistrationv1.ValidatingWebhookConfigurationList).ListMeta} + for _, item := range obj.(*admissionregistrationv1.ValidatingWebhookConfigurationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations. +func (c *FakeValidatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(validatingwebhookconfigurationsResource, opts)) +} + +// Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. +func (c *FakeValidatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration, opts v1.CreateOptions) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &admissionregistrationv1.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingWebhookConfiguration), err +} + +// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. +func (c *FakeValidatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration, opts v1.UpdateOptions) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &admissionregistrationv1.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingWebhookConfiguration), err +} + +// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. +func (c *FakeValidatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(validatingwebhookconfigurationsResource, name, opts), &admissionregistrationv1.ValidatingWebhookConfiguration{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOpts) + + _, err := c.Fake.Invokes(action, &admissionregistrationv1.ValidatingWebhookConfigurationList{}) + return err +} + +// Patch applies the patch and returns the patched validatingWebhookConfiguration. +func (c *FakeValidatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, pt, data, subresources...), &admissionregistrationv1.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingWebhookConfiguration), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied validatingWebhookConfiguration. +func (c *FakeValidatingWebhookConfigurations) Apply(ctx context.Context, validatingWebhookConfiguration *applyconfigurationsadmissionregistrationv1.ValidatingWebhookConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { + if validatingWebhookConfiguration == nil { + return nil, fmt.Errorf("validatingWebhookConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(validatingWebhookConfiguration) + if err != nil { + return nil, err + } + name := validatingWebhookConfiguration.Name + if name == nil { + return nil, fmt.Errorf("validatingWebhookConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, *name, types.ApplyPatchType, data), &admissionregistrationv1.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingWebhookConfiguration), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go new file mode 100644 index 0000000000..dc0e30ca4d --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go @@ -0,0 +1,44 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAdmissionregistrationV1alpha1 struct { + *testing.Fake +} + +func (c *FakeAdmissionregistrationV1alpha1) ValidatingAdmissionPolicies() v1alpha1.ValidatingAdmissionPolicyInterface { + return &FakeValidatingAdmissionPolicies{c} +} + +func (c *FakeAdmissionregistrationV1alpha1) ValidatingAdmissionPolicyBindings() v1alpha1.ValidatingAdmissionPolicyBindingInterface { + return &FakeValidatingAdmissionPolicyBindings{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAdmissionregistrationV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_validatingadmissionpolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_validatingadmissionpolicy.go new file mode 100644 index 0000000000..2fed66b44d --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_validatingadmissionpolicy.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1alpha1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeValidatingAdmissionPolicies implements ValidatingAdmissionPolicyInterface +type FakeValidatingAdmissionPolicies struct { + Fake *FakeAdmissionregistrationV1alpha1 +} + +var validatingadmissionpoliciesResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Resource: "validatingadmissionpolicies"} + +var validatingadmissionpoliciesKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicy"} + +// Get takes name of the validatingAdmissionPolicy, and returns the corresponding validatingAdmissionPolicy object, and an error if there is any. +func (c *FakeValidatingAdmissionPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ValidatingAdmissionPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(validatingadmissionpoliciesResource, name), &v1alpha1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ValidatingAdmissionPolicy), err +} + +// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors. +func (c *FakeValidatingAdmissionPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ValidatingAdmissionPolicyList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(validatingadmissionpoliciesResource, validatingadmissionpoliciesKind, opts), &v1alpha1.ValidatingAdmissionPolicyList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ValidatingAdmissionPolicyList{ListMeta: obj.(*v1alpha1.ValidatingAdmissionPolicyList).ListMeta} + for _, item := range obj.(*v1alpha1.ValidatingAdmissionPolicyList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicies. +func (c *FakeValidatingAdmissionPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(validatingadmissionpoliciesResource, opts)) +} + +// Create takes the representation of a validatingAdmissionPolicy and creates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any. +func (c *FakeValidatingAdmissionPolicies) Create(ctx context.Context, validatingAdmissionPolicy *v1alpha1.ValidatingAdmissionPolicy, opts v1.CreateOptions) (result *v1alpha1.ValidatingAdmissionPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), &v1alpha1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ValidatingAdmissionPolicy), err +} + +// Update takes the representation of a validatingAdmissionPolicy and updates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any. +func (c *FakeValidatingAdmissionPolicies) Update(ctx context.Context, validatingAdmissionPolicy *v1alpha1.ValidatingAdmissionPolicy, opts v1.UpdateOptions) (result *v1alpha1.ValidatingAdmissionPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), &v1alpha1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ValidatingAdmissionPolicy), err +} + +// Delete takes name of the validatingAdmissionPolicy and deletes it. Returns an error if one occurs. +func (c *FakeValidatingAdmissionPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(validatingadmissionpoliciesResource, name, opts), &v1alpha1.ValidatingAdmissionPolicy{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeValidatingAdmissionPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(validatingadmissionpoliciesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ValidatingAdmissionPolicyList{}) + return err +} + +// Patch applies the patch and returns the patched validatingAdmissionPolicy. +func (c *FakeValidatingAdmissionPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ValidatingAdmissionPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, name, pt, data, subresources...), &v1alpha1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ValidatingAdmissionPolicy), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied validatingAdmissionPolicy. +func (c *FakeValidatingAdmissionPolicies) Apply(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ValidatingAdmissionPolicy, err error) { + if validatingAdmissionPolicy == nil { + return nil, fmt.Errorf("validatingAdmissionPolicy provided to Apply must not be nil") + } + data, err := json.Marshal(validatingAdmissionPolicy) + if err != nil { + return nil, err + } + name := validatingAdmissionPolicy.Name + if name == nil { + return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, *name, types.ApplyPatchType, data), &v1alpha1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ValidatingAdmissionPolicy), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_validatingadmissionpolicybinding.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_validatingadmissionpolicybinding.go new file mode 100644 index 0000000000..7c9cb88aab --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_validatingadmissionpolicybinding.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1alpha1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeValidatingAdmissionPolicyBindings implements ValidatingAdmissionPolicyBindingInterface +type FakeValidatingAdmissionPolicyBindings struct { + Fake *FakeAdmissionregistrationV1alpha1 +} + +var validatingadmissionpolicybindingsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Resource: "validatingadmissionpolicybindings"} + +var validatingadmissionpolicybindingsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicyBinding"} + +// Get takes name of the validatingAdmissionPolicyBinding, and returns the corresponding validatingAdmissionPolicyBinding object, and an error if there is any. +func (c *FakeValidatingAdmissionPolicyBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ValidatingAdmissionPolicyBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(validatingadmissionpolicybindingsResource, name), &v1alpha1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ValidatingAdmissionPolicyBinding), err +} + +// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors. +func (c *FakeValidatingAdmissionPolicyBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ValidatingAdmissionPolicyBindingList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(validatingadmissionpolicybindingsResource, validatingadmissionpolicybindingsKind, opts), &v1alpha1.ValidatingAdmissionPolicyBindingList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ValidatingAdmissionPolicyBindingList{ListMeta: obj.(*v1alpha1.ValidatingAdmissionPolicyBindingList).ListMeta} + for _, item := range obj.(*v1alpha1.ValidatingAdmissionPolicyBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicyBindings. +func (c *FakeValidatingAdmissionPolicyBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(validatingadmissionpolicybindingsResource, opts)) +} + +// Create takes the representation of a validatingAdmissionPolicyBinding and creates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any. +func (c *FakeValidatingAdmissionPolicyBindings) Create(ctx context.Context, validatingAdmissionPolicyBinding *v1alpha1.ValidatingAdmissionPolicyBinding, opts v1.CreateOptions) (result *v1alpha1.ValidatingAdmissionPolicyBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), &v1alpha1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ValidatingAdmissionPolicyBinding), err +} + +// Update takes the representation of a validatingAdmissionPolicyBinding and updates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any. +func (c *FakeValidatingAdmissionPolicyBindings) Update(ctx context.Context, validatingAdmissionPolicyBinding *v1alpha1.ValidatingAdmissionPolicyBinding, opts v1.UpdateOptions) (result *v1alpha1.ValidatingAdmissionPolicyBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), &v1alpha1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ValidatingAdmissionPolicyBinding), err +} + +// Delete takes name of the validatingAdmissionPolicyBinding and deletes it. Returns an error if one occurs. +func (c *FakeValidatingAdmissionPolicyBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(validatingadmissionpolicybindingsResource, name, opts), &v1alpha1.ValidatingAdmissionPolicyBinding{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeValidatingAdmissionPolicyBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(validatingadmissionpolicybindingsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ValidatingAdmissionPolicyBindingList{}) + return err +} + +// Patch applies the patch and returns the patched validatingAdmissionPolicyBinding. +func (c *FakeValidatingAdmissionPolicyBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ValidatingAdmissionPolicyBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, name, pt, data, subresources...), &v1alpha1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ValidatingAdmissionPolicyBinding), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied validatingAdmissionPolicyBinding. +func (c *FakeValidatingAdmissionPolicyBindings) Apply(ctx context.Context, validatingAdmissionPolicyBinding *admissionregistrationv1alpha1.ValidatingAdmissionPolicyBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ValidatingAdmissionPolicyBinding, err error) { + if validatingAdmissionPolicyBinding == nil { + return nil, fmt.Errorf("validatingAdmissionPolicyBinding provided to Apply must not be nil") + } + data, err := json.Marshal(validatingAdmissionPolicyBinding) + if err != nil { + return nil, err + } + name := validatingAdmissionPolicyBinding.Name + if name == nil { + return nil, fmt.Errorf("validatingAdmissionPolicyBinding.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, *name, types.ApplyPatchType, data), &v1alpha1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ValidatingAdmissionPolicyBinding), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_admissionregistration_client.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_admissionregistration_client.go new file mode 100644 index 0000000000..1a988ddba1 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_admissionregistration_client.go @@ -0,0 +1,44 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAdmissionregistrationV1beta1 struct { + *testing.Fake +} + +func (c *FakeAdmissionregistrationV1beta1) MutatingWebhookConfigurations() v1beta1.MutatingWebhookConfigurationInterface { + return &FakeMutatingWebhookConfigurations{c} +} + +func (c *FakeAdmissionregistrationV1beta1) ValidatingWebhookConfigurations() v1beta1.ValidatingWebhookConfigurationInterface { + return &FakeValidatingWebhookConfigurations{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAdmissionregistrationV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go new file mode 100644 index 0000000000..a06bb7db10 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/admissionregistration/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeMutatingWebhookConfigurations implements MutatingWebhookConfigurationInterface +type FakeMutatingWebhookConfigurations struct { + Fake *FakeAdmissionregistrationV1beta1 +} + +var mutatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1beta1", Resource: "mutatingwebhookconfigurations"} + +var mutatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1beta1", Kind: "MutatingWebhookConfiguration"} + +// Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any. +func (c *FakeMutatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(mutatingwebhookconfigurationsResource, name), &v1beta1.MutatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.MutatingWebhookConfiguration), err +} + +// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors. +func (c *FakeMutatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), &v1beta1.MutatingWebhookConfigurationList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.MutatingWebhookConfigurationList{ListMeta: obj.(*v1beta1.MutatingWebhookConfigurationList).ListMeta} + for _, item := range obj.(*v1beta1.MutatingWebhookConfigurationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations. +func (c *FakeMutatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(mutatingwebhookconfigurationsResource, opts)) +} + +// Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. +func (c *FakeMutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.CreateOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1beta1.MutatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.MutatingWebhookConfiguration), err +} + +// Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. +func (c *FakeMutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.UpdateOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1beta1.MutatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.MutatingWebhookConfiguration), err +} + +// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs. +func (c *FakeMutatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(mutatingwebhookconfigurationsResource, name, opts), &v1beta1.MutatingWebhookConfiguration{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.MutatingWebhookConfigurationList{}) + return err +} + +// Patch applies the patch and returns the patched mutatingWebhookConfiguration. +func (c *FakeMutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, pt, data, subresources...), &v1beta1.MutatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.MutatingWebhookConfiguration), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied mutatingWebhookConfiguration. +func (c *FakeMutatingWebhookConfigurations) Apply(ctx context.Context, mutatingWebhookConfiguration *admissionregistrationv1beta1.MutatingWebhookConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { + if mutatingWebhookConfiguration == nil { + return nil, fmt.Errorf("mutatingWebhookConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(mutatingWebhookConfiguration) + if err != nil { + return nil, err + } + name := mutatingWebhookConfiguration.Name + if name == nil { + return nil, fmt.Errorf("mutatingWebhookConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, *name, types.ApplyPatchType, data), &v1beta1.MutatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.MutatingWebhookConfiguration), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go new file mode 100644 index 0000000000..27495b31de --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/admissionregistration/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeValidatingWebhookConfigurations implements ValidatingWebhookConfigurationInterface +type FakeValidatingWebhookConfigurations struct { + Fake *FakeAdmissionregistrationV1beta1 +} + +var validatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1beta1", Resource: "validatingwebhookconfigurations"} + +var validatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1beta1", Kind: "ValidatingWebhookConfiguration"} + +// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any. +func (c *FakeValidatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(validatingwebhookconfigurationsResource, name), &v1beta1.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ValidatingWebhookConfiguration), err +} + +// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. +func (c *FakeValidatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(validatingwebhookconfigurationsResource, validatingwebhookconfigurationsKind, opts), &v1beta1.ValidatingWebhookConfigurationList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.ValidatingWebhookConfigurationList{ListMeta: obj.(*v1beta1.ValidatingWebhookConfigurationList).ListMeta} + for _, item := range obj.(*v1beta1.ValidatingWebhookConfigurationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations. +func (c *FakeValidatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(validatingwebhookconfigurationsResource, opts)) +} + +// Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. +func (c *FakeValidatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.CreateOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1beta1.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ValidatingWebhookConfiguration), err +} + +// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. +func (c *FakeValidatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.UpdateOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1beta1.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ValidatingWebhookConfiguration), err +} + +// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. +func (c *FakeValidatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(validatingwebhookconfigurationsResource, name, opts), &v1beta1.ValidatingWebhookConfiguration{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.ValidatingWebhookConfigurationList{}) + return err +} + +// Patch applies the patch and returns the patched validatingWebhookConfiguration. +func (c *FakeValidatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, pt, data, subresources...), &v1beta1.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ValidatingWebhookConfiguration), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied validatingWebhookConfiguration. +func (c *FakeValidatingWebhookConfigurations) Apply(ctx context.Context, validatingWebhookConfiguration *admissionregistrationv1beta1.ValidatingWebhookConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { + if validatingWebhookConfiguration == nil { + return nil, fmt.Errorf("validatingWebhookConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(validatingWebhookConfiguration) + if err != nil { + return nil, err + } + name := validatingWebhookConfiguration.Name + if name == nil { + return nil, fmt.Errorf("validatingWebhookConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, *name, types.ApplyPatchType, data), &v1beta1.ValidatingWebhookConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ValidatingWebhookConfiguration), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake/fake_apiserverinternal_client.go b/vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake/fake_apiserverinternal_client.go new file mode 100644 index 0000000000..0960a5e81e --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake/fake_apiserverinternal_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeInternalV1alpha1 struct { + *testing.Fake +} + +func (c *FakeInternalV1alpha1) StorageVersions() v1alpha1.StorageVersionInterface { + return &FakeStorageVersions{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeInternalV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake/fake_storageversion.go b/vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake/fake_storageversion.go new file mode 100644 index 0000000000..8b6a84d7a9 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake/fake_storageversion.go @@ -0,0 +1,179 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/apiserverinternal/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + apiserverinternalv1alpha1 "k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeStorageVersions implements StorageVersionInterface +type FakeStorageVersions struct { + Fake *FakeInternalV1alpha1 +} + +var storageversionsResource = schema.GroupVersionResource{Group: "internal.apiserver.k8s.io", Version: "v1alpha1", Resource: "storageversions"} + +var storageversionsKind = schema.GroupVersionKind{Group: "internal.apiserver.k8s.io", Version: "v1alpha1", Kind: "StorageVersion"} + +// Get takes name of the storageVersion, and returns the corresponding storageVersion object, and an error if there is any. +func (c *FakeStorageVersions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.StorageVersion, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(storageversionsResource, name), &v1alpha1.StorageVersion{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageVersion), err +} + +// List takes label and field selectors, and returns the list of StorageVersions that match those selectors. +func (c *FakeStorageVersions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageVersionList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(storageversionsResource, storageversionsKind, opts), &v1alpha1.StorageVersionList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.StorageVersionList{ListMeta: obj.(*v1alpha1.StorageVersionList).ListMeta} + for _, item := range obj.(*v1alpha1.StorageVersionList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested storageVersions. +func (c *FakeStorageVersions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(storageversionsResource, opts)) +} + +// Create takes the representation of a storageVersion and creates it. Returns the server's representation of the storageVersion, and an error, if there is any. +func (c *FakeStorageVersions) Create(ctx context.Context, storageVersion *v1alpha1.StorageVersion, opts v1.CreateOptions) (result *v1alpha1.StorageVersion, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(storageversionsResource, storageVersion), &v1alpha1.StorageVersion{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageVersion), err +} + +// Update takes the representation of a storageVersion and updates it. Returns the server's representation of the storageVersion, and an error, if there is any. +func (c *FakeStorageVersions) Update(ctx context.Context, storageVersion *v1alpha1.StorageVersion, opts v1.UpdateOptions) (result *v1alpha1.StorageVersion, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(storageversionsResource, storageVersion), &v1alpha1.StorageVersion{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageVersion), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeStorageVersions) UpdateStatus(ctx context.Context, storageVersion *v1alpha1.StorageVersion, opts v1.UpdateOptions) (*v1alpha1.StorageVersion, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(storageversionsResource, "status", storageVersion), &v1alpha1.StorageVersion{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageVersion), err +} + +// Delete takes name of the storageVersion and deletes it. Returns an error if one occurs. +func (c *FakeStorageVersions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(storageversionsResource, name, opts), &v1alpha1.StorageVersion{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeStorageVersions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(storageversionsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.StorageVersionList{}) + return err +} + +// Patch applies the patch and returns the patched storageVersion. +func (c *FakeStorageVersions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StorageVersion, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(storageversionsResource, name, pt, data, subresources...), &v1alpha1.StorageVersion{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageVersion), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied storageVersion. +func (c *FakeStorageVersions) Apply(ctx context.Context, storageVersion *apiserverinternalv1alpha1.StorageVersionApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.StorageVersion, err error) { + if storageVersion == nil { + return nil, fmt.Errorf("storageVersion provided to Apply must not be nil") + } + data, err := json.Marshal(storageVersion) + if err != nil { + return nil, err + } + name := storageVersion.Name + if name == nil { + return nil, fmt.Errorf("storageVersion.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(storageversionsResource, *name, types.ApplyPatchType, data), &v1alpha1.StorageVersion{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageVersion), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeStorageVersions) ApplyStatus(ctx context.Context, storageVersion *apiserverinternalv1alpha1.StorageVersionApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.StorageVersion, err error) { + if storageVersion == nil { + return nil, fmt.Errorf("storageVersion provided to Apply must not be nil") + } + data, err := json.Marshal(storageVersion) + if err != nil { + return nil, err + } + name := storageVersion.Name + if name == nil { + return nil, fmt.Errorf("storageVersion.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(storageversionsResource, *name, types.ApplyPatchType, data, "status"), &v1alpha1.StorageVersion{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageVersion), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_apps_client.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_apps_client.go new file mode 100644 index 0000000000..458df0fa33 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_apps_client.go @@ -0,0 +1,56 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/apps/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAppsV1 struct { + *testing.Fake +} + +func (c *FakeAppsV1) ControllerRevisions(namespace string) v1.ControllerRevisionInterface { + return &FakeControllerRevisions{c, namespace} +} + +func (c *FakeAppsV1) DaemonSets(namespace string) v1.DaemonSetInterface { + return &FakeDaemonSets{c, namespace} +} + +func (c *FakeAppsV1) Deployments(namespace string) v1.DeploymentInterface { + return &FakeDeployments{c, namespace} +} + +func (c *FakeAppsV1) ReplicaSets(namespace string) v1.ReplicaSetInterface { + return &FakeReplicaSets{c, namespace} +} + +func (c *FakeAppsV1) StatefulSets(namespace string) v1.StatefulSetInterface { + return &FakeStatefulSets{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAppsV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go new file mode 100644 index 0000000000..1116d6dffc --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + appsv1 "k8s.io/api/apps/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsappsv1 "k8s.io/client-go/applyconfigurations/apps/v1" + testing "k8s.io/client-go/testing" +) + +// FakeControllerRevisions implements ControllerRevisionInterface +type FakeControllerRevisions struct { + Fake *FakeAppsV1 + ns string +} + +var controllerrevisionsResource = schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "controllerrevisions"} + +var controllerrevisionsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ControllerRevision"} + +// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any. +func (c *FakeControllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *appsv1.ControllerRevision, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &appsv1.ControllerRevision{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.ControllerRevision), err +} + +// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. +func (c *FakeControllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *appsv1.ControllerRevisionList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &appsv1.ControllerRevisionList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &appsv1.ControllerRevisionList{ListMeta: obj.(*appsv1.ControllerRevisionList).ListMeta} + for _, item := range obj.(*appsv1.ControllerRevisionList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested controllerRevisions. +func (c *FakeControllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(controllerrevisionsResource, c.ns, opts)) + +} + +// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. +func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *appsv1.ControllerRevision, opts v1.CreateOptions) (result *appsv1.ControllerRevision, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &appsv1.ControllerRevision{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.ControllerRevision), err +} + +// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. +func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *appsv1.ControllerRevision, opts v1.UpdateOptions) (result *appsv1.ControllerRevision, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &appsv1.ControllerRevision{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.ControllerRevision), err +} + +// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. +func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(controllerrevisionsResource, c.ns, name, opts), &appsv1.ControllerRevision{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &appsv1.ControllerRevisionList{}) + return err +} + +// Patch applies the patch and returns the patched controllerRevision. +func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1.ControllerRevision, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &appsv1.ControllerRevision{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.ControllerRevision), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied controllerRevision. +func (c *FakeControllerRevisions) Apply(ctx context.Context, controllerRevision *applyconfigurationsappsv1.ControllerRevisionApplyConfiguration, opts v1.ApplyOptions) (result *appsv1.ControllerRevision, err error) { + if controllerRevision == nil { + return nil, fmt.Errorf("controllerRevision provided to Apply must not be nil") + } + data, err := json.Marshal(controllerRevision) + if err != nil { + return nil, err + } + name := controllerRevision.Name + if name == nil { + return nil, fmt.Errorf("controllerRevision.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, *name, types.ApplyPatchType, data), &appsv1.ControllerRevision{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.ControllerRevision), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go new file mode 100644 index 0000000000..00c28df9ba --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + appsv1 "k8s.io/api/apps/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsappsv1 "k8s.io/client-go/applyconfigurations/apps/v1" + testing "k8s.io/client-go/testing" +) + +// FakeDaemonSets implements DaemonSetInterface +type FakeDaemonSets struct { + Fake *FakeAppsV1 + ns string +} + +var daemonsetsResource = schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "daemonsets"} + +var daemonsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DaemonSet"} + +// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. +func (c *FakeDaemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *appsv1.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &appsv1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.DaemonSet), err +} + +// List takes label and field selectors, and returns the list of DaemonSets that match those selectors. +func (c *FakeDaemonSets) List(ctx context.Context, opts v1.ListOptions) (result *appsv1.DaemonSetList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &appsv1.DaemonSetList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &appsv1.DaemonSetList{ListMeta: obj.(*appsv1.DaemonSetList).ListMeta} + for _, item := range obj.(*appsv1.DaemonSetList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested daemonSets. +func (c *FakeDaemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(daemonsetsResource, c.ns, opts)) + +} + +// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. +func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *appsv1.DaemonSet, opts v1.CreateOptions) (result *appsv1.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &appsv1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.DaemonSet), err +} + +// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. +func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *appsv1.DaemonSet, opts v1.UpdateOptions) (result *appsv1.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &appsv1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.DaemonSet), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *appsv1.DaemonSet, opts v1.UpdateOptions) (*appsv1.DaemonSet, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &appsv1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.DaemonSet), err +} + +// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. +func (c *FakeDaemonSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(daemonsetsResource, c.ns, name, opts), &appsv1.DaemonSet{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &appsv1.DaemonSetList{}) + return err +} + +// Patch applies the patch and returns the patched daemonSet. +func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), &appsv1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.DaemonSet), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied daemonSet. +func (c *FakeDaemonSets) Apply(ctx context.Context, daemonSet *applyconfigurationsappsv1.DaemonSetApplyConfiguration, opts v1.ApplyOptions) (result *appsv1.DaemonSet, err error) { + if daemonSet == nil { + return nil, fmt.Errorf("daemonSet provided to Apply must not be nil") + } + data, err := json.Marshal(daemonSet) + if err != nil { + return nil, err + } + name := daemonSet.Name + if name == nil { + return nil, fmt.Errorf("daemonSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, *name, types.ApplyPatchType, data), &appsv1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.DaemonSet), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeDaemonSets) ApplyStatus(ctx context.Context, daemonSet *applyconfigurationsappsv1.DaemonSetApplyConfiguration, opts v1.ApplyOptions) (result *appsv1.DaemonSet, err error) { + if daemonSet == nil { + return nil, fmt.Errorf("daemonSet provided to Apply must not be nil") + } + data, err := json.Marshal(daemonSet) + if err != nil { + return nil, err + } + name := daemonSet.Name + if name == nil { + return nil, fmt.Errorf("daemonSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &appsv1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.DaemonSet), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go new file mode 100644 index 0000000000..8899824aa5 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go @@ -0,0 +1,233 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + appsv1 "k8s.io/api/apps/v1" + autoscalingv1 "k8s.io/api/autoscaling/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsappsv1 "k8s.io/client-go/applyconfigurations/apps/v1" + applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" + testing "k8s.io/client-go/testing" +) + +// FakeDeployments implements DeploymentInterface +type FakeDeployments struct { + Fake *FakeAppsV1 + ns string +} + +var deploymentsResource = schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "deployments"} + +var deploymentsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "Deployment"} + +// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. +func (c *FakeDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *appsv1.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &appsv1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.Deployment), err +} + +// List takes label and field selectors, and returns the list of Deployments that match those selectors. +func (c *FakeDeployments) List(ctx context.Context, opts v1.ListOptions) (result *appsv1.DeploymentList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &appsv1.DeploymentList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &appsv1.DeploymentList{ListMeta: obj.(*appsv1.DeploymentList).ListMeta} + for _, item := range obj.(*appsv1.DeploymentList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested deployments. +func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(deploymentsResource, c.ns, opts)) + +} + +// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. +func (c *FakeDeployments) Create(ctx context.Context, deployment *appsv1.Deployment, opts v1.CreateOptions) (result *appsv1.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &appsv1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.Deployment), err +} + +// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. +func (c *FakeDeployments) Update(ctx context.Context, deployment *appsv1.Deployment, opts v1.UpdateOptions) (result *appsv1.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &appsv1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.Deployment), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *appsv1.Deployment, opts v1.UpdateOptions) (*appsv1.Deployment, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &appsv1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.Deployment), err +} + +// Delete takes name of the deployment and deletes it. Returns an error if one occurs. +func (c *FakeDeployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(deploymentsResource, c.ns, name, opts), &appsv1.Deployment{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &appsv1.DeploymentList{}) + return err +} + +// Patch applies the patch and returns the patched deployment. +func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &appsv1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.Deployment), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied deployment. +func (c *FakeDeployments) Apply(ctx context.Context, deployment *applyconfigurationsappsv1.DeploymentApplyConfiguration, opts v1.ApplyOptions) (result *appsv1.Deployment, err error) { + if deployment == nil { + return nil, fmt.Errorf("deployment provided to Apply must not be nil") + } + data, err := json.Marshal(deployment) + if err != nil { + return nil, err + } + name := deployment.Name + if name == nil { + return nil, fmt.Errorf("deployment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data), &appsv1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.Deployment), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeDeployments) ApplyStatus(ctx context.Context, deployment *applyconfigurationsappsv1.DeploymentApplyConfiguration, opts v1.ApplyOptions) (result *appsv1.Deployment, err error) { + if deployment == nil { + return nil, fmt.Errorf("deployment provided to Apply must not be nil") + } + data, err := json.Marshal(deployment) + if err != nil { + return nil, err + } + name := deployment.Name + if name == nil { + return nil, fmt.Errorf("deployment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &appsv1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.Deployment), err +} + +// GetScale takes name of the deployment, and returns the corresponding scale object, and an error if there is any. +func (c *FakeDeployments) GetScale(ctx context.Context, deploymentName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetSubresourceAction(deploymentsResource, c.ns, "scale", deploymentName), &autoscalingv1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.Scale), err +} + +// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. +func (c *FakeDeployments) UpdateScale(ctx context.Context, deploymentName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "scale", c.ns, scale), &autoscalingv1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.Scale), err +} + +// ApplyScale takes top resource name and the apply declarative configuration for scale, +// applies it and returns the applied scale, and an error, if there is any. +func (c *FakeDeployments) ApplyScale(ctx context.Context, deploymentName string, scale *applyconfigurationsautoscalingv1.ScaleApplyConfiguration, opts v1.ApplyOptions) (result *autoscalingv1.Scale, err error) { + if scale == nil { + return nil, fmt.Errorf("scale provided to ApplyScale must not be nil") + } + data, err := json.Marshal(scale) + if err != nil { + return nil, err + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, deploymentName, types.ApplyPatchType, data, "status"), &autoscalingv1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.Scale), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go new file mode 100644 index 0000000000..39acfafeb2 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go @@ -0,0 +1,233 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + appsv1 "k8s.io/api/apps/v1" + autoscalingv1 "k8s.io/api/autoscaling/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsappsv1 "k8s.io/client-go/applyconfigurations/apps/v1" + applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" + testing "k8s.io/client-go/testing" +) + +// FakeReplicaSets implements ReplicaSetInterface +type FakeReplicaSets struct { + Fake *FakeAppsV1 + ns string +} + +var replicasetsResource = schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "replicasets"} + +var replicasetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ReplicaSet"} + +// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. +func (c *FakeReplicaSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *appsv1.ReplicaSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &appsv1.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.ReplicaSet), err +} + +// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. +func (c *FakeReplicaSets) List(ctx context.Context, opts v1.ListOptions) (result *appsv1.ReplicaSetList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), &appsv1.ReplicaSetList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &appsv1.ReplicaSetList{ListMeta: obj.(*appsv1.ReplicaSetList).ListMeta} + for _, item := range obj.(*appsv1.ReplicaSetList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested replicaSets. +func (c *FakeReplicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(replicasetsResource, c.ns, opts)) + +} + +// Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. +func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *appsv1.ReplicaSet, opts v1.CreateOptions) (result *appsv1.ReplicaSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &appsv1.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.ReplicaSet), err +} + +// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. +func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *appsv1.ReplicaSet, opts v1.UpdateOptions) (result *appsv1.ReplicaSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &appsv1.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.ReplicaSet), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *appsv1.ReplicaSet, opts v1.UpdateOptions) (*appsv1.ReplicaSet, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &appsv1.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.ReplicaSet), err +} + +// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. +func (c *FakeReplicaSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(replicasetsResource, c.ns, name, opts), &appsv1.ReplicaSet{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &appsv1.ReplicaSetList{}) + return err +} + +// Patch applies the patch and returns the patched replicaSet. +func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1.ReplicaSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), &appsv1.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.ReplicaSet), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied replicaSet. +func (c *FakeReplicaSets) Apply(ctx context.Context, replicaSet *applyconfigurationsappsv1.ReplicaSetApplyConfiguration, opts v1.ApplyOptions) (result *appsv1.ReplicaSet, err error) { + if replicaSet == nil { + return nil, fmt.Errorf("replicaSet provided to Apply must not be nil") + } + data, err := json.Marshal(replicaSet) + if err != nil { + return nil, err + } + name := replicaSet.Name + if name == nil { + return nil, fmt.Errorf("replicaSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, *name, types.ApplyPatchType, data), &appsv1.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.ReplicaSet), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeReplicaSets) ApplyStatus(ctx context.Context, replicaSet *applyconfigurationsappsv1.ReplicaSetApplyConfiguration, opts v1.ApplyOptions) (result *appsv1.ReplicaSet, err error) { + if replicaSet == nil { + return nil, fmt.Errorf("replicaSet provided to Apply must not be nil") + } + data, err := json.Marshal(replicaSet) + if err != nil { + return nil, err + } + name := replicaSet.Name + if name == nil { + return nil, fmt.Errorf("replicaSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &appsv1.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.ReplicaSet), err +} + +// GetScale takes name of the replicaSet, and returns the corresponding scale object, and an error if there is any. +func (c *FakeReplicaSets) GetScale(ctx context.Context, replicaSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetSubresourceAction(replicasetsResource, c.ns, "scale", replicaSetName), &autoscalingv1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.Scale), err +} + +// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. +func (c *FakeReplicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "scale", c.ns, scale), &autoscalingv1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.Scale), err +} + +// ApplyScale takes top resource name and the apply declarative configuration for scale, +// applies it and returns the applied scale, and an error, if there is any. +func (c *FakeReplicaSets) ApplyScale(ctx context.Context, replicaSetName string, scale *applyconfigurationsautoscalingv1.ScaleApplyConfiguration, opts v1.ApplyOptions) (result *autoscalingv1.Scale, err error) { + if scale == nil { + return nil, fmt.Errorf("scale provided to ApplyScale must not be nil") + } + data, err := json.Marshal(scale) + if err != nil { + return nil, err + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, replicaSetName, types.ApplyPatchType, data, "status"), &autoscalingv1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.Scale), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go new file mode 100644 index 0000000000..e04eb025d4 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go @@ -0,0 +1,233 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + appsv1 "k8s.io/api/apps/v1" + autoscalingv1 "k8s.io/api/autoscaling/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsappsv1 "k8s.io/client-go/applyconfigurations/apps/v1" + applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" + testing "k8s.io/client-go/testing" +) + +// FakeStatefulSets implements StatefulSetInterface +type FakeStatefulSets struct { + Fake *FakeAppsV1 + ns string +} + +var statefulsetsResource = schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "statefulsets"} + +var statefulsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "StatefulSet"} + +// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. +func (c *FakeStatefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *appsv1.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &appsv1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.StatefulSet), err +} + +// List takes label and field selectors, and returns the list of StatefulSets that match those selectors. +func (c *FakeStatefulSets) List(ctx context.Context, opts v1.ListOptions) (result *appsv1.StatefulSetList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &appsv1.StatefulSetList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &appsv1.StatefulSetList{ListMeta: obj.(*appsv1.StatefulSetList).ListMeta} + for _, item := range obj.(*appsv1.StatefulSetList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested statefulSets. +func (c *FakeStatefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(statefulsetsResource, c.ns, opts)) + +} + +// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. +func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *appsv1.StatefulSet, opts v1.CreateOptions) (result *appsv1.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &appsv1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.StatefulSet), err +} + +// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. +func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *appsv1.StatefulSet, opts v1.UpdateOptions) (result *appsv1.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &appsv1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.StatefulSet), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *appsv1.StatefulSet, opts v1.UpdateOptions) (*appsv1.StatefulSet, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &appsv1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.StatefulSet), err +} + +// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. +func (c *FakeStatefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(statefulsetsResource, c.ns, name, opts), &appsv1.StatefulSet{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &appsv1.StatefulSetList{}) + return err +} + +// Patch applies the patch and returns the patched statefulSet. +func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &appsv1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.StatefulSet), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied statefulSet. +func (c *FakeStatefulSets) Apply(ctx context.Context, statefulSet *applyconfigurationsappsv1.StatefulSetApplyConfiguration, opts v1.ApplyOptions) (result *appsv1.StatefulSet, err error) { + if statefulSet == nil { + return nil, fmt.Errorf("statefulSet provided to Apply must not be nil") + } + data, err := json.Marshal(statefulSet) + if err != nil { + return nil, err + } + name := statefulSet.Name + if name == nil { + return nil, fmt.Errorf("statefulSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data), &appsv1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.StatefulSet), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeStatefulSets) ApplyStatus(ctx context.Context, statefulSet *applyconfigurationsappsv1.StatefulSetApplyConfiguration, opts v1.ApplyOptions) (result *appsv1.StatefulSet, err error) { + if statefulSet == nil { + return nil, fmt.Errorf("statefulSet provided to Apply must not be nil") + } + data, err := json.Marshal(statefulSet) + if err != nil { + return nil, err + } + name := statefulSet.Name + if name == nil { + return nil, fmt.Errorf("statefulSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &appsv1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*appsv1.StatefulSet), err +} + +// GetScale takes name of the statefulSet, and returns the corresponding scale object, and an error if there is any. +func (c *FakeStatefulSets) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetSubresourceAction(statefulsetsResource, c.ns, "scale", statefulSetName), &autoscalingv1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.Scale), err +} + +// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. +func (c *FakeStatefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "scale", c.ns, scale), &autoscalingv1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.Scale), err +} + +// ApplyScale takes top resource name and the apply declarative configuration for scale, +// applies it and returns the applied scale, and an error, if there is any. +func (c *FakeStatefulSets) ApplyScale(ctx context.Context, statefulSetName string, scale *applyconfigurationsautoscalingv1.ScaleApplyConfiguration, opts v1.ApplyOptions) (result *autoscalingv1.Scale, err error) { + if scale == nil { + return nil, fmt.Errorf("scale provided to ApplyScale must not be nil") + } + data, err := json.Marshal(scale) + if err != nil { + return nil, err + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, statefulSetName, types.ApplyPatchType, data, "status"), &autoscalingv1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.Scale), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_apps_client.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_apps_client.go new file mode 100644 index 0000000000..8e65d78d29 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_apps_client.go @@ -0,0 +1,48 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAppsV1beta1 struct { + *testing.Fake +} + +func (c *FakeAppsV1beta1) ControllerRevisions(namespace string) v1beta1.ControllerRevisionInterface { + return &FakeControllerRevisions{c, namespace} +} + +func (c *FakeAppsV1beta1) Deployments(namespace string) v1beta1.DeploymentInterface { + return &FakeDeployments{c, namespace} +} + +func (c *FakeAppsV1beta1) StatefulSets(namespace string) v1beta1.StatefulSetInterface { + return &FakeStatefulSets{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAppsV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go new file mode 100644 index 0000000000..a4fb08c903 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/apps/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + appsv1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeControllerRevisions implements ControllerRevisionInterface +type FakeControllerRevisions struct { + Fake *FakeAppsV1beta1 + ns string +} + +var controllerrevisionsResource = schema.GroupVersionResource{Group: "apps", Version: "v1beta1", Resource: "controllerrevisions"} + +var controllerrevisionsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta1", Kind: "ControllerRevision"} + +// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any. +func (c *FakeControllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ControllerRevision, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &v1beta1.ControllerRevision{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ControllerRevision), err +} + +// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. +func (c *FakeControllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &v1beta1.ControllerRevisionList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.ControllerRevisionList{ListMeta: obj.(*v1beta1.ControllerRevisionList).ListMeta} + for _, item := range obj.(*v1beta1.ControllerRevisionList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested controllerRevisions. +func (c *FakeControllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(controllerrevisionsResource, c.ns, opts)) + +} + +// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. +func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.CreateOptions) (result *v1beta1.ControllerRevision, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta1.ControllerRevision{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ControllerRevision), err +} + +// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. +func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.UpdateOptions) (result *v1beta1.ControllerRevision, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta1.ControllerRevision{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ControllerRevision), err +} + +// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. +func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(controllerrevisionsResource, c.ns, name, opts), &v1beta1.ControllerRevision{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.ControllerRevisionList{}) + return err +} + +// Patch applies the patch and returns the patched controllerRevision. +func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ControllerRevision, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &v1beta1.ControllerRevision{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ControllerRevision), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied controllerRevision. +func (c *FakeControllerRevisions) Apply(ctx context.Context, controllerRevision *appsv1beta1.ControllerRevisionApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ControllerRevision, err error) { + if controllerRevision == nil { + return nil, fmt.Errorf("controllerRevision provided to Apply must not be nil") + } + data, err := json.Marshal(controllerRevision) + if err != nil { + return nil, err + } + name := controllerRevision.Name + if name == nil { + return nil, fmt.Errorf("controllerRevision.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.ControllerRevision{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ControllerRevision), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go new file mode 100644 index 0000000000..2db29b4814 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/apps/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + appsv1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeDeployments implements DeploymentInterface +type FakeDeployments struct { + Fake *FakeAppsV1beta1 + ns string +} + +var deploymentsResource = schema.GroupVersionResource{Group: "apps", Version: "v1beta1", Resource: "deployments"} + +var deploymentsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta1", Kind: "Deployment"} + +// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. +func (c *FakeDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Deployment), err +} + +// List takes label and field selectors, and returns the list of Deployments that match those selectors. +func (c *FakeDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &v1beta1.DeploymentList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.DeploymentList{ListMeta: obj.(*v1beta1.DeploymentList).ListMeta} + for _, item := range obj.(*v1beta1.DeploymentList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested deployments. +func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(deploymentsResource, c.ns, opts)) + +} + +// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. +func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (result *v1beta1.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Deployment), err +} + +// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. +func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Deployment), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Deployment), err +} + +// Delete takes name of the deployment and deletes it. Returns an error if one occurs. +func (c *FakeDeployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(deploymentsResource, c.ns, name, opts), &v1beta1.Deployment{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.DeploymentList{}) + return err +} + +// Patch applies the patch and returns the patched deployment. +func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &v1beta1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Deployment), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied deployment. +func (c *FakeDeployments) Apply(ctx context.Context, deployment *appsv1beta1.DeploymentApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Deployment, err error) { + if deployment == nil { + return nil, fmt.Errorf("deployment provided to Apply must not be nil") + } + data, err := json.Marshal(deployment) + if err != nil { + return nil, err + } + name := deployment.Name + if name == nil { + return nil, fmt.Errorf("deployment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Deployment), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeDeployments) ApplyStatus(ctx context.Context, deployment *appsv1beta1.DeploymentApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Deployment, err error) { + if deployment == nil { + return nil, fmt.Errorf("deployment provided to Apply must not be nil") + } + data, err := json.Marshal(deployment) + if err != nil { + return nil, err + } + name := deployment.Name + if name == nil { + return nil, fmt.Errorf("deployment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Deployment), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go new file mode 100644 index 0000000000..b756a3239c --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/apps/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + appsv1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeStatefulSets implements StatefulSetInterface +type FakeStatefulSets struct { + Fake *FakeAppsV1beta1 + ns string +} + +var statefulsetsResource = schema.GroupVersionResource{Group: "apps", Version: "v1beta1", Resource: "statefulsets"} + +var statefulsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta1", Kind: "StatefulSet"} + +// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. +func (c *FakeStatefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &v1beta1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StatefulSet), err +} + +// List takes label and field selectors, and returns the list of StatefulSets that match those selectors. +func (c *FakeStatefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &v1beta1.StatefulSetList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.StatefulSetList{ListMeta: obj.(*v1beta1.StatefulSetList).ListMeta} + for _, item := range obj.(*v1beta1.StatefulSetList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested statefulSets. +func (c *FakeStatefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(statefulsetsResource, c.ns, opts)) + +} + +// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. +func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.CreateOptions) (result *v1beta1.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &v1beta1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StatefulSet), err +} + +// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. +func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (result *v1beta1.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &v1beta1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StatefulSet), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (*v1beta1.StatefulSet, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &v1beta1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StatefulSet), err +} + +// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. +func (c *FakeStatefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(statefulsetsResource, c.ns, name, opts), &v1beta1.StatefulSet{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.StatefulSetList{}) + return err +} + +// Patch applies the patch and returns the patched statefulSet. +func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &v1beta1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StatefulSet), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied statefulSet. +func (c *FakeStatefulSets) Apply(ctx context.Context, statefulSet *appsv1beta1.StatefulSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.StatefulSet, err error) { + if statefulSet == nil { + return nil, fmt.Errorf("statefulSet provided to Apply must not be nil") + } + data, err := json.Marshal(statefulSet) + if err != nil { + return nil, err + } + name := statefulSet.Name + if name == nil { + return nil, fmt.Errorf("statefulSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StatefulSet), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeStatefulSets) ApplyStatus(ctx context.Context, statefulSet *appsv1beta1.StatefulSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.StatefulSet, err error) { + if statefulSet == nil { + return nil, fmt.Errorf("statefulSet provided to Apply must not be nil") + } + data, err := json.Marshal(statefulSet) + if err != nil { + return nil, err + } + name := statefulSet.Name + if name == nil { + return nil, fmt.Errorf("statefulSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StatefulSet), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_apps_client.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_apps_client.go new file mode 100644 index 0000000000..0ec34a2cdb --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_apps_client.go @@ -0,0 +1,56 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAppsV1beta2 struct { + *testing.Fake +} + +func (c *FakeAppsV1beta2) ControllerRevisions(namespace string) v1beta2.ControllerRevisionInterface { + return &FakeControllerRevisions{c, namespace} +} + +func (c *FakeAppsV1beta2) DaemonSets(namespace string) v1beta2.DaemonSetInterface { + return &FakeDaemonSets{c, namespace} +} + +func (c *FakeAppsV1beta2) Deployments(namespace string) v1beta2.DeploymentInterface { + return &FakeDeployments{c, namespace} +} + +func (c *FakeAppsV1beta2) ReplicaSets(namespace string) v1beta2.ReplicaSetInterface { + return &FakeReplicaSets{c, namespace} +} + +func (c *FakeAppsV1beta2) StatefulSets(namespace string) v1beta2.StatefulSetInterface { + return &FakeStatefulSets{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAppsV1beta2) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go new file mode 100644 index 0000000000..f3d71bf77e --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta2 "k8s.io/api/apps/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" + testing "k8s.io/client-go/testing" +) + +// FakeControllerRevisions implements ControllerRevisionInterface +type FakeControllerRevisions struct { + Fake *FakeAppsV1beta2 + ns string +} + +var controllerrevisionsResource = schema.GroupVersionResource{Group: "apps", Version: "v1beta2", Resource: "controllerrevisions"} + +var controllerrevisionsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "ControllerRevision"} + +// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any. +func (c *FakeControllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ControllerRevision, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &v1beta2.ControllerRevision{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.ControllerRevision), err +} + +// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. +func (c *FakeControllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &v1beta2.ControllerRevisionList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta2.ControllerRevisionList{ListMeta: obj.(*v1beta2.ControllerRevisionList).ListMeta} + for _, item := range obj.(*v1beta2.ControllerRevisionList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested controllerRevisions. +func (c *FakeControllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(controllerrevisionsResource, c.ns, opts)) + +} + +// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. +func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.CreateOptions) (result *v1beta2.ControllerRevision, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta2.ControllerRevision{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.ControllerRevision), err +} + +// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. +func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.UpdateOptions) (result *v1beta2.ControllerRevision, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta2.ControllerRevision{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.ControllerRevision), err +} + +// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. +func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(controllerrevisionsResource, c.ns, name, opts), &v1beta2.ControllerRevision{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta2.ControllerRevisionList{}) + return err +} + +// Patch applies the patch and returns the patched controllerRevision. +func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ControllerRevision, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &v1beta2.ControllerRevision{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.ControllerRevision), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied controllerRevision. +func (c *FakeControllerRevisions) Apply(ctx context.Context, controllerRevision *appsv1beta2.ControllerRevisionApplyConfiguration, opts v1.ApplyOptions) (result *v1beta2.ControllerRevision, err error) { + if controllerRevision == nil { + return nil, fmt.Errorf("controllerRevision provided to Apply must not be nil") + } + data, err := json.Marshal(controllerRevision) + if err != nil { + return nil, err + } + name := controllerRevision.Name + if name == nil { + return nil, fmt.Errorf("controllerRevision.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta2.ControllerRevision{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.ControllerRevision), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go new file mode 100644 index 0000000000..3ee0f7239c --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta2 "k8s.io/api/apps/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" + testing "k8s.io/client-go/testing" +) + +// FakeDaemonSets implements DaemonSetInterface +type FakeDaemonSets struct { + Fake *FakeAppsV1beta2 + ns string +} + +var daemonsetsResource = schema.GroupVersionResource{Group: "apps", Version: "v1beta2", Resource: "daemonsets"} + +var daemonsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "DaemonSet"} + +// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. +func (c *FakeDaemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &v1beta2.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.DaemonSet), err +} + +// List takes label and field selectors, and returns the list of DaemonSets that match those selectors. +func (c *FakeDaemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &v1beta2.DaemonSetList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta2.DaemonSetList{ListMeta: obj.(*v1beta2.DaemonSetList).ListMeta} + for _, item := range obj.(*v1beta2.DaemonSetList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested daemonSets. +func (c *FakeDaemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(daemonsetsResource, c.ns, opts)) + +} + +// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. +func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.CreateOptions) (result *v1beta2.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &v1beta2.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.DaemonSet), err +} + +// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. +func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (result *v1beta2.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &v1beta2.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.DaemonSet), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (*v1beta2.DaemonSet, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &v1beta2.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.DaemonSet), err +} + +// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. +func (c *FakeDaemonSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(daemonsetsResource, c.ns, name, opts), &v1beta2.DaemonSet{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta2.DaemonSetList{}) + return err +} + +// Patch applies the patch and returns the patched daemonSet. +func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), &v1beta2.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.DaemonSet), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied daemonSet. +func (c *FakeDaemonSets) Apply(ctx context.Context, daemonSet *appsv1beta2.DaemonSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta2.DaemonSet, err error) { + if daemonSet == nil { + return nil, fmt.Errorf("daemonSet provided to Apply must not be nil") + } + data, err := json.Marshal(daemonSet) + if err != nil { + return nil, err + } + name := daemonSet.Name + if name == nil { + return nil, fmt.Errorf("daemonSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta2.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.DaemonSet), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeDaemonSets) ApplyStatus(ctx context.Context, daemonSet *appsv1beta2.DaemonSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta2.DaemonSet, err error) { + if daemonSet == nil { + return nil, fmt.Errorf("daemonSet provided to Apply must not be nil") + } + data, err := json.Marshal(daemonSet) + if err != nil { + return nil, err + } + name := daemonSet.Name + if name == nil { + return nil, fmt.Errorf("daemonSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta2.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.DaemonSet), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go new file mode 100644 index 0000000000..38fb2a67c7 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta2 "k8s.io/api/apps/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" + testing "k8s.io/client-go/testing" +) + +// FakeDeployments implements DeploymentInterface +type FakeDeployments struct { + Fake *FakeAppsV1beta2 + ns string +} + +var deploymentsResource = schema.GroupVersionResource{Group: "apps", Version: "v1beta2", Resource: "deployments"} + +var deploymentsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "Deployment"} + +// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. +func (c *FakeDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &v1beta2.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.Deployment), err +} + +// List takes label and field selectors, and returns the list of Deployments that match those selectors. +func (c *FakeDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &v1beta2.DeploymentList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta2.DeploymentList{ListMeta: obj.(*v1beta2.DeploymentList).ListMeta} + for _, item := range obj.(*v1beta2.DeploymentList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested deployments. +func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(deploymentsResource, c.ns, opts)) + +} + +// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. +func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta2.Deployment, opts v1.CreateOptions) (result *v1beta2.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta2.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.Deployment), err +} + +// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. +func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (result *v1beta2.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta2.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.Deployment), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (*v1beta2.Deployment, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta2.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.Deployment), err +} + +// Delete takes name of the deployment and deletes it. Returns an error if one occurs. +func (c *FakeDeployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(deploymentsResource, c.ns, name, opts), &v1beta2.Deployment{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta2.DeploymentList{}) + return err +} + +// Patch applies the patch and returns the patched deployment. +func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &v1beta2.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.Deployment), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied deployment. +func (c *FakeDeployments) Apply(ctx context.Context, deployment *appsv1beta2.DeploymentApplyConfiguration, opts v1.ApplyOptions) (result *v1beta2.Deployment, err error) { + if deployment == nil { + return nil, fmt.Errorf("deployment provided to Apply must not be nil") + } + data, err := json.Marshal(deployment) + if err != nil { + return nil, err + } + name := deployment.Name + if name == nil { + return nil, fmt.Errorf("deployment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta2.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.Deployment), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeDeployments) ApplyStatus(ctx context.Context, deployment *appsv1beta2.DeploymentApplyConfiguration, opts v1.ApplyOptions) (result *v1beta2.Deployment, err error) { + if deployment == nil { + return nil, fmt.Errorf("deployment provided to Apply must not be nil") + } + data, err := json.Marshal(deployment) + if err != nil { + return nil, err + } + name := deployment.Name + if name == nil { + return nil, fmt.Errorf("deployment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta2.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.Deployment), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go new file mode 100644 index 0000000000..2fb89cee07 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta2 "k8s.io/api/apps/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" + testing "k8s.io/client-go/testing" +) + +// FakeReplicaSets implements ReplicaSetInterface +type FakeReplicaSets struct { + Fake *FakeAppsV1beta2 + ns string +} + +var replicasetsResource = schema.GroupVersionResource{Group: "apps", Version: "v1beta2", Resource: "replicasets"} + +var replicasetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "ReplicaSet"} + +// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. +func (c *FakeReplicaSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ReplicaSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &v1beta2.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.ReplicaSet), err +} + +// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. +func (c *FakeReplicaSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), &v1beta2.ReplicaSetList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta2.ReplicaSetList{ListMeta: obj.(*v1beta2.ReplicaSetList).ListMeta} + for _, item := range obj.(*v1beta2.ReplicaSetList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested replicaSets. +func (c *FakeReplicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(replicasetsResource, c.ns, opts)) + +} + +// Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. +func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.CreateOptions) (result *v1beta2.ReplicaSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &v1beta2.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.ReplicaSet), err +} + +// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. +func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (result *v1beta2.ReplicaSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &v1beta2.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.ReplicaSet), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (*v1beta2.ReplicaSet, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &v1beta2.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.ReplicaSet), err +} + +// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. +func (c *FakeReplicaSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(replicasetsResource, c.ns, name, opts), &v1beta2.ReplicaSet{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta2.ReplicaSetList{}) + return err +} + +// Patch applies the patch and returns the patched replicaSet. +func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ReplicaSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), &v1beta2.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.ReplicaSet), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied replicaSet. +func (c *FakeReplicaSets) Apply(ctx context.Context, replicaSet *appsv1beta2.ReplicaSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta2.ReplicaSet, err error) { + if replicaSet == nil { + return nil, fmt.Errorf("replicaSet provided to Apply must not be nil") + } + data, err := json.Marshal(replicaSet) + if err != nil { + return nil, err + } + name := replicaSet.Name + if name == nil { + return nil, fmt.Errorf("replicaSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta2.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.ReplicaSet), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeReplicaSets) ApplyStatus(ctx context.Context, replicaSet *appsv1beta2.ReplicaSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta2.ReplicaSet, err error) { + if replicaSet == nil { + return nil, fmt.Errorf("replicaSet provided to Apply must not be nil") + } + data, err := json.Marshal(replicaSet) + if err != nil { + return nil, err + } + name := replicaSet.Name + if name == nil { + return nil, fmt.Errorf("replicaSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta2.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.ReplicaSet), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go new file mode 100644 index 0000000000..cc9903c0f5 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go @@ -0,0 +1,231 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta2 "k8s.io/api/apps/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" + testing "k8s.io/client-go/testing" +) + +// FakeStatefulSets implements StatefulSetInterface +type FakeStatefulSets struct { + Fake *FakeAppsV1beta2 + ns string +} + +var statefulsetsResource = schema.GroupVersionResource{Group: "apps", Version: "v1beta2", Resource: "statefulsets"} + +var statefulsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "StatefulSet"} + +// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. +func (c *FakeStatefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &v1beta2.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.StatefulSet), err +} + +// List takes label and field selectors, and returns the list of StatefulSets that match those selectors. +func (c *FakeStatefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &v1beta2.StatefulSetList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta2.StatefulSetList{ListMeta: obj.(*v1beta2.StatefulSetList).ListMeta} + for _, item := range obj.(*v1beta2.StatefulSetList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested statefulSets. +func (c *FakeStatefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(statefulsetsResource, c.ns, opts)) + +} + +// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. +func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.CreateOptions) (result *v1beta2.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &v1beta2.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.StatefulSet), err +} + +// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. +func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (result *v1beta2.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &v1beta2.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.StatefulSet), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (*v1beta2.StatefulSet, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &v1beta2.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.StatefulSet), err +} + +// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. +func (c *FakeStatefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(statefulsetsResource, c.ns, name, opts), &v1beta2.StatefulSet{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta2.StatefulSetList{}) + return err +} + +// Patch applies the patch and returns the patched statefulSet. +func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.StatefulSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &v1beta2.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.StatefulSet), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied statefulSet. +func (c *FakeStatefulSets) Apply(ctx context.Context, statefulSet *appsv1beta2.StatefulSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta2.StatefulSet, err error) { + if statefulSet == nil { + return nil, fmt.Errorf("statefulSet provided to Apply must not be nil") + } + data, err := json.Marshal(statefulSet) + if err != nil { + return nil, err + } + name := statefulSet.Name + if name == nil { + return nil, fmt.Errorf("statefulSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta2.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.StatefulSet), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeStatefulSets) ApplyStatus(ctx context.Context, statefulSet *appsv1beta2.StatefulSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta2.StatefulSet, err error) { + if statefulSet == nil { + return nil, fmt.Errorf("statefulSet provided to Apply must not be nil") + } + data, err := json.Marshal(statefulSet) + if err != nil { + return nil, err + } + name := statefulSet.Name + if name == nil { + return nil, fmt.Errorf("statefulSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta2.StatefulSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.StatefulSet), err +} + +// GetScale takes name of the statefulSet, and returns the corresponding scale object, and an error if there is any. +func (c *FakeStatefulSets) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (result *v1beta2.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetSubresourceAction(statefulsetsResource, c.ns, "scale", statefulSetName), &v1beta2.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.Scale), err +} + +// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. +func (c *FakeStatefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *v1beta2.Scale, opts v1.UpdateOptions) (result *v1beta2.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "scale", c.ns, scale), &v1beta2.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.Scale), err +} + +// ApplyScale takes top resource name and the apply declarative configuration for scale, +// applies it and returns the applied scale, and an error, if there is any. +func (c *FakeStatefulSets) ApplyScale(ctx context.Context, statefulSetName string, scale *appsv1beta2.ScaleApplyConfiguration, opts v1.ApplyOptions) (result *v1beta2.Scale, err error) { + if scale == nil { + return nil, fmt.Errorf("scale provided to ApplyScale must not be nil") + } + data, err := json.Marshal(scale) + if err != nil { + return nil, err + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, statefulSetName, types.ApplyPatchType, data, "status"), &v1beta2.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta2.Scale), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_authentication_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_authentication_client.go new file mode 100644 index 0000000000..ee06a6cdd6 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_authentication_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/authentication/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAuthenticationV1 struct { + *testing.Fake +} + +func (c *FakeAuthenticationV1) TokenReviews() v1.TokenReviewInterface { + return &FakeTokenReviews{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAuthenticationV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go new file mode 100644 index 0000000000..b85fcfbb87 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go @@ -0,0 +1,47 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeTokenReviews implements TokenReviewInterface +type FakeTokenReviews struct { + Fake *FakeAuthenticationV1 +} + +var tokenreviewsResource = schema.GroupVersionResource{Group: "authentication.k8s.io", Version: "v1", Resource: "tokenreviews"} + +var tokenreviewsKind = schema.GroupVersionKind{Group: "authentication.k8s.io", Version: "v1", Kind: "TokenReview"} + +// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any. +func (c *FakeTokenReviews) Create(ctx context.Context, tokenReview *v1.TokenReview, opts metav1.CreateOptions) (result *v1.TokenReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(tokenreviewsResource, tokenReview), &v1.TokenReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1.TokenReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1alpha1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1alpha1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1alpha1/fake/fake_authentication_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1alpha1/fake/fake_authentication_client.go new file mode 100644 index 0000000000..1a1a04f41e --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1alpha1/fake/fake_authentication_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "k8s.io/client-go/kubernetes/typed/authentication/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAuthenticationV1alpha1 struct { + *testing.Fake +} + +func (c *FakeAuthenticationV1alpha1) SelfSubjectReviews() v1alpha1.SelfSubjectReviewInterface { + return &FakeSelfSubjectReviews{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAuthenticationV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1alpha1/fake/fake_selfsubjectreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1alpha1/fake/fake_selfsubjectreview.go new file mode 100644 index 0000000000..6bb1c2508e --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1alpha1/fake/fake_selfsubjectreview.go @@ -0,0 +1,47 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "k8s.io/api/authentication/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeSelfSubjectReviews implements SelfSubjectReviewInterface +type FakeSelfSubjectReviews struct { + Fake *FakeAuthenticationV1alpha1 +} + +var selfsubjectreviewsResource = schema.GroupVersionResource{Group: "authentication.k8s.io", Version: "v1alpha1", Resource: "selfsubjectreviews"} + +var selfsubjectreviewsKind = schema.GroupVersionKind{Group: "authentication.k8s.io", Version: "v1alpha1", Kind: "SelfSubjectReview"} + +// Create takes the representation of a selfSubjectReview and creates it. Returns the server's representation of the selfSubjectReview, and an error, if there is any. +func (c *FakeSelfSubjectReviews) Create(ctx context.Context, selfSubjectReview *v1alpha1.SelfSubjectReview, opts v1.CreateOptions) (result *v1alpha1.SelfSubjectReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(selfsubjectreviewsResource, selfSubjectReview), &v1alpha1.SelfSubjectReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SelfSubjectReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_authentication_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_authentication_client.go new file mode 100644 index 0000000000..7299653ca2 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_authentication_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAuthenticationV1beta1 struct { + *testing.Fake +} + +func (c *FakeAuthenticationV1beta1) TokenReviews() v1beta1.TokenReviewInterface { + return &FakeTokenReviews{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAuthenticationV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go new file mode 100644 index 0000000000..0da3ec6f43 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go @@ -0,0 +1,47 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta1 "k8s.io/api/authentication/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeTokenReviews implements TokenReviewInterface +type FakeTokenReviews struct { + Fake *FakeAuthenticationV1beta1 +} + +var tokenreviewsResource = schema.GroupVersionResource{Group: "authentication.k8s.io", Version: "v1beta1", Resource: "tokenreviews"} + +var tokenreviewsKind = schema.GroupVersionKind{Group: "authentication.k8s.io", Version: "v1beta1", Kind: "TokenReview"} + +// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any. +func (c *FakeTokenReviews) Create(ctx context.Context, tokenReview *v1beta1.TokenReview, opts v1.CreateOptions) (result *v1beta1.TokenReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(tokenreviewsResource, tokenReview), &v1beta1.TokenReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.TokenReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_authorization_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_authorization_client.go new file mode 100644 index 0000000000..f7e8234509 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_authorization_client.go @@ -0,0 +1,52 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/authorization/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAuthorizationV1 struct { + *testing.Fake +} + +func (c *FakeAuthorizationV1) LocalSubjectAccessReviews(namespace string) v1.LocalSubjectAccessReviewInterface { + return &FakeLocalSubjectAccessReviews{c, namespace} +} + +func (c *FakeAuthorizationV1) SelfSubjectAccessReviews() v1.SelfSubjectAccessReviewInterface { + return &FakeSelfSubjectAccessReviews{c} +} + +func (c *FakeAuthorizationV1) SelfSubjectRulesReviews() v1.SelfSubjectRulesReviewInterface { + return &FakeSelfSubjectRulesReviews{c} +} + +func (c *FakeAuthorizationV1) SubjectAccessReviews() v1.SubjectAccessReviewInterface { + return &FakeSubjectAccessReviews{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAuthorizationV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go new file mode 100644 index 0000000000..d74ae0a474 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go @@ -0,0 +1,49 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeLocalSubjectAccessReviews implements LocalSubjectAccessReviewInterface +type FakeLocalSubjectAccessReviews struct { + Fake *FakeAuthorizationV1 + ns string +} + +var localsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1", Resource: "localsubjectaccessreviews"} + +var localsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "LocalSubjectAccessReview"} + +// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any. +func (c *FakeLocalSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview, opts metav1.CreateOptions) (result *v1.LocalSubjectAccessReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(localsubjectaccessreviewsResource, c.ns, localSubjectAccessReview), &v1.LocalSubjectAccessReview{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.LocalSubjectAccessReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go new file mode 100644 index 0000000000..80ebbbd45f --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go @@ -0,0 +1,47 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeSelfSubjectAccessReviews implements SelfSubjectAccessReviewInterface +type FakeSelfSubjectAccessReviews struct { + Fake *FakeAuthorizationV1 +} + +var selfsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1", Resource: "selfsubjectaccessreviews"} + +var selfsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SelfSubjectAccessReview"} + +// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any. +func (c *FakeSelfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview, opts metav1.CreateOptions) (result *v1.SelfSubjectAccessReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(selfsubjectaccessreviewsResource, selfSubjectAccessReview), &v1.SelfSubjectAccessReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1.SelfSubjectAccessReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go new file mode 100644 index 0000000000..dd70908ad3 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go @@ -0,0 +1,47 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface +type FakeSelfSubjectRulesReviews struct { + Fake *FakeAuthorizationV1 +} + +var selfsubjectrulesreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1", Resource: "selfsubjectrulesreviews"} + +var selfsubjectrulesreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SelfSubjectRulesReview"} + +// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any. +func (c *FakeSelfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview, opts metav1.CreateOptions) (result *v1.SelfSubjectRulesReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(selfsubjectrulesreviewsResource, selfSubjectRulesReview), &v1.SelfSubjectRulesReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1.SelfSubjectRulesReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go new file mode 100644 index 0000000000..b480b2b418 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go @@ -0,0 +1,47 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeSubjectAccessReviews implements SubjectAccessReviewInterface +type FakeSubjectAccessReviews struct { + Fake *FakeAuthorizationV1 +} + +var subjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1", Resource: "subjectaccessreviews"} + +var subjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SubjectAccessReview"} + +// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any. +func (c *FakeSubjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.CreateOptions) (result *v1.SubjectAccessReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(subjectaccessreviewsResource, subjectAccessReview), &v1.SubjectAccessReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1.SubjectAccessReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_authorization_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_authorization_client.go new file mode 100644 index 0000000000..8e328a57bc --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_authorization_client.go @@ -0,0 +1,52 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAuthorizationV1beta1 struct { + *testing.Fake +} + +func (c *FakeAuthorizationV1beta1) LocalSubjectAccessReviews(namespace string) v1beta1.LocalSubjectAccessReviewInterface { + return &FakeLocalSubjectAccessReviews{c, namespace} +} + +func (c *FakeAuthorizationV1beta1) SelfSubjectAccessReviews() v1beta1.SelfSubjectAccessReviewInterface { + return &FakeSelfSubjectAccessReviews{c} +} + +func (c *FakeAuthorizationV1beta1) SelfSubjectRulesReviews() v1beta1.SelfSubjectRulesReviewInterface { + return &FakeSelfSubjectRulesReviews{c} +} + +func (c *FakeAuthorizationV1beta1) SubjectAccessReviews() v1beta1.SubjectAccessReviewInterface { + return &FakeSubjectAccessReviews{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAuthorizationV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go new file mode 100644 index 0000000000..2d3ba44628 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go @@ -0,0 +1,49 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeLocalSubjectAccessReviews implements LocalSubjectAccessReviewInterface +type FakeLocalSubjectAccessReviews struct { + Fake *FakeAuthorizationV1beta1 + ns string +} + +var localsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "localsubjectaccessreviews"} + +var localsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "LocalSubjectAccessReview"} + +// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any. +func (c *FakeLocalSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1beta1.LocalSubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.LocalSubjectAccessReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(localsubjectaccessreviewsResource, c.ns, localSubjectAccessReview), &v1beta1.LocalSubjectAccessReview{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.LocalSubjectAccessReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go new file mode 100644 index 0000000000..febe90c77a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go @@ -0,0 +1,47 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeSelfSubjectAccessReviews implements SelfSubjectAccessReviewInterface +type FakeSelfSubjectAccessReviews struct { + Fake *FakeAuthorizationV1beta1 +} + +var selfsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "selfsubjectaccessreviews"} + +var selfsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "SelfSubjectAccessReview"} + +// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any. +func (c *FakeSelfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectAccessReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(selfsubjectaccessreviewsResource, selfSubjectAccessReview), &v1beta1.SelfSubjectAccessReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.SelfSubjectAccessReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go new file mode 100644 index 0000000000..02df06012a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go @@ -0,0 +1,47 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface +type FakeSelfSubjectRulesReviews struct { + Fake *FakeAuthorizationV1beta1 +} + +var selfsubjectrulesreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "selfsubjectrulesreviews"} + +var selfsubjectrulesreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "SelfSubjectRulesReview"} + +// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any. +func (c *FakeSelfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectRulesReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(selfsubjectrulesreviewsResource, selfSubjectRulesReview), &v1beta1.SelfSubjectRulesReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.SelfSubjectRulesReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go new file mode 100644 index 0000000000..b5be913c4b --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go @@ -0,0 +1,47 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeSubjectAccessReviews implements SubjectAccessReviewInterface +type FakeSubjectAccessReviews struct { + Fake *FakeAuthorizationV1beta1 +} + +var subjectaccessreviewsResource = schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1beta1", Resource: "subjectaccessreviews"} + +var subjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "SubjectAccessReview"} + +// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any. +func (c *FakeSubjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1beta1.SubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.SubjectAccessReview, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(subjectaccessreviewsResource, subjectAccessReview), &v1beta1.SubjectAccessReview{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.SubjectAccessReview), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_autoscaling_client.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_autoscaling_client.go new file mode 100644 index 0000000000..99e26fcf39 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_autoscaling_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAutoscalingV1 struct { + *testing.Fake +} + +func (c *FakeAutoscalingV1) HorizontalPodAutoscalers(namespace string) v1.HorizontalPodAutoscalerInterface { + return &FakeHorizontalPodAutoscalers{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAutoscalingV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go new file mode 100644 index 0000000000..dcd47480ba --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + autoscalingv1 "k8s.io/api/autoscaling/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" + testing "k8s.io/client-go/testing" +) + +// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface +type FakeHorizontalPodAutoscalers struct { + Fake *FakeAutoscalingV1 + ns string +} + +var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "v1", Resource: "horizontalpodautoscalers"} + +var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscaler"} + +// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. +func (c *FakeHorizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &autoscalingv1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.HorizontalPodAutoscaler), err +} + +// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. +func (c *FakeHorizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *autoscalingv1.HorizontalPodAutoscalerList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &autoscalingv1.HorizontalPodAutoscalerList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &autoscalingv1.HorizontalPodAutoscalerList{ListMeta: obj.(*autoscalingv1.HorizontalPodAutoscalerList).ListMeta} + for _, item := range obj.(*autoscalingv1.HorizontalPodAutoscalerList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. +func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) + +} + +// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.HorizontalPodAutoscaler), err +} + +// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.HorizontalPodAutoscaler), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*autoscalingv1.HorizontalPodAutoscaler, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.HorizontalPodAutoscaler), err +} + +// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. +func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(horizontalpodautoscalersResource, c.ns, name, opts), &autoscalingv1.HorizontalPodAutoscaler{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &autoscalingv1.HorizontalPodAutoscalerList{}) + return err +} + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &autoscalingv1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.HorizontalPodAutoscaler), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied horizontalPodAutoscaler. +func (c *FakeHorizontalPodAutoscalers) Apply(ctx context.Context, horizontalPodAutoscaler *applyconfigurationsautoscalingv1.HorizontalPodAutoscalerApplyConfiguration, opts v1.ApplyOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { + if horizontalPodAutoscaler == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler provided to Apply must not be nil") + } + data, err := json.Marshal(horizontalPodAutoscaler) + if err != nil { + return nil, err + } + name := horizontalPodAutoscaler.Name + if name == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data), &autoscalingv1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.HorizontalPodAutoscaler), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeHorizontalPodAutoscalers) ApplyStatus(ctx context.Context, horizontalPodAutoscaler *applyconfigurationsautoscalingv1.HorizontalPodAutoscalerApplyConfiguration, opts v1.ApplyOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { + if horizontalPodAutoscaler == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler provided to Apply must not be nil") + } + data, err := json.Marshal(horizontalPodAutoscaler) + if err != nil { + return nil, err + } + name := horizontalPodAutoscaler.Name + if name == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data, "status"), &autoscalingv1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.HorizontalPodAutoscaler), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/fake_autoscaling_client.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/fake_autoscaling_client.go new file mode 100644 index 0000000000..d4b907f4b0 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/fake_autoscaling_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAutoscalingV2 struct { + *testing.Fake +} + +func (c *FakeAutoscalingV2) HorizontalPodAutoscalers(namespace string) v2.HorizontalPodAutoscalerInterface { + return &FakeHorizontalPodAutoscalers{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAutoscalingV2) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/fake_horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/fake_horizontalpodautoscaler.go new file mode 100644 index 0000000000..ca4b24704d --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/fake_horizontalpodautoscaler.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v2 "k8s.io/api/autoscaling/v2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + autoscalingv2 "k8s.io/client-go/applyconfigurations/autoscaling/v2" + testing "k8s.io/client-go/testing" +) + +// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface +type FakeHorizontalPodAutoscalers struct { + Fake *FakeAutoscalingV2 + ns string +} + +var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "v2", Resource: "horizontalpodautoscalers"} + +var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v2", Kind: "HorizontalPodAutoscaler"} + +// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. +func (c *FakeHorizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.HorizontalPodAutoscaler), err +} + +// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. +func (c *FakeHorizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2.HorizontalPodAutoscalerList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v2.HorizontalPodAutoscalerList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v2.HorizontalPodAutoscalerList{ListMeta: obj.(*v2.HorizontalPodAutoscalerList).ListMeta} + for _, item := range obj.(*v2.HorizontalPodAutoscalerList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. +func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) + +} + +// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.HorizontalPodAutoscaler), err +} + +// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.HorizontalPodAutoscaler), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2.HorizontalPodAutoscaler, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.HorizontalPodAutoscaler), err +} + +// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. +func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(horizontalpodautoscalersResource, c.ns, name, opts), &v2.HorizontalPodAutoscaler{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v2.HorizontalPodAutoscalerList{}) + return err +} + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.HorizontalPodAutoscaler), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied horizontalPodAutoscaler. +func (c *FakeHorizontalPodAutoscalers) Apply(ctx context.Context, horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscalerApplyConfiguration, opts v1.ApplyOptions) (result *v2.HorizontalPodAutoscaler, err error) { + if horizontalPodAutoscaler == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler provided to Apply must not be nil") + } + data, err := json.Marshal(horizontalPodAutoscaler) + if err != nil { + return nil, err + } + name := horizontalPodAutoscaler.Name + if name == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data), &v2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.HorizontalPodAutoscaler), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeHorizontalPodAutoscalers) ApplyStatus(ctx context.Context, horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscalerApplyConfiguration, opts v1.ApplyOptions) (result *v2.HorizontalPodAutoscaler, err error) { + if horizontalPodAutoscaler == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler provided to Apply must not be nil") + } + data, err := json.Marshal(horizontalPodAutoscaler) + if err != nil { + return nil, err + } + name := horizontalPodAutoscaler.Name + if name == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.HorizontalPodAutoscaler), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_autoscaling_client.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_autoscaling_client.go new file mode 100644 index 0000000000..be8e0f48e5 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_autoscaling_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAutoscalingV2beta1 struct { + *testing.Fake +} + +func (c *FakeAutoscalingV2beta1) HorizontalPodAutoscalers(namespace string) v2beta1.HorizontalPodAutoscalerInterface { + return &FakeHorizontalPodAutoscalers{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAutoscalingV2beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go new file mode 100644 index 0000000000..2a750abddf --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v2beta1 "k8s.io/api/autoscaling/v2beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + autoscalingv2beta1 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta1" + testing "k8s.io/client-go/testing" +) + +// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface +type FakeHorizontalPodAutoscalers struct { + Fake *FakeAutoscalingV2beta1 + ns string +} + +var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "v2beta1", Resource: "horizontalpodautoscalers"} + +var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v2beta1", Kind: "HorizontalPodAutoscaler"} + +// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. +func (c *FakeHorizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v2beta1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2beta1.HorizontalPodAutoscaler), err +} + +// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. +func (c *FakeHorizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v2beta1.HorizontalPodAutoscalerList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v2beta1.HorizontalPodAutoscalerList{ListMeta: obj.(*v2beta1.HorizontalPodAutoscalerList).ListMeta} + for _, item := range obj.(*v2beta1.HorizontalPodAutoscalerList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. +func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) + +} + +// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2beta1.HorizontalPodAutoscaler), err +} + +// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2beta1.HorizontalPodAutoscaler), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta1.HorizontalPodAutoscaler, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2beta1.HorizontalPodAutoscaler), err +} + +// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. +func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(horizontalpodautoscalersResource, c.ns, name, opts), &v2beta1.HorizontalPodAutoscaler{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v2beta1.HorizontalPodAutoscalerList{}) + return err +} + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v2beta1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2beta1.HorizontalPodAutoscaler), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied horizontalPodAutoscaler. +func (c *FakeHorizontalPodAutoscalers) Apply(ctx context.Context, horizontalPodAutoscaler *autoscalingv2beta1.HorizontalPodAutoscalerApplyConfiguration, opts v1.ApplyOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { + if horizontalPodAutoscaler == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler provided to Apply must not be nil") + } + data, err := json.Marshal(horizontalPodAutoscaler) + if err != nil { + return nil, err + } + name := horizontalPodAutoscaler.Name + if name == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data), &v2beta1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2beta1.HorizontalPodAutoscaler), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeHorizontalPodAutoscalers) ApplyStatus(ctx context.Context, horizontalPodAutoscaler *autoscalingv2beta1.HorizontalPodAutoscalerApplyConfiguration, opts v1.ApplyOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { + if horizontalPodAutoscaler == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler provided to Apply must not be nil") + } + data, err := json.Marshal(horizontalPodAutoscaler) + if err != nil { + return nil, err + } + name := horizontalPodAutoscaler.Name + if name == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v2beta1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2beta1.HorizontalPodAutoscaler), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_autoscaling_client.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_autoscaling_client.go new file mode 100644 index 0000000000..8c36e0e815 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_autoscaling_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAutoscalingV2beta2 struct { + *testing.Fake +} + +func (c *FakeAutoscalingV2beta2) HorizontalPodAutoscalers(namespace string) v2beta2.HorizontalPodAutoscalerInterface { + return &FakeHorizontalPodAutoscalers{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAutoscalingV2beta2) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_horizontalpodautoscaler.go new file mode 100644 index 0000000000..00d642d856 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_horizontalpodautoscaler.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v2beta2 "k8s.io/api/autoscaling/v2beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + autoscalingv2beta2 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta2" + testing "k8s.io/client-go/testing" +) + +// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface +type FakeHorizontalPodAutoscalers struct { + Fake *FakeAutoscalingV2beta2 + ns string +} + +var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "v2beta2", Resource: "horizontalpodautoscalers"} + +var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v2beta2", Kind: "HorizontalPodAutoscaler"} + +// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. +func (c *FakeHorizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v2beta2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2beta2.HorizontalPodAutoscaler), err +} + +// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. +func (c *FakeHorizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v2beta2.HorizontalPodAutoscalerList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v2beta2.HorizontalPodAutoscalerList{ListMeta: obj.(*v2beta2.HorizontalPodAutoscalerList).ListMeta} + for _, item := range obj.(*v2beta2.HorizontalPodAutoscalerList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. +func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) + +} + +// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2beta2.HorizontalPodAutoscaler), err +} + +// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2beta2.HorizontalPodAutoscaler), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta2.HorizontalPodAutoscaler, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2beta2.HorizontalPodAutoscaler), err +} + +// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. +func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(horizontalpodautoscalersResource, c.ns, name, opts), &v2beta2.HorizontalPodAutoscaler{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v2beta2.HorizontalPodAutoscalerList{}) + return err +} + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v2beta2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2beta2.HorizontalPodAutoscaler), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied horizontalPodAutoscaler. +func (c *FakeHorizontalPodAutoscalers) Apply(ctx context.Context, horizontalPodAutoscaler *autoscalingv2beta2.HorizontalPodAutoscalerApplyConfiguration, opts v1.ApplyOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { + if horizontalPodAutoscaler == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler provided to Apply must not be nil") + } + data, err := json.Marshal(horizontalPodAutoscaler) + if err != nil { + return nil, err + } + name := horizontalPodAutoscaler.Name + if name == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data), &v2beta2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2beta2.HorizontalPodAutoscaler), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeHorizontalPodAutoscalers) ApplyStatus(ctx context.Context, horizontalPodAutoscaler *autoscalingv2beta2.HorizontalPodAutoscalerApplyConfiguration, opts v1.ApplyOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { + if horizontalPodAutoscaler == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler provided to Apply must not be nil") + } + data, err := json.Marshal(horizontalPodAutoscaler) + if err != nil { + return nil, err + } + name := horizontalPodAutoscaler.Name + if name == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v2beta2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2beta2.HorizontalPodAutoscaler), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_batch_client.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_batch_client.go new file mode 100644 index 0000000000..43d5b0d309 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_batch_client.go @@ -0,0 +1,44 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/batch/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeBatchV1 struct { + *testing.Fake +} + +func (c *FakeBatchV1) CronJobs(namespace string) v1.CronJobInterface { + return &FakeCronJobs{c, namespace} +} + +func (c *FakeBatchV1) Jobs(namespace string) v1.JobInterface { + return &FakeJobs{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeBatchV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_cronjob.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_cronjob.go new file mode 100644 index 0000000000..39f4ca0232 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_cronjob.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + batchv1 "k8s.io/api/batch/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsbatchv1 "k8s.io/client-go/applyconfigurations/batch/v1" + testing "k8s.io/client-go/testing" +) + +// FakeCronJobs implements CronJobInterface +type FakeCronJobs struct { + Fake *FakeBatchV1 + ns string +} + +var cronjobsResource = schema.GroupVersionResource{Group: "batch", Version: "v1", Resource: "cronjobs"} + +var cronjobsKind = schema.GroupVersionKind{Group: "batch", Version: "v1", Kind: "CronJob"} + +// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any. +func (c *FakeCronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *batchv1.CronJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(cronjobsResource, c.ns, name), &batchv1.CronJob{}) + + if obj == nil { + return nil, err + } + return obj.(*batchv1.CronJob), err +} + +// List takes label and field selectors, and returns the list of CronJobs that match those selectors. +func (c *FakeCronJobs) List(ctx context.Context, opts v1.ListOptions) (result *batchv1.CronJobList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(cronjobsResource, cronjobsKind, c.ns, opts), &batchv1.CronJobList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &batchv1.CronJobList{ListMeta: obj.(*batchv1.CronJobList).ListMeta} + for _, item := range obj.(*batchv1.CronJobList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested cronJobs. +func (c *FakeCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(cronjobsResource, c.ns, opts)) + +} + +// Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any. +func (c *FakeCronJobs) Create(ctx context.Context, cronJob *batchv1.CronJob, opts v1.CreateOptions) (result *batchv1.CronJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(cronjobsResource, c.ns, cronJob), &batchv1.CronJob{}) + + if obj == nil { + return nil, err + } + return obj.(*batchv1.CronJob), err +} + +// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any. +func (c *FakeCronJobs) Update(ctx context.Context, cronJob *batchv1.CronJob, opts v1.UpdateOptions) (result *batchv1.CronJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(cronjobsResource, c.ns, cronJob), &batchv1.CronJob{}) + + if obj == nil { + return nil, err + } + return obj.(*batchv1.CronJob), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeCronJobs) UpdateStatus(ctx context.Context, cronJob *batchv1.CronJob, opts v1.UpdateOptions) (*batchv1.CronJob, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(cronjobsResource, "status", c.ns, cronJob), &batchv1.CronJob{}) + + if obj == nil { + return nil, err + } + return obj.(*batchv1.CronJob), err +} + +// Delete takes name of the cronJob and deletes it. Returns an error if one occurs. +func (c *FakeCronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(cronjobsResource, c.ns, name, opts), &batchv1.CronJob{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &batchv1.CronJobList{}) + return err +} + +// Patch applies the patch and returns the patched cronJob. +func (c *FakeCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *batchv1.CronJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, name, pt, data, subresources...), &batchv1.CronJob{}) + + if obj == nil { + return nil, err + } + return obj.(*batchv1.CronJob), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cronJob. +func (c *FakeCronJobs) Apply(ctx context.Context, cronJob *applyconfigurationsbatchv1.CronJobApplyConfiguration, opts v1.ApplyOptions) (result *batchv1.CronJob, err error) { + if cronJob == nil { + return nil, fmt.Errorf("cronJob provided to Apply must not be nil") + } + data, err := json.Marshal(cronJob) + if err != nil { + return nil, err + } + name := cronJob.Name + if name == nil { + return nil, fmt.Errorf("cronJob.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, *name, types.ApplyPatchType, data), &batchv1.CronJob{}) + + if obj == nil { + return nil, err + } + return obj.(*batchv1.CronJob), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeCronJobs) ApplyStatus(ctx context.Context, cronJob *applyconfigurationsbatchv1.CronJobApplyConfiguration, opts v1.ApplyOptions) (result *batchv1.CronJob, err error) { + if cronJob == nil { + return nil, fmt.Errorf("cronJob provided to Apply must not be nil") + } + data, err := json.Marshal(cronJob) + if err != nil { + return nil, err + } + name := cronJob.Name + if name == nil { + return nil, fmt.Errorf("cronJob.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &batchv1.CronJob{}) + + if obj == nil { + return nil, err + } + return obj.(*batchv1.CronJob), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go new file mode 100644 index 0000000000..c44cddb3c0 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + batchv1 "k8s.io/api/batch/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsbatchv1 "k8s.io/client-go/applyconfigurations/batch/v1" + testing "k8s.io/client-go/testing" +) + +// FakeJobs implements JobInterface +type FakeJobs struct { + Fake *FakeBatchV1 + ns string +} + +var jobsResource = schema.GroupVersionResource{Group: "batch", Version: "v1", Resource: "jobs"} + +var jobsKind = schema.GroupVersionKind{Group: "batch", Version: "v1", Kind: "Job"} + +// Get takes name of the job, and returns the corresponding job object, and an error if there is any. +func (c *FakeJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *batchv1.Job, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(jobsResource, c.ns, name), &batchv1.Job{}) + + if obj == nil { + return nil, err + } + return obj.(*batchv1.Job), err +} + +// List takes label and field selectors, and returns the list of Jobs that match those selectors. +func (c *FakeJobs) List(ctx context.Context, opts v1.ListOptions) (result *batchv1.JobList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(jobsResource, jobsKind, c.ns, opts), &batchv1.JobList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &batchv1.JobList{ListMeta: obj.(*batchv1.JobList).ListMeta} + for _, item := range obj.(*batchv1.JobList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested jobs. +func (c *FakeJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(jobsResource, c.ns, opts)) + +} + +// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any. +func (c *FakeJobs) Create(ctx context.Context, job *batchv1.Job, opts v1.CreateOptions) (result *batchv1.Job, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(jobsResource, c.ns, job), &batchv1.Job{}) + + if obj == nil { + return nil, err + } + return obj.(*batchv1.Job), err +} + +// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any. +func (c *FakeJobs) Update(ctx context.Context, job *batchv1.Job, opts v1.UpdateOptions) (result *batchv1.Job, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(jobsResource, c.ns, job), &batchv1.Job{}) + + if obj == nil { + return nil, err + } + return obj.(*batchv1.Job), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeJobs) UpdateStatus(ctx context.Context, job *batchv1.Job, opts v1.UpdateOptions) (*batchv1.Job, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &batchv1.Job{}) + + if obj == nil { + return nil, err + } + return obj.(*batchv1.Job), err +} + +// Delete takes name of the job and deletes it. Returns an error if one occurs. +func (c *FakeJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(jobsResource, c.ns, name, opts), &batchv1.Job{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &batchv1.JobList{}) + return err +} + +// Patch applies the patch and returns the patched job. +func (c *FakeJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *batchv1.Job, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, pt, data, subresources...), &batchv1.Job{}) + + if obj == nil { + return nil, err + } + return obj.(*batchv1.Job), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied job. +func (c *FakeJobs) Apply(ctx context.Context, job *applyconfigurationsbatchv1.JobApplyConfiguration, opts v1.ApplyOptions) (result *batchv1.Job, err error) { + if job == nil { + return nil, fmt.Errorf("job provided to Apply must not be nil") + } + data, err := json.Marshal(job) + if err != nil { + return nil, err + } + name := job.Name + if name == nil { + return nil, fmt.Errorf("job.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, *name, types.ApplyPatchType, data), &batchv1.Job{}) + + if obj == nil { + return nil, err + } + return obj.(*batchv1.Job), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeJobs) ApplyStatus(ctx context.Context, job *applyconfigurationsbatchv1.JobApplyConfiguration, opts v1.ApplyOptions) (result *batchv1.Job, err error) { + if job == nil { + return nil, fmt.Errorf("job provided to Apply must not be nil") + } + data, err := json.Marshal(job) + if err != nil { + return nil, err + } + name := job.Name + if name == nil { + return nil, fmt.Errorf("job.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &batchv1.Job{}) + + if obj == nil { + return nil, err + } + return obj.(*batchv1.Job), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_batch_client.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_batch_client.go new file mode 100644 index 0000000000..6f350aed9a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_batch_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeBatchV1beta1 struct { + *testing.Fake +} + +func (c *FakeBatchV1beta1) CronJobs(namespace string) v1beta1.CronJobInterface { + return &FakeCronJobs{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeBatchV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go new file mode 100644 index 0000000000..a8bad764f5 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/batch/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + batchv1beta1 "k8s.io/client-go/applyconfigurations/batch/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeCronJobs implements CronJobInterface +type FakeCronJobs struct { + Fake *FakeBatchV1beta1 + ns string +} + +var cronjobsResource = schema.GroupVersionResource{Group: "batch", Version: "v1beta1", Resource: "cronjobs"} + +var cronjobsKind = schema.GroupVersionKind{Group: "batch", Version: "v1beta1", Kind: "CronJob"} + +// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any. +func (c *FakeCronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CronJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(cronjobsResource, c.ns, name), &v1beta1.CronJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CronJob), err +} + +// List takes label and field selectors, and returns the list of CronJobs that match those selectors. +func (c *FakeCronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CronJobList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(cronjobsResource, cronjobsKind, c.ns, opts), &v1beta1.CronJobList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.CronJobList{ListMeta: obj.(*v1beta1.CronJobList).ListMeta} + for _, item := range obj.(*v1beta1.CronJobList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested cronJobs. +func (c *FakeCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(cronjobsResource, c.ns, opts)) + +} + +// Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any. +func (c *FakeCronJobs) Create(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.CreateOptions) (result *v1beta1.CronJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(cronjobsResource, c.ns, cronJob), &v1beta1.CronJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CronJob), err +} + +// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any. +func (c *FakeCronJobs) Update(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (result *v1beta1.CronJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(cronjobsResource, c.ns, cronJob), &v1beta1.CronJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CronJob), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeCronJobs) UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (*v1beta1.CronJob, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(cronjobsResource, "status", c.ns, cronJob), &v1beta1.CronJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CronJob), err +} + +// Delete takes name of the cronJob and deletes it. Returns an error if one occurs. +func (c *FakeCronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(cronjobsResource, c.ns, name, opts), &v1beta1.CronJob{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.CronJobList{}) + return err +} + +// Patch applies the patch and returns the patched cronJob. +func (c *FakeCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CronJob, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, name, pt, data, subresources...), &v1beta1.CronJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CronJob), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cronJob. +func (c *FakeCronJobs) Apply(ctx context.Context, cronJob *batchv1beta1.CronJobApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.CronJob, err error) { + if cronJob == nil { + return nil, fmt.Errorf("cronJob provided to Apply must not be nil") + } + data, err := json.Marshal(cronJob) + if err != nil { + return nil, err + } + name := cronJob.Name + if name == nil { + return nil, fmt.Errorf("cronJob.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.CronJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CronJob), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeCronJobs) ApplyStatus(ctx context.Context, cronJob *batchv1beta1.CronJobApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.CronJob, err error) { + if cronJob == nil { + return nil, fmt.Errorf("cronJob provided to Apply must not be nil") + } + data, err := json.Marshal(cronJob) + if err != nil { + return nil, err + } + name := cronJob.Name + if name == nil { + return nil, fmt.Errorf("cronJob.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.CronJob{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CronJob), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/fake_certificates_client.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/fake_certificates_client.go new file mode 100644 index 0000000000..4779d6169b --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/fake_certificates_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/certificates/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeCertificatesV1 struct { + *testing.Fake +} + +func (c *FakeCertificatesV1) CertificateSigningRequests() v1.CertificateSigningRequestInterface { + return &FakeCertificateSigningRequests{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeCertificatesV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/fake_certificatesigningrequest.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/fake_certificatesigningrequest.go new file mode 100644 index 0000000000..90a1e6dc66 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/fake_certificatesigningrequest.go @@ -0,0 +1,189 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + certificatesv1 "k8s.io/api/certificates/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscertificatesv1 "k8s.io/client-go/applyconfigurations/certificates/v1" + testing "k8s.io/client-go/testing" +) + +// FakeCertificateSigningRequests implements CertificateSigningRequestInterface +type FakeCertificateSigningRequests struct { + Fake *FakeCertificatesV1 +} + +var certificatesigningrequestsResource = schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1", Resource: "certificatesigningrequests"} + +var certificatesigningrequestsKind = schema.GroupVersionKind{Group: "certificates.k8s.io", Version: "v1", Kind: "CertificateSigningRequest"} + +// Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any. +func (c *FakeCertificateSigningRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *certificatesv1.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(certificatesigningrequestsResource, name), &certificatesv1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificatesv1.CertificateSigningRequest), err +} + +// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. +func (c *FakeCertificateSigningRequests) List(ctx context.Context, opts v1.ListOptions) (result *certificatesv1.CertificateSigningRequestList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(certificatesigningrequestsResource, certificatesigningrequestsKind, opts), &certificatesv1.CertificateSigningRequestList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &certificatesv1.CertificateSigningRequestList{ListMeta: obj.(*certificatesv1.CertificateSigningRequestList).ListMeta} + for _, item := range obj.(*certificatesv1.CertificateSigningRequestList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested certificateSigningRequests. +func (c *FakeCertificateSigningRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(certificatesigningrequestsResource, opts)) +} + +// Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. +func (c *FakeCertificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *certificatesv1.CertificateSigningRequest, opts v1.CreateOptions) (result *certificatesv1.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &certificatesv1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificatesv1.CertificateSigningRequest), err +} + +// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. +func (c *FakeCertificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *certificatesv1.CertificateSigningRequest, opts v1.UpdateOptions) (result *certificatesv1.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &certificatesv1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificatesv1.CertificateSigningRequest), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeCertificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *certificatesv1.CertificateSigningRequest, opts v1.UpdateOptions) (*certificatesv1.CertificateSigningRequest, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &certificatesv1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificatesv1.CertificateSigningRequest), err +} + +// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. +func (c *FakeCertificateSigningRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(certificatesigningrequestsResource, name, opts), &certificatesv1.CertificateSigningRequest{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCertificateSigningRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOpts) + + _, err := c.Fake.Invokes(action, &certificatesv1.CertificateSigningRequestList{}) + return err +} + +// Patch applies the patch and returns the patched certificateSigningRequest. +func (c *FakeCertificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *certificatesv1.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, pt, data, subresources...), &certificatesv1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificatesv1.CertificateSigningRequest), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied certificateSigningRequest. +func (c *FakeCertificateSigningRequests) Apply(ctx context.Context, certificateSigningRequest *applyconfigurationscertificatesv1.CertificateSigningRequestApplyConfiguration, opts v1.ApplyOptions) (result *certificatesv1.CertificateSigningRequest, err error) { + if certificateSigningRequest == nil { + return nil, fmt.Errorf("certificateSigningRequest provided to Apply must not be nil") + } + data, err := json.Marshal(certificateSigningRequest) + if err != nil { + return nil, err + } + name := certificateSigningRequest.Name + if name == nil { + return nil, fmt.Errorf("certificateSigningRequest.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(certificatesigningrequestsResource, *name, types.ApplyPatchType, data), &certificatesv1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificatesv1.CertificateSigningRequest), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeCertificateSigningRequests) ApplyStatus(ctx context.Context, certificateSigningRequest *applyconfigurationscertificatesv1.CertificateSigningRequestApplyConfiguration, opts v1.ApplyOptions) (result *certificatesv1.CertificateSigningRequest, err error) { + if certificateSigningRequest == nil { + return nil, fmt.Errorf("certificateSigningRequest provided to Apply must not be nil") + } + data, err := json.Marshal(certificateSigningRequest) + if err != nil { + return nil, err + } + name := certificateSigningRequest.Name + if name == nil { + return nil, fmt.Errorf("certificateSigningRequest.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(certificatesigningrequestsResource, *name, types.ApplyPatchType, data, "status"), &certificatesv1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificatesv1.CertificateSigningRequest), err +} + +// UpdateApproval takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. +func (c *FakeCertificateSigningRequests) UpdateApproval(ctx context.Context, certificateSigningRequestName string, certificateSigningRequest *certificatesv1.CertificateSigningRequest, opts v1.UpdateOptions) (result *certificatesv1.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "approval", certificateSigningRequest), &certificatesv1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificatesv1.CertificateSigningRequest), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificates_client.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificates_client.go new file mode 100644 index 0000000000..29d8b088ea --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificates_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeCertificatesV1beta1 struct { + *testing.Fake +} + +func (c *FakeCertificatesV1beta1) CertificateSigningRequests() v1beta1.CertificateSigningRequestInterface { + return &FakeCertificateSigningRequests{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeCertificatesV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go new file mode 100644 index 0000000000..5a416150a8 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go @@ -0,0 +1,179 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/certificates/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + certificatesv1beta1 "k8s.io/client-go/applyconfigurations/certificates/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeCertificateSigningRequests implements CertificateSigningRequestInterface +type FakeCertificateSigningRequests struct { + Fake *FakeCertificatesV1beta1 +} + +var certificatesigningrequestsResource = schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1beta1", Resource: "certificatesigningrequests"} + +var certificatesigningrequestsKind = schema.GroupVersionKind{Group: "certificates.k8s.io", Version: "v1beta1", Kind: "CertificateSigningRequest"} + +// Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any. +func (c *FakeCertificateSigningRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(certificatesigningrequestsResource, name), &v1beta1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CertificateSigningRequest), err +} + +// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. +func (c *FakeCertificateSigningRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(certificatesigningrequestsResource, certificatesigningrequestsKind, opts), &v1beta1.CertificateSigningRequestList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.CertificateSigningRequestList{ListMeta: obj.(*v1beta1.CertificateSigningRequestList).ListMeta} + for _, item := range obj.(*v1beta1.CertificateSigningRequestList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested certificateSigningRequests. +func (c *FakeCertificateSigningRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(certificatesigningrequestsResource, opts)) +} + +// Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. +func (c *FakeCertificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.CreateOptions) (result *v1beta1.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1beta1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CertificateSigningRequest), err +} + +// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. +func (c *FakeCertificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (result *v1beta1.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1beta1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CertificateSigningRequest), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeCertificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (*v1beta1.CertificateSigningRequest, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &v1beta1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CertificateSigningRequest), err +} + +// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. +func (c *FakeCertificateSigningRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(certificatesigningrequestsResource, name, opts), &v1beta1.CertificateSigningRequest{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCertificateSigningRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.CertificateSigningRequestList{}) + return err +} + +// Patch applies the patch and returns the patched certificateSigningRequest. +func (c *FakeCertificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, pt, data, subresources...), &v1beta1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CertificateSigningRequest), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied certificateSigningRequest. +func (c *FakeCertificateSigningRequests) Apply(ctx context.Context, certificateSigningRequest *certificatesv1beta1.CertificateSigningRequestApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.CertificateSigningRequest, err error) { + if certificateSigningRequest == nil { + return nil, fmt.Errorf("certificateSigningRequest provided to Apply must not be nil") + } + data, err := json.Marshal(certificateSigningRequest) + if err != nil { + return nil, err + } + name := certificateSigningRequest.Name + if name == nil { + return nil, fmt.Errorf("certificateSigningRequest.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(certificatesigningrequestsResource, *name, types.ApplyPatchType, data), &v1beta1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CertificateSigningRequest), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeCertificateSigningRequests) ApplyStatus(ctx context.Context, certificateSigningRequest *certificatesv1beta1.CertificateSigningRequestApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.CertificateSigningRequest, err error) { + if certificateSigningRequest == nil { + return nil, fmt.Errorf("certificateSigningRequest provided to Apply must not be nil") + } + data, err := json.Marshal(certificateSigningRequest) + if err != nil { + return nil, err + } + name := certificateSigningRequest.Name + if name == nil { + return nil, fmt.Errorf("certificateSigningRequest.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(certificatesigningrequestsResource, *name, types.ApplyPatchType, data, "status"), &v1beta1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CertificateSigningRequest), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest_expansion.go new file mode 100644 index 0000000000..2c3eaf971e --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest_expansion.go @@ -0,0 +1,34 @@ +/* +Copyright 2017 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 fake + +import ( + "context" + + certificates "k8s.io/api/certificates/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + core "k8s.io/client-go/testing" +) + +func (c *FakeCertificateSigningRequests) UpdateApproval(ctx context.Context, certificateSigningRequest *certificates.CertificateSigningRequest, opts metav1.UpdateOptions) (result *certificates.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(core.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "approval", certificateSigningRequest), &certificates.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificates.CertificateSigningRequest), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_coordination_client.go b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_coordination_client.go new file mode 100644 index 0000000000..6920275b20 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_coordination_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/coordination/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeCoordinationV1 struct { + *testing.Fake +} + +func (c *FakeCoordinationV1) Leases(namespace string) v1.LeaseInterface { + return &FakeLeases{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeCoordinationV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_lease.go b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_lease.go new file mode 100644 index 0000000000..c52c828ef4 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_lease.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + coordinationv1 "k8s.io/api/coordination/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscoordinationv1 "k8s.io/client-go/applyconfigurations/coordination/v1" + testing "k8s.io/client-go/testing" +) + +// FakeLeases implements LeaseInterface +type FakeLeases struct { + Fake *FakeCoordinationV1 + ns string +} + +var leasesResource = schema.GroupVersionResource{Group: "coordination.k8s.io", Version: "v1", Resource: "leases"} + +var leasesKind = schema.GroupVersionKind{Group: "coordination.k8s.io", Version: "v1", Kind: "Lease"} + +// Get takes name of the lease, and returns the corresponding lease object, and an error if there is any. +func (c *FakeLeases) Get(ctx context.Context, name string, options v1.GetOptions) (result *coordinationv1.Lease, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(leasesResource, c.ns, name), &coordinationv1.Lease{}) + + if obj == nil { + return nil, err + } + return obj.(*coordinationv1.Lease), err +} + +// List takes label and field selectors, and returns the list of Leases that match those selectors. +func (c *FakeLeases) List(ctx context.Context, opts v1.ListOptions) (result *coordinationv1.LeaseList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(leasesResource, leasesKind, c.ns, opts), &coordinationv1.LeaseList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &coordinationv1.LeaseList{ListMeta: obj.(*coordinationv1.LeaseList).ListMeta} + for _, item := range obj.(*coordinationv1.LeaseList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested leases. +func (c *FakeLeases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(leasesResource, c.ns, opts)) + +} + +// Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. +func (c *FakeLeases) Create(ctx context.Context, lease *coordinationv1.Lease, opts v1.CreateOptions) (result *coordinationv1.Lease, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(leasesResource, c.ns, lease), &coordinationv1.Lease{}) + + if obj == nil { + return nil, err + } + return obj.(*coordinationv1.Lease), err +} + +// Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any. +func (c *FakeLeases) Update(ctx context.Context, lease *coordinationv1.Lease, opts v1.UpdateOptions) (result *coordinationv1.Lease, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(leasesResource, c.ns, lease), &coordinationv1.Lease{}) + + if obj == nil { + return nil, err + } + return obj.(*coordinationv1.Lease), err +} + +// Delete takes name of the lease and deletes it. Returns an error if one occurs. +func (c *FakeLeases) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(leasesResource, c.ns, name, opts), &coordinationv1.Lease{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeLeases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &coordinationv1.LeaseList{}) + return err +} + +// Patch applies the patch and returns the patched lease. +func (c *FakeLeases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *coordinationv1.Lease, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(leasesResource, c.ns, name, pt, data, subresources...), &coordinationv1.Lease{}) + + if obj == nil { + return nil, err + } + return obj.(*coordinationv1.Lease), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied lease. +func (c *FakeLeases) Apply(ctx context.Context, lease *applyconfigurationscoordinationv1.LeaseApplyConfiguration, opts v1.ApplyOptions) (result *coordinationv1.Lease, err error) { + if lease == nil { + return nil, fmt.Errorf("lease provided to Apply must not be nil") + } + data, err := json.Marshal(lease) + if err != nil { + return nil, err + } + name := lease.Name + if name == nil { + return nil, fmt.Errorf("lease.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(leasesResource, c.ns, *name, types.ApplyPatchType, data), &coordinationv1.Lease{}) + + if obj == nil { + return nil, err + } + return obj.(*coordinationv1.Lease), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_coordination_client.go b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_coordination_client.go new file mode 100644 index 0000000000..f583b466e2 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_coordination_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeCoordinationV1beta1 struct { + *testing.Fake +} + +func (c *FakeCoordinationV1beta1) Leases(namespace string) v1beta1.LeaseInterface { + return &FakeLeases{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeCoordinationV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go new file mode 100644 index 0000000000..15b6c401dc --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/coordination/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + coordinationv1beta1 "k8s.io/client-go/applyconfigurations/coordination/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeLeases implements LeaseInterface +type FakeLeases struct { + Fake *FakeCoordinationV1beta1 + ns string +} + +var leasesResource = schema.GroupVersionResource{Group: "coordination.k8s.io", Version: "v1beta1", Resource: "leases"} + +var leasesKind = schema.GroupVersionKind{Group: "coordination.k8s.io", Version: "v1beta1", Kind: "Lease"} + +// Get takes name of the lease, and returns the corresponding lease object, and an error if there is any. +func (c *FakeLeases) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Lease, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(leasesResource, c.ns, name), &v1beta1.Lease{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Lease), err +} + +// List takes label and field selectors, and returns the list of Leases that match those selectors. +func (c *FakeLeases) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.LeaseList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(leasesResource, leasesKind, c.ns, opts), &v1beta1.LeaseList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.LeaseList{ListMeta: obj.(*v1beta1.LeaseList).ListMeta} + for _, item := range obj.(*v1beta1.LeaseList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested leases. +func (c *FakeLeases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(leasesResource, c.ns, opts)) + +} + +// Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. +func (c *FakeLeases) Create(ctx context.Context, lease *v1beta1.Lease, opts v1.CreateOptions) (result *v1beta1.Lease, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(leasesResource, c.ns, lease), &v1beta1.Lease{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Lease), err +} + +// Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any. +func (c *FakeLeases) Update(ctx context.Context, lease *v1beta1.Lease, opts v1.UpdateOptions) (result *v1beta1.Lease, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(leasesResource, c.ns, lease), &v1beta1.Lease{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Lease), err +} + +// Delete takes name of the lease and deletes it. Returns an error if one occurs. +func (c *FakeLeases) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(leasesResource, c.ns, name, opts), &v1beta1.Lease{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeLeases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.LeaseList{}) + return err +} + +// Patch applies the patch and returns the patched lease. +func (c *FakeLeases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Lease, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(leasesResource, c.ns, name, pt, data, subresources...), &v1beta1.Lease{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Lease), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied lease. +func (c *FakeLeases) Apply(ctx context.Context, lease *coordinationv1beta1.LeaseApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Lease, err error) { + if lease == nil { + return nil, fmt.Errorf("lease provided to Apply must not be nil") + } + data, err := json.Marshal(lease) + if err != nil { + return nil, err + } + name := lease.Name + if name == nil { + return nil, fmt.Errorf("lease.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(leasesResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.Lease{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Lease), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go new file mode 100644 index 0000000000..7e5c02daac --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakeComponentStatuses implements ComponentStatusInterface +type FakeComponentStatuses struct { + Fake *FakeCoreV1 +} + +var componentstatusesResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "componentstatuses"} + +var componentstatusesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ComponentStatus"} + +// Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any. +func (c *FakeComponentStatuses) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.ComponentStatus, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(componentstatusesResource, name), &corev1.ComponentStatus{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.ComponentStatus), err +} + +// List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors. +func (c *FakeComponentStatuses) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ComponentStatusList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(componentstatusesResource, componentstatusesKind, opts), &corev1.ComponentStatusList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.ComponentStatusList{ListMeta: obj.(*corev1.ComponentStatusList).ListMeta} + for _, item := range obj.(*corev1.ComponentStatusList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested componentStatuses. +func (c *FakeComponentStatuses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(componentstatusesResource, opts)) +} + +// Create takes the representation of a componentStatus and creates it. Returns the server's representation of the componentStatus, and an error, if there is any. +func (c *FakeComponentStatuses) Create(ctx context.Context, componentStatus *corev1.ComponentStatus, opts v1.CreateOptions) (result *corev1.ComponentStatus, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(componentstatusesResource, componentStatus), &corev1.ComponentStatus{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.ComponentStatus), err +} + +// Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any. +func (c *FakeComponentStatuses) Update(ctx context.Context, componentStatus *corev1.ComponentStatus, opts v1.UpdateOptions) (result *corev1.ComponentStatus, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(componentstatusesResource, componentStatus), &corev1.ComponentStatus{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.ComponentStatus), err +} + +// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs. +func (c *FakeComponentStatuses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(componentstatusesResource, name, opts), &corev1.ComponentStatus{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeComponentStatuses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(componentstatusesResource, listOpts) + + _, err := c.Fake.Invokes(action, &corev1.ComponentStatusList{}) + return err +} + +// Patch applies the patch and returns the patched componentStatus. +func (c *FakeComponentStatuses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.ComponentStatus, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(componentstatusesResource, name, pt, data, subresources...), &corev1.ComponentStatus{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.ComponentStatus), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied componentStatus. +func (c *FakeComponentStatuses) Apply(ctx context.Context, componentStatus *applyconfigurationscorev1.ComponentStatusApplyConfiguration, opts v1.ApplyOptions) (result *corev1.ComponentStatus, err error) { + if componentStatus == nil { + return nil, fmt.Errorf("componentStatus provided to Apply must not be nil") + } + data, err := json.Marshal(componentStatus) + if err != nil { + return nil, err + } + name := componentStatus.Name + if name == nil { + return nil, fmt.Errorf("componentStatus.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(componentstatusesResource, *name, types.ApplyPatchType, data), &corev1.ComponentStatus{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.ComponentStatus), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go new file mode 100644 index 0000000000..b74b376a92 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakeConfigMaps implements ConfigMapInterface +type FakeConfigMaps struct { + Fake *FakeCoreV1 + ns string +} + +var configmapsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "configmaps"} + +var configmapsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ConfigMap"} + +// Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any. +func (c *FakeConfigMaps) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.ConfigMap, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(configmapsResource, c.ns, name), &corev1.ConfigMap{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ConfigMap), err +} + +// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. +func (c *FakeConfigMaps) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ConfigMapList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(configmapsResource, configmapsKind, c.ns, opts), &corev1.ConfigMapList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.ConfigMapList{ListMeta: obj.(*corev1.ConfigMapList).ListMeta} + for _, item := range obj.(*corev1.ConfigMapList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested configMaps. +func (c *FakeConfigMaps) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(configmapsResource, c.ns, opts)) + +} + +// Create takes the representation of a configMap and creates it. Returns the server's representation of the configMap, and an error, if there is any. +func (c *FakeConfigMaps) Create(ctx context.Context, configMap *corev1.ConfigMap, opts v1.CreateOptions) (result *corev1.ConfigMap, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(configmapsResource, c.ns, configMap), &corev1.ConfigMap{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ConfigMap), err +} + +// Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any. +func (c *FakeConfigMaps) Update(ctx context.Context, configMap *corev1.ConfigMap, opts v1.UpdateOptions) (result *corev1.ConfigMap, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(configmapsResource, c.ns, configMap), &corev1.ConfigMap{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ConfigMap), err +} + +// Delete takes name of the configMap and deletes it. Returns an error if one occurs. +func (c *FakeConfigMaps) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(configmapsResource, c.ns, name, opts), &corev1.ConfigMap{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeConfigMaps) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(configmapsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &corev1.ConfigMapList{}) + return err +} + +// Patch applies the patch and returns the patched configMap. +func (c *FakeConfigMaps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.ConfigMap, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(configmapsResource, c.ns, name, pt, data, subresources...), &corev1.ConfigMap{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ConfigMap), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied configMap. +func (c *FakeConfigMaps) Apply(ctx context.Context, configMap *applyconfigurationscorev1.ConfigMapApplyConfiguration, opts v1.ApplyOptions) (result *corev1.ConfigMap, err error) { + if configMap == nil { + return nil, fmt.Errorf("configMap provided to Apply must not be nil") + } + data, err := json.Marshal(configMap) + if err != nil { + return nil, err + } + name := configMap.Name + if name == nil { + return nil, fmt.Errorf("configMap.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(configmapsResource, c.ns, *name, types.ApplyPatchType, data), &corev1.ConfigMap{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ConfigMap), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_core_client.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_core_client.go new file mode 100644 index 0000000000..5ad90943c9 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_core_client.go @@ -0,0 +1,100 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/core/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeCoreV1 struct { + *testing.Fake +} + +func (c *FakeCoreV1) ComponentStatuses() v1.ComponentStatusInterface { + return &FakeComponentStatuses{c} +} + +func (c *FakeCoreV1) ConfigMaps(namespace string) v1.ConfigMapInterface { + return &FakeConfigMaps{c, namespace} +} + +func (c *FakeCoreV1) Endpoints(namespace string) v1.EndpointsInterface { + return &FakeEndpoints{c, namespace} +} + +func (c *FakeCoreV1) Events(namespace string) v1.EventInterface { + return &FakeEvents{c, namespace} +} + +func (c *FakeCoreV1) LimitRanges(namespace string) v1.LimitRangeInterface { + return &FakeLimitRanges{c, namespace} +} + +func (c *FakeCoreV1) Namespaces() v1.NamespaceInterface { + return &FakeNamespaces{c} +} + +func (c *FakeCoreV1) Nodes() v1.NodeInterface { + return &FakeNodes{c} +} + +func (c *FakeCoreV1) PersistentVolumes() v1.PersistentVolumeInterface { + return &FakePersistentVolumes{c} +} + +func (c *FakeCoreV1) PersistentVolumeClaims(namespace string) v1.PersistentVolumeClaimInterface { + return &FakePersistentVolumeClaims{c, namespace} +} + +func (c *FakeCoreV1) Pods(namespace string) v1.PodInterface { + return &FakePods{c, namespace} +} + +func (c *FakeCoreV1) PodTemplates(namespace string) v1.PodTemplateInterface { + return &FakePodTemplates{c, namespace} +} + +func (c *FakeCoreV1) ReplicationControllers(namespace string) v1.ReplicationControllerInterface { + return &FakeReplicationControllers{c, namespace} +} + +func (c *FakeCoreV1) ResourceQuotas(namespace string) v1.ResourceQuotaInterface { + return &FakeResourceQuotas{c, namespace} +} + +func (c *FakeCoreV1) Secrets(namespace string) v1.SecretInterface { + return &FakeSecrets{c, namespace} +} + +func (c *FakeCoreV1) Services(namespace string) v1.ServiceInterface { + return &FakeServices{c, namespace} +} + +func (c *FakeCoreV1) ServiceAccounts(namespace string) v1.ServiceAccountInterface { + return &FakeServiceAccounts{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeCoreV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go new file mode 100644 index 0000000000..e9a515a1af --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakeEndpoints implements EndpointsInterface +type FakeEndpoints struct { + Fake *FakeCoreV1 + ns string +} + +var endpointsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "endpoints"} + +var endpointsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Endpoints"} + +// Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any. +func (c *FakeEndpoints) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Endpoints, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(endpointsResource, c.ns, name), &corev1.Endpoints{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Endpoints), err +} + +// List takes label and field selectors, and returns the list of Endpoints that match those selectors. +func (c *FakeEndpoints) List(ctx context.Context, opts v1.ListOptions) (result *corev1.EndpointsList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(endpointsResource, endpointsKind, c.ns, opts), &corev1.EndpointsList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.EndpointsList{ListMeta: obj.(*corev1.EndpointsList).ListMeta} + for _, item := range obj.(*corev1.EndpointsList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested endpoints. +func (c *FakeEndpoints) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(endpointsResource, c.ns, opts)) + +} + +// Create takes the representation of a endpoints and creates it. Returns the server's representation of the endpoints, and an error, if there is any. +func (c *FakeEndpoints) Create(ctx context.Context, endpoints *corev1.Endpoints, opts v1.CreateOptions) (result *corev1.Endpoints, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(endpointsResource, c.ns, endpoints), &corev1.Endpoints{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Endpoints), err +} + +// Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any. +func (c *FakeEndpoints) Update(ctx context.Context, endpoints *corev1.Endpoints, opts v1.UpdateOptions) (result *corev1.Endpoints, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(endpointsResource, c.ns, endpoints), &corev1.Endpoints{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Endpoints), err +} + +// Delete takes name of the endpoints and deletes it. Returns an error if one occurs. +func (c *FakeEndpoints) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(endpointsResource, c.ns, name, opts), &corev1.Endpoints{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeEndpoints) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(endpointsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &corev1.EndpointsList{}) + return err +} + +// Patch applies the patch and returns the patched endpoints. +func (c *FakeEndpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Endpoints, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(endpointsResource, c.ns, name, pt, data, subresources...), &corev1.Endpoints{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Endpoints), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied endpoints. +func (c *FakeEndpoints) Apply(ctx context.Context, endpoints *applyconfigurationscorev1.EndpointsApplyConfiguration, opts v1.ApplyOptions) (result *corev1.Endpoints, err error) { + if endpoints == nil { + return nil, fmt.Errorf("endpoints provided to Apply must not be nil") + } + data, err := json.Marshal(endpoints) + if err != nil { + return nil, err + } + name := endpoints.Name + if name == nil { + return nil, fmt.Errorf("endpoints.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(endpointsResource, c.ns, *name, types.ApplyPatchType, data), &corev1.Endpoints{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Endpoints), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go new file mode 100644 index 0000000000..9518839431 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakeEvents implements EventInterface +type FakeEvents struct { + Fake *FakeCoreV1 + ns string +} + +var eventsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "events"} + +var eventsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Event"} + +// Get takes name of the event, and returns the corresponding event object, and an error if there is any. +func (c *FakeEvents) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(eventsResource, c.ns, name), &corev1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Event), err +} + +// List takes label and field selectors, and returns the list of Events that match those selectors. +func (c *FakeEvents) List(ctx context.Context, opts v1.ListOptions) (result *corev1.EventList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(eventsResource, eventsKind, c.ns, opts), &corev1.EventList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.EventList{ListMeta: obj.(*corev1.EventList).ListMeta} + for _, item := range obj.(*corev1.EventList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested events. +func (c *FakeEvents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(eventsResource, c.ns, opts)) + +} + +// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. +func (c *FakeEvents) Create(ctx context.Context, event *corev1.Event, opts v1.CreateOptions) (result *corev1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &corev1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Event), err +} + +// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. +func (c *FakeEvents) Update(ctx context.Context, event *corev1.Event, opts v1.UpdateOptions) (result *corev1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &corev1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Event), err +} + +// Delete takes name of the event and deletes it. Returns an error if one occurs. +func (c *FakeEvents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(eventsResource, c.ns, name, opts), &corev1.Event{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeEvents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &corev1.EventList{}) + return err +} + +// Patch applies the patch and returns the patched event. +func (c *FakeEvents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, pt, data, subresources...), &corev1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Event), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied event. +func (c *FakeEvents) Apply(ctx context.Context, event *applyconfigurationscorev1.EventApplyConfiguration, opts v1.ApplyOptions) (result *corev1.Event, err error) { + if event == nil { + return nil, fmt.Errorf("event provided to Apply must not be nil") + } + data, err := json.Marshal(event) + if err != nil { + return nil, err + } + name := event.Name + if name == nil { + return nil, fmt.Errorf("event.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, *name, types.ApplyPatchType, data), &corev1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Event), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event_expansion.go new file mode 100644 index 0000000000..48282f86e3 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event_expansion.go @@ -0,0 +1,101 @@ +/* +Copyright 2014 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 fake + +import ( + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" + core "k8s.io/client-go/testing" +) + +func (c *FakeEvents) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) { + var action core.CreateActionImpl + if c.ns != "" { + action = core.NewCreateAction(eventsResource, c.ns, event) + } else { + action = core.NewCreateAction(eventsResource, event.GetNamespace(), event) + } + obj, err := c.Fake.Invokes(action, event) + if obj == nil { + return nil, err + } + + return obj.(*v1.Event), err +} + +// Update replaces an existing event. Returns the copy of the event the server returns, or an error. +func (c *FakeEvents) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) { + var action core.UpdateActionImpl + if c.ns != "" { + action = core.NewUpdateAction(eventsResource, c.ns, event) + } else { + action = core.NewUpdateAction(eventsResource, event.GetNamespace(), event) + } + obj, err := c.Fake.Invokes(action, event) + if obj == nil { + return nil, err + } + + return obj.(*v1.Event), err +} + +// PatchWithEventNamespace patches an existing event. Returns the copy of the event the server returns, or an error. +// TODO: Should take a PatchType as an argument probably. +func (c *FakeEvents) PatchWithEventNamespace(event *v1.Event, data []byte) (*v1.Event, error) { + // TODO: Should be configurable to support additional patch strategies. + pt := types.StrategicMergePatchType + var action core.PatchActionImpl + if c.ns != "" { + action = core.NewPatchAction(eventsResource, c.ns, event.Name, pt, data) + } else { + action = core.NewPatchAction(eventsResource, event.GetNamespace(), event.Name, pt, data) + } + obj, err := c.Fake.Invokes(action, event) + if obj == nil { + return nil, err + } + + return obj.(*v1.Event), err +} + +// Search returns a list of events matching the specified object. +func (c *FakeEvents) Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*v1.EventList, error) { + var action core.ListActionImpl + if c.ns != "" { + action = core.NewListAction(eventsResource, eventsKind, c.ns, metav1.ListOptions{}) + } else { + action = core.NewListAction(eventsResource, eventsKind, v1.NamespaceDefault, metav1.ListOptions{}) + } + obj, err := c.Fake.Invokes(action, &v1.EventList{}) + if obj == nil { + return nil, err + } + + return obj.(*v1.EventList), err +} + +func (c *FakeEvents) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector { + action := core.GenericActionImpl{} + action.Verb = "get-field-selector" + action.Resource = eventsResource + + c.Fake.Invokes(action, nil) + return fields.Everything() +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go new file mode 100644 index 0000000000..7487285e91 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakeLimitRanges implements LimitRangeInterface +type FakeLimitRanges struct { + Fake *FakeCoreV1 + ns string +} + +var limitrangesResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "limitranges"} + +var limitrangesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "LimitRange"} + +// Get takes name of the limitRange, and returns the corresponding limitRange object, and an error if there is any. +func (c *FakeLimitRanges) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.LimitRange, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(limitrangesResource, c.ns, name), &corev1.LimitRange{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.LimitRange), err +} + +// List takes label and field selectors, and returns the list of LimitRanges that match those selectors. +func (c *FakeLimitRanges) List(ctx context.Context, opts v1.ListOptions) (result *corev1.LimitRangeList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(limitrangesResource, limitrangesKind, c.ns, opts), &corev1.LimitRangeList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.LimitRangeList{ListMeta: obj.(*corev1.LimitRangeList).ListMeta} + for _, item := range obj.(*corev1.LimitRangeList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested limitRanges. +func (c *FakeLimitRanges) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(limitrangesResource, c.ns, opts)) + +} + +// Create takes the representation of a limitRange and creates it. Returns the server's representation of the limitRange, and an error, if there is any. +func (c *FakeLimitRanges) Create(ctx context.Context, limitRange *corev1.LimitRange, opts v1.CreateOptions) (result *corev1.LimitRange, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(limitrangesResource, c.ns, limitRange), &corev1.LimitRange{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.LimitRange), err +} + +// Update takes the representation of a limitRange and updates it. Returns the server's representation of the limitRange, and an error, if there is any. +func (c *FakeLimitRanges) Update(ctx context.Context, limitRange *corev1.LimitRange, opts v1.UpdateOptions) (result *corev1.LimitRange, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(limitrangesResource, c.ns, limitRange), &corev1.LimitRange{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.LimitRange), err +} + +// Delete takes name of the limitRange and deletes it. Returns an error if one occurs. +func (c *FakeLimitRanges) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(limitrangesResource, c.ns, name, opts), &corev1.LimitRange{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeLimitRanges) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(limitrangesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &corev1.LimitRangeList{}) + return err +} + +// Patch applies the patch and returns the patched limitRange. +func (c *FakeLimitRanges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.LimitRange, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(limitrangesResource, c.ns, name, pt, data, subresources...), &corev1.LimitRange{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.LimitRange), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied limitRange. +func (c *FakeLimitRanges) Apply(ctx context.Context, limitRange *applyconfigurationscorev1.LimitRangeApplyConfiguration, opts v1.ApplyOptions) (result *corev1.LimitRange, err error) { + if limitRange == nil { + return nil, fmt.Errorf("limitRange provided to Apply must not be nil") + } + data, err := json.Marshal(limitRange) + if err != nil { + return nil, err + } + name := limitRange.Name + if name == nil { + return nil, fmt.Errorf("limitRange.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(limitrangesResource, c.ns, *name, types.ApplyPatchType, data), &corev1.LimitRange{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.LimitRange), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go new file mode 100644 index 0000000000..83ada9f723 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go @@ -0,0 +1,171 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakeNamespaces implements NamespaceInterface +type FakeNamespaces struct { + Fake *FakeCoreV1 +} + +var namespacesResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "namespaces"} + +var namespacesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Namespace"} + +// Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any. +func (c *FakeNamespaces) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Namespace, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(namespacesResource, name), &corev1.Namespace{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.Namespace), err +} + +// List takes label and field selectors, and returns the list of Namespaces that match those selectors. +func (c *FakeNamespaces) List(ctx context.Context, opts v1.ListOptions) (result *corev1.NamespaceList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(namespacesResource, namespacesKind, opts), &corev1.NamespaceList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.NamespaceList{ListMeta: obj.(*corev1.NamespaceList).ListMeta} + for _, item := range obj.(*corev1.NamespaceList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested namespaces. +func (c *FakeNamespaces) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(namespacesResource, opts)) +} + +// Create takes the representation of a namespace and creates it. Returns the server's representation of the namespace, and an error, if there is any. +func (c *FakeNamespaces) Create(ctx context.Context, namespace *corev1.Namespace, opts v1.CreateOptions) (result *corev1.Namespace, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(namespacesResource, namespace), &corev1.Namespace{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.Namespace), err +} + +// Update takes the representation of a namespace and updates it. Returns the server's representation of the namespace, and an error, if there is any. +func (c *FakeNamespaces) Update(ctx context.Context, namespace *corev1.Namespace, opts v1.UpdateOptions) (result *corev1.Namespace, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(namespacesResource, namespace), &corev1.Namespace{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.Namespace), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeNamespaces) UpdateStatus(ctx context.Context, namespace *corev1.Namespace, opts v1.UpdateOptions) (*corev1.Namespace, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(namespacesResource, "status", namespace), &corev1.Namespace{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.Namespace), err +} + +// Delete takes name of the namespace and deletes it. Returns an error if one occurs. +func (c *FakeNamespaces) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(namespacesResource, name, opts), &corev1.Namespace{}) + return err +} + +// Patch applies the patch and returns the patched namespace. +func (c *FakeNamespaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Namespace, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(namespacesResource, name, pt, data, subresources...), &corev1.Namespace{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.Namespace), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied namespace. +func (c *FakeNamespaces) Apply(ctx context.Context, namespace *applyconfigurationscorev1.NamespaceApplyConfiguration, opts v1.ApplyOptions) (result *corev1.Namespace, err error) { + if namespace == nil { + return nil, fmt.Errorf("namespace provided to Apply must not be nil") + } + data, err := json.Marshal(namespace) + if err != nil { + return nil, err + } + name := namespace.Name + if name == nil { + return nil, fmt.Errorf("namespace.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(namespacesResource, *name, types.ApplyPatchType, data), &corev1.Namespace{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.Namespace), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeNamespaces) ApplyStatus(ctx context.Context, namespace *applyconfigurationscorev1.NamespaceApplyConfiguration, opts v1.ApplyOptions) (result *corev1.Namespace, err error) { + if namespace == nil { + return nil, fmt.Errorf("namespace provided to Apply must not be nil") + } + data, err := json.Marshal(namespace) + if err != nil { + return nil, err + } + name := namespace.Name + if name == nil { + return nil, fmt.Errorf("namespace.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(namespacesResource, *name, types.ApplyPatchType, data, "status"), &corev1.Namespace{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.Namespace), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace_expansion.go new file mode 100644 index 0000000000..d86b328a4d --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace_expansion.go @@ -0,0 +1,40 @@ +/* +Copyright 2014 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 fake + +import ( + "context" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + core "k8s.io/client-go/testing" +) + +func (c *FakeNamespaces) Finalize(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error) { + action := core.CreateActionImpl{} + action.Verb = "create" + action.Resource = namespacesResource + action.Subresource = "finalize" + action.Object = namespace + + obj, err := c.Fake.Invokes(action, namespace) + if obj == nil { + return nil, err + } + + return obj.(*v1.Namespace), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go new file mode 100644 index 0000000000..82816deb44 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go @@ -0,0 +1,179 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakeNodes implements NodeInterface +type FakeNodes struct { + Fake *FakeCoreV1 +} + +var nodesResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "nodes"} + +var nodesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Node"} + +// Get takes name of the node, and returns the corresponding node object, and an error if there is any. +func (c *FakeNodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Node, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(nodesResource, name), &corev1.Node{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.Node), err +} + +// List takes label and field selectors, and returns the list of Nodes that match those selectors. +func (c *FakeNodes) List(ctx context.Context, opts v1.ListOptions) (result *corev1.NodeList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(nodesResource, nodesKind, opts), &corev1.NodeList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.NodeList{ListMeta: obj.(*corev1.NodeList).ListMeta} + for _, item := range obj.(*corev1.NodeList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested nodes. +func (c *FakeNodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(nodesResource, opts)) +} + +// Create takes the representation of a node and creates it. Returns the server's representation of the node, and an error, if there is any. +func (c *FakeNodes) Create(ctx context.Context, node *corev1.Node, opts v1.CreateOptions) (result *corev1.Node, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(nodesResource, node), &corev1.Node{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.Node), err +} + +// Update takes the representation of a node and updates it. Returns the server's representation of the node, and an error, if there is any. +func (c *FakeNodes) Update(ctx context.Context, node *corev1.Node, opts v1.UpdateOptions) (result *corev1.Node, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(nodesResource, node), &corev1.Node{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.Node), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeNodes) UpdateStatus(ctx context.Context, node *corev1.Node, opts v1.UpdateOptions) (*corev1.Node, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(nodesResource, "status", node), &corev1.Node{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.Node), err +} + +// Delete takes name of the node and deletes it. Returns an error if one occurs. +func (c *FakeNodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(nodesResource, name, opts), &corev1.Node{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeNodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(nodesResource, listOpts) + + _, err := c.Fake.Invokes(action, &corev1.NodeList{}) + return err +} + +// Patch applies the patch and returns the patched node. +func (c *FakeNodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Node, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(nodesResource, name, pt, data, subresources...), &corev1.Node{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.Node), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied node. +func (c *FakeNodes) Apply(ctx context.Context, node *applyconfigurationscorev1.NodeApplyConfiguration, opts v1.ApplyOptions) (result *corev1.Node, err error) { + if node == nil { + return nil, fmt.Errorf("node provided to Apply must not be nil") + } + data, err := json.Marshal(node) + if err != nil { + return nil, err + } + name := node.Name + if name == nil { + return nil, fmt.Errorf("node.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(nodesResource, *name, types.ApplyPatchType, data), &corev1.Node{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.Node), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeNodes) ApplyStatus(ctx context.Context, node *applyconfigurationscorev1.NodeApplyConfiguration, opts v1.ApplyOptions) (result *corev1.Node, err error) { + if node == nil { + return nil, fmt.Errorf("node provided to Apply must not be nil") + } + data, err := json.Marshal(node) + if err != nil { + return nil, err + } + name := node.Name + if name == nil { + return nil, fmt.Errorf("node.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(nodesResource, *name, types.ApplyPatchType, data, "status"), &corev1.Node{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.Node), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node_expansion.go new file mode 100644 index 0000000000..eccf9fec63 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node_expansion.go @@ -0,0 +1,38 @@ +/* +Copyright 2016 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 fake + +import ( + "context" + + v1 "k8s.io/api/core/v1" + types "k8s.io/apimachinery/pkg/types" + core "k8s.io/client-go/testing" +) + +// TODO: Should take a PatchType as an argument probably. +func (c *FakeNodes) PatchStatus(_ context.Context, nodeName string, data []byte) (*v1.Node, error) { + // TODO: Should be configurable to support additional patch strategies. + pt := types.StrategicMergePatchType + obj, err := c.Fake.Invokes( + core.NewRootPatchSubresourceAction(nodesResource, nodeName, pt, data, "status"), &v1.Node{}) + if obj == nil { + return nil, err + } + + return obj.(*v1.Node), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go new file mode 100644 index 0000000000..d071a45dbb --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go @@ -0,0 +1,179 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakePersistentVolumes implements PersistentVolumeInterface +type FakePersistentVolumes struct { + Fake *FakeCoreV1 +} + +var persistentvolumesResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "persistentvolumes"} + +var persistentvolumesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PersistentVolume"} + +// Get takes name of the persistentVolume, and returns the corresponding persistentVolume object, and an error if there is any. +func (c *FakePersistentVolumes) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.PersistentVolume, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(persistentvolumesResource, name), &corev1.PersistentVolume{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.PersistentVolume), err +} + +// List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors. +func (c *FakePersistentVolumes) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PersistentVolumeList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(persistentvolumesResource, persistentvolumesKind, opts), &corev1.PersistentVolumeList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.PersistentVolumeList{ListMeta: obj.(*corev1.PersistentVolumeList).ListMeta} + for _, item := range obj.(*corev1.PersistentVolumeList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested persistentVolumes. +func (c *FakePersistentVolumes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(persistentvolumesResource, opts)) +} + +// Create takes the representation of a persistentVolume and creates it. Returns the server's representation of the persistentVolume, and an error, if there is any. +func (c *FakePersistentVolumes) Create(ctx context.Context, persistentVolume *corev1.PersistentVolume, opts v1.CreateOptions) (result *corev1.PersistentVolume, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(persistentvolumesResource, persistentVolume), &corev1.PersistentVolume{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.PersistentVolume), err +} + +// Update takes the representation of a persistentVolume and updates it. Returns the server's representation of the persistentVolume, and an error, if there is any. +func (c *FakePersistentVolumes) Update(ctx context.Context, persistentVolume *corev1.PersistentVolume, opts v1.UpdateOptions) (result *corev1.PersistentVolume, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(persistentvolumesResource, persistentVolume), &corev1.PersistentVolume{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.PersistentVolume), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakePersistentVolumes) UpdateStatus(ctx context.Context, persistentVolume *corev1.PersistentVolume, opts v1.UpdateOptions) (*corev1.PersistentVolume, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(persistentvolumesResource, "status", persistentVolume), &corev1.PersistentVolume{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.PersistentVolume), err +} + +// Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs. +func (c *FakePersistentVolumes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(persistentvolumesResource, name, opts), &corev1.PersistentVolume{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePersistentVolumes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(persistentvolumesResource, listOpts) + + _, err := c.Fake.Invokes(action, &corev1.PersistentVolumeList{}) + return err +} + +// Patch applies the patch and returns the patched persistentVolume. +func (c *FakePersistentVolumes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.PersistentVolume, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(persistentvolumesResource, name, pt, data, subresources...), &corev1.PersistentVolume{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.PersistentVolume), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied persistentVolume. +func (c *FakePersistentVolumes) Apply(ctx context.Context, persistentVolume *applyconfigurationscorev1.PersistentVolumeApplyConfiguration, opts v1.ApplyOptions) (result *corev1.PersistentVolume, err error) { + if persistentVolume == nil { + return nil, fmt.Errorf("persistentVolume provided to Apply must not be nil") + } + data, err := json.Marshal(persistentVolume) + if err != nil { + return nil, err + } + name := persistentVolume.Name + if name == nil { + return nil, fmt.Errorf("persistentVolume.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(persistentvolumesResource, *name, types.ApplyPatchType, data), &corev1.PersistentVolume{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.PersistentVolume), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakePersistentVolumes) ApplyStatus(ctx context.Context, persistentVolume *applyconfigurationscorev1.PersistentVolumeApplyConfiguration, opts v1.ApplyOptions) (result *corev1.PersistentVolume, err error) { + if persistentVolume == nil { + return nil, fmt.Errorf("persistentVolume provided to Apply must not be nil") + } + data, err := json.Marshal(persistentVolume) + if err != nil { + return nil, err + } + name := persistentVolume.Name + if name == nil { + return nil, fmt.Errorf("persistentVolume.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(persistentvolumesResource, *name, types.ApplyPatchType, data, "status"), &corev1.PersistentVolume{}) + if obj == nil { + return nil, err + } + return obj.(*corev1.PersistentVolume), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go new file mode 100644 index 0000000000..6e4cef2602 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakePersistentVolumeClaims implements PersistentVolumeClaimInterface +type FakePersistentVolumeClaims struct { + Fake *FakeCoreV1 + ns string +} + +var persistentvolumeclaimsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "persistentvolumeclaims"} + +var persistentvolumeclaimsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PersistentVolumeClaim"} + +// Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any. +func (c *FakePersistentVolumeClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.PersistentVolumeClaim, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(persistentvolumeclaimsResource, c.ns, name), &corev1.PersistentVolumeClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.PersistentVolumeClaim), err +} + +// List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors. +func (c *FakePersistentVolumeClaims) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PersistentVolumeClaimList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(persistentvolumeclaimsResource, persistentvolumeclaimsKind, c.ns, opts), &corev1.PersistentVolumeClaimList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.PersistentVolumeClaimList{ListMeta: obj.(*corev1.PersistentVolumeClaimList).ListMeta} + for _, item := range obj.(*corev1.PersistentVolumeClaimList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested persistentVolumeClaims. +func (c *FakePersistentVolumeClaims) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(persistentvolumeclaimsResource, c.ns, opts)) + +} + +// Create takes the representation of a persistentVolumeClaim and creates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. +func (c *FakePersistentVolumeClaims) Create(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim, opts v1.CreateOptions) (result *corev1.PersistentVolumeClaim, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.PersistentVolumeClaim), err +} + +// Update takes the representation of a persistentVolumeClaim and updates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. +func (c *FakePersistentVolumeClaims) Update(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim, opts v1.UpdateOptions) (result *corev1.PersistentVolumeClaim, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.PersistentVolumeClaim), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakePersistentVolumeClaims) UpdateStatus(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim, opts v1.UpdateOptions) (*corev1.PersistentVolumeClaim, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(persistentvolumeclaimsResource, "status", c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.PersistentVolumeClaim), err +} + +// Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs. +func (c *FakePersistentVolumeClaims) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(persistentvolumeclaimsResource, c.ns, name, opts), &corev1.PersistentVolumeClaim{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePersistentVolumeClaims) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &corev1.PersistentVolumeClaimList{}) + return err +} + +// Patch applies the patch and returns the patched persistentVolumeClaim. +func (c *FakePersistentVolumeClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.PersistentVolumeClaim, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, pt, data, subresources...), &corev1.PersistentVolumeClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.PersistentVolumeClaim), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied persistentVolumeClaim. +func (c *FakePersistentVolumeClaims) Apply(ctx context.Context, persistentVolumeClaim *applyconfigurationscorev1.PersistentVolumeClaimApplyConfiguration, opts v1.ApplyOptions) (result *corev1.PersistentVolumeClaim, err error) { + if persistentVolumeClaim == nil { + return nil, fmt.Errorf("persistentVolumeClaim provided to Apply must not be nil") + } + data, err := json.Marshal(persistentVolumeClaim) + if err != nil { + return nil, err + } + name := persistentVolumeClaim.Name + if name == nil { + return nil, fmt.Errorf("persistentVolumeClaim.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, *name, types.ApplyPatchType, data), &corev1.PersistentVolumeClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.PersistentVolumeClaim), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakePersistentVolumeClaims) ApplyStatus(ctx context.Context, persistentVolumeClaim *applyconfigurationscorev1.PersistentVolumeClaimApplyConfiguration, opts v1.ApplyOptions) (result *corev1.PersistentVolumeClaim, err error) { + if persistentVolumeClaim == nil { + return nil, fmt.Errorf("persistentVolumeClaim provided to Apply must not be nil") + } + data, err := json.Marshal(persistentVolumeClaim) + if err != nil { + return nil, err + } + name := persistentVolumeClaim.Name + if name == nil { + return nil, fmt.Errorf("persistentVolumeClaim.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &corev1.PersistentVolumeClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.PersistentVolumeClaim), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go new file mode 100644 index 0000000000..38a1479550 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go @@ -0,0 +1,201 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakePods implements PodInterface +type FakePods struct { + Fake *FakeCoreV1 + ns string +} + +var podsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"} + +var podsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Pod"} + +// Get takes name of the pod, and returns the corresponding pod object, and an error if there is any. +func (c *FakePods) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Pod, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(podsResource, c.ns, name), &corev1.Pod{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Pod), err +} + +// List takes label and field selectors, and returns the list of Pods that match those selectors. +func (c *FakePods) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PodList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(podsResource, podsKind, c.ns, opts), &corev1.PodList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.PodList{ListMeta: obj.(*corev1.PodList).ListMeta} + for _, item := range obj.(*corev1.PodList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested pods. +func (c *FakePods) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(podsResource, c.ns, opts)) + +} + +// Create takes the representation of a pod and creates it. Returns the server's representation of the pod, and an error, if there is any. +func (c *FakePods) Create(ctx context.Context, pod *corev1.Pod, opts v1.CreateOptions) (result *corev1.Pod, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(podsResource, c.ns, pod), &corev1.Pod{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Pod), err +} + +// Update takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any. +func (c *FakePods) Update(ctx context.Context, pod *corev1.Pod, opts v1.UpdateOptions) (result *corev1.Pod, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(podsResource, c.ns, pod), &corev1.Pod{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Pod), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakePods) UpdateStatus(ctx context.Context, pod *corev1.Pod, opts v1.UpdateOptions) (*corev1.Pod, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(podsResource, "status", c.ns, pod), &corev1.Pod{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Pod), err +} + +// Delete takes name of the pod and deletes it. Returns an error if one occurs. +func (c *FakePods) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(podsResource, c.ns, name, opts), &corev1.Pod{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePods) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(podsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &corev1.PodList{}) + return err +} + +// Patch applies the patch and returns the patched pod. +func (c *FakePods) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Pod, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(podsResource, c.ns, name, pt, data, subresources...), &corev1.Pod{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Pod), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied pod. +func (c *FakePods) Apply(ctx context.Context, pod *applyconfigurationscorev1.PodApplyConfiguration, opts v1.ApplyOptions) (result *corev1.Pod, err error) { + if pod == nil { + return nil, fmt.Errorf("pod provided to Apply must not be nil") + } + data, err := json.Marshal(pod) + if err != nil { + return nil, err + } + name := pod.Name + if name == nil { + return nil, fmt.Errorf("pod.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(podsResource, c.ns, *name, types.ApplyPatchType, data), &corev1.Pod{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Pod), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakePods) ApplyStatus(ctx context.Context, pod *applyconfigurationscorev1.PodApplyConfiguration, opts v1.ApplyOptions) (result *corev1.Pod, err error) { + if pod == nil { + return nil, fmt.Errorf("pod provided to Apply must not be nil") + } + data, err := json.Marshal(pod) + if err != nil { + return nil, err + } + name := pod.Name + if name == nil { + return nil, fmt.Errorf("pod.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(podsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &corev1.Pod{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Pod), err +} + +// UpdateEphemeralContainers takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any. +func (c *FakePods) UpdateEphemeralContainers(ctx context.Context, podName string, pod *corev1.Pod, opts v1.UpdateOptions) (result *corev1.Pod, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(podsResource, "ephemeralcontainers", c.ns, pod), &corev1.Pod{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Pod), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go new file mode 100644 index 0000000000..c814cadb05 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go @@ -0,0 +1,112 @@ +/* +Copyright 2014 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 fake + +import ( + "context" + "fmt" + "io" + "net/http" + "strings" + + v1 "k8s.io/api/core/v1" + policyv1 "k8s.io/api/policy/v1" + policyv1beta1 "k8s.io/api/policy/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes/scheme" + restclient "k8s.io/client-go/rest" + fakerest "k8s.io/client-go/rest/fake" + core "k8s.io/client-go/testing" +) + +func (c *FakePods) Bind(ctx context.Context, binding *v1.Binding, opts metav1.CreateOptions) error { + action := core.CreateActionImpl{} + action.Verb = "create" + action.Namespace = binding.Namespace + action.Resource = podsResource + action.Subresource = "binding" + action.Object = binding + + _, err := c.Fake.Invokes(action, binding) + return err +} + +func (c *FakePods) GetBinding(name string) (result *v1.Binding, err error) { + obj, err := c.Fake. + Invokes(core.NewGetSubresourceAction(podsResource, c.ns, "binding", name), &v1.Binding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.Binding), err +} + +func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request { + action := core.GenericActionImpl{} + action.Verb = "get" + action.Namespace = c.ns + action.Resource = podsResource + action.Subresource = "log" + action.Value = opts + + _, _ = c.Fake.Invokes(action, &v1.Pod{}) + fakeClient := &fakerest.RESTClient{ + Client: fakerest.CreateHTTPClient(func(request *http.Request) (*http.Response, error) { + resp := &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(strings.NewReader("fake logs")), + } + return resp, nil + }), + NegotiatedSerializer: scheme.Codecs.WithoutConversion(), + GroupVersion: podsKind.GroupVersion(), + VersionedAPIPath: fmt.Sprintf("/api/v1/namespaces/%s/pods/%s/log", c.ns, name), + } + return fakeClient.Request() +} + +func (c *FakePods) Evict(ctx context.Context, eviction *policyv1beta1.Eviction) error { + return c.EvictV1beta1(ctx, eviction) +} + +func (c *FakePods) EvictV1(ctx context.Context, eviction *policyv1.Eviction) error { + action := core.CreateActionImpl{} + action.Verb = "create" + action.Namespace = c.ns + action.Resource = podsResource + action.Subresource = "eviction" + action.Object = eviction + + _, err := c.Fake.Invokes(action, eviction) + return err +} + +func (c *FakePods) EvictV1beta1(ctx context.Context, eviction *policyv1beta1.Eviction) error { + action := core.CreateActionImpl{} + action.Verb = "create" + action.Namespace = c.ns + action.Resource = podsResource + action.Subresource = "eviction" + action.Object = eviction + + _, err := c.Fake.Invokes(action, eviction) + return err +} + +func (c *FakePods) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper { + return c.Fake.InvokesProxy(core.NewProxyGetAction(podsResource, c.ns, scheme, name, port, path, params)) +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go new file mode 100644 index 0000000000..00711f36fb --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakePodTemplates implements PodTemplateInterface +type FakePodTemplates struct { + Fake *FakeCoreV1 + ns string +} + +var podtemplatesResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "podtemplates"} + +var podtemplatesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PodTemplate"} + +// Get takes name of the podTemplate, and returns the corresponding podTemplate object, and an error if there is any. +func (c *FakePodTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.PodTemplate, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(podtemplatesResource, c.ns, name), &corev1.PodTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.PodTemplate), err +} + +// List takes label and field selectors, and returns the list of PodTemplates that match those selectors. +func (c *FakePodTemplates) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PodTemplateList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(podtemplatesResource, podtemplatesKind, c.ns, opts), &corev1.PodTemplateList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.PodTemplateList{ListMeta: obj.(*corev1.PodTemplateList).ListMeta} + for _, item := range obj.(*corev1.PodTemplateList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested podTemplates. +func (c *FakePodTemplates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(podtemplatesResource, c.ns, opts)) + +} + +// Create takes the representation of a podTemplate and creates it. Returns the server's representation of the podTemplate, and an error, if there is any. +func (c *FakePodTemplates) Create(ctx context.Context, podTemplate *corev1.PodTemplate, opts v1.CreateOptions) (result *corev1.PodTemplate, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(podtemplatesResource, c.ns, podTemplate), &corev1.PodTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.PodTemplate), err +} + +// Update takes the representation of a podTemplate and updates it. Returns the server's representation of the podTemplate, and an error, if there is any. +func (c *FakePodTemplates) Update(ctx context.Context, podTemplate *corev1.PodTemplate, opts v1.UpdateOptions) (result *corev1.PodTemplate, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(podtemplatesResource, c.ns, podTemplate), &corev1.PodTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.PodTemplate), err +} + +// Delete takes name of the podTemplate and deletes it. Returns an error if one occurs. +func (c *FakePodTemplates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(podtemplatesResource, c.ns, name, opts), &corev1.PodTemplate{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePodTemplates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &corev1.PodTemplateList{}) + return err +} + +// Patch applies the patch and returns the patched podTemplate. +func (c *FakePodTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.PodTemplate, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(podtemplatesResource, c.ns, name, pt, data, subresources...), &corev1.PodTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.PodTemplate), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied podTemplate. +func (c *FakePodTemplates) Apply(ctx context.Context, podTemplate *applyconfigurationscorev1.PodTemplateApplyConfiguration, opts v1.ApplyOptions) (result *corev1.PodTemplate, err error) { + if podTemplate == nil { + return nil, fmt.Errorf("podTemplate provided to Apply must not be nil") + } + data, err := json.Marshal(podTemplate) + if err != nil { + return nil, err + } + name := podTemplate.Name + if name == nil { + return nil, fmt.Errorf("podTemplate.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(podtemplatesResource, c.ns, *name, types.ApplyPatchType, data), &corev1.PodTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.PodTemplate), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go new file mode 100644 index 0000000000..086f4dbf9f --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go @@ -0,0 +1,213 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + autoscalingv1 "k8s.io/api/autoscaling/v1" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakeReplicationControllers implements ReplicationControllerInterface +type FakeReplicationControllers struct { + Fake *FakeCoreV1 + ns string +} + +var replicationcontrollersResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "replicationcontrollers"} + +var replicationcontrollersKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ReplicationController"} + +// Get takes name of the replicationController, and returns the corresponding replicationController object, and an error if there is any. +func (c *FakeReplicationControllers) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.ReplicationController, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(replicationcontrollersResource, c.ns, name), &corev1.ReplicationController{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ReplicationController), err +} + +// List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors. +func (c *FakeReplicationControllers) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ReplicationControllerList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(replicationcontrollersResource, replicationcontrollersKind, c.ns, opts), &corev1.ReplicationControllerList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.ReplicationControllerList{ListMeta: obj.(*corev1.ReplicationControllerList).ListMeta} + for _, item := range obj.(*corev1.ReplicationControllerList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested replicationControllers. +func (c *FakeReplicationControllers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(replicationcontrollersResource, c.ns, opts)) + +} + +// Create takes the representation of a replicationController and creates it. Returns the server's representation of the replicationController, and an error, if there is any. +func (c *FakeReplicationControllers) Create(ctx context.Context, replicationController *corev1.ReplicationController, opts v1.CreateOptions) (result *corev1.ReplicationController, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(replicationcontrollersResource, c.ns, replicationController), &corev1.ReplicationController{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ReplicationController), err +} + +// Update takes the representation of a replicationController and updates it. Returns the server's representation of the replicationController, and an error, if there is any. +func (c *FakeReplicationControllers) Update(ctx context.Context, replicationController *corev1.ReplicationController, opts v1.UpdateOptions) (result *corev1.ReplicationController, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(replicationcontrollersResource, c.ns, replicationController), &corev1.ReplicationController{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ReplicationController), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeReplicationControllers) UpdateStatus(ctx context.Context, replicationController *corev1.ReplicationController, opts v1.UpdateOptions) (*corev1.ReplicationController, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "status", c.ns, replicationController), &corev1.ReplicationController{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ReplicationController), err +} + +// Delete takes name of the replicationController and deletes it. Returns an error if one occurs. +func (c *FakeReplicationControllers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(replicationcontrollersResource, c.ns, name, opts), &corev1.ReplicationController{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeReplicationControllers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &corev1.ReplicationControllerList{}) + return err +} + +// Patch applies the patch and returns the patched replicationController. +func (c *FakeReplicationControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.ReplicationController, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, name, pt, data, subresources...), &corev1.ReplicationController{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ReplicationController), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied replicationController. +func (c *FakeReplicationControllers) Apply(ctx context.Context, replicationController *applyconfigurationscorev1.ReplicationControllerApplyConfiguration, opts v1.ApplyOptions) (result *corev1.ReplicationController, err error) { + if replicationController == nil { + return nil, fmt.Errorf("replicationController provided to Apply must not be nil") + } + data, err := json.Marshal(replicationController) + if err != nil { + return nil, err + } + name := replicationController.Name + if name == nil { + return nil, fmt.Errorf("replicationController.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, *name, types.ApplyPatchType, data), &corev1.ReplicationController{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ReplicationController), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeReplicationControllers) ApplyStatus(ctx context.Context, replicationController *applyconfigurationscorev1.ReplicationControllerApplyConfiguration, opts v1.ApplyOptions) (result *corev1.ReplicationController, err error) { + if replicationController == nil { + return nil, fmt.Errorf("replicationController provided to Apply must not be nil") + } + data, err := json.Marshal(replicationController) + if err != nil { + return nil, err + } + name := replicationController.Name + if name == nil { + return nil, fmt.Errorf("replicationController.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, *name, types.ApplyPatchType, data, "status"), &corev1.ReplicationController{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ReplicationController), err +} + +// GetScale takes name of the replicationController, and returns the corresponding scale object, and an error if there is any. +func (c *FakeReplicationControllers) GetScale(ctx context.Context, replicationControllerName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetSubresourceAction(replicationcontrollersResource, c.ns, "scale", replicationControllerName), &autoscalingv1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.Scale), err +} + +// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. +func (c *FakeReplicationControllers) UpdateScale(ctx context.Context, replicationControllerName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "scale", c.ns, scale), &autoscalingv1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscalingv1.Scale), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go new file mode 100644 index 0000000000..9e008a9732 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakeResourceQuotas implements ResourceQuotaInterface +type FakeResourceQuotas struct { + Fake *FakeCoreV1 + ns string +} + +var resourcequotasResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "resourcequotas"} + +var resourcequotasKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ResourceQuota"} + +// Get takes name of the resourceQuota, and returns the corresponding resourceQuota object, and an error if there is any. +func (c *FakeResourceQuotas) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.ResourceQuota, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(resourcequotasResource, c.ns, name), &corev1.ResourceQuota{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ResourceQuota), err +} + +// List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors. +func (c *FakeResourceQuotas) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ResourceQuotaList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(resourcequotasResource, resourcequotasKind, c.ns, opts), &corev1.ResourceQuotaList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.ResourceQuotaList{ListMeta: obj.(*corev1.ResourceQuotaList).ListMeta} + for _, item := range obj.(*corev1.ResourceQuotaList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested resourceQuotas. +func (c *FakeResourceQuotas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(resourcequotasResource, c.ns, opts)) + +} + +// Create takes the representation of a resourceQuota and creates it. Returns the server's representation of the resourceQuota, and an error, if there is any. +func (c *FakeResourceQuotas) Create(ctx context.Context, resourceQuota *corev1.ResourceQuota, opts v1.CreateOptions) (result *corev1.ResourceQuota, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(resourcequotasResource, c.ns, resourceQuota), &corev1.ResourceQuota{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ResourceQuota), err +} + +// Update takes the representation of a resourceQuota and updates it. Returns the server's representation of the resourceQuota, and an error, if there is any. +func (c *FakeResourceQuotas) Update(ctx context.Context, resourceQuota *corev1.ResourceQuota, opts v1.UpdateOptions) (result *corev1.ResourceQuota, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(resourcequotasResource, c.ns, resourceQuota), &corev1.ResourceQuota{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ResourceQuota), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeResourceQuotas) UpdateStatus(ctx context.Context, resourceQuota *corev1.ResourceQuota, opts v1.UpdateOptions) (*corev1.ResourceQuota, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(resourcequotasResource, "status", c.ns, resourceQuota), &corev1.ResourceQuota{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ResourceQuota), err +} + +// Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs. +func (c *FakeResourceQuotas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(resourcequotasResource, c.ns, name, opts), &corev1.ResourceQuota{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeResourceQuotas) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &corev1.ResourceQuotaList{}) + return err +} + +// Patch applies the patch and returns the patched resourceQuota. +func (c *FakeResourceQuotas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.ResourceQuota, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourcequotasResource, c.ns, name, pt, data, subresources...), &corev1.ResourceQuota{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ResourceQuota), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceQuota. +func (c *FakeResourceQuotas) Apply(ctx context.Context, resourceQuota *applyconfigurationscorev1.ResourceQuotaApplyConfiguration, opts v1.ApplyOptions) (result *corev1.ResourceQuota, err error) { + if resourceQuota == nil { + return nil, fmt.Errorf("resourceQuota provided to Apply must not be nil") + } + data, err := json.Marshal(resourceQuota) + if err != nil { + return nil, err + } + name := resourceQuota.Name + if name == nil { + return nil, fmt.Errorf("resourceQuota.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourcequotasResource, c.ns, *name, types.ApplyPatchType, data), &corev1.ResourceQuota{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ResourceQuota), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeResourceQuotas) ApplyStatus(ctx context.Context, resourceQuota *applyconfigurationscorev1.ResourceQuotaApplyConfiguration, opts v1.ApplyOptions) (result *corev1.ResourceQuota, err error) { + if resourceQuota == nil { + return nil, fmt.Errorf("resourceQuota provided to Apply must not be nil") + } + data, err := json.Marshal(resourceQuota) + if err != nil { + return nil, err + } + name := resourceQuota.Name + if name == nil { + return nil, fmt.Errorf("resourceQuota.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourcequotasResource, c.ns, *name, types.ApplyPatchType, data, "status"), &corev1.ResourceQuota{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ResourceQuota), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go new file mode 100644 index 0000000000..b467305330 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakeSecrets implements SecretInterface +type FakeSecrets struct { + Fake *FakeCoreV1 + ns string +} + +var secretsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "secrets"} + +var secretsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Secret"} + +// Get takes name of the secret, and returns the corresponding secret object, and an error if there is any. +func (c *FakeSecrets) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Secret, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(secretsResource, c.ns, name), &corev1.Secret{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Secret), err +} + +// List takes label and field selectors, and returns the list of Secrets that match those selectors. +func (c *FakeSecrets) List(ctx context.Context, opts v1.ListOptions) (result *corev1.SecretList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(secretsResource, secretsKind, c.ns, opts), &corev1.SecretList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.SecretList{ListMeta: obj.(*corev1.SecretList).ListMeta} + for _, item := range obj.(*corev1.SecretList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested secrets. +func (c *FakeSecrets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(secretsResource, c.ns, opts)) + +} + +// Create takes the representation of a secret and creates it. Returns the server's representation of the secret, and an error, if there is any. +func (c *FakeSecrets) Create(ctx context.Context, secret *corev1.Secret, opts v1.CreateOptions) (result *corev1.Secret, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(secretsResource, c.ns, secret), &corev1.Secret{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Secret), err +} + +// Update takes the representation of a secret and updates it. Returns the server's representation of the secret, and an error, if there is any. +func (c *FakeSecrets) Update(ctx context.Context, secret *corev1.Secret, opts v1.UpdateOptions) (result *corev1.Secret, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(secretsResource, c.ns, secret), &corev1.Secret{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Secret), err +} + +// Delete takes name of the secret and deletes it. Returns an error if one occurs. +func (c *FakeSecrets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(secretsResource, c.ns, name, opts), &corev1.Secret{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeSecrets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(secretsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &corev1.SecretList{}) + return err +} + +// Patch applies the patch and returns the patched secret. +func (c *FakeSecrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Secret, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(secretsResource, c.ns, name, pt, data, subresources...), &corev1.Secret{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Secret), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied secret. +func (c *FakeSecrets) Apply(ctx context.Context, secret *applyconfigurationscorev1.SecretApplyConfiguration, opts v1.ApplyOptions) (result *corev1.Secret, err error) { + if secret == nil { + return nil, fmt.Errorf("secret provided to Apply must not be nil") + } + data, err := json.Marshal(secret) + if err != nil { + return nil, err + } + name := secret.Name + if name == nil { + return nil, fmt.Errorf("secret.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(secretsResource, c.ns, *name, types.ApplyPatchType, data), &corev1.Secret{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Secret), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go new file mode 100644 index 0000000000..bfbabec074 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go @@ -0,0 +1,182 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakeServices implements ServiceInterface +type FakeServices struct { + Fake *FakeCoreV1 + ns string +} + +var servicesResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "services"} + +var servicesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Service"} + +// Get takes name of the service, and returns the corresponding service object, and an error if there is any. +func (c *FakeServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Service, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(servicesResource, c.ns, name), &corev1.Service{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Service), err +} + +// List takes label and field selectors, and returns the list of Services that match those selectors. +func (c *FakeServices) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ServiceList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(servicesResource, servicesKind, c.ns, opts), &corev1.ServiceList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.ServiceList{ListMeta: obj.(*corev1.ServiceList).ListMeta} + for _, item := range obj.(*corev1.ServiceList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested services. +func (c *FakeServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(servicesResource, c.ns, opts)) + +} + +// Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any. +func (c *FakeServices) Create(ctx context.Context, service *corev1.Service, opts v1.CreateOptions) (result *corev1.Service, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(servicesResource, c.ns, service), &corev1.Service{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Service), err +} + +// Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any. +func (c *FakeServices) Update(ctx context.Context, service *corev1.Service, opts v1.UpdateOptions) (result *corev1.Service, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(servicesResource, c.ns, service), &corev1.Service{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Service), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeServices) UpdateStatus(ctx context.Context, service *corev1.Service, opts v1.UpdateOptions) (*corev1.Service, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(servicesResource, "status", c.ns, service), &corev1.Service{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Service), err +} + +// Delete takes name of the service and deletes it. Returns an error if one occurs. +func (c *FakeServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(servicesResource, c.ns, name, opts), &corev1.Service{}) + + return err +} + +// Patch applies the patch and returns the patched service. +func (c *FakeServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Service, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(servicesResource, c.ns, name, pt, data, subresources...), &corev1.Service{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Service), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied service. +func (c *FakeServices) Apply(ctx context.Context, service *applyconfigurationscorev1.ServiceApplyConfiguration, opts v1.ApplyOptions) (result *corev1.Service, err error) { + if service == nil { + return nil, fmt.Errorf("service provided to Apply must not be nil") + } + data, err := json.Marshal(service) + if err != nil { + return nil, err + } + name := service.Name + if name == nil { + return nil, fmt.Errorf("service.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(servicesResource, c.ns, *name, types.ApplyPatchType, data), &corev1.Service{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Service), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeServices) ApplyStatus(ctx context.Context, service *applyconfigurationscorev1.ServiceApplyConfiguration, opts v1.ApplyOptions) (result *corev1.Service, err error) { + if service == nil { + return nil, fmt.Errorf("service provided to Apply must not be nil") + } + data, err := json.Marshal(service) + if err != nil { + return nil, err + } + name := service.Name + if name == nil { + return nil, fmt.Errorf("service.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(servicesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &corev1.Service{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.Service), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service_expansion.go new file mode 100644 index 0000000000..92e4930d71 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service_expansion.go @@ -0,0 +1,26 @@ +/* +Copyright 2014 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 fake + +import ( + restclient "k8s.io/client-go/rest" + core "k8s.io/client-go/testing" +) + +func (c *FakeServices) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper { + return c.Fake.InvokesProxy(core.NewProxyGetAction(servicesResource, c.ns, scheme, name, port, path, params)) +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go new file mode 100644 index 0000000000..ff468957a7 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go @@ -0,0 +1,167 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + authenticationv1 "k8s.io/api/authentication/v1" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" + testing "k8s.io/client-go/testing" +) + +// FakeServiceAccounts implements ServiceAccountInterface +type FakeServiceAccounts struct { + Fake *FakeCoreV1 + ns string +} + +var serviceaccountsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "serviceaccounts"} + +var serviceaccountsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ServiceAccount"} + +// Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any. +func (c *FakeServiceAccounts) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.ServiceAccount, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(serviceaccountsResource, c.ns, name), &corev1.ServiceAccount{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ServiceAccount), err +} + +// List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors. +func (c *FakeServiceAccounts) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ServiceAccountList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(serviceaccountsResource, serviceaccountsKind, c.ns, opts), &corev1.ServiceAccountList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &corev1.ServiceAccountList{ListMeta: obj.(*corev1.ServiceAccountList).ListMeta} + for _, item := range obj.(*corev1.ServiceAccountList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested serviceAccounts. +func (c *FakeServiceAccounts) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(serviceaccountsResource, c.ns, opts)) + +} + +// Create takes the representation of a serviceAccount and creates it. Returns the server's representation of the serviceAccount, and an error, if there is any. +func (c *FakeServiceAccounts) Create(ctx context.Context, serviceAccount *corev1.ServiceAccount, opts v1.CreateOptions) (result *corev1.ServiceAccount, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(serviceaccountsResource, c.ns, serviceAccount), &corev1.ServiceAccount{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ServiceAccount), err +} + +// Update takes the representation of a serviceAccount and updates it. Returns the server's representation of the serviceAccount, and an error, if there is any. +func (c *FakeServiceAccounts) Update(ctx context.Context, serviceAccount *corev1.ServiceAccount, opts v1.UpdateOptions) (result *corev1.ServiceAccount, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(serviceaccountsResource, c.ns, serviceAccount), &corev1.ServiceAccount{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ServiceAccount), err +} + +// Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs. +func (c *FakeServiceAccounts) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(serviceaccountsResource, c.ns, name, opts), &corev1.ServiceAccount{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeServiceAccounts) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &corev1.ServiceAccountList{}) + return err +} + +// Patch applies the patch and returns the patched serviceAccount. +func (c *FakeServiceAccounts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.ServiceAccount, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, pt, data, subresources...), &corev1.ServiceAccount{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ServiceAccount), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied serviceAccount. +func (c *FakeServiceAccounts) Apply(ctx context.Context, serviceAccount *applyconfigurationscorev1.ServiceAccountApplyConfiguration, opts v1.ApplyOptions) (result *corev1.ServiceAccount, err error) { + if serviceAccount == nil { + return nil, fmt.Errorf("serviceAccount provided to Apply must not be nil") + } + data, err := json.Marshal(serviceAccount) + if err != nil { + return nil, err + } + name := serviceAccount.Name + if name == nil { + return nil, fmt.Errorf("serviceAccount.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(serviceaccountsResource, c.ns, *name, types.ApplyPatchType, data), &corev1.ServiceAccount{}) + + if obj == nil { + return nil, err + } + return obj.(*corev1.ServiceAccount), err +} + +// CreateToken takes the representation of a tokenRequest and creates it. Returns the server's representation of the tokenRequest, and an error, if there is any. +func (c *FakeServiceAccounts) CreateToken(ctx context.Context, serviceAccountName string, tokenRequest *authenticationv1.TokenRequest, opts v1.CreateOptions) (result *authenticationv1.TokenRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateSubresourceAction(serviceaccountsResource, serviceAccountName, "token", c.ns, tokenRequest), &authenticationv1.TokenRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*authenticationv1.TokenRequest), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake/fake_discovery_client.go b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake/fake_discovery_client.go new file mode 100644 index 0000000000..1ca9b23f59 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake/fake_discovery_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/discovery/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeDiscoveryV1 struct { + *testing.Fake +} + +func (c *FakeDiscoveryV1) EndpointSlices(namespace string) v1.EndpointSliceInterface { + return &FakeEndpointSlices{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeDiscoveryV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake/fake_endpointslice.go b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake/fake_endpointslice.go new file mode 100644 index 0000000000..20e58b151f --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake/fake_endpointslice.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + discoveryv1 "k8s.io/api/discovery/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsdiscoveryv1 "k8s.io/client-go/applyconfigurations/discovery/v1" + testing "k8s.io/client-go/testing" +) + +// FakeEndpointSlices implements EndpointSliceInterface +type FakeEndpointSlices struct { + Fake *FakeDiscoveryV1 + ns string +} + +var endpointslicesResource = schema.GroupVersionResource{Group: "discovery.k8s.io", Version: "v1", Resource: "endpointslices"} + +var endpointslicesKind = schema.GroupVersionKind{Group: "discovery.k8s.io", Version: "v1", Kind: "EndpointSlice"} + +// Get takes name of the endpointSlice, and returns the corresponding endpointSlice object, and an error if there is any. +func (c *FakeEndpointSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *discoveryv1.EndpointSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(endpointslicesResource, c.ns, name), &discoveryv1.EndpointSlice{}) + + if obj == nil { + return nil, err + } + return obj.(*discoveryv1.EndpointSlice), err +} + +// List takes label and field selectors, and returns the list of EndpointSlices that match those selectors. +func (c *FakeEndpointSlices) List(ctx context.Context, opts v1.ListOptions) (result *discoveryv1.EndpointSliceList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(endpointslicesResource, endpointslicesKind, c.ns, opts), &discoveryv1.EndpointSliceList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &discoveryv1.EndpointSliceList{ListMeta: obj.(*discoveryv1.EndpointSliceList).ListMeta} + for _, item := range obj.(*discoveryv1.EndpointSliceList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested endpointSlices. +func (c *FakeEndpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(endpointslicesResource, c.ns, opts)) + +} + +// Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. +func (c *FakeEndpointSlices) Create(ctx context.Context, endpointSlice *discoveryv1.EndpointSlice, opts v1.CreateOptions) (result *discoveryv1.EndpointSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(endpointslicesResource, c.ns, endpointSlice), &discoveryv1.EndpointSlice{}) + + if obj == nil { + return nil, err + } + return obj.(*discoveryv1.EndpointSlice), err +} + +// Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. +func (c *FakeEndpointSlices) Update(ctx context.Context, endpointSlice *discoveryv1.EndpointSlice, opts v1.UpdateOptions) (result *discoveryv1.EndpointSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(endpointslicesResource, c.ns, endpointSlice), &discoveryv1.EndpointSlice{}) + + if obj == nil { + return nil, err + } + return obj.(*discoveryv1.EndpointSlice), err +} + +// Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs. +func (c *FakeEndpointSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(endpointslicesResource, c.ns, name, opts), &discoveryv1.EndpointSlice{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeEndpointSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(endpointslicesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &discoveryv1.EndpointSliceList{}) + return err +} + +// Patch applies the patch and returns the patched endpointSlice. +func (c *FakeEndpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *discoveryv1.EndpointSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(endpointslicesResource, c.ns, name, pt, data, subresources...), &discoveryv1.EndpointSlice{}) + + if obj == nil { + return nil, err + } + return obj.(*discoveryv1.EndpointSlice), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied endpointSlice. +func (c *FakeEndpointSlices) Apply(ctx context.Context, endpointSlice *applyconfigurationsdiscoveryv1.EndpointSliceApplyConfiguration, opts v1.ApplyOptions) (result *discoveryv1.EndpointSlice, err error) { + if endpointSlice == nil { + return nil, fmt.Errorf("endpointSlice provided to Apply must not be nil") + } + data, err := json.Marshal(endpointSlice) + if err != nil { + return nil, err + } + name := endpointSlice.Name + if name == nil { + return nil, fmt.Errorf("endpointSlice.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(endpointslicesResource, c.ns, *name, types.ApplyPatchType, data), &discoveryv1.EndpointSlice{}) + + if obj == nil { + return nil, err + } + return obj.(*discoveryv1.EndpointSlice), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_discovery_client.go b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_discovery_client.go new file mode 100644 index 0000000000..e285de6476 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_discovery_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeDiscoveryV1beta1 struct { + *testing.Fake +} + +func (c *FakeDiscoveryV1beta1) EndpointSlices(namespace string) v1beta1.EndpointSliceInterface { + return &FakeEndpointSlices{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeDiscoveryV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_endpointslice.go b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_endpointslice.go new file mode 100644 index 0000000000..249de3446c --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_endpointslice.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/discovery/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + discoveryv1beta1 "k8s.io/client-go/applyconfigurations/discovery/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeEndpointSlices implements EndpointSliceInterface +type FakeEndpointSlices struct { + Fake *FakeDiscoveryV1beta1 + ns string +} + +var endpointslicesResource = schema.GroupVersionResource{Group: "discovery.k8s.io", Version: "v1beta1", Resource: "endpointslices"} + +var endpointslicesKind = schema.GroupVersionKind{Group: "discovery.k8s.io", Version: "v1beta1", Kind: "EndpointSlice"} + +// Get takes name of the endpointSlice, and returns the corresponding endpointSlice object, and an error if there is any. +func (c *FakeEndpointSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.EndpointSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(endpointslicesResource, c.ns, name), &v1beta1.EndpointSlice{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.EndpointSlice), err +} + +// List takes label and field selectors, and returns the list of EndpointSlices that match those selectors. +func (c *FakeEndpointSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.EndpointSliceList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(endpointslicesResource, endpointslicesKind, c.ns, opts), &v1beta1.EndpointSliceList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.EndpointSliceList{ListMeta: obj.(*v1beta1.EndpointSliceList).ListMeta} + for _, item := range obj.(*v1beta1.EndpointSliceList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested endpointSlices. +func (c *FakeEndpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(endpointslicesResource, c.ns, opts)) + +} + +// Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. +func (c *FakeEndpointSlices) Create(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.CreateOptions) (result *v1beta1.EndpointSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(endpointslicesResource, c.ns, endpointSlice), &v1beta1.EndpointSlice{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.EndpointSlice), err +} + +// Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. +func (c *FakeEndpointSlices) Update(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.UpdateOptions) (result *v1beta1.EndpointSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(endpointslicesResource, c.ns, endpointSlice), &v1beta1.EndpointSlice{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.EndpointSlice), err +} + +// Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs. +func (c *FakeEndpointSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(endpointslicesResource, c.ns, name, opts), &v1beta1.EndpointSlice{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeEndpointSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(endpointslicesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.EndpointSliceList{}) + return err +} + +// Patch applies the patch and returns the patched endpointSlice. +func (c *FakeEndpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.EndpointSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(endpointslicesResource, c.ns, name, pt, data, subresources...), &v1beta1.EndpointSlice{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.EndpointSlice), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied endpointSlice. +func (c *FakeEndpointSlices) Apply(ctx context.Context, endpointSlice *discoveryv1beta1.EndpointSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.EndpointSlice, err error) { + if endpointSlice == nil { + return nil, fmt.Errorf("endpointSlice provided to Apply must not be nil") + } + data, err := json.Marshal(endpointSlice) + if err != nil { + return nil, err + } + name := endpointSlice.Name + if name == nil { + return nil, fmt.Errorf("endpointSlice.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(endpointslicesResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.EndpointSlice{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.EndpointSlice), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_event.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_event.go new file mode 100644 index 0000000000..87ff13c822 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_event.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + eventsv1 "k8s.io/api/events/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationseventsv1 "k8s.io/client-go/applyconfigurations/events/v1" + testing "k8s.io/client-go/testing" +) + +// FakeEvents implements EventInterface +type FakeEvents struct { + Fake *FakeEventsV1 + ns string +} + +var eventsResource = schema.GroupVersionResource{Group: "events.k8s.io", Version: "v1", Resource: "events"} + +var eventsKind = schema.GroupVersionKind{Group: "events.k8s.io", Version: "v1", Kind: "Event"} + +// Get takes name of the event, and returns the corresponding event object, and an error if there is any. +func (c *FakeEvents) Get(ctx context.Context, name string, options v1.GetOptions) (result *eventsv1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(eventsResource, c.ns, name), &eventsv1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*eventsv1.Event), err +} + +// List takes label and field selectors, and returns the list of Events that match those selectors. +func (c *FakeEvents) List(ctx context.Context, opts v1.ListOptions) (result *eventsv1.EventList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(eventsResource, eventsKind, c.ns, opts), &eventsv1.EventList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &eventsv1.EventList{ListMeta: obj.(*eventsv1.EventList).ListMeta} + for _, item := range obj.(*eventsv1.EventList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested events. +func (c *FakeEvents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(eventsResource, c.ns, opts)) + +} + +// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. +func (c *FakeEvents) Create(ctx context.Context, event *eventsv1.Event, opts v1.CreateOptions) (result *eventsv1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &eventsv1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*eventsv1.Event), err +} + +// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. +func (c *FakeEvents) Update(ctx context.Context, event *eventsv1.Event, opts v1.UpdateOptions) (result *eventsv1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &eventsv1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*eventsv1.Event), err +} + +// Delete takes name of the event and deletes it. Returns an error if one occurs. +func (c *FakeEvents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(eventsResource, c.ns, name, opts), &eventsv1.Event{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeEvents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &eventsv1.EventList{}) + return err +} + +// Patch applies the patch and returns the patched event. +func (c *FakeEvents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *eventsv1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, pt, data, subresources...), &eventsv1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*eventsv1.Event), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied event. +func (c *FakeEvents) Apply(ctx context.Context, event *applyconfigurationseventsv1.EventApplyConfiguration, opts v1.ApplyOptions) (result *eventsv1.Event, err error) { + if event == nil { + return nil, fmt.Errorf("event provided to Apply must not be nil") + } + data, err := json.Marshal(event) + if err != nil { + return nil, err + } + name := event.Name + if name == nil { + return nil, fmt.Errorf("event.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, *name, types.ApplyPatchType, data), &eventsv1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*eventsv1.Event), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_events_client.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_events_client.go new file mode 100644 index 0000000000..95ef2b307c --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_events_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/events/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeEventsV1 struct { + *testing.Fake +} + +func (c *FakeEventsV1) Events(namespace string) v1.EventInterface { + return &FakeEvents{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeEventsV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go new file mode 100644 index 0000000000..5481c4d3f8 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/events/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + eventsv1beta1 "k8s.io/client-go/applyconfigurations/events/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeEvents implements EventInterface +type FakeEvents struct { + Fake *FakeEventsV1beta1 + ns string +} + +var eventsResource = schema.GroupVersionResource{Group: "events.k8s.io", Version: "v1beta1", Resource: "events"} + +var eventsKind = schema.GroupVersionKind{Group: "events.k8s.io", Version: "v1beta1", Kind: "Event"} + +// Get takes name of the event, and returns the corresponding event object, and an error if there is any. +func (c *FakeEvents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(eventsResource, c.ns, name), &v1beta1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Event), err +} + +// List takes label and field selectors, and returns the list of Events that match those selectors. +func (c *FakeEvents) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.EventList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(eventsResource, eventsKind, c.ns, opts), &v1beta1.EventList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.EventList{ListMeta: obj.(*v1beta1.EventList).ListMeta} + for _, item := range obj.(*v1beta1.EventList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested events. +func (c *FakeEvents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(eventsResource, c.ns, opts)) + +} + +// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. +func (c *FakeEvents) Create(ctx context.Context, event *v1beta1.Event, opts v1.CreateOptions) (result *v1beta1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &v1beta1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Event), err +} + +// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. +func (c *FakeEvents) Update(ctx context.Context, event *v1beta1.Event, opts v1.UpdateOptions) (result *v1beta1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &v1beta1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Event), err +} + +// Delete takes name of the event and deletes it. Returns an error if one occurs. +func (c *FakeEvents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(eventsResource, c.ns, name, opts), &v1beta1.Event{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeEvents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.EventList{}) + return err +} + +// Patch applies the patch and returns the patched event. +func (c *FakeEvents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, pt, data, subresources...), &v1beta1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Event), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied event. +func (c *FakeEvents) Apply(ctx context.Context, event *eventsv1beta1.EventApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Event, err error) { + if event == nil { + return nil, fmt.Errorf("event provided to Apply must not be nil") + } + data, err := json.Marshal(event) + if err != nil { + return nil, err + } + name := event.Name + if name == nil { + return nil, fmt.Errorf("event.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Event), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event_expansion.go new file mode 100644 index 0000000000..19c1b44155 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event_expansion.go @@ -0,0 +1,66 @@ +/* +Copyright 2019 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 fake + +import ( + v1beta1 "k8s.io/api/events/v1beta1" + types "k8s.io/apimachinery/pkg/types" + core "k8s.io/client-go/testing" +) + +// CreateWithEventNamespace creats a new event. Returns the copy of the event the server returns, or an error. +func (c *FakeEvents) CreateWithEventNamespace(event *v1beta1.Event) (*v1beta1.Event, error) { + action := core.NewRootCreateAction(eventsResource, event) + if c.ns != "" { + action = core.NewCreateAction(eventsResource, c.ns, event) + } + obj, err := c.Fake.Invokes(action, event) + if obj == nil { + return nil, err + } + + return obj.(*v1beta1.Event), err +} + +// UpdateWithEventNamespace replaces an existing event. Returns the copy of the event the server returns, or an error. +func (c *FakeEvents) UpdateWithEventNamespace(event *v1beta1.Event) (*v1beta1.Event, error) { + action := core.NewRootUpdateAction(eventsResource, event) + if c.ns != "" { + action = core.NewUpdateAction(eventsResource, c.ns, event) + } + obj, err := c.Fake.Invokes(action, event) + if obj == nil { + return nil, err + } + + return obj.(*v1beta1.Event), err +} + +// PatchWithEventNamespace patches an existing event. Returns the copy of the event the server returns, or an error. +func (c *FakeEvents) PatchWithEventNamespace(event *v1beta1.Event, data []byte) (*v1beta1.Event, error) { + pt := types.StrategicMergePatchType + action := core.NewRootPatchAction(eventsResource, event.Name, pt, data) + if c.ns != "" { + action = core.NewPatchAction(eventsResource, c.ns, event.Name, pt, data) + } + obj, err := c.Fake.Invokes(action, event) + if obj == nil { + return nil, err + } + + return obj.(*v1beta1.Event), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_events_client.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_events_client.go new file mode 100644 index 0000000000..875c774e38 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_events_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeEventsV1beta1 struct { + *testing.Fake +} + +func (c *FakeEventsV1beta1) Events(namespace string) v1beta1.EventInterface { + return &FakeEvents{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeEventsV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go new file mode 100644 index 0000000000..11c05f1951 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/extensions/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + extensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeDaemonSets implements DaemonSetInterface +type FakeDaemonSets struct { + Fake *FakeExtensionsV1beta1 + ns string +} + +var daemonsetsResource = schema.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "daemonsets"} + +var daemonsetsKind = schema.GroupVersionKind{Group: "extensions", Version: "v1beta1", Kind: "DaemonSet"} + +// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. +func (c *FakeDaemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &v1beta1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DaemonSet), err +} + +// List takes label and field selectors, and returns the list of DaemonSets that match those selectors. +func (c *FakeDaemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DaemonSetList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &v1beta1.DaemonSetList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.DaemonSetList{ListMeta: obj.(*v1beta1.DaemonSetList).ListMeta} + for _, item := range obj.(*v1beta1.DaemonSetList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested daemonSets. +func (c *FakeDaemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(daemonsetsResource, c.ns, opts)) + +} + +// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. +func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.CreateOptions) (result *v1beta1.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &v1beta1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DaemonSet), err +} + +// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. +func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (result *v1beta1.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &v1beta1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DaemonSet), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (*v1beta1.DaemonSet, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &v1beta1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DaemonSet), err +} + +// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. +func (c *FakeDaemonSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(daemonsetsResource, c.ns, name, opts), &v1beta1.DaemonSet{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.DaemonSetList{}) + return err +} + +// Patch applies the patch and returns the patched daemonSet. +func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), &v1beta1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DaemonSet), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied daemonSet. +func (c *FakeDaemonSets) Apply(ctx context.Context, daemonSet *extensionsv1beta1.DaemonSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.DaemonSet, err error) { + if daemonSet == nil { + return nil, fmt.Errorf("daemonSet provided to Apply must not be nil") + } + data, err := json.Marshal(daemonSet) + if err != nil { + return nil, err + } + name := daemonSet.Name + if name == nil { + return nil, fmt.Errorf("daemonSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DaemonSet), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeDaemonSets) ApplyStatus(ctx context.Context, daemonSet *extensionsv1beta1.DaemonSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.DaemonSet, err error) { + if daemonSet == nil { + return nil, fmt.Errorf("daemonSet provided to Apply must not be nil") + } + data, err := json.Marshal(daemonSet) + if err != nil { + return nil, err + } + name := daemonSet.Name + if name == nil { + return nil, fmt.Errorf("daemonSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DaemonSet), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go new file mode 100644 index 0000000000..9edf85d60e --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go @@ -0,0 +1,231 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/extensions/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + extensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeDeployments implements DeploymentInterface +type FakeDeployments struct { + Fake *FakeExtensionsV1beta1 + ns string +} + +var deploymentsResource = schema.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "deployments"} + +var deploymentsKind = schema.GroupVersionKind{Group: "extensions", Version: "v1beta1", Kind: "Deployment"} + +// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. +func (c *FakeDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Deployment), err +} + +// List takes label and field selectors, and returns the list of Deployments that match those selectors. +func (c *FakeDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &v1beta1.DeploymentList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.DeploymentList{ListMeta: obj.(*v1beta1.DeploymentList).ListMeta} + for _, item := range obj.(*v1beta1.DeploymentList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested deployments. +func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(deploymentsResource, c.ns, opts)) + +} + +// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. +func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (result *v1beta1.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Deployment), err +} + +// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. +func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Deployment), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Deployment), err +} + +// Delete takes name of the deployment and deletes it. Returns an error if one occurs. +func (c *FakeDeployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(deploymentsResource, c.ns, name, opts), &v1beta1.Deployment{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.DeploymentList{}) + return err +} + +// Patch applies the patch and returns the patched deployment. +func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &v1beta1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Deployment), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied deployment. +func (c *FakeDeployments) Apply(ctx context.Context, deployment *extensionsv1beta1.DeploymentApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Deployment, err error) { + if deployment == nil { + return nil, fmt.Errorf("deployment provided to Apply must not be nil") + } + data, err := json.Marshal(deployment) + if err != nil { + return nil, err + } + name := deployment.Name + if name == nil { + return nil, fmt.Errorf("deployment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Deployment), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeDeployments) ApplyStatus(ctx context.Context, deployment *extensionsv1beta1.DeploymentApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Deployment, err error) { + if deployment == nil { + return nil, fmt.Errorf("deployment provided to Apply must not be nil") + } + data, err := json.Marshal(deployment) + if err != nil { + return nil, err + } + name := deployment.Name + if name == nil { + return nil, fmt.Errorf("deployment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Deployment), err +} + +// GetScale takes name of the deployment, and returns the corresponding scale object, and an error if there is any. +func (c *FakeDeployments) GetScale(ctx context.Context, deploymentName string, options v1.GetOptions) (result *v1beta1.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetSubresourceAction(deploymentsResource, c.ns, "scale", deploymentName), &v1beta1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Scale), err +} + +// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. +func (c *FakeDeployments) UpdateScale(ctx context.Context, deploymentName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (result *v1beta1.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "scale", c.ns, scale), &v1beta1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Scale), err +} + +// ApplyScale takes top resource name and the apply declarative configuration for scale, +// applies it and returns the applied scale, and an error, if there is any. +func (c *FakeDeployments) ApplyScale(ctx context.Context, deploymentName string, scale *extensionsv1beta1.ScaleApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Scale, err error) { + if scale == nil { + return nil, fmt.Errorf("scale provided to ApplyScale must not be nil") + } + data, err := json.Marshal(scale) + if err != nil { + return nil, err + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, deploymentName, types.ApplyPatchType, data, "status"), &v1beta1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Scale), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment_expansion.go new file mode 100644 index 0000000000..6ea1acd853 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment_expansion.go @@ -0,0 +1,36 @@ +/* +Copyright 2014 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 fake + +import ( + "context" + + "k8s.io/api/extensions/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + core "k8s.io/client-go/testing" +) + +func (c *FakeDeployments) Rollback(ctx context.Context, deploymentRollback *v1beta1.DeploymentRollback, opts metav1.CreateOptions) error { + action := core.CreateActionImpl{} + action.Verb = "create" + action.Resource = deploymentsResource + action.Subresource = "rollback" + action.Object = deploymentRollback + + _, err := c.Fake.Invokes(action, deploymentRollback) + return err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_extensions_client.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_extensions_client.go new file mode 100644 index 0000000000..36c0d51bc3 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_extensions_client.go @@ -0,0 +1,60 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeExtensionsV1beta1 struct { + *testing.Fake +} + +func (c *FakeExtensionsV1beta1) DaemonSets(namespace string) v1beta1.DaemonSetInterface { + return &FakeDaemonSets{c, namespace} +} + +func (c *FakeExtensionsV1beta1) Deployments(namespace string) v1beta1.DeploymentInterface { + return &FakeDeployments{c, namespace} +} + +func (c *FakeExtensionsV1beta1) Ingresses(namespace string) v1beta1.IngressInterface { + return &FakeIngresses{c, namespace} +} + +func (c *FakeExtensionsV1beta1) NetworkPolicies(namespace string) v1beta1.NetworkPolicyInterface { + return &FakeNetworkPolicies{c, namespace} +} + +func (c *FakeExtensionsV1beta1) PodSecurityPolicies() v1beta1.PodSecurityPolicyInterface { + return &FakePodSecurityPolicies{c} +} + +func (c *FakeExtensionsV1beta1) ReplicaSets(namespace string) v1beta1.ReplicaSetInterface { + return &FakeReplicaSets{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeExtensionsV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go new file mode 100644 index 0000000000..d3bbd1abce --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/extensions/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + extensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeIngresses implements IngressInterface +type FakeIngresses struct { + Fake *FakeExtensionsV1beta1 + ns string +} + +var ingressesResource = schema.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "ingresses"} + +var ingressesKind = schema.GroupVersionKind{Group: "extensions", Version: "v1beta1", Kind: "Ingress"} + +// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. +func (c *FakeIngresses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(ingressesResource, c.ns, name), &v1beta1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Ingress), err +} + +// List takes label and field selectors, and returns the list of Ingresses that match those selectors. +func (c *FakeIngresses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IngressList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(ingressesResource, ingressesKind, c.ns, opts), &v1beta1.IngressList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.IngressList{ListMeta: obj.(*v1beta1.IngressList).ListMeta} + for _, item := range obj.(*v1beta1.IngressList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested ingresses. +func (c *FakeIngresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(ingressesResource, c.ns, opts)) + +} + +// Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. +func (c *FakeIngresses) Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (result *v1beta1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Ingress), err +} + +// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. +func (c *FakeIngresses) Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Ingress), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeIngresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (*v1beta1.Ingress, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &v1beta1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Ingress), err +} + +// Delete takes name of the ingress and deletes it. Returns an error if one occurs. +func (c *FakeIngresses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(ingressesResource, c.ns, name, opts), &v1beta1.Ingress{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeIngresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(ingressesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.IngressList{}) + return err +} + +// Patch applies the patch and returns the patched ingress. +func (c *FakeIngresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, name, pt, data, subresources...), &v1beta1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Ingress), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied ingress. +func (c *FakeIngresses) Apply(ctx context.Context, ingress *extensionsv1beta1.IngressApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Ingress, err error) { + if ingress == nil { + return nil, fmt.Errorf("ingress provided to Apply must not be nil") + } + data, err := json.Marshal(ingress) + if err != nil { + return nil, err + } + name := ingress.Name + if name == nil { + return nil, fmt.Errorf("ingress.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Ingress), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeIngresses) ApplyStatus(ctx context.Context, ingress *extensionsv1beta1.IngressApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Ingress, err error) { + if ingress == nil { + return nil, fmt.Errorf("ingress provided to Apply must not be nil") + } + data, err := json.Marshal(ingress) + if err != nil { + return nil, err + } + name := ingress.Name + if name == nil { + return nil, fmt.Errorf("ingress.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Ingress), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go new file mode 100644 index 0000000000..1ff5d8c992 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/extensions/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + extensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeNetworkPolicies implements NetworkPolicyInterface +type FakeNetworkPolicies struct { + Fake *FakeExtensionsV1beta1 + ns string +} + +var networkpoliciesResource = schema.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "networkpolicies"} + +var networkpoliciesKind = schema.GroupVersionKind{Group: "extensions", Version: "v1beta1", Kind: "NetworkPolicy"} + +// Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any. +func (c *FakeNetworkPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.NetworkPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(networkpoliciesResource, c.ns, name), &v1beta1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.NetworkPolicy), err +} + +// List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. +func (c *FakeNetworkPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.NetworkPolicyList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(networkpoliciesResource, networkpoliciesKind, c.ns, opts), &v1beta1.NetworkPolicyList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.NetworkPolicyList{ListMeta: obj.(*v1beta1.NetworkPolicyList).ListMeta} + for _, item := range obj.(*v1beta1.NetworkPolicyList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested networkPolicies. +func (c *FakeNetworkPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(networkpoliciesResource, c.ns, opts)) + +} + +// Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. +func (c *FakeNetworkPolicies) Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.CreateOptions) (result *v1beta1.NetworkPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(networkpoliciesResource, c.ns, networkPolicy), &v1beta1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.NetworkPolicy), err +} + +// Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any. +func (c *FakeNetworkPolicies) Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (result *v1beta1.NetworkPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(networkpoliciesResource, c.ns, networkPolicy), &v1beta1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.NetworkPolicy), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeNetworkPolicies) UpdateStatus(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (*v1beta1.NetworkPolicy, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(networkpoliciesResource, "status", c.ns, networkPolicy), &v1beta1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.NetworkPolicy), err +} + +// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. +func (c *FakeNetworkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(networkpoliciesResource, c.ns, name, opts), &v1beta1.NetworkPolicy{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeNetworkPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(networkpoliciesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.NetworkPolicyList{}) + return err +} + +// Patch applies the patch and returns the patched networkPolicy. +func (c *FakeNetworkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.NetworkPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, name, pt, data, subresources...), &v1beta1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.NetworkPolicy), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied networkPolicy. +func (c *FakeNetworkPolicies) Apply(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error) { + if networkPolicy == nil { + return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil") + } + data, err := json.Marshal(networkPolicy) + if err != nil { + return nil, err + } + name := networkPolicy.Name + if name == nil { + return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.NetworkPolicy), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeNetworkPolicies) ApplyStatus(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error) { + if networkPolicy == nil { + return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil") + } + data, err := json.Marshal(networkPolicy) + if err != nil { + return nil, err + } + name := networkPolicy.Name + if name == nil { + return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.NetworkPolicy), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go new file mode 100644 index 0000000000..dd53fd5bd7 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/extensions/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + extensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakePodSecurityPolicies implements PodSecurityPolicyInterface +type FakePodSecurityPolicies struct { + Fake *FakeExtensionsV1beta1 +} + +var podsecuritypoliciesResource = schema.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "podsecuritypolicies"} + +var podsecuritypoliciesKind = schema.GroupVersionKind{Group: "extensions", Version: "v1beta1", Kind: "PodSecurityPolicy"} + +// Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any. +func (c *FakePodSecurityPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(podsecuritypoliciesResource, name), &v1beta1.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodSecurityPolicy), err +} + +// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors. +func (c *FakePodSecurityPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(podsecuritypoliciesResource, podsecuritypoliciesKind, opts), &v1beta1.PodSecurityPolicyList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.PodSecurityPolicyList{ListMeta: obj.(*v1beta1.PodSecurityPolicyList).ListMeta} + for _, item := range obj.(*v1beta1.PodSecurityPolicyList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested podSecurityPolicies. +func (c *FakePodSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(podsecuritypoliciesResource, opts)) +} + +// Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. +func (c *FakePodSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodSecurityPolicy), err +} + +// Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. +func (c *FakePodSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodSecurityPolicy), err +} + +// Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs. +func (c *FakePodSecurityPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(podsecuritypoliciesResource, name, opts), &v1beta1.PodSecurityPolicy{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePodSecurityPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(podsecuritypoliciesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.PodSecurityPolicyList{}) + return err +} + +// Patch applies the patch and returns the patched podSecurityPolicy. +func (c *FakePodSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(podsecuritypoliciesResource, name, pt, data, subresources...), &v1beta1.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodSecurityPolicy), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied podSecurityPolicy. +func (c *FakePodSecurityPolicies) Apply(ctx context.Context, podSecurityPolicy *extensionsv1beta1.PodSecurityPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PodSecurityPolicy, err error) { + if podSecurityPolicy == nil { + return nil, fmt.Errorf("podSecurityPolicy provided to Apply must not be nil") + } + data, err := json.Marshal(podSecurityPolicy) + if err != nil { + return nil, err + } + name := podSecurityPolicy.Name + if name == nil { + return nil, fmt.Errorf("podSecurityPolicy.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(podsecuritypoliciesResource, *name, types.ApplyPatchType, data), &v1beta1.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodSecurityPolicy), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go new file mode 100644 index 0000000000..d6d35e4938 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go @@ -0,0 +1,231 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/extensions/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + extensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeReplicaSets implements ReplicaSetInterface +type FakeReplicaSets struct { + Fake *FakeExtensionsV1beta1 + ns string +} + +var replicasetsResource = schema.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "replicasets"} + +var replicasetsKind = schema.GroupVersionKind{Group: "extensions", Version: "v1beta1", Kind: "ReplicaSet"} + +// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. +func (c *FakeReplicaSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &v1beta1.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ReplicaSet), err +} + +// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. +func (c *FakeReplicaSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), &v1beta1.ReplicaSetList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.ReplicaSetList{ListMeta: obj.(*v1beta1.ReplicaSetList).ListMeta} + for _, item := range obj.(*v1beta1.ReplicaSetList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested replicaSets. +func (c *FakeReplicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(replicasetsResource, c.ns, opts)) + +} + +// Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. +func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.CreateOptions) (result *v1beta1.ReplicaSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &v1beta1.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ReplicaSet), err +} + +// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. +func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (result *v1beta1.ReplicaSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &v1beta1.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ReplicaSet), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (*v1beta1.ReplicaSet, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &v1beta1.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ReplicaSet), err +} + +// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. +func (c *FakeReplicaSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(replicasetsResource, c.ns, name, opts), &v1beta1.ReplicaSet{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.ReplicaSetList{}) + return err +} + +// Patch applies the patch and returns the patched replicaSet. +func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ReplicaSet, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), &v1beta1.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ReplicaSet), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied replicaSet. +func (c *FakeReplicaSets) Apply(ctx context.Context, replicaSet *extensionsv1beta1.ReplicaSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ReplicaSet, err error) { + if replicaSet == nil { + return nil, fmt.Errorf("replicaSet provided to Apply must not be nil") + } + data, err := json.Marshal(replicaSet) + if err != nil { + return nil, err + } + name := replicaSet.Name + if name == nil { + return nil, fmt.Errorf("replicaSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ReplicaSet), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeReplicaSets) ApplyStatus(ctx context.Context, replicaSet *extensionsv1beta1.ReplicaSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ReplicaSet, err error) { + if replicaSet == nil { + return nil, fmt.Errorf("replicaSet provided to Apply must not be nil") + } + data, err := json.Marshal(replicaSet) + if err != nil { + return nil, err + } + name := replicaSet.Name + if name == nil { + return nil, fmt.Errorf("replicaSet.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ReplicaSet), err +} + +// GetScale takes name of the replicaSet, and returns the corresponding scale object, and an error if there is any. +func (c *FakeReplicaSets) GetScale(ctx context.Context, replicaSetName string, options v1.GetOptions) (result *v1beta1.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetSubresourceAction(replicasetsResource, c.ns, "scale", replicaSetName), &v1beta1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Scale), err +} + +// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. +func (c *FakeReplicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (result *v1beta1.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "scale", c.ns, scale), &v1beta1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Scale), err +} + +// ApplyScale takes top resource name and the apply declarative configuration for scale, +// applies it and returns the applied scale, and an error, if there is any. +func (c *FakeReplicaSets) ApplyScale(ctx context.Context, replicaSetName string, scale *extensionsv1beta1.ScaleApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Scale, err error) { + if scale == nil { + return nil, fmt.Errorf("scale provided to ApplyScale must not be nil") + } + data, err := json.Marshal(scale) + if err != nil { + return nil, err + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, replicaSetName, types.ApplyPatchType, data, "status"), &v1beta1.Scale{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Scale), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowcontrol_client.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowcontrol_client.go new file mode 100644 index 0000000000..72d5eff0c2 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowcontrol_client.go @@ -0,0 +1,44 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeFlowcontrolV1alpha1 struct { + *testing.Fake +} + +func (c *FakeFlowcontrolV1alpha1) FlowSchemas() v1alpha1.FlowSchemaInterface { + return &FakeFlowSchemas{c} +} + +func (c *FakeFlowcontrolV1alpha1) PriorityLevelConfigurations() v1alpha1.PriorityLevelConfigurationInterface { + return &FakePriorityLevelConfigurations{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeFlowcontrolV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go new file mode 100644 index 0000000000..06730a1ea0 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go @@ -0,0 +1,179 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + flowcontrolv1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeFlowSchemas implements FlowSchemaInterface +type FakeFlowSchemas struct { + Fake *FakeFlowcontrolV1alpha1 +} + +var flowschemasResource = schema.GroupVersionResource{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1", Resource: "flowschemas"} + +var flowschemasKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1", Kind: "FlowSchema"} + +// Get takes name of the flowSchema, and returns the corresponding flowSchema object, and an error if there is any. +func (c *FakeFlowSchemas) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(flowschemasResource, name), &v1alpha1.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FlowSchema), err +} + +// List takes label and field selectors, and returns the list of FlowSchemas that match those selectors. +func (c *FakeFlowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FlowSchemaList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(flowschemasResource, flowschemasKind, opts), &v1alpha1.FlowSchemaList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.FlowSchemaList{ListMeta: obj.(*v1alpha1.FlowSchemaList).ListMeta} + for _, item := range obj.(*v1alpha1.FlowSchemaList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested flowSchemas. +func (c *FakeFlowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(flowschemasResource, opts)) +} + +// Create takes the representation of a flowSchema and creates it. Returns the server's representation of the flowSchema, and an error, if there is any. +func (c *FakeFlowSchemas) Create(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.CreateOptions) (result *v1alpha1.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(flowschemasResource, flowSchema), &v1alpha1.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FlowSchema), err +} + +// Update takes the representation of a flowSchema and updates it. Returns the server's representation of the flowSchema, and an error, if there is any. +func (c *FakeFlowSchemas) Update(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (result *v1alpha1.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(flowschemasResource, flowSchema), &v1alpha1.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FlowSchema), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeFlowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (*v1alpha1.FlowSchema, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(flowschemasResource, "status", flowSchema), &v1alpha1.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FlowSchema), err +} + +// Delete takes name of the flowSchema and deletes it. Returns an error if one occurs. +func (c *FakeFlowSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(flowschemasResource, name, opts), &v1alpha1.FlowSchema{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeFlowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(flowschemasResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.FlowSchemaList{}) + return err +} + +// Patch applies the patch and returns the patched flowSchema. +func (c *FakeFlowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, name, pt, data, subresources...), &v1alpha1.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FlowSchema), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied flowSchema. +func (c *FakeFlowSchemas) Apply(ctx context.Context, flowSchema *flowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FlowSchema, err error) { + if flowSchema == nil { + return nil, fmt.Errorf("flowSchema provided to Apply must not be nil") + } + data, err := json.Marshal(flowSchema) + if err != nil { + return nil, err + } + name := flowSchema.Name + if name == nil { + return nil, fmt.Errorf("flowSchema.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, *name, types.ApplyPatchType, data), &v1alpha1.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FlowSchema), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeFlowSchemas) ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FlowSchema, err error) { + if flowSchema == nil { + return nil, fmt.Errorf("flowSchema provided to Apply must not be nil") + } + data, err := json.Marshal(flowSchema) + if err != nil { + return nil, err + } + name := flowSchema.Name + if name == nil { + return nil, fmt.Errorf("flowSchema.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, *name, types.ApplyPatchType, data, "status"), &v1alpha1.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FlowSchema), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go new file mode 100644 index 0000000000..0e72282541 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go @@ -0,0 +1,179 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + flowcontrolv1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakePriorityLevelConfigurations implements PriorityLevelConfigurationInterface +type FakePriorityLevelConfigurations struct { + Fake *FakeFlowcontrolV1alpha1 +} + +var prioritylevelconfigurationsResource = schema.GroupVersionResource{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1", Resource: "prioritylevelconfigurations"} + +var prioritylevelconfigurationsKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1", Kind: "PriorityLevelConfiguration"} + +// Get takes name of the priorityLevelConfiguration, and returns the corresponding priorityLevelConfiguration object, and an error if there is any. +func (c *FakePriorityLevelConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(prioritylevelconfigurationsResource, name), &v1alpha1.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PriorityLevelConfiguration), err +} + +// List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors. +func (c *FakePriorityLevelConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PriorityLevelConfigurationList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(prioritylevelconfigurationsResource, prioritylevelconfigurationsKind, opts), &v1alpha1.PriorityLevelConfigurationList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.PriorityLevelConfigurationList{ListMeta: obj.(*v1alpha1.PriorityLevelConfigurationList).ListMeta} + for _, item := range obj.(*v1alpha1.PriorityLevelConfigurationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested priorityLevelConfigurations. +func (c *FakePriorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(prioritylevelconfigurationsResource, opts)) +} + +// Create takes the representation of a priorityLevelConfiguration and creates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. +func (c *FakePriorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.CreateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1alpha1.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PriorityLevelConfiguration), err +} + +// Update takes the representation of a priorityLevelConfiguration and updates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. +func (c *FakePriorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1alpha1.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PriorityLevelConfiguration), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakePriorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1alpha1.PriorityLevelConfiguration, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(prioritylevelconfigurationsResource, "status", priorityLevelConfiguration), &v1alpha1.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PriorityLevelConfiguration), err +} + +// Delete takes name of the priorityLevelConfiguration and deletes it. Returns an error if one occurs. +func (c *FakePriorityLevelConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(prioritylevelconfigurationsResource, name, opts), &v1alpha1.PriorityLevelConfiguration{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePriorityLevelConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(prioritylevelconfigurationsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.PriorityLevelConfigurationList{}) + return err +} + +// Patch applies the patch and returns the patched priorityLevelConfiguration. +func (c *FakePriorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, name, pt, data, subresources...), &v1alpha1.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PriorityLevelConfiguration), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied priorityLevelConfiguration. +func (c *FakePriorityLevelConfigurations) Apply(ctx context.Context, priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { + if priorityLevelConfiguration == nil { + return nil, fmt.Errorf("priorityLevelConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(priorityLevelConfiguration) + if err != nil { + return nil, err + } + name := priorityLevelConfiguration.Name + if name == nil { + return nil, fmt.Errorf("priorityLevelConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, *name, types.ApplyPatchType, data), &v1alpha1.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PriorityLevelConfiguration), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakePriorityLevelConfigurations) ApplyStatus(ctx context.Context, priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { + if priorityLevelConfiguration == nil { + return nil, fmt.Errorf("priorityLevelConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(priorityLevelConfiguration) + if err != nil { + return nil, err + } + name := priorityLevelConfiguration.Name + if name == nil { + return nil, fmt.Errorf("priorityLevelConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, *name, types.ApplyPatchType, data, "status"), &v1alpha1.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PriorityLevelConfiguration), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/fake_flowcontrol_client.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/fake_flowcontrol_client.go new file mode 100644 index 0000000000..1bd58d088a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/fake_flowcontrol_client.go @@ -0,0 +1,44 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeFlowcontrolV1beta1 struct { + *testing.Fake +} + +func (c *FakeFlowcontrolV1beta1) FlowSchemas() v1beta1.FlowSchemaInterface { + return &FakeFlowSchemas{c} +} + +func (c *FakeFlowcontrolV1beta1) PriorityLevelConfigurations() v1beta1.PriorityLevelConfigurationInterface { + return &FakePriorityLevelConfigurations{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeFlowcontrolV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/fake_flowschema.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/fake_flowschema.go new file mode 100644 index 0000000000..58d5ed14ef --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/fake_flowschema.go @@ -0,0 +1,179 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/flowcontrol/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + flowcontrolv1beta1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeFlowSchemas implements FlowSchemaInterface +type FakeFlowSchemas struct { + Fake *FakeFlowcontrolV1beta1 +} + +var flowschemasResource = schema.GroupVersionResource{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1", Resource: "flowschemas"} + +var flowschemasKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1", Kind: "FlowSchema"} + +// Get takes name of the flowSchema, and returns the corresponding flowSchema object, and an error if there is any. +func (c *FakeFlowSchemas) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(flowschemasResource, name), &v1beta1.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.FlowSchema), err +} + +// List takes label and field selectors, and returns the list of FlowSchemas that match those selectors. +func (c *FakeFlowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.FlowSchemaList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(flowschemasResource, flowschemasKind, opts), &v1beta1.FlowSchemaList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.FlowSchemaList{ListMeta: obj.(*v1beta1.FlowSchemaList).ListMeta} + for _, item := range obj.(*v1beta1.FlowSchemaList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested flowSchemas. +func (c *FakeFlowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(flowschemasResource, opts)) +} + +// Create takes the representation of a flowSchema and creates it. Returns the server's representation of the flowSchema, and an error, if there is any. +func (c *FakeFlowSchemas) Create(ctx context.Context, flowSchema *v1beta1.FlowSchema, opts v1.CreateOptions) (result *v1beta1.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(flowschemasResource, flowSchema), &v1beta1.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.FlowSchema), err +} + +// Update takes the representation of a flowSchema and updates it. Returns the server's representation of the flowSchema, and an error, if there is any. +func (c *FakeFlowSchemas) Update(ctx context.Context, flowSchema *v1beta1.FlowSchema, opts v1.UpdateOptions) (result *v1beta1.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(flowschemasResource, flowSchema), &v1beta1.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.FlowSchema), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeFlowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1beta1.FlowSchema, opts v1.UpdateOptions) (*v1beta1.FlowSchema, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(flowschemasResource, "status", flowSchema), &v1beta1.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.FlowSchema), err +} + +// Delete takes name of the flowSchema and deletes it. Returns an error if one occurs. +func (c *FakeFlowSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(flowschemasResource, name, opts), &v1beta1.FlowSchema{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeFlowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(flowschemasResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.FlowSchemaList{}) + return err +} + +// Patch applies the patch and returns the patched flowSchema. +func (c *FakeFlowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, name, pt, data, subresources...), &v1beta1.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.FlowSchema), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied flowSchema. +func (c *FakeFlowSchemas) Apply(ctx context.Context, flowSchema *flowcontrolv1beta1.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.FlowSchema, err error) { + if flowSchema == nil { + return nil, fmt.Errorf("flowSchema provided to Apply must not be nil") + } + data, err := json.Marshal(flowSchema) + if err != nil { + return nil, err + } + name := flowSchema.Name + if name == nil { + return nil, fmt.Errorf("flowSchema.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, *name, types.ApplyPatchType, data), &v1beta1.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.FlowSchema), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeFlowSchemas) ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1beta1.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.FlowSchema, err error) { + if flowSchema == nil { + return nil, fmt.Errorf("flowSchema provided to Apply must not be nil") + } + data, err := json.Marshal(flowSchema) + if err != nil { + return nil, err + } + name := flowSchema.Name + if name == nil { + return nil, fmt.Errorf("flowSchema.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, *name, types.ApplyPatchType, data, "status"), &v1beta1.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.FlowSchema), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/fake_prioritylevelconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/fake_prioritylevelconfiguration.go new file mode 100644 index 0000000000..19fc62beb3 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/fake_prioritylevelconfiguration.go @@ -0,0 +1,179 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/flowcontrol/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + flowcontrolv1beta1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakePriorityLevelConfigurations implements PriorityLevelConfigurationInterface +type FakePriorityLevelConfigurations struct { + Fake *FakeFlowcontrolV1beta1 +} + +var prioritylevelconfigurationsResource = schema.GroupVersionResource{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1", Resource: "prioritylevelconfigurations"} + +var prioritylevelconfigurationsKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1", Kind: "PriorityLevelConfiguration"} + +// Get takes name of the priorityLevelConfiguration, and returns the corresponding priorityLevelConfiguration object, and an error if there is any. +func (c *FakePriorityLevelConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(prioritylevelconfigurationsResource, name), &v1beta1.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityLevelConfiguration), err +} + +// List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors. +func (c *FakePriorityLevelConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PriorityLevelConfigurationList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(prioritylevelconfigurationsResource, prioritylevelconfigurationsKind, opts), &v1beta1.PriorityLevelConfigurationList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.PriorityLevelConfigurationList{ListMeta: obj.(*v1beta1.PriorityLevelConfigurationList).ListMeta} + for _, item := range obj.(*v1beta1.PriorityLevelConfigurationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested priorityLevelConfigurations. +func (c *FakePriorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(prioritylevelconfigurationsResource, opts)) +} + +// Create takes the representation of a priorityLevelConfiguration and creates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. +func (c *FakePriorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1beta1.PriorityLevelConfiguration, opts v1.CreateOptions) (result *v1beta1.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1beta1.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityLevelConfiguration), err +} + +// Update takes the representation of a priorityLevelConfiguration and updates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. +func (c *FakePriorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1beta1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1beta1.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1beta1.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityLevelConfiguration), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakePriorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1beta1.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1beta1.PriorityLevelConfiguration, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(prioritylevelconfigurationsResource, "status", priorityLevelConfiguration), &v1beta1.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityLevelConfiguration), err +} + +// Delete takes name of the priorityLevelConfiguration and deletes it. Returns an error if one occurs. +func (c *FakePriorityLevelConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(prioritylevelconfigurationsResource, name, opts), &v1beta1.PriorityLevelConfiguration{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePriorityLevelConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(prioritylevelconfigurationsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.PriorityLevelConfigurationList{}) + return err +} + +// Patch applies the patch and returns the patched priorityLevelConfiguration. +func (c *FakePriorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, name, pt, data, subresources...), &v1beta1.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityLevelConfiguration), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied priorityLevelConfiguration. +func (c *FakePriorityLevelConfigurations) Apply(ctx context.Context, priorityLevelConfiguration *flowcontrolv1beta1.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PriorityLevelConfiguration, err error) { + if priorityLevelConfiguration == nil { + return nil, fmt.Errorf("priorityLevelConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(priorityLevelConfiguration) + if err != nil { + return nil, err + } + name := priorityLevelConfiguration.Name + if name == nil { + return nil, fmt.Errorf("priorityLevelConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, *name, types.ApplyPatchType, data), &v1beta1.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityLevelConfiguration), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakePriorityLevelConfigurations) ApplyStatus(ctx context.Context, priorityLevelConfiguration *flowcontrolv1beta1.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PriorityLevelConfiguration, err error) { + if priorityLevelConfiguration == nil { + return nil, fmt.Errorf("priorityLevelConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(priorityLevelConfiguration) + if err != nil { + return nil, err + } + name := priorityLevelConfiguration.Name + if name == nil { + return nil, fmt.Errorf("priorityLevelConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, *name, types.ApplyPatchType, data, "status"), &v1beta1.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityLevelConfiguration), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/fake_flowcontrol_client.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/fake_flowcontrol_client.go new file mode 100644 index 0000000000..9f36b3b7a2 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/fake_flowcontrol_client.go @@ -0,0 +1,44 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeFlowcontrolV1beta2 struct { + *testing.Fake +} + +func (c *FakeFlowcontrolV1beta2) FlowSchemas() v1beta2.FlowSchemaInterface { + return &FakeFlowSchemas{c} +} + +func (c *FakeFlowcontrolV1beta2) PriorityLevelConfigurations() v1beta2.PriorityLevelConfigurationInterface { + return &FakePriorityLevelConfigurations{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeFlowcontrolV1beta2) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/fake_flowschema.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/fake_flowschema.go new file mode 100644 index 0000000000..e4603eba71 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/fake_flowschema.go @@ -0,0 +1,179 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta2 "k8s.io/api/flowcontrol/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + flowcontrolv1beta2 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2" + testing "k8s.io/client-go/testing" +) + +// FakeFlowSchemas implements FlowSchemaInterface +type FakeFlowSchemas struct { + Fake *FakeFlowcontrolV1beta2 +} + +var flowschemasResource = schema.GroupVersionResource{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2", Resource: "flowschemas"} + +var flowschemasKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2", Kind: "FlowSchema"} + +// Get takes name of the flowSchema, and returns the corresponding flowSchema object, and an error if there is any. +func (c *FakeFlowSchemas) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(flowschemasResource, name), &v1beta2.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.FlowSchema), err +} + +// List takes label and field selectors, and returns the list of FlowSchemas that match those selectors. +func (c *FakeFlowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.FlowSchemaList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(flowschemasResource, flowschemasKind, opts), &v1beta2.FlowSchemaList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta2.FlowSchemaList{ListMeta: obj.(*v1beta2.FlowSchemaList).ListMeta} + for _, item := range obj.(*v1beta2.FlowSchemaList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested flowSchemas. +func (c *FakeFlowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(flowschemasResource, opts)) +} + +// Create takes the representation of a flowSchema and creates it. Returns the server's representation of the flowSchema, and an error, if there is any. +func (c *FakeFlowSchemas) Create(ctx context.Context, flowSchema *v1beta2.FlowSchema, opts v1.CreateOptions) (result *v1beta2.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(flowschemasResource, flowSchema), &v1beta2.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.FlowSchema), err +} + +// Update takes the representation of a flowSchema and updates it. Returns the server's representation of the flowSchema, and an error, if there is any. +func (c *FakeFlowSchemas) Update(ctx context.Context, flowSchema *v1beta2.FlowSchema, opts v1.UpdateOptions) (result *v1beta2.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(flowschemasResource, flowSchema), &v1beta2.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.FlowSchema), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeFlowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1beta2.FlowSchema, opts v1.UpdateOptions) (*v1beta2.FlowSchema, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(flowschemasResource, "status", flowSchema), &v1beta2.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.FlowSchema), err +} + +// Delete takes name of the flowSchema and deletes it. Returns an error if one occurs. +func (c *FakeFlowSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(flowschemasResource, name, opts), &v1beta2.FlowSchema{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeFlowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(flowschemasResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta2.FlowSchemaList{}) + return err +} + +// Patch applies the patch and returns the patched flowSchema. +func (c *FakeFlowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, name, pt, data, subresources...), &v1beta2.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.FlowSchema), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied flowSchema. +func (c *FakeFlowSchemas) Apply(ctx context.Context, flowSchema *flowcontrolv1beta2.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1beta2.FlowSchema, err error) { + if flowSchema == nil { + return nil, fmt.Errorf("flowSchema provided to Apply must not be nil") + } + data, err := json.Marshal(flowSchema) + if err != nil { + return nil, err + } + name := flowSchema.Name + if name == nil { + return nil, fmt.Errorf("flowSchema.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, *name, types.ApplyPatchType, data), &v1beta2.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.FlowSchema), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeFlowSchemas) ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1beta2.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1beta2.FlowSchema, err error) { + if flowSchema == nil { + return nil, fmt.Errorf("flowSchema provided to Apply must not be nil") + } + data, err := json.Marshal(flowSchema) + if err != nil { + return nil, err + } + name := flowSchema.Name + if name == nil { + return nil, fmt.Errorf("flowSchema.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, *name, types.ApplyPatchType, data, "status"), &v1beta2.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.FlowSchema), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/fake_prioritylevelconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/fake_prioritylevelconfiguration.go new file mode 100644 index 0000000000..e1979d0751 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/fake_prioritylevelconfiguration.go @@ -0,0 +1,179 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta2 "k8s.io/api/flowcontrol/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + flowcontrolv1beta2 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2" + testing "k8s.io/client-go/testing" +) + +// FakePriorityLevelConfigurations implements PriorityLevelConfigurationInterface +type FakePriorityLevelConfigurations struct { + Fake *FakeFlowcontrolV1beta2 +} + +var prioritylevelconfigurationsResource = schema.GroupVersionResource{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2", Resource: "prioritylevelconfigurations"} + +var prioritylevelconfigurationsKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2", Kind: "PriorityLevelConfiguration"} + +// Get takes name of the priorityLevelConfiguration, and returns the corresponding priorityLevelConfiguration object, and an error if there is any. +func (c *FakePriorityLevelConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(prioritylevelconfigurationsResource, name), &v1beta2.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.PriorityLevelConfiguration), err +} + +// List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors. +func (c *FakePriorityLevelConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.PriorityLevelConfigurationList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(prioritylevelconfigurationsResource, prioritylevelconfigurationsKind, opts), &v1beta2.PriorityLevelConfigurationList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta2.PriorityLevelConfigurationList{ListMeta: obj.(*v1beta2.PriorityLevelConfigurationList).ListMeta} + for _, item := range obj.(*v1beta2.PriorityLevelConfigurationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested priorityLevelConfigurations. +func (c *FakePriorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(prioritylevelconfigurationsResource, opts)) +} + +// Create takes the representation of a priorityLevelConfiguration and creates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. +func (c *FakePriorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1beta2.PriorityLevelConfiguration, opts v1.CreateOptions) (result *v1beta2.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1beta2.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.PriorityLevelConfiguration), err +} + +// Update takes the representation of a priorityLevelConfiguration and updates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. +func (c *FakePriorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1beta2.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1beta2.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1beta2.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.PriorityLevelConfiguration), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakePriorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1beta2.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1beta2.PriorityLevelConfiguration, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(prioritylevelconfigurationsResource, "status", priorityLevelConfiguration), &v1beta2.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.PriorityLevelConfiguration), err +} + +// Delete takes name of the priorityLevelConfiguration and deletes it. Returns an error if one occurs. +func (c *FakePriorityLevelConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(prioritylevelconfigurationsResource, name, opts), &v1beta2.PriorityLevelConfiguration{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePriorityLevelConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(prioritylevelconfigurationsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta2.PriorityLevelConfigurationList{}) + return err +} + +// Patch applies the patch and returns the patched priorityLevelConfiguration. +func (c *FakePriorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, name, pt, data, subresources...), &v1beta2.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.PriorityLevelConfiguration), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied priorityLevelConfiguration. +func (c *FakePriorityLevelConfigurations) Apply(ctx context.Context, priorityLevelConfiguration *flowcontrolv1beta2.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1beta2.PriorityLevelConfiguration, err error) { + if priorityLevelConfiguration == nil { + return nil, fmt.Errorf("priorityLevelConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(priorityLevelConfiguration) + if err != nil { + return nil, err + } + name := priorityLevelConfiguration.Name + if name == nil { + return nil, fmt.Errorf("priorityLevelConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, *name, types.ApplyPatchType, data), &v1beta2.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.PriorityLevelConfiguration), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakePriorityLevelConfigurations) ApplyStatus(ctx context.Context, priorityLevelConfiguration *flowcontrolv1beta2.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1beta2.PriorityLevelConfiguration, err error) { + if priorityLevelConfiguration == nil { + return nil, fmt.Errorf("priorityLevelConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(priorityLevelConfiguration) + if err != nil { + return nil, err + } + name := priorityLevelConfiguration.Name + if name == nil { + return nil, fmt.Errorf("priorityLevelConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, *name, types.ApplyPatchType, data, "status"), &v1beta2.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.PriorityLevelConfiguration), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/fake_flowcontrol_client.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/fake_flowcontrol_client.go new file mode 100644 index 0000000000..1cb0198d06 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/fake_flowcontrol_client.go @@ -0,0 +1,44 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta3 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeFlowcontrolV1beta3 struct { + *testing.Fake +} + +func (c *FakeFlowcontrolV1beta3) FlowSchemas() v1beta3.FlowSchemaInterface { + return &FakeFlowSchemas{c} +} + +func (c *FakeFlowcontrolV1beta3) PriorityLevelConfigurations() v1beta3.PriorityLevelConfigurationInterface { + return &FakePriorityLevelConfigurations{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeFlowcontrolV1beta3) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/fake_flowschema.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/fake_flowschema.go new file mode 100644 index 0000000000..d6a8bdc32f --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/fake_flowschema.go @@ -0,0 +1,179 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta3 "k8s.io/api/flowcontrol/v1beta3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + flowcontrolv1beta3 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3" + testing "k8s.io/client-go/testing" +) + +// FakeFlowSchemas implements FlowSchemaInterface +type FakeFlowSchemas struct { + Fake *FakeFlowcontrolV1beta3 +} + +var flowschemasResource = schema.GroupVersionResource{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta3", Resource: "flowschemas"} + +var flowschemasKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta3", Kind: "FlowSchema"} + +// Get takes name of the flowSchema, and returns the corresponding flowSchema object, and an error if there is any. +func (c *FakeFlowSchemas) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta3.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(flowschemasResource, name), &v1beta3.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta3.FlowSchema), err +} + +// List takes label and field selectors, and returns the list of FlowSchemas that match those selectors. +func (c *FakeFlowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1beta3.FlowSchemaList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(flowschemasResource, flowschemasKind, opts), &v1beta3.FlowSchemaList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta3.FlowSchemaList{ListMeta: obj.(*v1beta3.FlowSchemaList).ListMeta} + for _, item := range obj.(*v1beta3.FlowSchemaList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested flowSchemas. +func (c *FakeFlowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(flowschemasResource, opts)) +} + +// Create takes the representation of a flowSchema and creates it. Returns the server's representation of the flowSchema, and an error, if there is any. +func (c *FakeFlowSchemas) Create(ctx context.Context, flowSchema *v1beta3.FlowSchema, opts v1.CreateOptions) (result *v1beta3.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(flowschemasResource, flowSchema), &v1beta3.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta3.FlowSchema), err +} + +// Update takes the representation of a flowSchema and updates it. Returns the server's representation of the flowSchema, and an error, if there is any. +func (c *FakeFlowSchemas) Update(ctx context.Context, flowSchema *v1beta3.FlowSchema, opts v1.UpdateOptions) (result *v1beta3.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(flowschemasResource, flowSchema), &v1beta3.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta3.FlowSchema), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeFlowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1beta3.FlowSchema, opts v1.UpdateOptions) (*v1beta3.FlowSchema, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(flowschemasResource, "status", flowSchema), &v1beta3.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta3.FlowSchema), err +} + +// Delete takes name of the flowSchema and deletes it. Returns an error if one occurs. +func (c *FakeFlowSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(flowschemasResource, name, opts), &v1beta3.FlowSchema{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeFlowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(flowschemasResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta3.FlowSchemaList{}) + return err +} + +// Patch applies the patch and returns the patched flowSchema. +func (c *FakeFlowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta3.FlowSchema, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, name, pt, data, subresources...), &v1beta3.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta3.FlowSchema), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied flowSchema. +func (c *FakeFlowSchemas) Apply(ctx context.Context, flowSchema *flowcontrolv1beta3.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1beta3.FlowSchema, err error) { + if flowSchema == nil { + return nil, fmt.Errorf("flowSchema provided to Apply must not be nil") + } + data, err := json.Marshal(flowSchema) + if err != nil { + return nil, err + } + name := flowSchema.Name + if name == nil { + return nil, fmt.Errorf("flowSchema.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, *name, types.ApplyPatchType, data), &v1beta3.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta3.FlowSchema), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeFlowSchemas) ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1beta3.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1beta3.FlowSchema, err error) { + if flowSchema == nil { + return nil, fmt.Errorf("flowSchema provided to Apply must not be nil") + } + data, err := json.Marshal(flowSchema) + if err != nil { + return nil, err + } + name := flowSchema.Name + if name == nil { + return nil, fmt.Errorf("flowSchema.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, *name, types.ApplyPatchType, data, "status"), &v1beta3.FlowSchema{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta3.FlowSchema), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/fake_prioritylevelconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/fake_prioritylevelconfiguration.go new file mode 100644 index 0000000000..5fbc57da7f --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake/fake_prioritylevelconfiguration.go @@ -0,0 +1,179 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta3 "k8s.io/api/flowcontrol/v1beta3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + flowcontrolv1beta3 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3" + testing "k8s.io/client-go/testing" +) + +// FakePriorityLevelConfigurations implements PriorityLevelConfigurationInterface +type FakePriorityLevelConfigurations struct { + Fake *FakeFlowcontrolV1beta3 +} + +var prioritylevelconfigurationsResource = schema.GroupVersionResource{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta3", Resource: "prioritylevelconfigurations"} + +var prioritylevelconfigurationsKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta3", Kind: "PriorityLevelConfiguration"} + +// Get takes name of the priorityLevelConfiguration, and returns the corresponding priorityLevelConfiguration object, and an error if there is any. +func (c *FakePriorityLevelConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta3.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(prioritylevelconfigurationsResource, name), &v1beta3.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta3.PriorityLevelConfiguration), err +} + +// List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors. +func (c *FakePriorityLevelConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta3.PriorityLevelConfigurationList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(prioritylevelconfigurationsResource, prioritylevelconfigurationsKind, opts), &v1beta3.PriorityLevelConfigurationList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta3.PriorityLevelConfigurationList{ListMeta: obj.(*v1beta3.PriorityLevelConfigurationList).ListMeta} + for _, item := range obj.(*v1beta3.PriorityLevelConfigurationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested priorityLevelConfigurations. +func (c *FakePriorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(prioritylevelconfigurationsResource, opts)) +} + +// Create takes the representation of a priorityLevelConfiguration and creates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. +func (c *FakePriorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1beta3.PriorityLevelConfiguration, opts v1.CreateOptions) (result *v1beta3.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1beta3.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta3.PriorityLevelConfiguration), err +} + +// Update takes the representation of a priorityLevelConfiguration and updates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. +func (c *FakePriorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1beta3.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1beta3.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1beta3.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta3.PriorityLevelConfiguration), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakePriorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1beta3.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1beta3.PriorityLevelConfiguration, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(prioritylevelconfigurationsResource, "status", priorityLevelConfiguration), &v1beta3.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta3.PriorityLevelConfiguration), err +} + +// Delete takes name of the priorityLevelConfiguration and deletes it. Returns an error if one occurs. +func (c *FakePriorityLevelConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(prioritylevelconfigurationsResource, name, opts), &v1beta3.PriorityLevelConfiguration{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePriorityLevelConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(prioritylevelconfigurationsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta3.PriorityLevelConfigurationList{}) + return err +} + +// Patch applies the patch and returns the patched priorityLevelConfiguration. +func (c *FakePriorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta3.PriorityLevelConfiguration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, name, pt, data, subresources...), &v1beta3.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta3.PriorityLevelConfiguration), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied priorityLevelConfiguration. +func (c *FakePriorityLevelConfigurations) Apply(ctx context.Context, priorityLevelConfiguration *flowcontrolv1beta3.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1beta3.PriorityLevelConfiguration, err error) { + if priorityLevelConfiguration == nil { + return nil, fmt.Errorf("priorityLevelConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(priorityLevelConfiguration) + if err != nil { + return nil, err + } + name := priorityLevelConfiguration.Name + if name == nil { + return nil, fmt.Errorf("priorityLevelConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, *name, types.ApplyPatchType, data), &v1beta3.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta3.PriorityLevelConfiguration), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakePriorityLevelConfigurations) ApplyStatus(ctx context.Context, priorityLevelConfiguration *flowcontrolv1beta3.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1beta3.PriorityLevelConfiguration, err error) { + if priorityLevelConfiguration == nil { + return nil, fmt.Errorf("priorityLevelConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(priorityLevelConfiguration) + if err != nil { + return nil, err + } + name := priorityLevelConfiguration.Name + if name == nil { + return nil, fmt.Errorf("priorityLevelConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, *name, types.ApplyPatchType, data, "status"), &v1beta3.PriorityLevelConfiguration{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta3.PriorityLevelConfiguration), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingress.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingress.go new file mode 100644 index 0000000000..8ffcd7f97c --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingress.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + networkingv1 "k8s.io/api/networking/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsnetworkingv1 "k8s.io/client-go/applyconfigurations/networking/v1" + testing "k8s.io/client-go/testing" +) + +// FakeIngresses implements IngressInterface +type FakeIngresses struct { + Fake *FakeNetworkingV1 + ns string +} + +var ingressesResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1", Resource: "ingresses"} + +var ingressesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "Ingress"} + +// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. +func (c *FakeIngresses) Get(ctx context.Context, name string, options v1.GetOptions) (result *networkingv1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(ingressesResource, c.ns, name), &networkingv1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.Ingress), err +} + +// List takes label and field selectors, and returns the list of Ingresses that match those selectors. +func (c *FakeIngresses) List(ctx context.Context, opts v1.ListOptions) (result *networkingv1.IngressList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(ingressesResource, ingressesKind, c.ns, opts), &networkingv1.IngressList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &networkingv1.IngressList{ListMeta: obj.(*networkingv1.IngressList).ListMeta} + for _, item := range obj.(*networkingv1.IngressList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested ingresses. +func (c *FakeIngresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(ingressesResource, c.ns, opts)) + +} + +// Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. +func (c *FakeIngresses) Create(ctx context.Context, ingress *networkingv1.Ingress, opts v1.CreateOptions) (result *networkingv1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(ingressesResource, c.ns, ingress), &networkingv1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.Ingress), err +} + +// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. +func (c *FakeIngresses) Update(ctx context.Context, ingress *networkingv1.Ingress, opts v1.UpdateOptions) (result *networkingv1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(ingressesResource, c.ns, ingress), &networkingv1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.Ingress), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeIngresses) UpdateStatus(ctx context.Context, ingress *networkingv1.Ingress, opts v1.UpdateOptions) (*networkingv1.Ingress, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &networkingv1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.Ingress), err +} + +// Delete takes name of the ingress and deletes it. Returns an error if one occurs. +func (c *FakeIngresses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(ingressesResource, c.ns, name, opts), &networkingv1.Ingress{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeIngresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(ingressesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &networkingv1.IngressList{}) + return err +} + +// Patch applies the patch and returns the patched ingress. +func (c *FakeIngresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *networkingv1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, name, pt, data, subresources...), &networkingv1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.Ingress), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied ingress. +func (c *FakeIngresses) Apply(ctx context.Context, ingress *applyconfigurationsnetworkingv1.IngressApplyConfiguration, opts v1.ApplyOptions) (result *networkingv1.Ingress, err error) { + if ingress == nil { + return nil, fmt.Errorf("ingress provided to Apply must not be nil") + } + data, err := json.Marshal(ingress) + if err != nil { + return nil, err + } + name := ingress.Name + if name == nil { + return nil, fmt.Errorf("ingress.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, *name, types.ApplyPatchType, data), &networkingv1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.Ingress), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeIngresses) ApplyStatus(ctx context.Context, ingress *applyconfigurationsnetworkingv1.IngressApplyConfiguration, opts v1.ApplyOptions) (result *networkingv1.Ingress, err error) { + if ingress == nil { + return nil, fmt.Errorf("ingress provided to Apply must not be nil") + } + data, err := json.Marshal(ingress) + if err != nil { + return nil, err + } + name := ingress.Name + if name == nil { + return nil, fmt.Errorf("ingress.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &networkingv1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.Ingress), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingressclass.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingressclass.go new file mode 100644 index 0000000000..fe320c4b72 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingressclass.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + networkingv1 "k8s.io/api/networking/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsnetworkingv1 "k8s.io/client-go/applyconfigurations/networking/v1" + testing "k8s.io/client-go/testing" +) + +// FakeIngressClasses implements IngressClassInterface +type FakeIngressClasses struct { + Fake *FakeNetworkingV1 +} + +var ingressclassesResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1", Resource: "ingressclasses"} + +var ingressclassesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "IngressClass"} + +// Get takes name of the ingressClass, and returns the corresponding ingressClass object, and an error if there is any. +func (c *FakeIngressClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *networkingv1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(ingressclassesResource, name), &networkingv1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1.IngressClass), err +} + +// List takes label and field selectors, and returns the list of IngressClasses that match those selectors. +func (c *FakeIngressClasses) List(ctx context.Context, opts v1.ListOptions) (result *networkingv1.IngressClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(ingressclassesResource, ingressclassesKind, opts), &networkingv1.IngressClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &networkingv1.IngressClassList{ListMeta: obj.(*networkingv1.IngressClassList).ListMeta} + for _, item := range obj.(*networkingv1.IngressClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested ingressClasses. +func (c *FakeIngressClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(ingressclassesResource, opts)) +} + +// Create takes the representation of a ingressClass and creates it. Returns the server's representation of the ingressClass, and an error, if there is any. +func (c *FakeIngressClasses) Create(ctx context.Context, ingressClass *networkingv1.IngressClass, opts v1.CreateOptions) (result *networkingv1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(ingressclassesResource, ingressClass), &networkingv1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1.IngressClass), err +} + +// Update takes the representation of a ingressClass and updates it. Returns the server's representation of the ingressClass, and an error, if there is any. +func (c *FakeIngressClasses) Update(ctx context.Context, ingressClass *networkingv1.IngressClass, opts v1.UpdateOptions) (result *networkingv1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(ingressclassesResource, ingressClass), &networkingv1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1.IngressClass), err +} + +// Delete takes name of the ingressClass and deletes it. Returns an error if one occurs. +func (c *FakeIngressClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(ingressclassesResource, name, opts), &networkingv1.IngressClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeIngressClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(ingressclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &networkingv1.IngressClassList{}) + return err +} + +// Patch applies the patch and returns the patched ingressClass. +func (c *FakeIngressClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *networkingv1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(ingressclassesResource, name, pt, data, subresources...), &networkingv1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1.IngressClass), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied ingressClass. +func (c *FakeIngressClasses) Apply(ctx context.Context, ingressClass *applyconfigurationsnetworkingv1.IngressClassApplyConfiguration, opts v1.ApplyOptions) (result *networkingv1.IngressClass, err error) { + if ingressClass == nil { + return nil, fmt.Errorf("ingressClass provided to Apply must not be nil") + } + data, err := json.Marshal(ingressClass) + if err != nil { + return nil, err + } + name := ingressClass.Name + if name == nil { + return nil, fmt.Errorf("ingressClass.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(ingressclassesResource, *name, types.ApplyPatchType, data), &networkingv1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1.IngressClass), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networking_client.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networking_client.go new file mode 100644 index 0000000000..ed1639e2ff --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networking_client.go @@ -0,0 +1,48 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/networking/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeNetworkingV1 struct { + *testing.Fake +} + +func (c *FakeNetworkingV1) Ingresses(namespace string) v1.IngressInterface { + return &FakeIngresses{c, namespace} +} + +func (c *FakeNetworkingV1) IngressClasses() v1.IngressClassInterface { + return &FakeIngressClasses{c} +} + +func (c *FakeNetworkingV1) NetworkPolicies(namespace string) v1.NetworkPolicyInterface { + return &FakeNetworkPolicies{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeNetworkingV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go new file mode 100644 index 0000000000..16c10cac0d --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + networkingv1 "k8s.io/api/networking/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsnetworkingv1 "k8s.io/client-go/applyconfigurations/networking/v1" + testing "k8s.io/client-go/testing" +) + +// FakeNetworkPolicies implements NetworkPolicyInterface +type FakeNetworkPolicies struct { + Fake *FakeNetworkingV1 + ns string +} + +var networkpoliciesResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1", Resource: "networkpolicies"} + +var networkpoliciesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "NetworkPolicy"} + +// Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any. +func (c *FakeNetworkPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *networkingv1.NetworkPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(networkpoliciesResource, c.ns, name), &networkingv1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.NetworkPolicy), err +} + +// List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. +func (c *FakeNetworkPolicies) List(ctx context.Context, opts v1.ListOptions) (result *networkingv1.NetworkPolicyList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(networkpoliciesResource, networkpoliciesKind, c.ns, opts), &networkingv1.NetworkPolicyList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &networkingv1.NetworkPolicyList{ListMeta: obj.(*networkingv1.NetworkPolicyList).ListMeta} + for _, item := range obj.(*networkingv1.NetworkPolicyList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested networkPolicies. +func (c *FakeNetworkPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(networkpoliciesResource, c.ns, opts)) + +} + +// Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. +func (c *FakeNetworkPolicies) Create(ctx context.Context, networkPolicy *networkingv1.NetworkPolicy, opts v1.CreateOptions) (result *networkingv1.NetworkPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(networkpoliciesResource, c.ns, networkPolicy), &networkingv1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.NetworkPolicy), err +} + +// Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any. +func (c *FakeNetworkPolicies) Update(ctx context.Context, networkPolicy *networkingv1.NetworkPolicy, opts v1.UpdateOptions) (result *networkingv1.NetworkPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(networkpoliciesResource, c.ns, networkPolicy), &networkingv1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.NetworkPolicy), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeNetworkPolicies) UpdateStatus(ctx context.Context, networkPolicy *networkingv1.NetworkPolicy, opts v1.UpdateOptions) (*networkingv1.NetworkPolicy, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(networkpoliciesResource, "status", c.ns, networkPolicy), &networkingv1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.NetworkPolicy), err +} + +// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. +func (c *FakeNetworkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(networkpoliciesResource, c.ns, name, opts), &networkingv1.NetworkPolicy{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeNetworkPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(networkpoliciesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &networkingv1.NetworkPolicyList{}) + return err +} + +// Patch applies the patch and returns the patched networkPolicy. +func (c *FakeNetworkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *networkingv1.NetworkPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, name, pt, data, subresources...), &networkingv1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.NetworkPolicy), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied networkPolicy. +func (c *FakeNetworkPolicies) Apply(ctx context.Context, networkPolicy *applyconfigurationsnetworkingv1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *networkingv1.NetworkPolicy, err error) { + if networkPolicy == nil { + return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil") + } + data, err := json.Marshal(networkPolicy) + if err != nil { + return nil, err + } + name := networkPolicy.Name + if name == nil { + return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, *name, types.ApplyPatchType, data), &networkingv1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.NetworkPolicy), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeNetworkPolicies) ApplyStatus(ctx context.Context, networkPolicy *applyconfigurationsnetworkingv1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *networkingv1.NetworkPolicy, err error) { + if networkPolicy == nil { + return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil") + } + data, err := json.Marshal(networkPolicy) + if err != nil { + return nil, err + } + name := networkPolicy.Name + if name == nil { + return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &networkingv1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.NetworkPolicy), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake/fake_clustercidr.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake/fake_clustercidr.go new file mode 100644 index 0000000000..ca0352d390 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake/fake_clustercidr.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/networking/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + networkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeClusterCIDRs implements ClusterCIDRInterface +type FakeClusterCIDRs struct { + Fake *FakeNetworkingV1alpha1 +} + +var clustercidrsResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1alpha1", Resource: "clustercidrs"} + +var clustercidrsKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1alpha1", Kind: "ClusterCIDR"} + +// Get takes name of the clusterCIDR, and returns the corresponding clusterCIDR object, and an error if there is any. +func (c *FakeClusterCIDRs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterCIDR, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(clustercidrsResource, name), &v1alpha1.ClusterCIDR{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterCIDR), err +} + +// List takes label and field selectors, and returns the list of ClusterCIDRs that match those selectors. +func (c *FakeClusterCIDRs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterCIDRList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(clustercidrsResource, clustercidrsKind, opts), &v1alpha1.ClusterCIDRList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ClusterCIDRList{ListMeta: obj.(*v1alpha1.ClusterCIDRList).ListMeta} + for _, item := range obj.(*v1alpha1.ClusterCIDRList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusterCIDRs. +func (c *FakeClusterCIDRs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(clustercidrsResource, opts)) +} + +// Create takes the representation of a clusterCIDR and creates it. Returns the server's representation of the clusterCIDR, and an error, if there is any. +func (c *FakeClusterCIDRs) Create(ctx context.Context, clusterCIDR *v1alpha1.ClusterCIDR, opts v1.CreateOptions) (result *v1alpha1.ClusterCIDR, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(clustercidrsResource, clusterCIDR), &v1alpha1.ClusterCIDR{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterCIDR), err +} + +// Update takes the representation of a clusterCIDR and updates it. Returns the server's representation of the clusterCIDR, and an error, if there is any. +func (c *FakeClusterCIDRs) Update(ctx context.Context, clusterCIDR *v1alpha1.ClusterCIDR, opts v1.UpdateOptions) (result *v1alpha1.ClusterCIDR, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(clustercidrsResource, clusterCIDR), &v1alpha1.ClusterCIDR{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterCIDR), err +} + +// Delete takes name of the clusterCIDR and deletes it. Returns an error if one occurs. +func (c *FakeClusterCIDRs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(clustercidrsResource, name, opts), &v1alpha1.ClusterCIDR{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeClusterCIDRs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clustercidrsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ClusterCIDRList{}) + return err +} + +// Patch applies the patch and returns the patched clusterCIDR. +func (c *FakeClusterCIDRs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterCIDR, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clustercidrsResource, name, pt, data, subresources...), &v1alpha1.ClusterCIDR{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterCIDR), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied clusterCIDR. +func (c *FakeClusterCIDRs) Apply(ctx context.Context, clusterCIDR *networkingv1alpha1.ClusterCIDRApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDR, err error) { + if clusterCIDR == nil { + return nil, fmt.Errorf("clusterCIDR provided to Apply must not be nil") + } + data, err := json.Marshal(clusterCIDR) + if err != nil { + return nil, err + } + name := clusterCIDR.Name + if name == nil { + return nil, fmt.Errorf("clusterCIDR.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clustercidrsResource, *name, types.ApplyPatchType, data), &v1alpha1.ClusterCIDR{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterCIDR), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake/fake_networking_client.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake/fake_networking_client.go new file mode 100644 index 0000000000..96979aa881 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake/fake_networking_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeNetworkingV1alpha1 struct { + *testing.Fake +} + +func (c *FakeNetworkingV1alpha1) ClusterCIDRs() v1alpha1.ClusterCIDRInterface { + return &FakeClusterCIDRs{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeNetworkingV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingress.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingress.go new file mode 100644 index 0000000000..349196c534 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingress.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/networking/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + networkingv1beta1 "k8s.io/client-go/applyconfigurations/networking/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeIngresses implements IngressInterface +type FakeIngresses struct { + Fake *FakeNetworkingV1beta1 + ns string +} + +var ingressesResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1beta1", Resource: "ingresses"} + +var ingressesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1beta1", Kind: "Ingress"} + +// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. +func (c *FakeIngresses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(ingressesResource, c.ns, name), &v1beta1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Ingress), err +} + +// List takes label and field selectors, and returns the list of Ingresses that match those selectors. +func (c *FakeIngresses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IngressList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(ingressesResource, ingressesKind, c.ns, opts), &v1beta1.IngressList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.IngressList{ListMeta: obj.(*v1beta1.IngressList).ListMeta} + for _, item := range obj.(*v1beta1.IngressList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested ingresses. +func (c *FakeIngresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(ingressesResource, c.ns, opts)) + +} + +// Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. +func (c *FakeIngresses) Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (result *v1beta1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Ingress), err +} + +// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. +func (c *FakeIngresses) Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Ingress), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeIngresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (*v1beta1.Ingress, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &v1beta1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Ingress), err +} + +// Delete takes name of the ingress and deletes it. Returns an error if one occurs. +func (c *FakeIngresses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(ingressesResource, c.ns, name, opts), &v1beta1.Ingress{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeIngresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(ingressesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.IngressList{}) + return err +} + +// Patch applies the patch and returns the patched ingress. +func (c *FakeIngresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, name, pt, data, subresources...), &v1beta1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Ingress), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied ingress. +func (c *FakeIngresses) Apply(ctx context.Context, ingress *networkingv1beta1.IngressApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Ingress, err error) { + if ingress == nil { + return nil, fmt.Errorf("ingress provided to Apply must not be nil") + } + data, err := json.Marshal(ingress) + if err != nil { + return nil, err + } + name := ingress.Name + if name == nil { + return nil, fmt.Errorf("ingress.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Ingress), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeIngresses) ApplyStatus(ctx context.Context, ingress *networkingv1beta1.IngressApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Ingress, err error) { + if ingress == nil { + return nil, fmt.Errorf("ingress provided to Apply must not be nil") + } + data, err := json.Marshal(ingress) + if err != nil { + return nil, err + } + name := ingress.Name + if name == nil { + return nil, fmt.Errorf("ingress.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Ingress), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingressclass.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingressclass.go new file mode 100644 index 0000000000..6ef8d1eddd --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingressclass.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/networking/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + networkingv1beta1 "k8s.io/client-go/applyconfigurations/networking/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeIngressClasses implements IngressClassInterface +type FakeIngressClasses struct { + Fake *FakeNetworkingV1beta1 +} + +var ingressclassesResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1beta1", Resource: "ingressclasses"} + +var ingressclassesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1beta1", Kind: "IngressClass"} + +// Get takes name of the ingressClass, and returns the corresponding ingressClass object, and an error if there is any. +func (c *FakeIngressClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(ingressclassesResource, name), &v1beta1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.IngressClass), err +} + +// List takes label and field selectors, and returns the list of IngressClasses that match those selectors. +func (c *FakeIngressClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IngressClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(ingressclassesResource, ingressclassesKind, opts), &v1beta1.IngressClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.IngressClassList{ListMeta: obj.(*v1beta1.IngressClassList).ListMeta} + for _, item := range obj.(*v1beta1.IngressClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested ingressClasses. +func (c *FakeIngressClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(ingressclassesResource, opts)) +} + +// Create takes the representation of a ingressClass and creates it. Returns the server's representation of the ingressClass, and an error, if there is any. +func (c *FakeIngressClasses) Create(ctx context.Context, ingressClass *v1beta1.IngressClass, opts v1.CreateOptions) (result *v1beta1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(ingressclassesResource, ingressClass), &v1beta1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.IngressClass), err +} + +// Update takes the representation of a ingressClass and updates it. Returns the server's representation of the ingressClass, and an error, if there is any. +func (c *FakeIngressClasses) Update(ctx context.Context, ingressClass *v1beta1.IngressClass, opts v1.UpdateOptions) (result *v1beta1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(ingressclassesResource, ingressClass), &v1beta1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.IngressClass), err +} + +// Delete takes name of the ingressClass and deletes it. Returns an error if one occurs. +func (c *FakeIngressClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(ingressclassesResource, name, opts), &v1beta1.IngressClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeIngressClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(ingressclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.IngressClassList{}) + return err +} + +// Patch applies the patch and returns the patched ingressClass. +func (c *FakeIngressClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(ingressclassesResource, name, pt, data, subresources...), &v1beta1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.IngressClass), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied ingressClass. +func (c *FakeIngressClasses) Apply(ctx context.Context, ingressClass *networkingv1beta1.IngressClassApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.IngressClass, err error) { + if ingressClass == nil { + return nil, fmt.Errorf("ingressClass provided to Apply must not be nil") + } + data, err := json.Marshal(ingressClass) + if err != nil { + return nil, err + } + name := ingressClass.Name + if name == nil { + return nil, fmt.Errorf("ingressClass.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(ingressclassesResource, *name, types.ApplyPatchType, data), &v1beta1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.IngressClass), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_networking_client.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_networking_client.go new file mode 100644 index 0000000000..b8792a3064 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_networking_client.go @@ -0,0 +1,44 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeNetworkingV1beta1 struct { + *testing.Fake +} + +func (c *FakeNetworkingV1beta1) Ingresses(namespace string) v1beta1.IngressInterface { + return &FakeIngresses{c, namespace} +} + +func (c *FakeNetworkingV1beta1) IngressClasses() v1beta1.IngressClassInterface { + return &FakeIngressClasses{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeNetworkingV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake/fake_node_client.go b/vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake/fake_node_client.go new file mode 100644 index 0000000000..dea10cbada --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake/fake_node_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/node/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeNodeV1 struct { + *testing.Fake +} + +func (c *FakeNodeV1) RuntimeClasses() v1.RuntimeClassInterface { + return &FakeRuntimeClasses{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeNodeV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake/fake_runtimeclass.go b/vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake/fake_runtimeclass.go new file mode 100644 index 0000000000..3a1aaf1b60 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake/fake_runtimeclass.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + nodev1 "k8s.io/api/node/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsnodev1 "k8s.io/client-go/applyconfigurations/node/v1" + testing "k8s.io/client-go/testing" +) + +// FakeRuntimeClasses implements RuntimeClassInterface +type FakeRuntimeClasses struct { + Fake *FakeNodeV1 +} + +var runtimeclassesResource = schema.GroupVersionResource{Group: "node.k8s.io", Version: "v1", Resource: "runtimeclasses"} + +var runtimeclassesKind = schema.GroupVersionKind{Group: "node.k8s.io", Version: "v1", Kind: "RuntimeClass"} + +// Get takes name of the runtimeClass, and returns the corresponding runtimeClass object, and an error if there is any. +func (c *FakeRuntimeClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *nodev1.RuntimeClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(runtimeclassesResource, name), &nodev1.RuntimeClass{}) + if obj == nil { + return nil, err + } + return obj.(*nodev1.RuntimeClass), err +} + +// List takes label and field selectors, and returns the list of RuntimeClasses that match those selectors. +func (c *FakeRuntimeClasses) List(ctx context.Context, opts v1.ListOptions) (result *nodev1.RuntimeClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(runtimeclassesResource, runtimeclassesKind, opts), &nodev1.RuntimeClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &nodev1.RuntimeClassList{ListMeta: obj.(*nodev1.RuntimeClassList).ListMeta} + for _, item := range obj.(*nodev1.RuntimeClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested runtimeClasses. +func (c *FakeRuntimeClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(runtimeclassesResource, opts)) +} + +// Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any. +func (c *FakeRuntimeClasses) Create(ctx context.Context, runtimeClass *nodev1.RuntimeClass, opts v1.CreateOptions) (result *nodev1.RuntimeClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(runtimeclassesResource, runtimeClass), &nodev1.RuntimeClass{}) + if obj == nil { + return nil, err + } + return obj.(*nodev1.RuntimeClass), err +} + +// Update takes the representation of a runtimeClass and updates it. Returns the server's representation of the runtimeClass, and an error, if there is any. +func (c *FakeRuntimeClasses) Update(ctx context.Context, runtimeClass *nodev1.RuntimeClass, opts v1.UpdateOptions) (result *nodev1.RuntimeClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(runtimeclassesResource, runtimeClass), &nodev1.RuntimeClass{}) + if obj == nil { + return nil, err + } + return obj.(*nodev1.RuntimeClass), err +} + +// Delete takes name of the runtimeClass and deletes it. Returns an error if one occurs. +func (c *FakeRuntimeClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(runtimeclassesResource, name, opts), &nodev1.RuntimeClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeRuntimeClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(runtimeclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &nodev1.RuntimeClassList{}) + return err +} + +// Patch applies the patch and returns the patched runtimeClass. +func (c *FakeRuntimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *nodev1.RuntimeClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(runtimeclassesResource, name, pt, data, subresources...), &nodev1.RuntimeClass{}) + if obj == nil { + return nil, err + } + return obj.(*nodev1.RuntimeClass), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied runtimeClass. +func (c *FakeRuntimeClasses) Apply(ctx context.Context, runtimeClass *applyconfigurationsnodev1.RuntimeClassApplyConfiguration, opts v1.ApplyOptions) (result *nodev1.RuntimeClass, err error) { + if runtimeClass == nil { + return nil, fmt.Errorf("runtimeClass provided to Apply must not be nil") + } + data, err := json.Marshal(runtimeClass) + if err != nil { + return nil, err + } + name := runtimeClass.Name + if name == nil { + return nil, fmt.Errorf("runtimeClass.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(runtimeclassesResource, *name, types.ApplyPatchType, data), &nodev1.RuntimeClass{}) + if obj == nil { + return nil, err + } + return obj.(*nodev1.RuntimeClass), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_node_client.go b/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_node_client.go new file mode 100644 index 0000000000..21ab9de33a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_node_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeNodeV1alpha1 struct { + *testing.Fake +} + +func (c *FakeNodeV1alpha1) RuntimeClasses() v1alpha1.RuntimeClassInterface { + return &FakeRuntimeClasses{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeNodeV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_runtimeclass.go b/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_runtimeclass.go new file mode 100644 index 0000000000..4b6387943d --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_runtimeclass.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/node/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + nodev1alpha1 "k8s.io/client-go/applyconfigurations/node/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeRuntimeClasses implements RuntimeClassInterface +type FakeRuntimeClasses struct { + Fake *FakeNodeV1alpha1 +} + +var runtimeclassesResource = schema.GroupVersionResource{Group: "node.k8s.io", Version: "v1alpha1", Resource: "runtimeclasses"} + +var runtimeclassesKind = schema.GroupVersionKind{Group: "node.k8s.io", Version: "v1alpha1", Kind: "RuntimeClass"} + +// Get takes name of the runtimeClass, and returns the corresponding runtimeClass object, and an error if there is any. +func (c *FakeRuntimeClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RuntimeClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(runtimeclassesResource, name), &v1alpha1.RuntimeClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RuntimeClass), err +} + +// List takes label and field selectors, and returns the list of RuntimeClasses that match those selectors. +func (c *FakeRuntimeClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RuntimeClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(runtimeclassesResource, runtimeclassesKind, opts), &v1alpha1.RuntimeClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.RuntimeClassList{ListMeta: obj.(*v1alpha1.RuntimeClassList).ListMeta} + for _, item := range obj.(*v1alpha1.RuntimeClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested runtimeClasses. +func (c *FakeRuntimeClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(runtimeclassesResource, opts)) +} + +// Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any. +func (c *FakeRuntimeClasses) Create(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.CreateOptions) (result *v1alpha1.RuntimeClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(runtimeclassesResource, runtimeClass), &v1alpha1.RuntimeClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RuntimeClass), err +} + +// Update takes the representation of a runtimeClass and updates it. Returns the server's representation of the runtimeClass, and an error, if there is any. +func (c *FakeRuntimeClasses) Update(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.UpdateOptions) (result *v1alpha1.RuntimeClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(runtimeclassesResource, runtimeClass), &v1alpha1.RuntimeClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RuntimeClass), err +} + +// Delete takes name of the runtimeClass and deletes it. Returns an error if one occurs. +func (c *FakeRuntimeClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(runtimeclassesResource, name, opts), &v1alpha1.RuntimeClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeRuntimeClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(runtimeclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.RuntimeClassList{}) + return err +} + +// Patch applies the patch and returns the patched runtimeClass. +func (c *FakeRuntimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RuntimeClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(runtimeclassesResource, name, pt, data, subresources...), &v1alpha1.RuntimeClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RuntimeClass), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied runtimeClass. +func (c *FakeRuntimeClasses) Apply(ctx context.Context, runtimeClass *nodev1alpha1.RuntimeClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.RuntimeClass, err error) { + if runtimeClass == nil { + return nil, fmt.Errorf("runtimeClass provided to Apply must not be nil") + } + data, err := json.Marshal(runtimeClass) + if err != nil { + return nil, err + } + name := runtimeClass.Name + if name == nil { + return nil, fmt.Errorf("runtimeClass.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(runtimeclassesResource, *name, types.ApplyPatchType, data), &v1alpha1.RuntimeClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RuntimeClass), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_node_client.go b/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_node_client.go new file mode 100644 index 0000000000..36976ce548 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_node_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeNodeV1beta1 struct { + *testing.Fake +} + +func (c *FakeNodeV1beta1) RuntimeClasses() v1beta1.RuntimeClassInterface { + return &FakeRuntimeClasses{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeNodeV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_runtimeclass.go b/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_runtimeclass.go new file mode 100644 index 0000000000..191162114b --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_runtimeclass.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/node/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + nodev1beta1 "k8s.io/client-go/applyconfigurations/node/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeRuntimeClasses implements RuntimeClassInterface +type FakeRuntimeClasses struct { + Fake *FakeNodeV1beta1 +} + +var runtimeclassesResource = schema.GroupVersionResource{Group: "node.k8s.io", Version: "v1beta1", Resource: "runtimeclasses"} + +var runtimeclassesKind = schema.GroupVersionKind{Group: "node.k8s.io", Version: "v1beta1", Kind: "RuntimeClass"} + +// Get takes name of the runtimeClass, and returns the corresponding runtimeClass object, and an error if there is any. +func (c *FakeRuntimeClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.RuntimeClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(runtimeclassesResource, name), &v1beta1.RuntimeClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RuntimeClass), err +} + +// List takes label and field selectors, and returns the list of RuntimeClasses that match those selectors. +func (c *FakeRuntimeClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RuntimeClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(runtimeclassesResource, runtimeclassesKind, opts), &v1beta1.RuntimeClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.RuntimeClassList{ListMeta: obj.(*v1beta1.RuntimeClassList).ListMeta} + for _, item := range obj.(*v1beta1.RuntimeClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested runtimeClasses. +func (c *FakeRuntimeClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(runtimeclassesResource, opts)) +} + +// Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any. +func (c *FakeRuntimeClasses) Create(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.CreateOptions) (result *v1beta1.RuntimeClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(runtimeclassesResource, runtimeClass), &v1beta1.RuntimeClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RuntimeClass), err +} + +// Update takes the representation of a runtimeClass and updates it. Returns the server's representation of the runtimeClass, and an error, if there is any. +func (c *FakeRuntimeClasses) Update(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.UpdateOptions) (result *v1beta1.RuntimeClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(runtimeclassesResource, runtimeClass), &v1beta1.RuntimeClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RuntimeClass), err +} + +// Delete takes name of the runtimeClass and deletes it. Returns an error if one occurs. +func (c *FakeRuntimeClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(runtimeclassesResource, name, opts), &v1beta1.RuntimeClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeRuntimeClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(runtimeclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.RuntimeClassList{}) + return err +} + +// Patch applies the patch and returns the patched runtimeClass. +func (c *FakeRuntimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RuntimeClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(runtimeclassesResource, name, pt, data, subresources...), &v1beta1.RuntimeClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RuntimeClass), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied runtimeClass. +func (c *FakeRuntimeClasses) Apply(ctx context.Context, runtimeClass *nodev1beta1.RuntimeClassApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.RuntimeClass, err error) { + if runtimeClass == nil { + return nil, fmt.Errorf("runtimeClass provided to Apply must not be nil") + } + data, err := json.Marshal(runtimeClass) + if err != nil { + return nil, err + } + name := runtimeClass.Name + if name == nil { + return nil, fmt.Errorf("runtimeClass.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(runtimeclassesResource, *name, types.ApplyPatchType, data), &v1beta1.RuntimeClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RuntimeClass), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_eviction.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_eviction.go new file mode 100644 index 0000000000..a579067ce8 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_eviction.go @@ -0,0 +1,25 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +// FakeEvictions implements EvictionInterface +type FakeEvictions struct { + Fake *FakePolicyV1 + ns string +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_eviction_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_eviction_expansion.go new file mode 100644 index 0000000000..1b6b4ade17 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_eviction_expansion.go @@ -0,0 +1,37 @@ +/* +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 fake + +import ( + "context" + + policy "k8s.io/api/policy/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + core "k8s.io/client-go/testing" +) + +func (c *FakeEvictions) Evict(ctx context.Context, eviction *policy.Eviction) error { + action := core.CreateActionImpl{} + action.Verb = "create" + action.Namespace = c.ns + action.Resource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"} + action.Subresource = "eviction" + action.Object = eviction + + _, err := c.Fake.Invokes(action, eviction) + return err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_poddisruptionbudget.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_poddisruptionbudget.go new file mode 100644 index 0000000000..8023e2cd6f --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_poddisruptionbudget.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + policyv1 "k8s.io/api/policy/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationspolicyv1 "k8s.io/client-go/applyconfigurations/policy/v1" + testing "k8s.io/client-go/testing" +) + +// FakePodDisruptionBudgets implements PodDisruptionBudgetInterface +type FakePodDisruptionBudgets struct { + Fake *FakePolicyV1 + ns string +} + +var poddisruptionbudgetsResource = schema.GroupVersionResource{Group: "policy", Version: "v1", Resource: "poddisruptionbudgets"} + +var poddisruptionbudgetsKind = schema.GroupVersionKind{Group: "policy", Version: "v1", Kind: "PodDisruptionBudget"} + +// Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any. +func (c *FakePodDisruptionBudgets) Get(ctx context.Context, name string, options v1.GetOptions) (result *policyv1.PodDisruptionBudget, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(poddisruptionbudgetsResource, c.ns, name), &policyv1.PodDisruptionBudget{}) + + if obj == nil { + return nil, err + } + return obj.(*policyv1.PodDisruptionBudget), err +} + +// List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. +func (c *FakePodDisruptionBudgets) List(ctx context.Context, opts v1.ListOptions) (result *policyv1.PodDisruptionBudgetList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(poddisruptionbudgetsResource, poddisruptionbudgetsKind, c.ns, opts), &policyv1.PodDisruptionBudgetList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &policyv1.PodDisruptionBudgetList{ListMeta: obj.(*policyv1.PodDisruptionBudgetList).ListMeta} + for _, item := range obj.(*policyv1.PodDisruptionBudgetList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested podDisruptionBudgets. +func (c *FakePodDisruptionBudgets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(poddisruptionbudgetsResource, c.ns, opts)) + +} + +// Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. +func (c *FakePodDisruptionBudgets) Create(ctx context.Context, podDisruptionBudget *policyv1.PodDisruptionBudget, opts v1.CreateOptions) (result *policyv1.PodDisruptionBudget, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &policyv1.PodDisruptionBudget{}) + + if obj == nil { + return nil, err + } + return obj.(*policyv1.PodDisruptionBudget), err +} + +// Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. +func (c *FakePodDisruptionBudgets) Update(ctx context.Context, podDisruptionBudget *policyv1.PodDisruptionBudget, opts v1.UpdateOptions) (result *policyv1.PodDisruptionBudget, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &policyv1.PodDisruptionBudget{}) + + if obj == nil { + return nil, err + } + return obj.(*policyv1.PodDisruptionBudget), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakePodDisruptionBudgets) UpdateStatus(ctx context.Context, podDisruptionBudget *policyv1.PodDisruptionBudget, opts v1.UpdateOptions) (*policyv1.PodDisruptionBudget, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(poddisruptionbudgetsResource, "status", c.ns, podDisruptionBudget), &policyv1.PodDisruptionBudget{}) + + if obj == nil { + return nil, err + } + return obj.(*policyv1.PodDisruptionBudget), err +} + +// Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs. +func (c *FakePodDisruptionBudgets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(poddisruptionbudgetsResource, c.ns, name, opts), &policyv1.PodDisruptionBudget{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePodDisruptionBudgets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(poddisruptionbudgetsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &policyv1.PodDisruptionBudgetList{}) + return err +} + +// Patch applies the patch and returns the patched podDisruptionBudget. +func (c *FakePodDisruptionBudgets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *policyv1.PodDisruptionBudget, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, pt, data, subresources...), &policyv1.PodDisruptionBudget{}) + + if obj == nil { + return nil, err + } + return obj.(*policyv1.PodDisruptionBudget), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied podDisruptionBudget. +func (c *FakePodDisruptionBudgets) Apply(ctx context.Context, podDisruptionBudget *applyconfigurationspolicyv1.PodDisruptionBudgetApplyConfiguration, opts v1.ApplyOptions) (result *policyv1.PodDisruptionBudget, err error) { + if podDisruptionBudget == nil { + return nil, fmt.Errorf("podDisruptionBudget provided to Apply must not be nil") + } + data, err := json.Marshal(podDisruptionBudget) + if err != nil { + return nil, err + } + name := podDisruptionBudget.Name + if name == nil { + return nil, fmt.Errorf("podDisruptionBudget.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, *name, types.ApplyPatchType, data), &policyv1.PodDisruptionBudget{}) + + if obj == nil { + return nil, err + } + return obj.(*policyv1.PodDisruptionBudget), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakePodDisruptionBudgets) ApplyStatus(ctx context.Context, podDisruptionBudget *applyconfigurationspolicyv1.PodDisruptionBudgetApplyConfiguration, opts v1.ApplyOptions) (result *policyv1.PodDisruptionBudget, err error) { + if podDisruptionBudget == nil { + return nil, fmt.Errorf("podDisruptionBudget provided to Apply must not be nil") + } + data, err := json.Marshal(podDisruptionBudget) + if err != nil { + return nil, err + } + name := podDisruptionBudget.Name + if name == nil { + return nil, fmt.Errorf("podDisruptionBudget.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &policyv1.PodDisruptionBudget{}) + + if obj == nil { + return nil, err + } + return obj.(*policyv1.PodDisruptionBudget), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_policy_client.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_policy_client.go new file mode 100644 index 0000000000..d5bb3d549a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/fake_policy_client.go @@ -0,0 +1,44 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/policy/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakePolicyV1 struct { + *testing.Fake +} + +func (c *FakePolicyV1) Evictions(namespace string) v1.EvictionInterface { + return &FakeEvictions{c, namespace} +} + +func (c *FakePolicyV1) PodDisruptionBudgets(namespace string) v1.PodDisruptionBudgetInterface { + return &FakePodDisruptionBudgets{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakePolicyV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction.go new file mode 100644 index 0000000000..b8f6f3eae2 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction.go @@ -0,0 +1,25 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +// FakeEvictions implements EvictionInterface +type FakeEvictions struct { + Fake *FakePolicyV1beta1 + ns string +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction_expansion.go new file mode 100644 index 0000000000..f97522bb38 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction_expansion.go @@ -0,0 +1,37 @@ +/* +Copyright 2016 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 fake + +import ( + "context" + + policy "k8s.io/api/policy/v1beta1" + "k8s.io/apimachinery/pkg/runtime/schema" + core "k8s.io/client-go/testing" +) + +func (c *FakeEvictions) Evict(ctx context.Context, eviction *policy.Eviction) error { + action := core.CreateActionImpl{} + action.Verb = "create" + action.Namespace = c.ns + action.Resource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"} + action.Subresource = "eviction" + action.Object = eviction + + _, err := c.Fake.Invokes(action, eviction) + return err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go new file mode 100644 index 0000000000..d1c856754c --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/policy/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + policyv1beta1 "k8s.io/client-go/applyconfigurations/policy/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakePodDisruptionBudgets implements PodDisruptionBudgetInterface +type FakePodDisruptionBudgets struct { + Fake *FakePolicyV1beta1 + ns string +} + +var poddisruptionbudgetsResource = schema.GroupVersionResource{Group: "policy", Version: "v1beta1", Resource: "poddisruptionbudgets"} + +var poddisruptionbudgetsKind = schema.GroupVersionKind{Group: "policy", Version: "v1beta1", Kind: "PodDisruptionBudget"} + +// Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any. +func (c *FakePodDisruptionBudgets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodDisruptionBudget, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(poddisruptionbudgetsResource, c.ns, name), &v1beta1.PodDisruptionBudget{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodDisruptionBudget), err +} + +// List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. +func (c *FakePodDisruptionBudgets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodDisruptionBudgetList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(poddisruptionbudgetsResource, poddisruptionbudgetsKind, c.ns, opts), &v1beta1.PodDisruptionBudgetList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.PodDisruptionBudgetList{ListMeta: obj.(*v1beta1.PodDisruptionBudgetList).ListMeta} + for _, item := range obj.(*v1beta1.PodDisruptionBudgetList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested podDisruptionBudgets. +func (c *FakePodDisruptionBudgets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(poddisruptionbudgetsResource, c.ns, opts)) + +} + +// Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. +func (c *FakePodDisruptionBudgets) Create(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.CreateOptions) (result *v1beta1.PodDisruptionBudget, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1beta1.PodDisruptionBudget{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodDisruptionBudget), err +} + +// Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. +func (c *FakePodDisruptionBudgets) Update(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (result *v1beta1.PodDisruptionBudget, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1beta1.PodDisruptionBudget{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodDisruptionBudget), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakePodDisruptionBudgets) UpdateStatus(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (*v1beta1.PodDisruptionBudget, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(poddisruptionbudgetsResource, "status", c.ns, podDisruptionBudget), &v1beta1.PodDisruptionBudget{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodDisruptionBudget), err +} + +// Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs. +func (c *FakePodDisruptionBudgets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(poddisruptionbudgetsResource, c.ns, name, opts), &v1beta1.PodDisruptionBudget{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePodDisruptionBudgets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(poddisruptionbudgetsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.PodDisruptionBudgetList{}) + return err +} + +// Patch applies the patch and returns the patched podDisruptionBudget. +func (c *FakePodDisruptionBudgets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, pt, data, subresources...), &v1beta1.PodDisruptionBudget{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodDisruptionBudget), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied podDisruptionBudget. +func (c *FakePodDisruptionBudgets) Apply(ctx context.Context, podDisruptionBudget *policyv1beta1.PodDisruptionBudgetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PodDisruptionBudget, err error) { + if podDisruptionBudget == nil { + return nil, fmt.Errorf("podDisruptionBudget provided to Apply must not be nil") + } + data, err := json.Marshal(podDisruptionBudget) + if err != nil { + return nil, err + } + name := podDisruptionBudget.Name + if name == nil { + return nil, fmt.Errorf("podDisruptionBudget.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.PodDisruptionBudget{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodDisruptionBudget), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakePodDisruptionBudgets) ApplyStatus(ctx context.Context, podDisruptionBudget *policyv1beta1.PodDisruptionBudgetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PodDisruptionBudget, err error) { + if podDisruptionBudget == nil { + return nil, fmt.Errorf("podDisruptionBudget provided to Apply must not be nil") + } + data, err := json.Marshal(podDisruptionBudget) + if err != nil { + return nil, err + } + name := podDisruptionBudget.Name + if name == nil { + return nil, fmt.Errorf("podDisruptionBudget.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.PodDisruptionBudget{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodDisruptionBudget), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go new file mode 100644 index 0000000000..614d4e799d --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/policy/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + policyv1beta1 "k8s.io/client-go/applyconfigurations/policy/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakePodSecurityPolicies implements PodSecurityPolicyInterface +type FakePodSecurityPolicies struct { + Fake *FakePolicyV1beta1 +} + +var podsecuritypoliciesResource = schema.GroupVersionResource{Group: "policy", Version: "v1beta1", Resource: "podsecuritypolicies"} + +var podsecuritypoliciesKind = schema.GroupVersionKind{Group: "policy", Version: "v1beta1", Kind: "PodSecurityPolicy"} + +// Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any. +func (c *FakePodSecurityPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(podsecuritypoliciesResource, name), &v1beta1.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodSecurityPolicy), err +} + +// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors. +func (c *FakePodSecurityPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(podsecuritypoliciesResource, podsecuritypoliciesKind, opts), &v1beta1.PodSecurityPolicyList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.PodSecurityPolicyList{ListMeta: obj.(*v1beta1.PodSecurityPolicyList).ListMeta} + for _, item := range obj.(*v1beta1.PodSecurityPolicyList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested podSecurityPolicies. +func (c *FakePodSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(podsecuritypoliciesResource, opts)) +} + +// Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. +func (c *FakePodSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodSecurityPolicy), err +} + +// Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. +func (c *FakePodSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodSecurityPolicy), err +} + +// Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs. +func (c *FakePodSecurityPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(podsecuritypoliciesResource, name, opts), &v1beta1.PodSecurityPolicy{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePodSecurityPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(podsecuritypoliciesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.PodSecurityPolicyList{}) + return err +} + +// Patch applies the patch and returns the patched podSecurityPolicy. +func (c *FakePodSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(podsecuritypoliciesResource, name, pt, data, subresources...), &v1beta1.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodSecurityPolicy), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied podSecurityPolicy. +func (c *FakePodSecurityPolicies) Apply(ctx context.Context, podSecurityPolicy *policyv1beta1.PodSecurityPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PodSecurityPolicy, err error) { + if podSecurityPolicy == nil { + return nil, fmt.Errorf("podSecurityPolicy provided to Apply must not be nil") + } + data, err := json.Marshal(podSecurityPolicy) + if err != nil { + return nil, err + } + name := podSecurityPolicy.Name + if name == nil { + return nil, fmt.Errorf("podSecurityPolicy.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(podsecuritypoliciesResource, *name, types.ApplyPatchType, data), &v1beta1.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodSecurityPolicy), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_policy_client.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_policy_client.go new file mode 100644 index 0000000000..9c780bf1f0 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_policy_client.go @@ -0,0 +1,48 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakePolicyV1beta1 struct { + *testing.Fake +} + +func (c *FakePolicyV1beta1) Evictions(namespace string) v1beta1.EvictionInterface { + return &FakeEvictions{c, namespace} +} + +func (c *FakePolicyV1beta1) PodDisruptionBudgets(namespace string) v1beta1.PodDisruptionBudgetInterface { + return &FakePodDisruptionBudgets{c, namespace} +} + +func (c *FakePolicyV1beta1) PodSecurityPolicies() v1beta1.PodSecurityPolicyInterface { + return &FakePodSecurityPolicies{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakePolicyV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go new file mode 100644 index 0000000000..21a32ca043 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + rbacv1 "k8s.io/api/rbac/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsrbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1" + testing "k8s.io/client-go/testing" +) + +// FakeClusterRoles implements ClusterRoleInterface +type FakeClusterRoles struct { + Fake *FakeRbacV1 +} + +var clusterrolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1", Resource: "clusterroles"} + +var clusterrolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRole"} + +// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. +func (c *FakeClusterRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *rbacv1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(clusterrolesResource, name), &rbacv1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*rbacv1.ClusterRole), err +} + +// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. +func (c *FakeClusterRoles) List(ctx context.Context, opts v1.ListOptions) (result *rbacv1.ClusterRoleList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(clusterrolesResource, clusterrolesKind, opts), &rbacv1.ClusterRoleList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &rbacv1.ClusterRoleList{ListMeta: obj.(*rbacv1.ClusterRoleList).ListMeta} + for _, item := range obj.(*rbacv1.ClusterRoleList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusterRoles. +func (c *FakeClusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(clusterrolesResource, opts)) +} + +// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. +func (c *FakeClusterRoles) Create(ctx context.Context, clusterRole *rbacv1.ClusterRole, opts v1.CreateOptions) (result *rbacv1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &rbacv1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*rbacv1.ClusterRole), err +} + +// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. +func (c *FakeClusterRoles) Update(ctx context.Context, clusterRole *rbacv1.ClusterRole, opts v1.UpdateOptions) (result *rbacv1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &rbacv1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*rbacv1.ClusterRole), err +} + +// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. +func (c *FakeClusterRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(clusterrolesResource, name, opts), &rbacv1.ClusterRole{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeClusterRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clusterrolesResource, listOpts) + + _, err := c.Fake.Invokes(action, &rbacv1.ClusterRoleList{}) + return err +} + +// Patch applies the patch and returns the patched clusterRole. +func (c *FakeClusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *rbacv1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, pt, data, subresources...), &rbacv1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*rbacv1.ClusterRole), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied clusterRole. +func (c *FakeClusterRoles) Apply(ctx context.Context, clusterRole *applyconfigurationsrbacv1.ClusterRoleApplyConfiguration, opts v1.ApplyOptions) (result *rbacv1.ClusterRole, err error) { + if clusterRole == nil { + return nil, fmt.Errorf("clusterRole provided to Apply must not be nil") + } + data, err := json.Marshal(clusterRole) + if err != nil { + return nil, err + } + name := clusterRole.Name + if name == nil { + return nil, fmt.Errorf("clusterRole.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, *name, types.ApplyPatchType, data), &rbacv1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*rbacv1.ClusterRole), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go new file mode 100644 index 0000000000..c65399598b --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + rbacv1 "k8s.io/api/rbac/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsrbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1" + testing "k8s.io/client-go/testing" +) + +// FakeClusterRoleBindings implements ClusterRoleBindingInterface +type FakeClusterRoleBindings struct { + Fake *FakeRbacV1 +} + +var clusterrolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1", Resource: "clusterrolebindings"} + +var clusterrolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRoleBinding"} + +// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. +func (c *FakeClusterRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *rbacv1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(clusterrolebindingsResource, name), &rbacv1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*rbacv1.ClusterRoleBinding), err +} + +// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. +func (c *FakeClusterRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *rbacv1.ClusterRoleBindingList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(clusterrolebindingsResource, clusterrolebindingsKind, opts), &rbacv1.ClusterRoleBindingList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &rbacv1.ClusterRoleBindingList{ListMeta: obj.(*rbacv1.ClusterRoleBindingList).ListMeta} + for _, item := range obj.(*rbacv1.ClusterRoleBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusterRoleBindings. +func (c *FakeClusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(clusterrolebindingsResource, opts)) +} + +// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. +func (c *FakeClusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *rbacv1.ClusterRoleBinding, opts v1.CreateOptions) (result *rbacv1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &rbacv1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*rbacv1.ClusterRoleBinding), err +} + +// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. +func (c *FakeClusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *rbacv1.ClusterRoleBinding, opts v1.UpdateOptions) (result *rbacv1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &rbacv1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*rbacv1.ClusterRoleBinding), err +} + +// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. +func (c *FakeClusterRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(clusterrolebindingsResource, name, opts), &rbacv1.ClusterRoleBinding{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeClusterRoleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOpts) + + _, err := c.Fake.Invokes(action, &rbacv1.ClusterRoleBindingList{}) + return err +} + +// Patch applies the patch and returns the patched clusterRoleBinding. +func (c *FakeClusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *rbacv1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, pt, data, subresources...), &rbacv1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*rbacv1.ClusterRoleBinding), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied clusterRoleBinding. +func (c *FakeClusterRoleBindings) Apply(ctx context.Context, clusterRoleBinding *applyconfigurationsrbacv1.ClusterRoleBindingApplyConfiguration, opts v1.ApplyOptions) (result *rbacv1.ClusterRoleBinding, err error) { + if clusterRoleBinding == nil { + return nil, fmt.Errorf("clusterRoleBinding provided to Apply must not be nil") + } + data, err := json.Marshal(clusterRoleBinding) + if err != nil { + return nil, err + } + name := clusterRoleBinding.Name + if name == nil { + return nil, fmt.Errorf("clusterRoleBinding.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, *name, types.ApplyPatchType, data), &rbacv1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*rbacv1.ClusterRoleBinding), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rbac_client.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rbac_client.go new file mode 100644 index 0000000000..426fd70d6c --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rbac_client.go @@ -0,0 +1,52 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/rbac/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeRbacV1 struct { + *testing.Fake +} + +func (c *FakeRbacV1) ClusterRoles() v1.ClusterRoleInterface { + return &FakeClusterRoles{c} +} + +func (c *FakeRbacV1) ClusterRoleBindings() v1.ClusterRoleBindingInterface { + return &FakeClusterRoleBindings{c} +} + +func (c *FakeRbacV1) Roles(namespace string) v1.RoleInterface { + return &FakeRoles{c, namespace} +} + +func (c *FakeRbacV1) RoleBindings(namespace string) v1.RoleBindingInterface { + return &FakeRoleBindings{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeRbacV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go new file mode 100644 index 0000000000..4a70d0c353 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + rbacv1 "k8s.io/api/rbac/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsrbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1" + testing "k8s.io/client-go/testing" +) + +// FakeRoles implements RoleInterface +type FakeRoles struct { + Fake *FakeRbacV1 + ns string +} + +var rolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1", Resource: "roles"} + +var rolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "Role"} + +// Get takes name of the role, and returns the corresponding role object, and an error if there is any. +func (c *FakeRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *rbacv1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(rolesResource, c.ns, name), &rbacv1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*rbacv1.Role), err +} + +// List takes label and field selectors, and returns the list of Roles that match those selectors. +func (c *FakeRoles) List(ctx context.Context, opts v1.ListOptions) (result *rbacv1.RoleList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(rolesResource, rolesKind, c.ns, opts), &rbacv1.RoleList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &rbacv1.RoleList{ListMeta: obj.(*rbacv1.RoleList).ListMeta} + for _, item := range obj.(*rbacv1.RoleList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested roles. +func (c *FakeRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(rolesResource, c.ns, opts)) + +} + +// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. +func (c *FakeRoles) Create(ctx context.Context, role *rbacv1.Role, opts v1.CreateOptions) (result *rbacv1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &rbacv1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*rbacv1.Role), err +} + +// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. +func (c *FakeRoles) Update(ctx context.Context, role *rbacv1.Role, opts v1.UpdateOptions) (result *rbacv1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &rbacv1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*rbacv1.Role), err +} + +// Delete takes name of the role and deletes it. Returns an error if one occurs. +func (c *FakeRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(rolesResource, c.ns, name, opts), &rbacv1.Role{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rolesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &rbacv1.RoleList{}) + return err +} + +// Patch applies the patch and returns the patched role. +func (c *FakeRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *rbacv1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, pt, data, subresources...), &rbacv1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*rbacv1.Role), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied role. +func (c *FakeRoles) Apply(ctx context.Context, role *applyconfigurationsrbacv1.RoleApplyConfiguration, opts v1.ApplyOptions) (result *rbacv1.Role, err error) { + if role == nil { + return nil, fmt.Errorf("role provided to Apply must not be nil") + } + data, err := json.Marshal(role) + if err != nil { + return nil, err + } + name := role.Name + if name == nil { + return nil, fmt.Errorf("role.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, *name, types.ApplyPatchType, data), &rbacv1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*rbacv1.Role), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go new file mode 100644 index 0000000000..0db37dd57b --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + rbacv1 "k8s.io/api/rbac/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsrbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1" + testing "k8s.io/client-go/testing" +) + +// FakeRoleBindings implements RoleBindingInterface +type FakeRoleBindings struct { + Fake *FakeRbacV1 + ns string +} + +var rolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1", Resource: "rolebindings"} + +var rolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBinding"} + +// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. +func (c *FakeRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *rbacv1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(rolebindingsResource, c.ns, name), &rbacv1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*rbacv1.RoleBinding), err +} + +// List takes label and field selectors, and returns the list of RoleBindings that match those selectors. +func (c *FakeRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *rbacv1.RoleBindingList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(rolebindingsResource, rolebindingsKind, c.ns, opts), &rbacv1.RoleBindingList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &rbacv1.RoleBindingList{ListMeta: obj.(*rbacv1.RoleBindingList).ListMeta} + for _, item := range obj.(*rbacv1.RoleBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested roleBindings. +func (c *FakeRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(rolebindingsResource, c.ns, opts)) + +} + +// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. +func (c *FakeRoleBindings) Create(ctx context.Context, roleBinding *rbacv1.RoleBinding, opts v1.CreateOptions) (result *rbacv1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &rbacv1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*rbacv1.RoleBinding), err +} + +// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. +func (c *FakeRoleBindings) Update(ctx context.Context, roleBinding *rbacv1.RoleBinding, opts v1.UpdateOptions) (result *rbacv1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &rbacv1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*rbacv1.RoleBinding), err +} + +// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. +func (c *FakeRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(rolebindingsResource, c.ns, name, opts), &rbacv1.RoleBinding{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeRoleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &rbacv1.RoleBindingList{}) + return err +} + +// Patch applies the patch and returns the patched roleBinding. +func (c *FakeRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *rbacv1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, pt, data, subresources...), &rbacv1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*rbacv1.RoleBinding), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied roleBinding. +func (c *FakeRoleBindings) Apply(ctx context.Context, roleBinding *applyconfigurationsrbacv1.RoleBindingApplyConfiguration, opts v1.ApplyOptions) (result *rbacv1.RoleBinding, err error) { + if roleBinding == nil { + return nil, fmt.Errorf("roleBinding provided to Apply must not be nil") + } + data, err := json.Marshal(roleBinding) + if err != nil { + return nil, err + } + name := roleBinding.Name + if name == nil { + return nil, fmt.Errorf("roleBinding.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, *name, types.ApplyPatchType, data), &rbacv1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*rbacv1.RoleBinding), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go new file mode 100644 index 0000000000..7e8e3a9b8a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/rbac/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeClusterRoles implements ClusterRoleInterface +type FakeClusterRoles struct { + Fake *FakeRbacV1alpha1 +} + +var clusterrolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Resource: "clusterroles"} + +var clusterrolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Kind: "ClusterRole"} + +// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. +func (c *FakeClusterRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(clusterrolesResource, name), &v1alpha1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterRole), err +} + +// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. +func (c *FakeClusterRoles) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterRoleList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(clusterrolesResource, clusterrolesKind, opts), &v1alpha1.ClusterRoleList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ClusterRoleList{ListMeta: obj.(*v1alpha1.ClusterRoleList).ListMeta} + for _, item := range obj.(*v1alpha1.ClusterRoleList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusterRoles. +func (c *FakeClusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(clusterrolesResource, opts)) +} + +// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. +func (c *FakeClusterRoles) Create(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.CreateOptions) (result *v1alpha1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &v1alpha1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterRole), err +} + +// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. +func (c *FakeClusterRoles) Update(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.UpdateOptions) (result *v1alpha1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &v1alpha1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterRole), err +} + +// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. +func (c *FakeClusterRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(clusterrolesResource, name, opts), &v1alpha1.ClusterRole{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeClusterRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clusterrolesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ClusterRoleList{}) + return err +} + +// Patch applies the patch and returns the patched clusterRole. +func (c *FakeClusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, pt, data, subresources...), &v1alpha1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterRole), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied clusterRole. +func (c *FakeClusterRoles) Apply(ctx context.Context, clusterRole *rbacv1alpha1.ClusterRoleApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterRole, err error) { + if clusterRole == nil { + return nil, fmt.Errorf("clusterRole provided to Apply must not be nil") + } + data, err := json.Marshal(clusterRole) + if err != nil { + return nil, err + } + name := clusterRole.Name + if name == nil { + return nil, fmt.Errorf("clusterRole.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, *name, types.ApplyPatchType, data), &v1alpha1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterRole), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go new file mode 100644 index 0000000000..5c5e632789 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/rbac/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeClusterRoleBindings implements ClusterRoleBindingInterface +type FakeClusterRoleBindings struct { + Fake *FakeRbacV1alpha1 +} + +var clusterrolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Resource: "clusterrolebindings"} + +var clusterrolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Kind: "ClusterRoleBinding"} + +// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. +func (c *FakeClusterRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(clusterrolebindingsResource, name), &v1alpha1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterRoleBinding), err +} + +// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. +func (c *FakeClusterRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(clusterrolebindingsResource, clusterrolebindingsKind, opts), &v1alpha1.ClusterRoleBindingList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ClusterRoleBindingList{ListMeta: obj.(*v1alpha1.ClusterRoleBindingList).ListMeta} + for _, item := range obj.(*v1alpha1.ClusterRoleBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusterRoleBindings. +func (c *FakeClusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(clusterrolebindingsResource, opts)) +} + +// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. +func (c *FakeClusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.CreateOptions) (result *v1alpha1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &v1alpha1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterRoleBinding), err +} + +// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. +func (c *FakeClusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.UpdateOptions) (result *v1alpha1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &v1alpha1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterRoleBinding), err +} + +// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. +func (c *FakeClusterRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(clusterrolebindingsResource, name, opts), &v1alpha1.ClusterRoleBinding{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeClusterRoleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ClusterRoleBindingList{}) + return err +} + +// Patch applies the patch and returns the patched clusterRoleBinding. +func (c *FakeClusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, pt, data, subresources...), &v1alpha1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterRoleBinding), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied clusterRoleBinding. +func (c *FakeClusterRoleBindings) Apply(ctx context.Context, clusterRoleBinding *rbacv1alpha1.ClusterRoleBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterRoleBinding, err error) { + if clusterRoleBinding == nil { + return nil, fmt.Errorf("clusterRoleBinding provided to Apply must not be nil") + } + data, err := json.Marshal(clusterRoleBinding) + if err != nil { + return nil, err + } + name := clusterRoleBinding.Name + if name == nil { + return nil, fmt.Errorf("clusterRoleBinding.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, *name, types.ApplyPatchType, data), &v1alpha1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterRoleBinding), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rbac_client.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rbac_client.go new file mode 100644 index 0000000000..3447e9be83 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rbac_client.go @@ -0,0 +1,52 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeRbacV1alpha1 struct { + *testing.Fake +} + +func (c *FakeRbacV1alpha1) ClusterRoles() v1alpha1.ClusterRoleInterface { + return &FakeClusterRoles{c} +} + +func (c *FakeRbacV1alpha1) ClusterRoleBindings() v1alpha1.ClusterRoleBindingInterface { + return &FakeClusterRoleBindings{c} +} + +func (c *FakeRbacV1alpha1) Roles(namespace string) v1alpha1.RoleInterface { + return &FakeRoles{c, namespace} +} + +func (c *FakeRbacV1alpha1) RoleBindings(namespace string) v1alpha1.RoleBindingInterface { + return &FakeRoleBindings{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeRbacV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go new file mode 100644 index 0000000000..cec3f099dc --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/rbac/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeRoles implements RoleInterface +type FakeRoles struct { + Fake *FakeRbacV1alpha1 + ns string +} + +var rolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Resource: "roles"} + +var rolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Kind: "Role"} + +// Get takes name of the role, and returns the corresponding role object, and an error if there is any. +func (c *FakeRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(rolesResource, c.ns, name), &v1alpha1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Role), err +} + +// List takes label and field selectors, and returns the list of Roles that match those selectors. +func (c *FakeRoles) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RoleList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(rolesResource, rolesKind, c.ns, opts), &v1alpha1.RoleList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.RoleList{ListMeta: obj.(*v1alpha1.RoleList).ListMeta} + for _, item := range obj.(*v1alpha1.RoleList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested roles. +func (c *FakeRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(rolesResource, c.ns, opts)) + +} + +// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. +func (c *FakeRoles) Create(ctx context.Context, role *v1alpha1.Role, opts v1.CreateOptions) (result *v1alpha1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &v1alpha1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Role), err +} + +// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. +func (c *FakeRoles) Update(ctx context.Context, role *v1alpha1.Role, opts v1.UpdateOptions) (result *v1alpha1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &v1alpha1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Role), err +} + +// Delete takes name of the role and deletes it. Returns an error if one occurs. +func (c *FakeRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(rolesResource, c.ns, name, opts), &v1alpha1.Role{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rolesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.RoleList{}) + return err +} + +// Patch applies the patch and returns the patched role. +func (c *FakeRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, pt, data, subresources...), &v1alpha1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Role), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied role. +func (c *FakeRoles) Apply(ctx context.Context, role *rbacv1alpha1.RoleApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Role, err error) { + if role == nil { + return nil, fmt.Errorf("role provided to Apply must not be nil") + } + data, err := json.Marshal(role) + if err != nil { + return nil, err + } + name := role.Name + if name == nil { + return nil, fmt.Errorf("role.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Role), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go new file mode 100644 index 0000000000..2d66494fdc --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/rbac/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeRoleBindings implements RoleBindingInterface +type FakeRoleBindings struct { + Fake *FakeRbacV1alpha1 + ns string +} + +var rolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Resource: "rolebindings"} + +var rolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Kind: "RoleBinding"} + +// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. +func (c *FakeRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(rolebindingsResource, c.ns, name), &v1alpha1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RoleBinding), err +} + +// List takes label and field selectors, and returns the list of RoleBindings that match those selectors. +func (c *FakeRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RoleBindingList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(rolebindingsResource, rolebindingsKind, c.ns, opts), &v1alpha1.RoleBindingList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.RoleBindingList{ListMeta: obj.(*v1alpha1.RoleBindingList).ListMeta} + for _, item := range obj.(*v1alpha1.RoleBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested roleBindings. +func (c *FakeRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(rolebindingsResource, c.ns, opts)) + +} + +// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. +func (c *FakeRoleBindings) Create(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.CreateOptions) (result *v1alpha1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &v1alpha1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RoleBinding), err +} + +// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. +func (c *FakeRoleBindings) Update(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.UpdateOptions) (result *v1alpha1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &v1alpha1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RoleBinding), err +} + +// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. +func (c *FakeRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(rolebindingsResource, c.ns, name, opts), &v1alpha1.RoleBinding{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeRoleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.RoleBindingList{}) + return err +} + +// Patch applies the patch and returns the patched roleBinding. +func (c *FakeRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RoleBinding), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied roleBinding. +func (c *FakeRoleBindings) Apply(ctx context.Context, roleBinding *rbacv1alpha1.RoleBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.RoleBinding, err error) { + if roleBinding == nil { + return nil, fmt.Errorf("roleBinding provided to Apply must not be nil") + } + data, err := json.Marshal(roleBinding) + if err != nil { + return nil, err + } + name := roleBinding.Name + if name == nil { + return nil, fmt.Errorf("roleBinding.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RoleBinding), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go new file mode 100644 index 0000000000..2b4f60054e --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/rbac/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeClusterRoles implements ClusterRoleInterface +type FakeClusterRoles struct { + Fake *FakeRbacV1beta1 +} + +var clusterrolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "clusterroles"} + +var clusterrolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "ClusterRole"} + +// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. +func (c *FakeClusterRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(clusterrolesResource, name), &v1beta1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRole), err +} + +// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. +func (c *FakeClusterRoles) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ClusterRoleList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(clusterrolesResource, clusterrolesKind, opts), &v1beta1.ClusterRoleList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.ClusterRoleList{ListMeta: obj.(*v1beta1.ClusterRoleList).ListMeta} + for _, item := range obj.(*v1beta1.ClusterRoleList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusterRoles. +func (c *FakeClusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(clusterrolesResource, opts)) +} + +// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. +func (c *FakeClusterRoles) Create(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.CreateOptions) (result *v1beta1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &v1beta1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRole), err +} + +// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. +func (c *FakeClusterRoles) Update(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.UpdateOptions) (result *v1beta1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &v1beta1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRole), err +} + +// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. +func (c *FakeClusterRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(clusterrolesResource, name, opts), &v1beta1.ClusterRole{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeClusterRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clusterrolesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.ClusterRoleList{}) + return err +} + +// Patch applies the patch and returns the patched clusterRole. +func (c *FakeClusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, pt, data, subresources...), &v1beta1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRole), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied clusterRole. +func (c *FakeClusterRoles) Apply(ctx context.Context, clusterRole *rbacv1beta1.ClusterRoleApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ClusterRole, err error) { + if clusterRole == nil { + return nil, fmt.Errorf("clusterRole provided to Apply must not be nil") + } + data, err := json.Marshal(clusterRole) + if err != nil { + return nil, err + } + name := clusterRole.Name + if name == nil { + return nil, fmt.Errorf("clusterRole.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, *name, types.ApplyPatchType, data), &v1beta1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRole), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go new file mode 100644 index 0000000000..379261ec86 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/rbac/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeClusterRoleBindings implements ClusterRoleBindingInterface +type FakeClusterRoleBindings struct { + Fake *FakeRbacV1beta1 +} + +var clusterrolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "clusterrolebindings"} + +var clusterrolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "ClusterRoleBinding"} + +// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. +func (c *FakeClusterRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(clusterrolebindingsResource, name), &v1beta1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRoleBinding), err +} + +// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. +func (c *FakeClusterRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ClusterRoleBindingList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(clusterrolebindingsResource, clusterrolebindingsKind, opts), &v1beta1.ClusterRoleBindingList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.ClusterRoleBindingList{ListMeta: obj.(*v1beta1.ClusterRoleBindingList).ListMeta} + for _, item := range obj.(*v1beta1.ClusterRoleBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusterRoleBindings. +func (c *FakeClusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(clusterrolebindingsResource, opts)) +} + +// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. +func (c *FakeClusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.CreateOptions) (result *v1beta1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &v1beta1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRoleBinding), err +} + +// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. +func (c *FakeClusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.UpdateOptions) (result *v1beta1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &v1beta1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRoleBinding), err +} + +// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. +func (c *FakeClusterRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(clusterrolebindingsResource, name, opts), &v1beta1.ClusterRoleBinding{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeClusterRoleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.ClusterRoleBindingList{}) + return err +} + +// Patch applies the patch and returns the patched clusterRoleBinding. +func (c *FakeClusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, pt, data, subresources...), &v1beta1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRoleBinding), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied clusterRoleBinding. +func (c *FakeClusterRoleBindings) Apply(ctx context.Context, clusterRoleBinding *rbacv1beta1.ClusterRoleBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ClusterRoleBinding, err error) { + if clusterRoleBinding == nil { + return nil, fmt.Errorf("clusterRoleBinding provided to Apply must not be nil") + } + data, err := json.Marshal(clusterRoleBinding) + if err != nil { + return nil, err + } + name := clusterRoleBinding.Name + if name == nil { + return nil, fmt.Errorf("clusterRoleBinding.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, *name, types.ApplyPatchType, data), &v1beta1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRoleBinding), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rbac_client.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rbac_client.go new file mode 100644 index 0000000000..bdbc246b7a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rbac_client.go @@ -0,0 +1,52 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeRbacV1beta1 struct { + *testing.Fake +} + +func (c *FakeRbacV1beta1) ClusterRoles() v1beta1.ClusterRoleInterface { + return &FakeClusterRoles{c} +} + +func (c *FakeRbacV1beta1) ClusterRoleBindings() v1beta1.ClusterRoleBindingInterface { + return &FakeClusterRoleBindings{c} +} + +func (c *FakeRbacV1beta1) Roles(namespace string) v1beta1.RoleInterface { + return &FakeRoles{c, namespace} +} + +func (c *FakeRbacV1beta1) RoleBindings(namespace string) v1beta1.RoleBindingInterface { + return &FakeRoleBindings{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeRbacV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go new file mode 100644 index 0000000000..44df9128a0 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/rbac/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeRoles implements RoleInterface +type FakeRoles struct { + Fake *FakeRbacV1beta1 + ns string +} + +var rolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "roles"} + +var rolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "Role"} + +// Get takes name of the role, and returns the corresponding role object, and an error if there is any. +func (c *FakeRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(rolesResource, c.ns, name), &v1beta1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Role), err +} + +// List takes label and field selectors, and returns the list of Roles that match those selectors. +func (c *FakeRoles) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RoleList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(rolesResource, rolesKind, c.ns, opts), &v1beta1.RoleList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.RoleList{ListMeta: obj.(*v1beta1.RoleList).ListMeta} + for _, item := range obj.(*v1beta1.RoleList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested roles. +func (c *FakeRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(rolesResource, c.ns, opts)) + +} + +// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. +func (c *FakeRoles) Create(ctx context.Context, role *v1beta1.Role, opts v1.CreateOptions) (result *v1beta1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &v1beta1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Role), err +} + +// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. +func (c *FakeRoles) Update(ctx context.Context, role *v1beta1.Role, opts v1.UpdateOptions) (result *v1beta1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &v1beta1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Role), err +} + +// Delete takes name of the role and deletes it. Returns an error if one occurs. +func (c *FakeRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(rolesResource, c.ns, name, opts), &v1beta1.Role{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rolesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.RoleList{}) + return err +} + +// Patch applies the patch and returns the patched role. +func (c *FakeRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, pt, data, subresources...), &v1beta1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Role), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied role. +func (c *FakeRoles) Apply(ctx context.Context, role *rbacv1beta1.RoleApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Role, err error) { + if role == nil { + return nil, fmt.Errorf("role provided to Apply must not be nil") + } + data, err := json.Marshal(role) + if err != nil { + return nil, err + } + name := role.Name + if name == nil { + return nil, fmt.Errorf("role.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Role), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go new file mode 100644 index 0000000000..5e90e6dbd1 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/rbac/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeRoleBindings implements RoleBindingInterface +type FakeRoleBindings struct { + Fake *FakeRbacV1beta1 + ns string +} + +var rolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "rolebindings"} + +var rolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "RoleBinding"} + +// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. +func (c *FakeRoleBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(rolebindingsResource, c.ns, name), &v1beta1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RoleBinding), err +} + +// List takes label and field selectors, and returns the list of RoleBindings that match those selectors. +func (c *FakeRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RoleBindingList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(rolebindingsResource, rolebindingsKind, c.ns, opts), &v1beta1.RoleBindingList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.RoleBindingList{ListMeta: obj.(*v1beta1.RoleBindingList).ListMeta} + for _, item := range obj.(*v1beta1.RoleBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested roleBindings. +func (c *FakeRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(rolebindingsResource, c.ns, opts)) + +} + +// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. +func (c *FakeRoleBindings) Create(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.CreateOptions) (result *v1beta1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &v1beta1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RoleBinding), err +} + +// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. +func (c *FakeRoleBindings) Update(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.UpdateOptions) (result *v1beta1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &v1beta1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RoleBinding), err +} + +// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. +func (c *FakeRoleBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(rolebindingsResource, c.ns, name, opts), &v1beta1.RoleBinding{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeRoleBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.RoleBindingList{}) + return err +} + +// Patch applies the patch and returns the patched roleBinding. +func (c *FakeRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, pt, data, subresources...), &v1beta1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RoleBinding), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied roleBinding. +func (c *FakeRoleBindings) Apply(ctx context.Context, roleBinding *rbacv1beta1.RoleBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.RoleBinding, err error) { + if roleBinding == nil { + return nil, fmt.Errorf("roleBinding provided to Apply must not be nil") + } + data, err := json.Marshal(roleBinding) + if err != nil { + return nil, err + } + name := roleBinding.Name + if name == nil { + return nil, fmt.Errorf("roleBinding.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RoleBinding), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_podscheduling.go b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_podscheduling.go new file mode 100644 index 0000000000..7b4e2a5d5a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_podscheduling.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/resource/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakePodSchedulings implements PodSchedulingInterface +type FakePodSchedulings struct { + Fake *FakeResourceV1alpha1 + ns string +} + +var podschedulingsResource = schema.GroupVersionResource{Group: "resource.k8s.io", Version: "v1alpha1", Resource: "podschedulings"} + +var podschedulingsKind = schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1alpha1", Kind: "PodScheduling"} + +// Get takes name of the podScheduling, and returns the corresponding podScheduling object, and an error if there is any. +func (c *FakePodSchedulings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PodScheduling, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(podschedulingsResource, c.ns, name), &v1alpha1.PodScheduling{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PodScheduling), err +} + +// List takes label and field selectors, and returns the list of PodSchedulings that match those selectors. +func (c *FakePodSchedulings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PodSchedulingList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(podschedulingsResource, podschedulingsKind, c.ns, opts), &v1alpha1.PodSchedulingList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.PodSchedulingList{ListMeta: obj.(*v1alpha1.PodSchedulingList).ListMeta} + for _, item := range obj.(*v1alpha1.PodSchedulingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested podSchedulings. +func (c *FakePodSchedulings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(podschedulingsResource, c.ns, opts)) + +} + +// Create takes the representation of a podScheduling and creates it. Returns the server's representation of the podScheduling, and an error, if there is any. +func (c *FakePodSchedulings) Create(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.CreateOptions) (result *v1alpha1.PodScheduling, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(podschedulingsResource, c.ns, podScheduling), &v1alpha1.PodScheduling{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PodScheduling), err +} + +// Update takes the representation of a podScheduling and updates it. Returns the server's representation of the podScheduling, and an error, if there is any. +func (c *FakePodSchedulings) Update(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (result *v1alpha1.PodScheduling, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(podschedulingsResource, c.ns, podScheduling), &v1alpha1.PodScheduling{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PodScheduling), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakePodSchedulings) UpdateStatus(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (*v1alpha1.PodScheduling, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(podschedulingsResource, "status", c.ns, podScheduling), &v1alpha1.PodScheduling{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PodScheduling), err +} + +// Delete takes name of the podScheduling and deletes it. Returns an error if one occurs. +func (c *FakePodSchedulings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(podschedulingsResource, c.ns, name, opts), &v1alpha1.PodScheduling{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePodSchedulings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(podschedulingsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.PodSchedulingList{}) + return err +} + +// Patch applies the patch and returns the patched podScheduling. +func (c *FakePodSchedulings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodScheduling, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.PodScheduling{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PodScheduling), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied podScheduling. +func (c *FakePodSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) { + if podScheduling == nil { + return nil, fmt.Errorf("podScheduling provided to Apply must not be nil") + } + data, err := json.Marshal(podScheduling) + if err != nil { + return nil, err + } + name := podScheduling.Name + if name == nil { + return nil, fmt.Errorf("podScheduling.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.PodScheduling{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PodScheduling), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakePodSchedulings) ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) { + if podScheduling == nil { + return nil, fmt.Errorf("podScheduling provided to Apply must not be nil") + } + data, err := json.Marshal(podScheduling) + if err != nil { + return nil, err + } + name := podScheduling.Name + if name == nil { + return nil, fmt.Errorf("podScheduling.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.PodScheduling{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PodScheduling), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resource_client.go b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resource_client.go new file mode 100644 index 0000000000..c4776ee54f --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resource_client.go @@ -0,0 +1,52 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeResourceV1alpha1 struct { + *testing.Fake +} + +func (c *FakeResourceV1alpha1) PodSchedulings(namespace string) v1alpha1.PodSchedulingInterface { + return &FakePodSchedulings{c, namespace} +} + +func (c *FakeResourceV1alpha1) ResourceClaims(namespace string) v1alpha1.ResourceClaimInterface { + return &FakeResourceClaims{c, namespace} +} + +func (c *FakeResourceV1alpha1) ResourceClaimTemplates(namespace string) v1alpha1.ResourceClaimTemplateInterface { + return &FakeResourceClaimTemplates{c, namespace} +} + +func (c *FakeResourceV1alpha1) ResourceClasses() v1alpha1.ResourceClassInterface { + return &FakeResourceClasses{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeResourceV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resourceclaim.go b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resourceclaim.go new file mode 100644 index 0000000000..a458459f84 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resourceclaim.go @@ -0,0 +1,190 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/resource/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeResourceClaims implements ResourceClaimInterface +type FakeResourceClaims struct { + Fake *FakeResourceV1alpha1 + ns string +} + +var resourceclaimsResource = schema.GroupVersionResource{Group: "resource.k8s.io", Version: "v1alpha1", Resource: "resourceclaims"} + +var resourceclaimsKind = schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1alpha1", Kind: "ResourceClaim"} + +// Get takes name of the resourceClaim, and returns the corresponding resourceClaim object, and an error if there is any. +func (c *FakeResourceClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClaim, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(resourceclaimsResource, c.ns, name), &v1alpha1.ResourceClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClaim), err +} + +// List takes label and field selectors, and returns the list of ResourceClaims that match those selectors. +func (c *FakeResourceClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClaimList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(resourceclaimsResource, resourceclaimsKind, c.ns, opts), &v1alpha1.ResourceClaimList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ResourceClaimList{ListMeta: obj.(*v1alpha1.ResourceClaimList).ListMeta} + for _, item := range obj.(*v1alpha1.ResourceClaimList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested resourceClaims. +func (c *FakeResourceClaims) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(resourceclaimsResource, c.ns, opts)) + +} + +// Create takes the representation of a resourceClaim and creates it. Returns the server's representation of the resourceClaim, and an error, if there is any. +func (c *FakeResourceClaims) Create(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.CreateOptions) (result *v1alpha1.ResourceClaim, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(resourceclaimsResource, c.ns, resourceClaim), &v1alpha1.ResourceClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClaim), err +} + +// Update takes the representation of a resourceClaim and updates it. Returns the server's representation of the resourceClaim, and an error, if there is any. +func (c *FakeResourceClaims) Update(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaim, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(resourceclaimsResource, c.ns, resourceClaim), &v1alpha1.ResourceClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClaim), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeResourceClaims) UpdateStatus(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (*v1alpha1.ResourceClaim, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(resourceclaimsResource, "status", c.ns, resourceClaim), &v1alpha1.ResourceClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClaim), err +} + +// Delete takes name of the resourceClaim and deletes it. Returns an error if one occurs. +func (c *FakeResourceClaims) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(resourceclaimsResource, c.ns, name, opts), &v1alpha1.ResourceClaim{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeResourceClaims) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(resourceclaimsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ResourceClaimList{}) + return err +} + +// Patch applies the patch and returns the patched resourceClaim. +func (c *FakeResourceClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClaim, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ResourceClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClaim), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaim. +func (c *FakeResourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) { + if resourceClaim == nil { + return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil") + } + data, err := json.Marshal(resourceClaim) + if err != nil { + return nil, err + } + name := resourceClaim.Name + if name == nil { + return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.ResourceClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClaim), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeResourceClaims) ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) { + if resourceClaim == nil { + return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil") + } + data, err := json.Marshal(resourceClaim) + if err != nil { + return nil, err + } + name := resourceClaim.Name + if name == nil { + return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.ResourceClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClaim), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resourceclaimtemplate.go b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resourceclaimtemplate.go new file mode 100644 index 0000000000..be22ab6d37 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resourceclaimtemplate.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/resource/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeResourceClaimTemplates implements ResourceClaimTemplateInterface +type FakeResourceClaimTemplates struct { + Fake *FakeResourceV1alpha1 + ns string +} + +var resourceclaimtemplatesResource = schema.GroupVersionResource{Group: "resource.k8s.io", Version: "v1alpha1", Resource: "resourceclaimtemplates"} + +var resourceclaimtemplatesKind = schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1alpha1", Kind: "ResourceClaimTemplate"} + +// Get takes name of the resourceClaimTemplate, and returns the corresponding resourceClaimTemplate object, and an error if there is any. +func (c *FakeResourceClaimTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClaimTemplate, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(resourceclaimtemplatesResource, c.ns, name), &v1alpha1.ResourceClaimTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClaimTemplate), err +} + +// List takes label and field selectors, and returns the list of ResourceClaimTemplates that match those selectors. +func (c *FakeResourceClaimTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClaimTemplateList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(resourceclaimtemplatesResource, resourceclaimtemplatesKind, c.ns, opts), &v1alpha1.ResourceClaimTemplateList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ResourceClaimTemplateList{ListMeta: obj.(*v1alpha1.ResourceClaimTemplateList).ListMeta} + for _, item := range obj.(*v1alpha1.ResourceClaimTemplateList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested resourceClaimTemplates. +func (c *FakeResourceClaimTemplates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(resourceclaimtemplatesResource, c.ns, opts)) + +} + +// Create takes the representation of a resourceClaimTemplate and creates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any. +func (c *FakeResourceClaimTemplates) Create(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.CreateOptions) (result *v1alpha1.ResourceClaimTemplate, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate), &v1alpha1.ResourceClaimTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClaimTemplate), err +} + +// Update takes the representation of a resourceClaimTemplate and updates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any. +func (c *FakeResourceClaimTemplates) Update(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaimTemplate, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate), &v1alpha1.ResourceClaimTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClaimTemplate), err +} + +// Delete takes name of the resourceClaimTemplate and deletes it. Returns an error if one occurs. +func (c *FakeResourceClaimTemplates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(resourceclaimtemplatesResource, c.ns, name, opts), &v1alpha1.ResourceClaimTemplate{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeResourceClaimTemplates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(resourceclaimtemplatesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ResourceClaimTemplateList{}) + return err +} + +// Patch applies the patch and returns the patched resourceClaimTemplate. +func (c *FakeResourceClaimTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClaimTemplate, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourceclaimtemplatesResource, c.ns, name, pt, data, subresources...), &v1alpha1.ResourceClaimTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClaimTemplate), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimTemplate. +func (c *FakeResourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaimTemplate, err error) { + if resourceClaimTemplate == nil { + return nil, fmt.Errorf("resourceClaimTemplate provided to Apply must not be nil") + } + data, err := json.Marshal(resourceClaimTemplate) + if err != nil { + return nil, err + } + name := resourceClaimTemplate.Name + if name == nil { + return nil, fmt.Errorf("resourceClaimTemplate.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourceclaimtemplatesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.ResourceClaimTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClaimTemplate), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resourceclass.go b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resourceclass.go new file mode 100644 index 0000000000..80fb7ec034 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake/fake_resourceclass.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/resource/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeResourceClasses implements ResourceClassInterface +type FakeResourceClasses struct { + Fake *FakeResourceV1alpha1 +} + +var resourceclassesResource = schema.GroupVersionResource{Group: "resource.k8s.io", Version: "v1alpha1", Resource: "resourceclasses"} + +var resourceclassesKind = schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1alpha1", Kind: "ResourceClass"} + +// Get takes name of the resourceClass, and returns the corresponding resourceClass object, and an error if there is any. +func (c *FakeResourceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(resourceclassesResource, name), &v1alpha1.ResourceClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClass), err +} + +// List takes label and field selectors, and returns the list of ResourceClasses that match those selectors. +func (c *FakeResourceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(resourceclassesResource, resourceclassesKind, opts), &v1alpha1.ResourceClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ResourceClassList{ListMeta: obj.(*v1alpha1.ResourceClassList).ListMeta} + for _, item := range obj.(*v1alpha1.ResourceClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested resourceClasses. +func (c *FakeResourceClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(resourceclassesResource, opts)) +} + +// Create takes the representation of a resourceClass and creates it. Returns the server's representation of the resourceClass, and an error, if there is any. +func (c *FakeResourceClasses) Create(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.CreateOptions) (result *v1alpha1.ResourceClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(resourceclassesResource, resourceClass), &v1alpha1.ResourceClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClass), err +} + +// Update takes the representation of a resourceClass and updates it. Returns the server's representation of the resourceClass, and an error, if there is any. +func (c *FakeResourceClasses) Update(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.UpdateOptions) (result *v1alpha1.ResourceClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(resourceclassesResource, resourceClass), &v1alpha1.ResourceClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClass), err +} + +// Delete takes name of the resourceClass and deletes it. Returns an error if one occurs. +func (c *FakeResourceClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(resourceclassesResource, name, opts), &v1alpha1.ResourceClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeResourceClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(resourceclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ResourceClassList{}) + return err +} + +// Patch applies the patch and returns the patched resourceClass. +func (c *FakeResourceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(resourceclassesResource, name, pt, data, subresources...), &v1alpha1.ResourceClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClass), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClass. +func (c *FakeResourceClasses) Apply(ctx context.Context, resourceClass *resourcev1alpha1.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClass, err error) { + if resourceClass == nil { + return nil, fmt.Errorf("resourceClass provided to Apply must not be nil") + } + data, err := json.Marshal(resourceClass) + if err != nil { + return nil, err + } + name := resourceClass.Name + if name == nil { + return nil, fmt.Errorf("resourceClass.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(resourceclassesResource, *name, types.ApplyPatchType, data), &v1alpha1.ResourceClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceClass), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_priorityclass.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_priorityclass.go new file mode 100644 index 0000000000..30f82270e7 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_priorityclass.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + schedulingv1 "k8s.io/api/scheduling/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsschedulingv1 "k8s.io/client-go/applyconfigurations/scheduling/v1" + testing "k8s.io/client-go/testing" +) + +// FakePriorityClasses implements PriorityClassInterface +type FakePriorityClasses struct { + Fake *FakeSchedulingV1 +} + +var priorityclassesResource = schema.GroupVersionResource{Group: "scheduling.k8s.io", Version: "v1", Resource: "priorityclasses"} + +var priorityclassesKind = schema.GroupVersionKind{Group: "scheduling.k8s.io", Version: "v1", Kind: "PriorityClass"} + +// Get takes name of the priorityClass, and returns the corresponding priorityClass object, and an error if there is any. +func (c *FakePriorityClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *schedulingv1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(priorityclassesResource, name), &schedulingv1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*schedulingv1.PriorityClass), err +} + +// List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. +func (c *FakePriorityClasses) List(ctx context.Context, opts v1.ListOptions) (result *schedulingv1.PriorityClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(priorityclassesResource, priorityclassesKind, opts), &schedulingv1.PriorityClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &schedulingv1.PriorityClassList{ListMeta: obj.(*schedulingv1.PriorityClassList).ListMeta} + for _, item := range obj.(*schedulingv1.PriorityClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested priorityClasses. +func (c *FakePriorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(priorityclassesResource, opts)) +} + +// Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. +func (c *FakePriorityClasses) Create(ctx context.Context, priorityClass *schedulingv1.PriorityClass, opts v1.CreateOptions) (result *schedulingv1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(priorityclassesResource, priorityClass), &schedulingv1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*schedulingv1.PriorityClass), err +} + +// Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. +func (c *FakePriorityClasses) Update(ctx context.Context, priorityClass *schedulingv1.PriorityClass, opts v1.UpdateOptions) (result *schedulingv1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(priorityclassesResource, priorityClass), &schedulingv1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*schedulingv1.PriorityClass), err +} + +// Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. +func (c *FakePriorityClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(priorityclassesResource, name, opts), &schedulingv1.PriorityClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePriorityClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(priorityclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &schedulingv1.PriorityClassList{}) + return err +} + +// Patch applies the patch and returns the patched priorityClass. +func (c *FakePriorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *schedulingv1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(priorityclassesResource, name, pt, data, subresources...), &schedulingv1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*schedulingv1.PriorityClass), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied priorityClass. +func (c *FakePriorityClasses) Apply(ctx context.Context, priorityClass *applyconfigurationsschedulingv1.PriorityClassApplyConfiguration, opts v1.ApplyOptions) (result *schedulingv1.PriorityClass, err error) { + if priorityClass == nil { + return nil, fmt.Errorf("priorityClass provided to Apply must not be nil") + } + data, err := json.Marshal(priorityClass) + if err != nil { + return nil, err + } + name := priorityClass.Name + if name == nil { + return nil, fmt.Errorf("priorityClass.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(priorityclassesResource, *name, types.ApplyPatchType, data), &schedulingv1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*schedulingv1.PriorityClass), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_scheduling_client.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_scheduling_client.go new file mode 100644 index 0000000000..a64ac945b9 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_scheduling_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeSchedulingV1 struct { + *testing.Fake +} + +func (c *FakeSchedulingV1) PriorityClasses() v1.PriorityClassInterface { + return &FakePriorityClasses{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeSchedulingV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go new file mode 100644 index 0000000000..32b6a11cb6 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/scheduling/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + schedulingv1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakePriorityClasses implements PriorityClassInterface +type FakePriorityClasses struct { + Fake *FakeSchedulingV1alpha1 +} + +var priorityclassesResource = schema.GroupVersionResource{Group: "scheduling.k8s.io", Version: "v1alpha1", Resource: "priorityclasses"} + +var priorityclassesKind = schema.GroupVersionKind{Group: "scheduling.k8s.io", Version: "v1alpha1", Kind: "PriorityClass"} + +// Get takes name of the priorityClass, and returns the corresponding priorityClass object, and an error if there is any. +func (c *FakePriorityClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(priorityclassesResource, name), &v1alpha1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PriorityClass), err +} + +// List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. +func (c *FakePriorityClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PriorityClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(priorityclassesResource, priorityclassesKind, opts), &v1alpha1.PriorityClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.PriorityClassList{ListMeta: obj.(*v1alpha1.PriorityClassList).ListMeta} + for _, item := range obj.(*v1alpha1.PriorityClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested priorityClasses. +func (c *FakePriorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(priorityclassesResource, opts)) +} + +// Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. +func (c *FakePriorityClasses) Create(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.CreateOptions) (result *v1alpha1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(priorityclassesResource, priorityClass), &v1alpha1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PriorityClass), err +} + +// Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. +func (c *FakePriorityClasses) Update(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.UpdateOptions) (result *v1alpha1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(priorityclassesResource, priorityClass), &v1alpha1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PriorityClass), err +} + +// Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. +func (c *FakePriorityClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(priorityclassesResource, name, opts), &v1alpha1.PriorityClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePriorityClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(priorityclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.PriorityClassList{}) + return err +} + +// Patch applies the patch and returns the patched priorityClass. +func (c *FakePriorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(priorityclassesResource, name, pt, data, subresources...), &v1alpha1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PriorityClass), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied priorityClass. +func (c *FakePriorityClasses) Apply(ctx context.Context, priorityClass *schedulingv1alpha1.PriorityClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PriorityClass, err error) { + if priorityClass == nil { + return nil, fmt.Errorf("priorityClass provided to Apply must not be nil") + } + data, err := json.Marshal(priorityClass) + if err != nil { + return nil, err + } + name := priorityClass.Name + if name == nil { + return nil, fmt.Errorf("priorityClass.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(priorityclassesResource, *name, types.ApplyPatchType, data), &v1alpha1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PriorityClass), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_scheduling_client.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_scheduling_client.go new file mode 100644 index 0000000000..974ba193f7 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_scheduling_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeSchedulingV1alpha1 struct { + *testing.Fake +} + +func (c *FakeSchedulingV1alpha1) PriorityClasses() v1alpha1.PriorityClassInterface { + return &FakePriorityClasses{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeSchedulingV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go new file mode 100644 index 0000000000..8ff5a1bd61 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/scheduling/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + schedulingv1beta1 "k8s.io/client-go/applyconfigurations/scheduling/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakePriorityClasses implements PriorityClassInterface +type FakePriorityClasses struct { + Fake *FakeSchedulingV1beta1 +} + +var priorityclassesResource = schema.GroupVersionResource{Group: "scheduling.k8s.io", Version: "v1beta1", Resource: "priorityclasses"} + +var priorityclassesKind = schema.GroupVersionKind{Group: "scheduling.k8s.io", Version: "v1beta1", Kind: "PriorityClass"} + +// Get takes name of the priorityClass, and returns the corresponding priorityClass object, and an error if there is any. +func (c *FakePriorityClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(priorityclassesResource, name), &v1beta1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityClass), err +} + +// List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. +func (c *FakePriorityClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PriorityClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(priorityclassesResource, priorityclassesKind, opts), &v1beta1.PriorityClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.PriorityClassList{ListMeta: obj.(*v1beta1.PriorityClassList).ListMeta} + for _, item := range obj.(*v1beta1.PriorityClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested priorityClasses. +func (c *FakePriorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(priorityclassesResource, opts)) +} + +// Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. +func (c *FakePriorityClasses) Create(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.CreateOptions) (result *v1beta1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(priorityclassesResource, priorityClass), &v1beta1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityClass), err +} + +// Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. +func (c *FakePriorityClasses) Update(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.UpdateOptions) (result *v1beta1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(priorityclassesResource, priorityClass), &v1beta1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityClass), err +} + +// Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. +func (c *FakePriorityClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(priorityclassesResource, name, opts), &v1beta1.PriorityClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePriorityClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(priorityclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.PriorityClassList{}) + return err +} + +// Patch applies the patch and returns the patched priorityClass. +func (c *FakePriorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(priorityclassesResource, name, pt, data, subresources...), &v1beta1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityClass), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied priorityClass. +func (c *FakePriorityClasses) Apply(ctx context.Context, priorityClass *schedulingv1beta1.PriorityClassApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PriorityClass, err error) { + if priorityClass == nil { + return nil, fmt.Errorf("priorityClass provided to Apply must not be nil") + } + data, err := json.Marshal(priorityClass) + if err != nil { + return nil, err + } + name := priorityClass.Name + if name == nil { + return nil, fmt.Errorf("priorityClass.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(priorityclassesResource, *name, types.ApplyPatchType, data), &v1beta1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityClass), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_scheduling_client.go b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_scheduling_client.go new file mode 100644 index 0000000000..4a6878a45e --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_scheduling_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeSchedulingV1beta1 struct { + *testing.Fake +} + +func (c *FakeSchedulingV1beta1) PriorityClasses() v1beta1.PriorityClassInterface { + return &FakePriorityClasses{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeSchedulingV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csidriver.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csidriver.go new file mode 100644 index 0000000000..42df475dce --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csidriver.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + storagev1 "k8s.io/api/storage/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsstoragev1 "k8s.io/client-go/applyconfigurations/storage/v1" + testing "k8s.io/client-go/testing" +) + +// FakeCSIDrivers implements CSIDriverInterface +type FakeCSIDrivers struct { + Fake *FakeStorageV1 +} + +var csidriversResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1", Resource: "csidrivers"} + +var csidriversKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "CSIDriver"} + +// Get takes name of the cSIDriver, and returns the corresponding cSIDriver object, and an error if there is any. +func (c *FakeCSIDrivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *storagev1.CSIDriver, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(csidriversResource, name), &storagev1.CSIDriver{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIDriver), err +} + +// List takes label and field selectors, and returns the list of CSIDrivers that match those selectors. +func (c *FakeCSIDrivers) List(ctx context.Context, opts v1.ListOptions) (result *storagev1.CSIDriverList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(csidriversResource, csidriversKind, opts), &storagev1.CSIDriverList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &storagev1.CSIDriverList{ListMeta: obj.(*storagev1.CSIDriverList).ListMeta} + for _, item := range obj.(*storagev1.CSIDriverList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested cSIDrivers. +func (c *FakeCSIDrivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(csidriversResource, opts)) +} + +// Create takes the representation of a cSIDriver and creates it. Returns the server's representation of the cSIDriver, and an error, if there is any. +func (c *FakeCSIDrivers) Create(ctx context.Context, cSIDriver *storagev1.CSIDriver, opts v1.CreateOptions) (result *storagev1.CSIDriver, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(csidriversResource, cSIDriver), &storagev1.CSIDriver{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIDriver), err +} + +// Update takes the representation of a cSIDriver and updates it. Returns the server's representation of the cSIDriver, and an error, if there is any. +func (c *FakeCSIDrivers) Update(ctx context.Context, cSIDriver *storagev1.CSIDriver, opts v1.UpdateOptions) (result *storagev1.CSIDriver, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(csidriversResource, cSIDriver), &storagev1.CSIDriver{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIDriver), err +} + +// Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs. +func (c *FakeCSIDrivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(csidriversResource, name, opts), &storagev1.CSIDriver{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCSIDrivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(csidriversResource, listOpts) + + _, err := c.Fake.Invokes(action, &storagev1.CSIDriverList{}) + return err +} + +// Patch applies the patch and returns the patched cSIDriver. +func (c *FakeCSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *storagev1.CSIDriver, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(csidriversResource, name, pt, data, subresources...), &storagev1.CSIDriver{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIDriver), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cSIDriver. +func (c *FakeCSIDrivers) Apply(ctx context.Context, cSIDriver *applyconfigurationsstoragev1.CSIDriverApplyConfiguration, opts v1.ApplyOptions) (result *storagev1.CSIDriver, err error) { + if cSIDriver == nil { + return nil, fmt.Errorf("cSIDriver provided to Apply must not be nil") + } + data, err := json.Marshal(cSIDriver) + if err != nil { + return nil, err + } + name := cSIDriver.Name + if name == nil { + return nil, fmt.Errorf("cSIDriver.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(csidriversResource, *name, types.ApplyPatchType, data), &storagev1.CSIDriver{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIDriver), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csinode.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csinode.go new file mode 100644 index 0000000000..4041d5e63f --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csinode.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + storagev1 "k8s.io/api/storage/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsstoragev1 "k8s.io/client-go/applyconfigurations/storage/v1" + testing "k8s.io/client-go/testing" +) + +// FakeCSINodes implements CSINodeInterface +type FakeCSINodes struct { + Fake *FakeStorageV1 +} + +var csinodesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1", Resource: "csinodes"} + +var csinodesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "CSINode"} + +// Get takes name of the cSINode, and returns the corresponding cSINode object, and an error if there is any. +func (c *FakeCSINodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *storagev1.CSINode, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(csinodesResource, name), &storagev1.CSINode{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSINode), err +} + +// List takes label and field selectors, and returns the list of CSINodes that match those selectors. +func (c *FakeCSINodes) List(ctx context.Context, opts v1.ListOptions) (result *storagev1.CSINodeList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(csinodesResource, csinodesKind, opts), &storagev1.CSINodeList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &storagev1.CSINodeList{ListMeta: obj.(*storagev1.CSINodeList).ListMeta} + for _, item := range obj.(*storagev1.CSINodeList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested cSINodes. +func (c *FakeCSINodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(csinodesResource, opts)) +} + +// Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any. +func (c *FakeCSINodes) Create(ctx context.Context, cSINode *storagev1.CSINode, opts v1.CreateOptions) (result *storagev1.CSINode, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(csinodesResource, cSINode), &storagev1.CSINode{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSINode), err +} + +// Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any. +func (c *FakeCSINodes) Update(ctx context.Context, cSINode *storagev1.CSINode, opts v1.UpdateOptions) (result *storagev1.CSINode, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(csinodesResource, cSINode), &storagev1.CSINode{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSINode), err +} + +// Delete takes name of the cSINode and deletes it. Returns an error if one occurs. +func (c *FakeCSINodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(csinodesResource, name, opts), &storagev1.CSINode{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCSINodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(csinodesResource, listOpts) + + _, err := c.Fake.Invokes(action, &storagev1.CSINodeList{}) + return err +} + +// Patch applies the patch and returns the patched cSINode. +func (c *FakeCSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *storagev1.CSINode, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(csinodesResource, name, pt, data, subresources...), &storagev1.CSINode{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSINode), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cSINode. +func (c *FakeCSINodes) Apply(ctx context.Context, cSINode *applyconfigurationsstoragev1.CSINodeApplyConfiguration, opts v1.ApplyOptions) (result *storagev1.CSINode, err error) { + if cSINode == nil { + return nil, fmt.Errorf("cSINode provided to Apply must not be nil") + } + data, err := json.Marshal(cSINode) + if err != nil { + return nil, err + } + name := cSINode.Name + if name == nil { + return nil, fmt.Errorf("cSINode.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(csinodesResource, *name, types.ApplyPatchType, data), &storagev1.CSINode{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSINode), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csistoragecapacity.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csistoragecapacity.go new file mode 100644 index 0000000000..40c4171c80 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csistoragecapacity.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + storagev1 "k8s.io/api/storage/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsstoragev1 "k8s.io/client-go/applyconfigurations/storage/v1" + testing "k8s.io/client-go/testing" +) + +// FakeCSIStorageCapacities implements CSIStorageCapacityInterface +type FakeCSIStorageCapacities struct { + Fake *FakeStorageV1 + ns string +} + +var csistoragecapacitiesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1", Resource: "csistoragecapacities"} + +var csistoragecapacitiesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "CSIStorageCapacity"} + +// Get takes name of the cSIStorageCapacity, and returns the corresponding cSIStorageCapacity object, and an error if there is any. +func (c *FakeCSIStorageCapacities) Get(ctx context.Context, name string, options v1.GetOptions) (result *storagev1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(csistoragecapacitiesResource, c.ns, name), &storagev1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIStorageCapacity), err +} + +// List takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors. +func (c *FakeCSIStorageCapacities) List(ctx context.Context, opts v1.ListOptions) (result *storagev1.CSIStorageCapacityList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(csistoragecapacitiesResource, csistoragecapacitiesKind, c.ns, opts), &storagev1.CSIStorageCapacityList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &storagev1.CSIStorageCapacityList{ListMeta: obj.(*storagev1.CSIStorageCapacityList).ListMeta} + for _, item := range obj.(*storagev1.CSIStorageCapacityList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested cSIStorageCapacities. +func (c *FakeCSIStorageCapacities) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(csistoragecapacitiesResource, c.ns, opts)) + +} + +// Create takes the representation of a cSIStorageCapacity and creates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. +func (c *FakeCSIStorageCapacities) Create(ctx context.Context, cSIStorageCapacity *storagev1.CSIStorageCapacity, opts v1.CreateOptions) (result *storagev1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(csistoragecapacitiesResource, c.ns, cSIStorageCapacity), &storagev1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIStorageCapacity), err +} + +// Update takes the representation of a cSIStorageCapacity and updates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. +func (c *FakeCSIStorageCapacities) Update(ctx context.Context, cSIStorageCapacity *storagev1.CSIStorageCapacity, opts v1.UpdateOptions) (result *storagev1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(csistoragecapacitiesResource, c.ns, cSIStorageCapacity), &storagev1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIStorageCapacity), err +} + +// Delete takes name of the cSIStorageCapacity and deletes it. Returns an error if one occurs. +func (c *FakeCSIStorageCapacities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(csistoragecapacitiesResource, c.ns, name, opts), &storagev1.CSIStorageCapacity{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCSIStorageCapacities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(csistoragecapacitiesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &storagev1.CSIStorageCapacityList{}) + return err +} + +// Patch applies the patch and returns the patched cSIStorageCapacity. +func (c *FakeCSIStorageCapacities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *storagev1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(csistoragecapacitiesResource, c.ns, name, pt, data, subresources...), &storagev1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIStorageCapacity), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cSIStorageCapacity. +func (c *FakeCSIStorageCapacities) Apply(ctx context.Context, cSIStorageCapacity *applyconfigurationsstoragev1.CSIStorageCapacityApplyConfiguration, opts v1.ApplyOptions) (result *storagev1.CSIStorageCapacity, err error) { + if cSIStorageCapacity == nil { + return nil, fmt.Errorf("cSIStorageCapacity provided to Apply must not be nil") + } + data, err := json.Marshal(cSIStorageCapacity) + if err != nil { + return nil, err + } + name := cSIStorageCapacity.Name + if name == nil { + return nil, fmt.Errorf("cSIStorageCapacity.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(csistoragecapacitiesResource, c.ns, *name, types.ApplyPatchType, data), &storagev1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIStorageCapacity), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go new file mode 100644 index 0000000000..5cb91b5166 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go @@ -0,0 +1,56 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/storage/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeStorageV1 struct { + *testing.Fake +} + +func (c *FakeStorageV1) CSIDrivers() v1.CSIDriverInterface { + return &FakeCSIDrivers{c} +} + +func (c *FakeStorageV1) CSINodes() v1.CSINodeInterface { + return &FakeCSINodes{c} +} + +func (c *FakeStorageV1) CSIStorageCapacities(namespace string) v1.CSIStorageCapacityInterface { + return &FakeCSIStorageCapacities{c, namespace} +} + +func (c *FakeStorageV1) StorageClasses() v1.StorageClassInterface { + return &FakeStorageClasses{c} +} + +func (c *FakeStorageV1) VolumeAttachments() v1.VolumeAttachmentInterface { + return &FakeVolumeAttachments{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeStorageV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go new file mode 100644 index 0000000000..60895be5b7 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + storagev1 "k8s.io/api/storage/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsstoragev1 "k8s.io/client-go/applyconfigurations/storage/v1" + testing "k8s.io/client-go/testing" +) + +// FakeStorageClasses implements StorageClassInterface +type FakeStorageClasses struct { + Fake *FakeStorageV1 +} + +var storageclassesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1", Resource: "storageclasses"} + +var storageclassesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "StorageClass"} + +// Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any. +func (c *FakeStorageClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *storagev1.StorageClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(storageclassesResource, name), &storagev1.StorageClass{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.StorageClass), err +} + +// List takes label and field selectors, and returns the list of StorageClasses that match those selectors. +func (c *FakeStorageClasses) List(ctx context.Context, opts v1.ListOptions) (result *storagev1.StorageClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(storageclassesResource, storageclassesKind, opts), &storagev1.StorageClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &storagev1.StorageClassList{ListMeta: obj.(*storagev1.StorageClassList).ListMeta} + for _, item := range obj.(*storagev1.StorageClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested storageClasses. +func (c *FakeStorageClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(storageclassesResource, opts)) +} + +// Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. +func (c *FakeStorageClasses) Create(ctx context.Context, storageClass *storagev1.StorageClass, opts v1.CreateOptions) (result *storagev1.StorageClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(storageclassesResource, storageClass), &storagev1.StorageClass{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.StorageClass), err +} + +// Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any. +func (c *FakeStorageClasses) Update(ctx context.Context, storageClass *storagev1.StorageClass, opts v1.UpdateOptions) (result *storagev1.StorageClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(storageclassesResource, storageClass), &storagev1.StorageClass{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.StorageClass), err +} + +// Delete takes name of the storageClass and deletes it. Returns an error if one occurs. +func (c *FakeStorageClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(storageclassesResource, name, opts), &storagev1.StorageClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeStorageClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(storageclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &storagev1.StorageClassList{}) + return err +} + +// Patch applies the patch and returns the patched storageClass. +func (c *FakeStorageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *storagev1.StorageClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, name, pt, data, subresources...), &storagev1.StorageClass{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.StorageClass), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied storageClass. +func (c *FakeStorageClasses) Apply(ctx context.Context, storageClass *applyconfigurationsstoragev1.StorageClassApplyConfiguration, opts v1.ApplyOptions) (result *storagev1.StorageClass, err error) { + if storageClass == nil { + return nil, fmt.Errorf("storageClass provided to Apply must not be nil") + } + data, err := json.Marshal(storageClass) + if err != nil { + return nil, err + } + name := storageClass.Name + if name == nil { + return nil, fmt.Errorf("storageClass.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, *name, types.ApplyPatchType, data), &storagev1.StorageClass{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.StorageClass), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_volumeattachment.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_volumeattachment.go new file mode 100644 index 0000000000..e48943f8ef --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_volumeattachment.go @@ -0,0 +1,179 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + storagev1 "k8s.io/api/storage/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsstoragev1 "k8s.io/client-go/applyconfigurations/storage/v1" + testing "k8s.io/client-go/testing" +) + +// FakeVolumeAttachments implements VolumeAttachmentInterface +type FakeVolumeAttachments struct { + Fake *FakeStorageV1 +} + +var volumeattachmentsResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1", Resource: "volumeattachments"} + +var volumeattachmentsKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "VolumeAttachment"} + +// Get takes name of the volumeAttachment, and returns the corresponding volumeAttachment object, and an error if there is any. +func (c *FakeVolumeAttachments) Get(ctx context.Context, name string, options v1.GetOptions) (result *storagev1.VolumeAttachment, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(volumeattachmentsResource, name), &storagev1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.VolumeAttachment), err +} + +// List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. +func (c *FakeVolumeAttachments) List(ctx context.Context, opts v1.ListOptions) (result *storagev1.VolumeAttachmentList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(volumeattachmentsResource, volumeattachmentsKind, opts), &storagev1.VolumeAttachmentList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &storagev1.VolumeAttachmentList{ListMeta: obj.(*storagev1.VolumeAttachmentList).ListMeta} + for _, item := range obj.(*storagev1.VolumeAttachmentList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested volumeAttachments. +func (c *FakeVolumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(volumeattachmentsResource, opts)) +} + +// Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. +func (c *FakeVolumeAttachments) Create(ctx context.Context, volumeAttachment *storagev1.VolumeAttachment, opts v1.CreateOptions) (result *storagev1.VolumeAttachment, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(volumeattachmentsResource, volumeAttachment), &storagev1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.VolumeAttachment), err +} + +// Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. +func (c *FakeVolumeAttachments) Update(ctx context.Context, volumeAttachment *storagev1.VolumeAttachment, opts v1.UpdateOptions) (result *storagev1.VolumeAttachment, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(volumeattachmentsResource, volumeAttachment), &storagev1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.VolumeAttachment), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeVolumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *storagev1.VolumeAttachment, opts v1.UpdateOptions) (*storagev1.VolumeAttachment, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(volumeattachmentsResource, "status", volumeAttachment), &storagev1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.VolumeAttachment), err +} + +// Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs. +func (c *FakeVolumeAttachments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(volumeattachmentsResource, name, opts), &storagev1.VolumeAttachment{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVolumeAttachments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(volumeattachmentsResource, listOpts) + + _, err := c.Fake.Invokes(action, &storagev1.VolumeAttachmentList{}) + return err +} + +// Patch applies the patch and returns the patched volumeAttachment. +func (c *FakeVolumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *storagev1.VolumeAttachment, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, name, pt, data, subresources...), &storagev1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.VolumeAttachment), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied volumeAttachment. +func (c *FakeVolumeAttachments) Apply(ctx context.Context, volumeAttachment *applyconfigurationsstoragev1.VolumeAttachmentApplyConfiguration, opts v1.ApplyOptions) (result *storagev1.VolumeAttachment, err error) { + if volumeAttachment == nil { + return nil, fmt.Errorf("volumeAttachment provided to Apply must not be nil") + } + data, err := json.Marshal(volumeAttachment) + if err != nil { + return nil, err + } + name := volumeAttachment.Name + if name == nil { + return nil, fmt.Errorf("volumeAttachment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, *name, types.ApplyPatchType, data), &storagev1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.VolumeAttachment), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeVolumeAttachments) ApplyStatus(ctx context.Context, volumeAttachment *applyconfigurationsstoragev1.VolumeAttachmentApplyConfiguration, opts v1.ApplyOptions) (result *storagev1.VolumeAttachment, err error) { + if volumeAttachment == nil { + return nil, fmt.Errorf("volumeAttachment provided to Apply must not be nil") + } + data, err := json.Marshal(volumeAttachment) + if err != nil { + return nil, err + } + name := volumeAttachment.Name + if name == nil { + return nil, fmt.Errorf("volumeAttachment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, *name, types.ApplyPatchType, data, "status"), &storagev1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1.VolumeAttachment), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_csistoragecapacity.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_csistoragecapacity.go new file mode 100644 index 0000000000..f56ed7895a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_csistoragecapacity.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/storage/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + storagev1alpha1 "k8s.io/client-go/applyconfigurations/storage/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeCSIStorageCapacities implements CSIStorageCapacityInterface +type FakeCSIStorageCapacities struct { + Fake *FakeStorageV1alpha1 + ns string +} + +var csistoragecapacitiesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1alpha1", Resource: "csistoragecapacities"} + +var csistoragecapacitiesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1alpha1", Kind: "CSIStorageCapacity"} + +// Get takes name of the cSIStorageCapacity, and returns the corresponding cSIStorageCapacity object, and an error if there is any. +func (c *FakeCSIStorageCapacities) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(csistoragecapacitiesResource, c.ns, name), &v1alpha1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CSIStorageCapacity), err +} + +// List takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors. +func (c *FakeCSIStorageCapacities) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CSIStorageCapacityList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(csistoragecapacitiesResource, csistoragecapacitiesKind, c.ns, opts), &v1alpha1.CSIStorageCapacityList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.CSIStorageCapacityList{ListMeta: obj.(*v1alpha1.CSIStorageCapacityList).ListMeta} + for _, item := range obj.(*v1alpha1.CSIStorageCapacityList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested cSIStorageCapacities. +func (c *FakeCSIStorageCapacities) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(csistoragecapacitiesResource, c.ns, opts)) + +} + +// Create takes the representation of a cSIStorageCapacity and creates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. +func (c *FakeCSIStorageCapacities) Create(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.CreateOptions) (result *v1alpha1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(csistoragecapacitiesResource, c.ns, cSIStorageCapacity), &v1alpha1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CSIStorageCapacity), err +} + +// Update takes the representation of a cSIStorageCapacity and updates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. +func (c *FakeCSIStorageCapacities) Update(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.UpdateOptions) (result *v1alpha1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(csistoragecapacitiesResource, c.ns, cSIStorageCapacity), &v1alpha1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CSIStorageCapacity), err +} + +// Delete takes name of the cSIStorageCapacity and deletes it. Returns an error if one occurs. +func (c *FakeCSIStorageCapacities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(csistoragecapacitiesResource, c.ns, name, opts), &v1alpha1.CSIStorageCapacity{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCSIStorageCapacities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(csistoragecapacitiesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.CSIStorageCapacityList{}) + return err +} + +// Patch applies the patch and returns the patched cSIStorageCapacity. +func (c *FakeCSIStorageCapacities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(csistoragecapacitiesResource, c.ns, name, pt, data, subresources...), &v1alpha1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CSIStorageCapacity), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cSIStorageCapacity. +func (c *FakeCSIStorageCapacities) Apply(ctx context.Context, cSIStorageCapacity *storagev1alpha1.CSIStorageCapacityApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CSIStorageCapacity, err error) { + if cSIStorageCapacity == nil { + return nil, fmt.Errorf("cSIStorageCapacity provided to Apply must not be nil") + } + data, err := json.Marshal(cSIStorageCapacity) + if err != nil { + return nil, err + } + name := cSIStorageCapacity.Name + if name == nil { + return nil, fmt.Errorf("cSIStorageCapacity.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(csistoragecapacitiesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CSIStorageCapacity), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_storage_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_storage_client.go new file mode 100644 index 0000000000..c26190aa01 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_storage_client.go @@ -0,0 +1,44 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeStorageV1alpha1 struct { + *testing.Fake +} + +func (c *FakeStorageV1alpha1) CSIStorageCapacities(namespace string) v1alpha1.CSIStorageCapacityInterface { + return &FakeCSIStorageCapacities{c, namespace} +} + +func (c *FakeStorageV1alpha1) VolumeAttachments() v1alpha1.VolumeAttachmentInterface { + return &FakeVolumeAttachments{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeStorageV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go new file mode 100644 index 0000000000..eb6ec7983b --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go @@ -0,0 +1,179 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/storage/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + storagev1alpha1 "k8s.io/client-go/applyconfigurations/storage/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeVolumeAttachments implements VolumeAttachmentInterface +type FakeVolumeAttachments struct { + Fake *FakeStorageV1alpha1 +} + +var volumeattachmentsResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1alpha1", Resource: "volumeattachments"} + +var volumeattachmentsKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1alpha1", Kind: "VolumeAttachment"} + +// Get takes name of the volumeAttachment, and returns the corresponding volumeAttachment object, and an error if there is any. +func (c *FakeVolumeAttachments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VolumeAttachment, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(volumeattachmentsResource, name), &v1alpha1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VolumeAttachment), err +} + +// List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. +func (c *FakeVolumeAttachments) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VolumeAttachmentList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(volumeattachmentsResource, volumeattachmentsKind, opts), &v1alpha1.VolumeAttachmentList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.VolumeAttachmentList{ListMeta: obj.(*v1alpha1.VolumeAttachmentList).ListMeta} + for _, item := range obj.(*v1alpha1.VolumeAttachmentList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested volumeAttachments. +func (c *FakeVolumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(volumeattachmentsResource, opts)) +} + +// Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. +func (c *FakeVolumeAttachments) Create(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.CreateOptions) (result *v1alpha1.VolumeAttachment, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(volumeattachmentsResource, volumeAttachment), &v1alpha1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VolumeAttachment), err +} + +// Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. +func (c *FakeVolumeAttachments) Update(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (result *v1alpha1.VolumeAttachment, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(volumeattachmentsResource, volumeAttachment), &v1alpha1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VolumeAttachment), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeVolumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (*v1alpha1.VolumeAttachment, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(volumeattachmentsResource, "status", volumeAttachment), &v1alpha1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VolumeAttachment), err +} + +// Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs. +func (c *FakeVolumeAttachments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(volumeattachmentsResource, name, opts), &v1alpha1.VolumeAttachment{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVolumeAttachments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(volumeattachmentsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.VolumeAttachmentList{}) + return err +} + +// Patch applies the patch and returns the patched volumeAttachment. +func (c *FakeVolumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VolumeAttachment, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, name, pt, data, subresources...), &v1alpha1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VolumeAttachment), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied volumeAttachment. +func (c *FakeVolumeAttachments) Apply(ctx context.Context, volumeAttachment *storagev1alpha1.VolumeAttachmentApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.VolumeAttachment, err error) { + if volumeAttachment == nil { + return nil, fmt.Errorf("volumeAttachment provided to Apply must not be nil") + } + data, err := json.Marshal(volumeAttachment) + if err != nil { + return nil, err + } + name := volumeAttachment.Name + if name == nil { + return nil, fmt.Errorf("volumeAttachment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, *name, types.ApplyPatchType, data), &v1alpha1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VolumeAttachment), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeVolumeAttachments) ApplyStatus(ctx context.Context, volumeAttachment *storagev1alpha1.VolumeAttachmentApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.VolumeAttachment, err error) { + if volumeAttachment == nil { + return nil, fmt.Errorf("volumeAttachment provided to Apply must not be nil") + } + data, err := json.Marshal(volumeAttachment) + if err != nil { + return nil, err + } + name := volumeAttachment.Name + if name == nil { + return nil, fmt.Errorf("volumeAttachment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, *name, types.ApplyPatchType, data, "status"), &v1alpha1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VolumeAttachment), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/doc.go new file mode 100644 index 0000000000..16f4439906 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csidriver.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csidriver.go new file mode 100644 index 0000000000..c65fa74222 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csidriver.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/storage/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + storagev1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeCSIDrivers implements CSIDriverInterface +type FakeCSIDrivers struct { + Fake *FakeStorageV1beta1 +} + +var csidriversResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1beta1", Resource: "csidrivers"} + +var csidriversKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1beta1", Kind: "CSIDriver"} + +// Get takes name of the cSIDriver, and returns the corresponding cSIDriver object, and an error if there is any. +func (c *FakeCSIDrivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CSIDriver, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(csidriversResource, name), &v1beta1.CSIDriver{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CSIDriver), err +} + +// List takes label and field selectors, and returns the list of CSIDrivers that match those selectors. +func (c *FakeCSIDrivers) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CSIDriverList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(csidriversResource, csidriversKind, opts), &v1beta1.CSIDriverList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.CSIDriverList{ListMeta: obj.(*v1beta1.CSIDriverList).ListMeta} + for _, item := range obj.(*v1beta1.CSIDriverList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested cSIDrivers. +func (c *FakeCSIDrivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(csidriversResource, opts)) +} + +// Create takes the representation of a cSIDriver and creates it. Returns the server's representation of the cSIDriver, and an error, if there is any. +func (c *FakeCSIDrivers) Create(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.CreateOptions) (result *v1beta1.CSIDriver, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(csidriversResource, cSIDriver), &v1beta1.CSIDriver{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CSIDriver), err +} + +// Update takes the representation of a cSIDriver and updates it. Returns the server's representation of the cSIDriver, and an error, if there is any. +func (c *FakeCSIDrivers) Update(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.UpdateOptions) (result *v1beta1.CSIDriver, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(csidriversResource, cSIDriver), &v1beta1.CSIDriver{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CSIDriver), err +} + +// Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs. +func (c *FakeCSIDrivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(csidriversResource, name, opts), &v1beta1.CSIDriver{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCSIDrivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(csidriversResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.CSIDriverList{}) + return err +} + +// Patch applies the patch and returns the patched cSIDriver. +func (c *FakeCSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSIDriver, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(csidriversResource, name, pt, data, subresources...), &v1beta1.CSIDriver{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CSIDriver), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cSIDriver. +func (c *FakeCSIDrivers) Apply(ctx context.Context, cSIDriver *storagev1beta1.CSIDriverApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.CSIDriver, err error) { + if cSIDriver == nil { + return nil, fmt.Errorf("cSIDriver provided to Apply must not be nil") + } + data, err := json.Marshal(cSIDriver) + if err != nil { + return nil, err + } + name := cSIDriver.Name + if name == nil { + return nil, fmt.Errorf("cSIDriver.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(csidriversResource, *name, types.ApplyPatchType, data), &v1beta1.CSIDriver{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CSIDriver), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csinode.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csinode.go new file mode 100644 index 0000000000..1ffd49b3ab --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csinode.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/storage/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + storagev1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeCSINodes implements CSINodeInterface +type FakeCSINodes struct { + Fake *FakeStorageV1beta1 +} + +var csinodesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1beta1", Resource: "csinodes"} + +var csinodesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1beta1", Kind: "CSINode"} + +// Get takes name of the cSINode, and returns the corresponding cSINode object, and an error if there is any. +func (c *FakeCSINodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CSINode, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(csinodesResource, name), &v1beta1.CSINode{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CSINode), err +} + +// List takes label and field selectors, and returns the list of CSINodes that match those selectors. +func (c *FakeCSINodes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CSINodeList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(csinodesResource, csinodesKind, opts), &v1beta1.CSINodeList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.CSINodeList{ListMeta: obj.(*v1beta1.CSINodeList).ListMeta} + for _, item := range obj.(*v1beta1.CSINodeList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested cSINodes. +func (c *FakeCSINodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(csinodesResource, opts)) +} + +// Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any. +func (c *FakeCSINodes) Create(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.CreateOptions) (result *v1beta1.CSINode, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(csinodesResource, cSINode), &v1beta1.CSINode{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CSINode), err +} + +// Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any. +func (c *FakeCSINodes) Update(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.UpdateOptions) (result *v1beta1.CSINode, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(csinodesResource, cSINode), &v1beta1.CSINode{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CSINode), err +} + +// Delete takes name of the cSINode and deletes it. Returns an error if one occurs. +func (c *FakeCSINodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(csinodesResource, name, opts), &v1beta1.CSINode{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCSINodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(csinodesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.CSINodeList{}) + return err +} + +// Patch applies the patch and returns the patched cSINode. +func (c *FakeCSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSINode, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(csinodesResource, name, pt, data, subresources...), &v1beta1.CSINode{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CSINode), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cSINode. +func (c *FakeCSINodes) Apply(ctx context.Context, cSINode *storagev1beta1.CSINodeApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.CSINode, err error) { + if cSINode == nil { + return nil, fmt.Errorf("cSINode provided to Apply must not be nil") + } + data, err := json.Marshal(cSINode) + if err != nil { + return nil, err + } + name := cSINode.Name + if name == nil { + return nil, fmt.Errorf("cSINode.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(csinodesResource, *name, types.ApplyPatchType, data), &v1beta1.CSINode{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CSINode), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csistoragecapacity.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csistoragecapacity.go new file mode 100644 index 0000000000..1715884d1b --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csistoragecapacity.go @@ -0,0 +1,155 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/storage/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + storagev1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeCSIStorageCapacities implements CSIStorageCapacityInterface +type FakeCSIStorageCapacities struct { + Fake *FakeStorageV1beta1 + ns string +} + +var csistoragecapacitiesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1beta1", Resource: "csistoragecapacities"} + +var csistoragecapacitiesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1beta1", Kind: "CSIStorageCapacity"} + +// Get takes name of the cSIStorageCapacity, and returns the corresponding cSIStorageCapacity object, and an error if there is any. +func (c *FakeCSIStorageCapacities) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(csistoragecapacitiesResource, c.ns, name), &v1beta1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CSIStorageCapacity), err +} + +// List takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors. +func (c *FakeCSIStorageCapacities) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CSIStorageCapacityList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(csistoragecapacitiesResource, csistoragecapacitiesKind, c.ns, opts), &v1beta1.CSIStorageCapacityList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.CSIStorageCapacityList{ListMeta: obj.(*v1beta1.CSIStorageCapacityList).ListMeta} + for _, item := range obj.(*v1beta1.CSIStorageCapacityList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested cSIStorageCapacities. +func (c *FakeCSIStorageCapacities) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(csistoragecapacitiesResource, c.ns, opts)) + +} + +// Create takes the representation of a cSIStorageCapacity and creates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. +func (c *FakeCSIStorageCapacities) Create(ctx context.Context, cSIStorageCapacity *v1beta1.CSIStorageCapacity, opts v1.CreateOptions) (result *v1beta1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(csistoragecapacitiesResource, c.ns, cSIStorageCapacity), &v1beta1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CSIStorageCapacity), err +} + +// Update takes the representation of a cSIStorageCapacity and updates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. +func (c *FakeCSIStorageCapacities) Update(ctx context.Context, cSIStorageCapacity *v1beta1.CSIStorageCapacity, opts v1.UpdateOptions) (result *v1beta1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(csistoragecapacitiesResource, c.ns, cSIStorageCapacity), &v1beta1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CSIStorageCapacity), err +} + +// Delete takes name of the cSIStorageCapacity and deletes it. Returns an error if one occurs. +func (c *FakeCSIStorageCapacities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(csistoragecapacitiesResource, c.ns, name, opts), &v1beta1.CSIStorageCapacity{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCSIStorageCapacities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(csistoragecapacitiesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.CSIStorageCapacityList{}) + return err +} + +// Patch applies the patch and returns the patched cSIStorageCapacity. +func (c *FakeCSIStorageCapacities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(csistoragecapacitiesResource, c.ns, name, pt, data, subresources...), &v1beta1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CSIStorageCapacity), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cSIStorageCapacity. +func (c *FakeCSIStorageCapacities) Apply(ctx context.Context, cSIStorageCapacity *storagev1beta1.CSIStorageCapacityApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.CSIStorageCapacity, err error) { + if cSIStorageCapacity == nil { + return nil, fmt.Errorf("cSIStorageCapacity provided to Apply must not be nil") + } + data, err := json.Marshal(cSIStorageCapacity) + if err != nil { + return nil, err + } + name := cSIStorageCapacity.Name + if name == nil { + return nil, fmt.Errorf("cSIStorageCapacity.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(csistoragecapacitiesResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CSIStorageCapacity), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storage_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storage_client.go new file mode 100644 index 0000000000..6b5bb02fda --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storage_client.go @@ -0,0 +1,56 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeStorageV1beta1 struct { + *testing.Fake +} + +func (c *FakeStorageV1beta1) CSIDrivers() v1beta1.CSIDriverInterface { + return &FakeCSIDrivers{c} +} + +func (c *FakeStorageV1beta1) CSINodes() v1beta1.CSINodeInterface { + return &FakeCSINodes{c} +} + +func (c *FakeStorageV1beta1) CSIStorageCapacities(namespace string) v1beta1.CSIStorageCapacityInterface { + return &FakeCSIStorageCapacities{c, namespace} +} + +func (c *FakeStorageV1beta1) StorageClasses() v1beta1.StorageClassInterface { + return &FakeStorageClasses{c} +} + +func (c *FakeStorageV1beta1) VolumeAttachments() v1beta1.VolumeAttachmentInterface { + return &FakeVolumeAttachments{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeStorageV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go new file mode 100644 index 0000000000..f929c55f8d --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go @@ -0,0 +1,146 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/storage/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + storagev1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeStorageClasses implements StorageClassInterface +type FakeStorageClasses struct { + Fake *FakeStorageV1beta1 +} + +var storageclassesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1beta1", Resource: "storageclasses"} + +var storageclassesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1beta1", Kind: "StorageClass"} + +// Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any. +func (c *FakeStorageClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.StorageClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(storageclassesResource, name), &v1beta1.StorageClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StorageClass), err +} + +// List takes label and field selectors, and returns the list of StorageClasses that match those selectors. +func (c *FakeStorageClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StorageClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(storageclassesResource, storageclassesKind, opts), &v1beta1.StorageClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.StorageClassList{ListMeta: obj.(*v1beta1.StorageClassList).ListMeta} + for _, item := range obj.(*v1beta1.StorageClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested storageClasses. +func (c *FakeStorageClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(storageclassesResource, opts)) +} + +// Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. +func (c *FakeStorageClasses) Create(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.CreateOptions) (result *v1beta1.StorageClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(storageclassesResource, storageClass), &v1beta1.StorageClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StorageClass), err +} + +// Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any. +func (c *FakeStorageClasses) Update(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.UpdateOptions) (result *v1beta1.StorageClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(storageclassesResource, storageClass), &v1beta1.StorageClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StorageClass), err +} + +// Delete takes name of the storageClass and deletes it. Returns an error if one occurs. +func (c *FakeStorageClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(storageclassesResource, name, opts), &v1beta1.StorageClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeStorageClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(storageclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.StorageClassList{}) + return err +} + +// Patch applies the patch and returns the patched storageClass. +func (c *FakeStorageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StorageClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, name, pt, data, subresources...), &v1beta1.StorageClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StorageClass), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied storageClass. +func (c *FakeStorageClasses) Apply(ctx context.Context, storageClass *storagev1beta1.StorageClassApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.StorageClass, err error) { + if storageClass == nil { + return nil, fmt.Errorf("storageClass provided to Apply must not be nil") + } + data, err := json.Marshal(storageClass) + if err != nil { + return nil, err + } + name := storageClass.Name + if name == nil { + return nil, fmt.Errorf("storageClass.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, *name, types.ApplyPatchType, data), &v1beta1.StorageClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StorageClass), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go new file mode 100644 index 0000000000..81df877691 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go @@ -0,0 +1,179 @@ +/* +Copyright 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/storage/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + storagev1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeVolumeAttachments implements VolumeAttachmentInterface +type FakeVolumeAttachments struct { + Fake *FakeStorageV1beta1 +} + +var volumeattachmentsResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1beta1", Resource: "volumeattachments"} + +var volumeattachmentsKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1beta1", Kind: "VolumeAttachment"} + +// Get takes name of the volumeAttachment, and returns the corresponding volumeAttachment object, and an error if there is any. +func (c *FakeVolumeAttachments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VolumeAttachment, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(volumeattachmentsResource, name), &v1beta1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeAttachment), err +} + +// List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. +func (c *FakeVolumeAttachments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeAttachmentList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(volumeattachmentsResource, volumeattachmentsKind, opts), &v1beta1.VolumeAttachmentList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.VolumeAttachmentList{ListMeta: obj.(*v1beta1.VolumeAttachmentList).ListMeta} + for _, item := range obj.(*v1beta1.VolumeAttachmentList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested volumeAttachments. +func (c *FakeVolumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(volumeattachmentsResource, opts)) +} + +// Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. +func (c *FakeVolumeAttachments) Create(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.CreateOptions) (result *v1beta1.VolumeAttachment, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(volumeattachmentsResource, volumeAttachment), &v1beta1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeAttachment), err +} + +// Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. +func (c *FakeVolumeAttachments) Update(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (result *v1beta1.VolumeAttachment, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(volumeattachmentsResource, volumeAttachment), &v1beta1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeAttachment), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeVolumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (*v1beta1.VolumeAttachment, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(volumeattachmentsResource, "status", volumeAttachment), &v1beta1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeAttachment), err +} + +// Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs. +func (c *FakeVolumeAttachments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(volumeattachmentsResource, name, opts), &v1beta1.VolumeAttachment{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVolumeAttachments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(volumeattachmentsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.VolumeAttachmentList{}) + return err +} + +// Patch applies the patch and returns the patched volumeAttachment. +func (c *FakeVolumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeAttachment, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, name, pt, data, subresources...), &v1beta1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeAttachment), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied volumeAttachment. +func (c *FakeVolumeAttachments) Apply(ctx context.Context, volumeAttachment *storagev1beta1.VolumeAttachmentApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.VolumeAttachment, err error) { + if volumeAttachment == nil { + return nil, fmt.Errorf("volumeAttachment provided to Apply must not be nil") + } + data, err := json.Marshal(volumeAttachment) + if err != nil { + return nil, err + } + name := volumeAttachment.Name + if name == nil { + return nil, fmt.Errorf("volumeAttachment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, *name, types.ApplyPatchType, data), &v1beta1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeAttachment), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeVolumeAttachments) ApplyStatus(ctx context.Context, volumeAttachment *storagev1beta1.VolumeAttachmentApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.VolumeAttachment, err error) { + if volumeAttachment == nil { + return nil, fmt.Errorf("volumeAttachment provided to Apply must not be nil") + } + data, err := json.Marshal(volumeAttachment) + if err != nil { + return nil, err + } + name := volumeAttachment.Name + if name == nil { + return nil, fmt.Errorf("volumeAttachment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, *name, types.ApplyPatchType, data, "status"), &v1beta1.VolumeAttachment{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.VolumeAttachment), err +} diff --git a/vendor/k8s.io/client-go/rest/fake/fake.go b/vendor/k8s.io/client-go/rest/fake/fake.go new file mode 100644 index 0000000000..293e096946 --- /dev/null +++ b/vendor/k8s.io/client-go/rest/fake/fake.go @@ -0,0 +1,118 @@ +/* +Copyright 2014 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. +*/ + +// This is made a separate package and should only be imported by tests, because +// it imports testapi +package fake + +import ( + "net/http" + "net/url" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" +) + +// CreateHTTPClient creates an http.Client that will invoke the provided roundTripper func +// when a request is made. +func CreateHTTPClient(roundTripper func(*http.Request) (*http.Response, error)) *http.Client { + return &http.Client{ + Transport: roundTripperFunc(roundTripper), + } +} + +type roundTripperFunc func(*http.Request) (*http.Response, error) + +func (f roundTripperFunc) RoundTrip(req *http.Request) (*http.Response, error) { + return f(req) +} + +// RESTClient provides a fake RESTClient interface. It is used to mock network +// interactions via a rest.Request, or to make them via the provided Client to +// a specific server. +type RESTClient struct { + NegotiatedSerializer runtime.NegotiatedSerializer + GroupVersion schema.GroupVersion + VersionedAPIPath string + + // Err is returned when any request would be made to the server. If Err is set, + // Req will not be recorded, Resp will not be returned, and Client will not be + // invoked. + Err error + // Req is set to the last request that was executed (had the methods Do/DoRaw) invoked. + Req *http.Request + // If Client is specified, the client will be invoked instead of returning Resp if + // Err is not set. + Client *http.Client + // Resp is returned to the caller after Req is recorded, unless Err or Client are set. + Resp *http.Response +} + +func (c *RESTClient) Get() *restclient.Request { + return c.Verb("GET") +} + +func (c *RESTClient) Put() *restclient.Request { + return c.Verb("PUT") +} + +func (c *RESTClient) Patch(pt types.PatchType) *restclient.Request { + return c.Verb("PATCH").SetHeader("Content-Type", string(pt)) +} + +func (c *RESTClient) Post() *restclient.Request { + return c.Verb("POST") +} + +func (c *RESTClient) Delete() *restclient.Request { + return c.Verb("DELETE") +} + +func (c *RESTClient) Verb(verb string) *restclient.Request { + return c.Request().Verb(verb) +} + +func (c *RESTClient) APIVersion() schema.GroupVersion { + return c.GroupVersion +} + +func (c *RESTClient) GetRateLimiter() flowcontrol.RateLimiter { + return nil +} + +func (c *RESTClient) Request() *restclient.Request { + config := restclient.ClientContentConfig{ + ContentType: runtime.ContentTypeJSON, + GroupVersion: c.GroupVersion, + Negotiator: runtime.NewClientNegotiator(c.NegotiatedSerializer, c.GroupVersion), + } + return restclient.NewRequestWithClient(&url.URL{Scheme: "https", Host: "localhost"}, c.VersionedAPIPath, config, CreateHTTPClient(c.do)) +} + +// do is invoked when a Request() created by this client is executed. +func (c *RESTClient) do(req *http.Request) (*http.Response, error) { + if c.Err != nil { + return nil, c.Err + } + c.Req = req + if c.Client != nil { + return c.Client.Do(req) + } + return c.Resp, nil +} diff --git a/vendor/k8s.io/client-go/testing/actions.go b/vendor/k8s.io/client-go/testing/actions.go new file mode 100644 index 0000000000..c8ae0aaf5d --- /dev/null +++ b/vendor/k8s.io/client-go/testing/actions.go @@ -0,0 +1,698 @@ +/* +Copyright 2015 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 testing + +import ( + "fmt" + "path" + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" +) + +func NewRootGetAction(resource schema.GroupVersionResource, name string) GetActionImpl { + action := GetActionImpl{} + action.Verb = "get" + action.Resource = resource + action.Name = name + + return action +} + +func NewGetAction(resource schema.GroupVersionResource, namespace, name string) GetActionImpl { + action := GetActionImpl{} + action.Verb = "get" + action.Resource = resource + action.Namespace = namespace + action.Name = name + + return action +} + +func NewGetSubresourceAction(resource schema.GroupVersionResource, namespace, subresource, name string) GetActionImpl { + action := GetActionImpl{} + action.Verb = "get" + action.Resource = resource + action.Subresource = subresource + action.Namespace = namespace + action.Name = name + + return action +} + +func NewRootGetSubresourceAction(resource schema.GroupVersionResource, subresource, name string) GetActionImpl { + action := GetActionImpl{} + action.Verb = "get" + action.Resource = resource + action.Subresource = subresource + action.Name = name + + return action +} + +func NewRootListAction(resource schema.GroupVersionResource, kind schema.GroupVersionKind, opts interface{}) ListActionImpl { + action := ListActionImpl{} + action.Verb = "list" + action.Resource = resource + action.Kind = kind + labelSelector, fieldSelector, _ := ExtractFromListOptions(opts) + action.ListRestrictions = ListRestrictions{labelSelector, fieldSelector} + + return action +} + +func NewListAction(resource schema.GroupVersionResource, kind schema.GroupVersionKind, namespace string, opts interface{}) ListActionImpl { + action := ListActionImpl{} + action.Verb = "list" + action.Resource = resource + action.Kind = kind + action.Namespace = namespace + labelSelector, fieldSelector, _ := ExtractFromListOptions(opts) + action.ListRestrictions = ListRestrictions{labelSelector, fieldSelector} + + return action +} + +func NewRootCreateAction(resource schema.GroupVersionResource, object runtime.Object) CreateActionImpl { + action := CreateActionImpl{} + action.Verb = "create" + action.Resource = resource + action.Object = object + + return action +} + +func NewCreateAction(resource schema.GroupVersionResource, namespace string, object runtime.Object) CreateActionImpl { + action := CreateActionImpl{} + action.Verb = "create" + action.Resource = resource + action.Namespace = namespace + action.Object = object + + return action +} + +func NewRootCreateSubresourceAction(resource schema.GroupVersionResource, name, subresource string, object runtime.Object) CreateActionImpl { + action := CreateActionImpl{} + action.Verb = "create" + action.Resource = resource + action.Subresource = subresource + action.Name = name + action.Object = object + + return action +} + +func NewCreateSubresourceAction(resource schema.GroupVersionResource, name, subresource, namespace string, object runtime.Object) CreateActionImpl { + action := CreateActionImpl{} + action.Verb = "create" + action.Resource = resource + action.Namespace = namespace + action.Subresource = subresource + action.Name = name + action.Object = object + + return action +} + +func NewRootUpdateAction(resource schema.GroupVersionResource, object runtime.Object) UpdateActionImpl { + action := UpdateActionImpl{} + action.Verb = "update" + action.Resource = resource + action.Object = object + + return action +} + +func NewUpdateAction(resource schema.GroupVersionResource, namespace string, object runtime.Object) UpdateActionImpl { + action := UpdateActionImpl{} + action.Verb = "update" + action.Resource = resource + action.Namespace = namespace + action.Object = object + + return action +} + +func NewRootPatchAction(resource schema.GroupVersionResource, name string, pt types.PatchType, patch []byte) PatchActionImpl { + action := PatchActionImpl{} + action.Verb = "patch" + action.Resource = resource + action.Name = name + action.PatchType = pt + action.Patch = patch + + return action +} + +func NewPatchAction(resource schema.GroupVersionResource, namespace string, name string, pt types.PatchType, patch []byte) PatchActionImpl { + action := PatchActionImpl{} + action.Verb = "patch" + action.Resource = resource + action.Namespace = namespace + action.Name = name + action.PatchType = pt + action.Patch = patch + + return action +} + +func NewRootPatchSubresourceAction(resource schema.GroupVersionResource, name string, pt types.PatchType, patch []byte, subresources ...string) PatchActionImpl { + action := PatchActionImpl{} + action.Verb = "patch" + action.Resource = resource + action.Subresource = path.Join(subresources...) + action.Name = name + action.PatchType = pt + action.Patch = patch + + return action +} + +func NewPatchSubresourceAction(resource schema.GroupVersionResource, namespace, name string, pt types.PatchType, patch []byte, subresources ...string) PatchActionImpl { + action := PatchActionImpl{} + action.Verb = "patch" + action.Resource = resource + action.Subresource = path.Join(subresources...) + action.Namespace = namespace + action.Name = name + action.PatchType = pt + action.Patch = patch + + return action +} + +func NewRootUpdateSubresourceAction(resource schema.GroupVersionResource, subresource string, object runtime.Object) UpdateActionImpl { + action := UpdateActionImpl{} + action.Verb = "update" + action.Resource = resource + action.Subresource = subresource + action.Object = object + + return action +} +func NewUpdateSubresourceAction(resource schema.GroupVersionResource, subresource string, namespace string, object runtime.Object) UpdateActionImpl { + action := UpdateActionImpl{} + action.Verb = "update" + action.Resource = resource + action.Subresource = subresource + action.Namespace = namespace + action.Object = object + + return action +} + +func NewRootDeleteAction(resource schema.GroupVersionResource, name string) DeleteActionImpl { + return NewRootDeleteActionWithOptions(resource, name, metav1.DeleteOptions{}) +} + +func NewRootDeleteActionWithOptions(resource schema.GroupVersionResource, name string, opts metav1.DeleteOptions) DeleteActionImpl { + action := DeleteActionImpl{} + action.Verb = "delete" + action.Resource = resource + action.Name = name + action.DeleteOptions = opts + + return action +} + +func NewRootDeleteSubresourceAction(resource schema.GroupVersionResource, subresource string, name string) DeleteActionImpl { + action := DeleteActionImpl{} + action.Verb = "delete" + action.Resource = resource + action.Subresource = subresource + action.Name = name + + return action +} + +func NewDeleteAction(resource schema.GroupVersionResource, namespace, name string) DeleteActionImpl { + return NewDeleteActionWithOptions(resource, namespace, name, metav1.DeleteOptions{}) +} + +func NewDeleteActionWithOptions(resource schema.GroupVersionResource, namespace, name string, opts metav1.DeleteOptions) DeleteActionImpl { + action := DeleteActionImpl{} + action.Verb = "delete" + action.Resource = resource + action.Namespace = namespace + action.Name = name + action.DeleteOptions = opts + + return action +} + +func NewDeleteSubresourceAction(resource schema.GroupVersionResource, subresource, namespace, name string) DeleteActionImpl { + action := DeleteActionImpl{} + action.Verb = "delete" + action.Resource = resource + action.Subresource = subresource + action.Namespace = namespace + action.Name = name + + return action +} + +func NewRootDeleteCollectionAction(resource schema.GroupVersionResource, opts interface{}) DeleteCollectionActionImpl { + action := DeleteCollectionActionImpl{} + action.Verb = "delete-collection" + action.Resource = resource + labelSelector, fieldSelector, _ := ExtractFromListOptions(opts) + action.ListRestrictions = ListRestrictions{labelSelector, fieldSelector} + + return action +} + +func NewDeleteCollectionAction(resource schema.GroupVersionResource, namespace string, opts interface{}) DeleteCollectionActionImpl { + action := DeleteCollectionActionImpl{} + action.Verb = "delete-collection" + action.Resource = resource + action.Namespace = namespace + labelSelector, fieldSelector, _ := ExtractFromListOptions(opts) + action.ListRestrictions = ListRestrictions{labelSelector, fieldSelector} + + return action +} + +func NewRootWatchAction(resource schema.GroupVersionResource, opts interface{}) WatchActionImpl { + action := WatchActionImpl{} + action.Verb = "watch" + action.Resource = resource + labelSelector, fieldSelector, resourceVersion := ExtractFromListOptions(opts) + action.WatchRestrictions = WatchRestrictions{labelSelector, fieldSelector, resourceVersion} + + return action +} + +func ExtractFromListOptions(opts interface{}) (labelSelector labels.Selector, fieldSelector fields.Selector, resourceVersion string) { + var err error + switch t := opts.(type) { + case metav1.ListOptions: + labelSelector, err = labels.Parse(t.LabelSelector) + if err != nil { + panic(fmt.Errorf("invalid selector %q: %v", t.LabelSelector, err)) + } + fieldSelector, err = fields.ParseSelector(t.FieldSelector) + if err != nil { + panic(fmt.Errorf("invalid selector %q: %v", t.FieldSelector, err)) + } + resourceVersion = t.ResourceVersion + default: + panic(fmt.Errorf("expect a ListOptions %T", opts)) + } + if labelSelector == nil { + labelSelector = labels.Everything() + } + if fieldSelector == nil { + fieldSelector = fields.Everything() + } + return labelSelector, fieldSelector, resourceVersion +} + +func NewWatchAction(resource schema.GroupVersionResource, namespace string, opts interface{}) WatchActionImpl { + action := WatchActionImpl{} + action.Verb = "watch" + action.Resource = resource + action.Namespace = namespace + labelSelector, fieldSelector, resourceVersion := ExtractFromListOptions(opts) + action.WatchRestrictions = WatchRestrictions{labelSelector, fieldSelector, resourceVersion} + + return action +} + +func NewProxyGetAction(resource schema.GroupVersionResource, namespace, scheme, name, port, path string, params map[string]string) ProxyGetActionImpl { + action := ProxyGetActionImpl{} + action.Verb = "get" + action.Resource = resource + action.Namespace = namespace + action.Scheme = scheme + action.Name = name + action.Port = port + action.Path = path + action.Params = params + return action +} + +type ListRestrictions struct { + Labels labels.Selector + Fields fields.Selector +} +type WatchRestrictions struct { + Labels labels.Selector + Fields fields.Selector + ResourceVersion string +} + +type Action interface { + GetNamespace() string + GetVerb() string + GetResource() schema.GroupVersionResource + GetSubresource() string + Matches(verb, resource string) bool + + // DeepCopy is used to copy an action to avoid any risk of accidental mutation. Most people never need to call this + // because the invocation logic deep copies before calls to storage and reactors. + DeepCopy() Action +} + +type GenericAction interface { + Action + GetValue() interface{} +} + +type GetAction interface { + Action + GetName() string +} + +type ListAction interface { + Action + GetListRestrictions() ListRestrictions +} + +type CreateAction interface { + Action + GetObject() runtime.Object +} + +type UpdateAction interface { + Action + GetObject() runtime.Object +} + +type DeleteAction interface { + Action + GetName() string + GetDeleteOptions() metav1.DeleteOptions +} + +type DeleteCollectionAction interface { + Action + GetListRestrictions() ListRestrictions +} + +type PatchAction interface { + Action + GetName() string + GetPatchType() types.PatchType + GetPatch() []byte +} + +type WatchAction interface { + Action + GetWatchRestrictions() WatchRestrictions +} + +type ProxyGetAction interface { + Action + GetScheme() string + GetName() string + GetPort() string + GetPath() string + GetParams() map[string]string +} + +type ActionImpl struct { + Namespace string + Verb string + Resource schema.GroupVersionResource + Subresource string +} + +func (a ActionImpl) GetNamespace() string { + return a.Namespace +} +func (a ActionImpl) GetVerb() string { + return a.Verb +} +func (a ActionImpl) GetResource() schema.GroupVersionResource { + return a.Resource +} +func (a ActionImpl) GetSubresource() string { + return a.Subresource +} +func (a ActionImpl) Matches(verb, resource string) bool { + // Stay backwards compatible. + if !strings.Contains(resource, "/") { + return strings.EqualFold(verb, a.Verb) && + strings.EqualFold(resource, a.Resource.Resource) + } + + parts := strings.SplitN(resource, "/", 2) + topresource, subresource := parts[0], parts[1] + + return strings.EqualFold(verb, a.Verb) && + strings.EqualFold(topresource, a.Resource.Resource) && + strings.EqualFold(subresource, a.Subresource) +} +func (a ActionImpl) DeepCopy() Action { + ret := a + return ret +} + +type GenericActionImpl struct { + ActionImpl + Value interface{} +} + +func (a GenericActionImpl) GetValue() interface{} { + return a.Value +} + +func (a GenericActionImpl) DeepCopy() Action { + return GenericActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + // TODO this is wrong, but no worse than before + Value: a.Value, + } +} + +type GetActionImpl struct { + ActionImpl + Name string +} + +func (a GetActionImpl) GetName() string { + return a.Name +} + +func (a GetActionImpl) DeepCopy() Action { + return GetActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + Name: a.Name, + } +} + +type ListActionImpl struct { + ActionImpl + Kind schema.GroupVersionKind + Name string + ListRestrictions ListRestrictions +} + +func (a ListActionImpl) GetKind() schema.GroupVersionKind { + return a.Kind +} + +func (a ListActionImpl) GetListRestrictions() ListRestrictions { + return a.ListRestrictions +} + +func (a ListActionImpl) DeepCopy() Action { + return ListActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + Kind: a.Kind, + Name: a.Name, + ListRestrictions: ListRestrictions{ + Labels: a.ListRestrictions.Labels.DeepCopySelector(), + Fields: a.ListRestrictions.Fields.DeepCopySelector(), + }, + } +} + +type CreateActionImpl struct { + ActionImpl + Name string + Object runtime.Object +} + +func (a CreateActionImpl) GetObject() runtime.Object { + return a.Object +} + +func (a CreateActionImpl) DeepCopy() Action { + return CreateActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + Name: a.Name, + Object: a.Object.DeepCopyObject(), + } +} + +type UpdateActionImpl struct { + ActionImpl + Object runtime.Object +} + +func (a UpdateActionImpl) GetObject() runtime.Object { + return a.Object +} + +func (a UpdateActionImpl) DeepCopy() Action { + return UpdateActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + Object: a.Object.DeepCopyObject(), + } +} + +type PatchActionImpl struct { + ActionImpl + Name string + PatchType types.PatchType + Patch []byte +} + +func (a PatchActionImpl) GetName() string { + return a.Name +} + +func (a PatchActionImpl) GetPatch() []byte { + return a.Patch +} + +func (a PatchActionImpl) GetPatchType() types.PatchType { + return a.PatchType +} + +func (a PatchActionImpl) DeepCopy() Action { + patch := make([]byte, len(a.Patch)) + copy(patch, a.Patch) + return PatchActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + Name: a.Name, + PatchType: a.PatchType, + Patch: patch, + } +} + +type DeleteActionImpl struct { + ActionImpl + Name string + DeleteOptions metav1.DeleteOptions +} + +func (a DeleteActionImpl) GetName() string { + return a.Name +} + +func (a DeleteActionImpl) GetDeleteOptions() metav1.DeleteOptions { + return a.DeleteOptions +} + +func (a DeleteActionImpl) DeepCopy() Action { + return DeleteActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + Name: a.Name, + DeleteOptions: *a.DeleteOptions.DeepCopy(), + } +} + +type DeleteCollectionActionImpl struct { + ActionImpl + ListRestrictions ListRestrictions +} + +func (a DeleteCollectionActionImpl) GetListRestrictions() ListRestrictions { + return a.ListRestrictions +} + +func (a DeleteCollectionActionImpl) DeepCopy() Action { + return DeleteCollectionActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + ListRestrictions: ListRestrictions{ + Labels: a.ListRestrictions.Labels.DeepCopySelector(), + Fields: a.ListRestrictions.Fields.DeepCopySelector(), + }, + } +} + +type WatchActionImpl struct { + ActionImpl + WatchRestrictions WatchRestrictions +} + +func (a WatchActionImpl) GetWatchRestrictions() WatchRestrictions { + return a.WatchRestrictions +} + +func (a WatchActionImpl) DeepCopy() Action { + return WatchActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + WatchRestrictions: WatchRestrictions{ + Labels: a.WatchRestrictions.Labels.DeepCopySelector(), + Fields: a.WatchRestrictions.Fields.DeepCopySelector(), + ResourceVersion: a.WatchRestrictions.ResourceVersion, + }, + } +} + +type ProxyGetActionImpl struct { + ActionImpl + Scheme string + Name string + Port string + Path string + Params map[string]string +} + +func (a ProxyGetActionImpl) GetScheme() string { + return a.Scheme +} + +func (a ProxyGetActionImpl) GetName() string { + return a.Name +} + +func (a ProxyGetActionImpl) GetPort() string { + return a.Port +} + +func (a ProxyGetActionImpl) GetPath() string { + return a.Path +} + +func (a ProxyGetActionImpl) GetParams() map[string]string { + return a.Params +} + +func (a ProxyGetActionImpl) DeepCopy() Action { + params := map[string]string{} + for k, v := range a.Params { + params[k] = v + } + return ProxyGetActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + Scheme: a.Scheme, + Name: a.Name, + Port: a.Port, + Path: a.Path, + Params: params, + } +} diff --git a/vendor/k8s.io/client-go/testing/fake.go b/vendor/k8s.io/client-go/testing/fake.go new file mode 100644 index 0000000000..3ab9c1b075 --- /dev/null +++ b/vendor/k8s.io/client-go/testing/fake.go @@ -0,0 +1,220 @@ +/* +Copyright 2016 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 testing + +import ( + "fmt" + "sync" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" +) + +// Fake implements client.Interface. Meant to be embedded into a struct to get +// a default implementation. This makes faking out just the method you want to +// test easier. +type Fake struct { + sync.RWMutex + actions []Action // these may be castable to other types, but "Action" is the minimum + + // ReactionChain is the list of reactors that will be attempted for every + // request in the order they are tried. + ReactionChain []Reactor + // WatchReactionChain is the list of watch reactors that will be attempted + // for every request in the order they are tried. + WatchReactionChain []WatchReactor + // ProxyReactionChain is the list of proxy reactors that will be attempted + // for every request in the order they are tried. + ProxyReactionChain []ProxyReactor + + Resources []*metav1.APIResourceList +} + +// Reactor is an interface to allow the composition of reaction functions. +type Reactor interface { + // Handles indicates whether or not this Reactor deals with a given + // action. + Handles(action Action) bool + // React handles the action and returns results. It may choose to + // delegate by indicated handled=false. + React(action Action) (handled bool, ret runtime.Object, err error) +} + +// WatchReactor is an interface to allow the composition of watch functions. +type WatchReactor interface { + // Handles indicates whether or not this Reactor deals with a given + // action. + Handles(action Action) bool + // React handles a watch action and returns results. It may choose to + // delegate by indicating handled=false. + React(action Action) (handled bool, ret watch.Interface, err error) +} + +// ProxyReactor is an interface to allow the composition of proxy get +// functions. +type ProxyReactor interface { + // Handles indicates whether or not this Reactor deals with a given + // action. + Handles(action Action) bool + // React handles a watch action and returns results. It may choose to + // delegate by indicating handled=false. + React(action Action) (handled bool, ret restclient.ResponseWrapper, err error) +} + +// ReactionFunc is a function that returns an object or error for a given +// Action. If "handled" is false, then the test client will ignore the +// results and continue to the next ReactionFunc. A ReactionFunc can describe +// reactions on subresources by testing the result of the action's +// GetSubresource() method. +type ReactionFunc func(action Action) (handled bool, ret runtime.Object, err error) + +// WatchReactionFunc is a function that returns a watch interface. If +// "handled" is false, then the test client will ignore the results and +// continue to the next ReactionFunc. +type WatchReactionFunc func(action Action) (handled bool, ret watch.Interface, err error) + +// ProxyReactionFunc is a function that returns a ResponseWrapper interface +// for a given Action. If "handled" is false, then the test client will +// ignore the results and continue to the next ProxyReactionFunc. +type ProxyReactionFunc func(action Action) (handled bool, ret restclient.ResponseWrapper, err error) + +// AddReactor appends a reactor to the end of the chain. +func (c *Fake) AddReactor(verb, resource string, reaction ReactionFunc) { + c.ReactionChain = append(c.ReactionChain, &SimpleReactor{verb, resource, reaction}) +} + +// PrependReactor adds a reactor to the beginning of the chain. +func (c *Fake) PrependReactor(verb, resource string, reaction ReactionFunc) { + c.ReactionChain = append([]Reactor{&SimpleReactor{verb, resource, reaction}}, c.ReactionChain...) +} + +// AddWatchReactor appends a reactor to the end of the chain. +func (c *Fake) AddWatchReactor(resource string, reaction WatchReactionFunc) { + c.Lock() + defer c.Unlock() + c.WatchReactionChain = append(c.WatchReactionChain, &SimpleWatchReactor{resource, reaction}) +} + +// PrependWatchReactor adds a reactor to the beginning of the chain. +func (c *Fake) PrependWatchReactor(resource string, reaction WatchReactionFunc) { + c.Lock() + defer c.Unlock() + c.WatchReactionChain = append([]WatchReactor{&SimpleWatchReactor{resource, reaction}}, c.WatchReactionChain...) +} + +// AddProxyReactor appends a reactor to the end of the chain. +func (c *Fake) AddProxyReactor(resource string, reaction ProxyReactionFunc) { + c.ProxyReactionChain = append(c.ProxyReactionChain, &SimpleProxyReactor{resource, reaction}) +} + +// PrependProxyReactor adds a reactor to the beginning of the chain. +func (c *Fake) PrependProxyReactor(resource string, reaction ProxyReactionFunc) { + c.ProxyReactionChain = append([]ProxyReactor{&SimpleProxyReactor{resource, reaction}}, c.ProxyReactionChain...) +} + +// Invokes records the provided Action and then invokes the ReactionFunc that +// handles the action if one exists. defaultReturnObj is expected to be of the +// same type a normal call would return. +func (c *Fake) Invokes(action Action, defaultReturnObj runtime.Object) (runtime.Object, error) { + c.Lock() + defer c.Unlock() + + actionCopy := action.DeepCopy() + c.actions = append(c.actions, action.DeepCopy()) + for _, reactor := range c.ReactionChain { + if !reactor.Handles(actionCopy) { + continue + } + + handled, ret, err := reactor.React(actionCopy) + if !handled { + continue + } + + return ret, err + } + + return defaultReturnObj, nil +} + +// InvokesWatch records the provided Action and then invokes the ReactionFunc +// that handles the action if one exists. +func (c *Fake) InvokesWatch(action Action) (watch.Interface, error) { + c.Lock() + defer c.Unlock() + + actionCopy := action.DeepCopy() + c.actions = append(c.actions, action.DeepCopy()) + for _, reactor := range c.WatchReactionChain { + if !reactor.Handles(actionCopy) { + continue + } + + handled, ret, err := reactor.React(actionCopy) + if !handled { + continue + } + + return ret, err + } + + return nil, fmt.Errorf("unhandled watch: %#v", action) +} + +// InvokesProxy records the provided Action and then invokes the ReactionFunc +// that handles the action if one exists. +func (c *Fake) InvokesProxy(action Action) restclient.ResponseWrapper { + c.Lock() + defer c.Unlock() + + actionCopy := action.DeepCopy() + c.actions = append(c.actions, action.DeepCopy()) + for _, reactor := range c.ProxyReactionChain { + if !reactor.Handles(actionCopy) { + continue + } + + handled, ret, err := reactor.React(actionCopy) + if !handled || err != nil { + continue + } + + return ret + } + + return nil +} + +// ClearActions clears the history of actions called on the fake client. +func (c *Fake) ClearActions() { + c.Lock() + defer c.Unlock() + + c.actions = make([]Action, 0) +} + +// Actions returns a chronologically ordered slice fake actions called on the +// fake client. +func (c *Fake) Actions() []Action { + c.RLock() + defer c.RUnlock() + fa := make([]Action, len(c.actions)) + copy(fa, c.actions) + return fa +} diff --git a/vendor/k8s.io/client-go/testing/fixture.go b/vendor/k8s.io/client-go/testing/fixture.go new file mode 100644 index 0000000000..396840670f --- /dev/null +++ b/vendor/k8s.io/client-go/testing/fixture.go @@ -0,0 +1,581 @@ +/* +Copyright 2015 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 testing + +import ( + "fmt" + "reflect" + "sort" + "strings" + "sync" + + jsonpatch "github.com/evanphx/json-patch" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/json" + "k8s.io/apimachinery/pkg/util/strategicpatch" + "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" +) + +// ObjectTracker keeps track of objects. It is intended to be used to +// fake calls to a server by returning objects based on their kind, +// namespace and name. +type ObjectTracker interface { + // Add adds an object to the tracker. If object being added + // is a list, its items are added separately. + Add(obj runtime.Object) error + + // Get retrieves the object by its kind, namespace and name. + Get(gvr schema.GroupVersionResource, ns, name string) (runtime.Object, error) + + // Create adds an object to the tracker in the specified namespace. + Create(gvr schema.GroupVersionResource, obj runtime.Object, ns string) error + + // Update updates an existing object in the tracker in the specified namespace. + Update(gvr schema.GroupVersionResource, obj runtime.Object, ns string) error + + // List retrieves all objects of a given kind in the given + // namespace. Only non-List kinds are accepted. + List(gvr schema.GroupVersionResource, gvk schema.GroupVersionKind, ns string) (runtime.Object, error) + + // Delete deletes an existing object from the tracker. If object + // didn't exist in the tracker prior to deletion, Delete returns + // no error. + Delete(gvr schema.GroupVersionResource, ns, name string) error + + // Watch watches objects from the tracker. Watch returns a channel + // which will push added / modified / deleted object. + Watch(gvr schema.GroupVersionResource, ns string) (watch.Interface, error) +} + +// ObjectScheme abstracts the implementation of common operations on objects. +type ObjectScheme interface { + runtime.ObjectCreater + runtime.ObjectTyper +} + +// ObjectReaction returns a ReactionFunc that applies core.Action to +// the given tracker. +func ObjectReaction(tracker ObjectTracker) ReactionFunc { + return func(action Action) (bool, runtime.Object, error) { + ns := action.GetNamespace() + gvr := action.GetResource() + // Here and below we need to switch on implementation types, + // not on interfaces, as some interfaces are identical + // (e.g. UpdateAction and CreateAction), so if we use them, + // updates and creates end up matching the same case branch. + switch action := action.(type) { + + case ListActionImpl: + obj, err := tracker.List(gvr, action.GetKind(), ns) + return true, obj, err + + case GetActionImpl: + obj, err := tracker.Get(gvr, ns, action.GetName()) + return true, obj, err + + case CreateActionImpl: + objMeta, err := meta.Accessor(action.GetObject()) + if err != nil { + return true, nil, err + } + if action.GetSubresource() == "" { + err = tracker.Create(gvr, action.GetObject(), ns) + } else { + oldObj, getOldObjErr := tracker.Get(gvr, ns, objMeta.GetName()) + if getOldObjErr != nil { + return true, nil, getOldObjErr + } + // Check whether the existing historical object type is the same as the current operation object type that needs to be updated, and if it is the same, perform the update operation. + if reflect.TypeOf(oldObj) == reflect.TypeOf(action.GetObject()) { + // TODO: Currently we're handling subresource creation as an update + // on the enclosing resource. This works for some subresources but + // might not be generic enough. + err = tracker.Update(gvr, action.GetObject(), ns) + } else { + // If the historical object type is different from the current object type, need to make sure we return the object submitted,don't persist the submitted object in the tracker. + return true, action.GetObject(), nil + } + } + if err != nil { + return true, nil, err + } + obj, err := tracker.Get(gvr, ns, objMeta.GetName()) + return true, obj, err + + case UpdateActionImpl: + objMeta, err := meta.Accessor(action.GetObject()) + if err != nil { + return true, nil, err + } + err = tracker.Update(gvr, action.GetObject(), ns) + if err != nil { + return true, nil, err + } + obj, err := tracker.Get(gvr, ns, objMeta.GetName()) + return true, obj, err + + case DeleteActionImpl: + err := tracker.Delete(gvr, ns, action.GetName()) + if err != nil { + return true, nil, err + } + return true, nil, nil + + case PatchActionImpl: + obj, err := tracker.Get(gvr, ns, action.GetName()) + if err != nil { + return true, nil, err + } + + old, err := json.Marshal(obj) + if err != nil { + return true, nil, err + } + + // reset the object in preparation to unmarshal, since unmarshal does not guarantee that fields + // in obj that are removed by patch are cleared + value := reflect.ValueOf(obj) + value.Elem().Set(reflect.New(value.Type().Elem()).Elem()) + + switch action.GetPatchType() { + case types.JSONPatchType: + patch, err := jsonpatch.DecodePatch(action.GetPatch()) + if err != nil { + return true, nil, err + } + modified, err := patch.Apply(old) + if err != nil { + return true, nil, err + } + + if err = json.Unmarshal(modified, obj); err != nil { + return true, nil, err + } + case types.MergePatchType: + modified, err := jsonpatch.MergePatch(old, action.GetPatch()) + if err != nil { + return true, nil, err + } + + if err := json.Unmarshal(modified, obj); err != nil { + return true, nil, err + } + case types.StrategicMergePatchType, types.ApplyPatchType: + mergedByte, err := strategicpatch.StrategicMergePatch(old, action.GetPatch(), obj) + if err != nil { + return true, nil, err + } + if err = json.Unmarshal(mergedByte, obj); err != nil { + return true, nil, err + } + default: + return true, nil, fmt.Errorf("PatchType is not supported") + } + + if err = tracker.Update(gvr, obj, ns); err != nil { + return true, nil, err + } + + return true, obj, nil + + default: + return false, nil, fmt.Errorf("no reaction implemented for %s", action) + } + } +} + +type tracker struct { + scheme ObjectScheme + decoder runtime.Decoder + lock sync.RWMutex + objects map[schema.GroupVersionResource]map[types.NamespacedName]runtime.Object + // The value type of watchers is a map of which the key is either a namespace or + // all/non namespace aka "" and its value is list of fake watchers. + // Manipulations on resources will broadcast the notification events into the + // watchers' channel. Note that too many unhandled events (currently 100, + // see apimachinery/pkg/watch.DefaultChanSize) will cause a panic. + watchers map[schema.GroupVersionResource]map[string][]*watch.RaceFreeFakeWatcher +} + +var _ ObjectTracker = &tracker{} + +// NewObjectTracker returns an ObjectTracker that can be used to keep track +// of objects for the fake clientset. Mostly useful for unit tests. +func NewObjectTracker(scheme ObjectScheme, decoder runtime.Decoder) ObjectTracker { + return &tracker{ + scheme: scheme, + decoder: decoder, + objects: make(map[schema.GroupVersionResource]map[types.NamespacedName]runtime.Object), + watchers: make(map[schema.GroupVersionResource]map[string][]*watch.RaceFreeFakeWatcher), + } +} + +func (t *tracker) List(gvr schema.GroupVersionResource, gvk schema.GroupVersionKind, ns string) (runtime.Object, error) { + // Heuristic for list kind: original kind + List suffix. Might + // not always be true but this tracker has a pretty limited + // understanding of the actual API model. + listGVK := gvk + listGVK.Kind = listGVK.Kind + "List" + // GVK does have the concept of "internal version". The scheme recognizes + // the runtime.APIVersionInternal, but not the empty string. + if listGVK.Version == "" { + listGVK.Version = runtime.APIVersionInternal + } + + list, err := t.scheme.New(listGVK) + if err != nil { + return nil, err + } + + if !meta.IsListType(list) { + return nil, fmt.Errorf("%q is not a list type", listGVK.Kind) + } + + t.lock.RLock() + defer t.lock.RUnlock() + + objs, ok := t.objects[gvr] + if !ok { + return list, nil + } + + matchingObjs, err := filterByNamespace(objs, ns) + if err != nil { + return nil, err + } + if err := meta.SetList(list, matchingObjs); err != nil { + return nil, err + } + return list.DeepCopyObject(), nil +} + +func (t *tracker) Watch(gvr schema.GroupVersionResource, ns string) (watch.Interface, error) { + t.lock.Lock() + defer t.lock.Unlock() + + fakewatcher := watch.NewRaceFreeFake() + + if _, exists := t.watchers[gvr]; !exists { + t.watchers[gvr] = make(map[string][]*watch.RaceFreeFakeWatcher) + } + t.watchers[gvr][ns] = append(t.watchers[gvr][ns], fakewatcher) + return fakewatcher, nil +} + +func (t *tracker) Get(gvr schema.GroupVersionResource, ns, name string) (runtime.Object, error) { + errNotFound := errors.NewNotFound(gvr.GroupResource(), name) + + t.lock.RLock() + defer t.lock.RUnlock() + + objs, ok := t.objects[gvr] + if !ok { + return nil, errNotFound + } + + matchingObj, ok := objs[types.NamespacedName{Namespace: ns, Name: name}] + if !ok { + return nil, errNotFound + } + + // Only one object should match in the tracker if it works + // correctly, as Add/Update methods enforce kind/namespace/name + // uniqueness. + obj := matchingObj.DeepCopyObject() + if status, ok := obj.(*metav1.Status); ok { + if status.Status != metav1.StatusSuccess { + return nil, &errors.StatusError{ErrStatus: *status} + } + } + + return obj, nil +} + +func (t *tracker) Add(obj runtime.Object) error { + if meta.IsListType(obj) { + return t.addList(obj, false) + } + objMeta, err := meta.Accessor(obj) + if err != nil { + return err + } + gvks, _, err := t.scheme.ObjectKinds(obj) + if err != nil { + return err + } + + if partial, ok := obj.(*metav1.PartialObjectMetadata); ok && len(partial.TypeMeta.APIVersion) > 0 { + gvks = []schema.GroupVersionKind{partial.TypeMeta.GroupVersionKind()} + } + + if len(gvks) == 0 { + return fmt.Errorf("no registered kinds for %v", obj) + } + for _, gvk := range gvks { + // NOTE: UnsafeGuessKindToResource is a heuristic and default match. The + // actual registration in apiserver can specify arbitrary route for a + // gvk. If a test uses such objects, it cannot preset the tracker with + // objects via Add(). Instead, it should trigger the Create() function + // of the tracker, where an arbitrary gvr can be specified. + gvr, _ := meta.UnsafeGuessKindToResource(gvk) + // Resource doesn't have the concept of "__internal" version, just set it to "". + if gvr.Version == runtime.APIVersionInternal { + gvr.Version = "" + } + + err := t.add(gvr, obj, objMeta.GetNamespace(), false) + if err != nil { + return err + } + } + return nil +} + +func (t *tracker) Create(gvr schema.GroupVersionResource, obj runtime.Object, ns string) error { + return t.add(gvr, obj, ns, false) +} + +func (t *tracker) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns string) error { + return t.add(gvr, obj, ns, true) +} + +func (t *tracker) getWatches(gvr schema.GroupVersionResource, ns string) []*watch.RaceFreeFakeWatcher { + watches := []*watch.RaceFreeFakeWatcher{} + if t.watchers[gvr] != nil { + if w := t.watchers[gvr][ns]; w != nil { + watches = append(watches, w...) + } + if ns != metav1.NamespaceAll { + if w := t.watchers[gvr][metav1.NamespaceAll]; w != nil { + watches = append(watches, w...) + } + } + } + return watches +} + +func (t *tracker) add(gvr schema.GroupVersionResource, obj runtime.Object, ns string, replaceExisting bool) error { + t.lock.Lock() + defer t.lock.Unlock() + + gr := gvr.GroupResource() + + // To avoid the object from being accidentally modified by caller + // after it's been added to the tracker, we always store the deep + // copy. + obj = obj.DeepCopyObject() + + newMeta, err := meta.Accessor(obj) + if err != nil { + return err + } + + // Propagate namespace to the new object if hasn't already been set. + if len(newMeta.GetNamespace()) == 0 { + newMeta.SetNamespace(ns) + } + + if ns != newMeta.GetNamespace() { + msg := fmt.Sprintf("request namespace does not match object namespace, request: %q object: %q", ns, newMeta.GetNamespace()) + return errors.NewBadRequest(msg) + } + + _, ok := t.objects[gvr] + if !ok { + t.objects[gvr] = make(map[types.NamespacedName]runtime.Object) + } + + namespacedName := types.NamespacedName{Namespace: newMeta.GetNamespace(), Name: newMeta.GetName()} + if _, ok = t.objects[gvr][namespacedName]; ok { + if replaceExisting { + for _, w := range t.getWatches(gvr, ns) { + // To avoid the object from being accidentally modified by watcher + w.Modify(obj.DeepCopyObject()) + } + t.objects[gvr][namespacedName] = obj + return nil + } + return errors.NewAlreadyExists(gr, newMeta.GetName()) + } + + if replaceExisting { + // Tried to update but no matching object was found. + return errors.NewNotFound(gr, newMeta.GetName()) + } + + t.objects[gvr][namespacedName] = obj + + for _, w := range t.getWatches(gvr, ns) { + // To avoid the object from being accidentally modified by watcher + w.Add(obj.DeepCopyObject()) + } + + return nil +} + +func (t *tracker) addList(obj runtime.Object, replaceExisting bool) error { + list, err := meta.ExtractList(obj) + if err != nil { + return err + } + errs := runtime.DecodeList(list, t.decoder) + if len(errs) > 0 { + return errs[0] + } + for _, obj := range list { + if err := t.Add(obj); err != nil { + return err + } + } + return nil +} + +func (t *tracker) Delete(gvr schema.GroupVersionResource, ns, name string) error { + t.lock.Lock() + defer t.lock.Unlock() + + objs, ok := t.objects[gvr] + if !ok { + return errors.NewNotFound(gvr.GroupResource(), name) + } + + namespacedName := types.NamespacedName{Namespace: ns, Name: name} + obj, ok := objs[namespacedName] + if !ok { + return errors.NewNotFound(gvr.GroupResource(), name) + } + + delete(objs, namespacedName) + for _, w := range t.getWatches(gvr, ns) { + w.Delete(obj.DeepCopyObject()) + } + return nil +} + +// filterByNamespace returns all objects in the collection that +// match provided namespace. Empty namespace matches +// non-namespaced objects. +func filterByNamespace(objs map[types.NamespacedName]runtime.Object, ns string) ([]runtime.Object, error) { + var res []runtime.Object + + for _, obj := range objs { + acc, err := meta.Accessor(obj) + if err != nil { + return nil, err + } + if ns != "" && acc.GetNamespace() != ns { + continue + } + res = append(res, obj) + } + + // Sort res to get deterministic order. + sort.Slice(res, func(i, j int) bool { + acc1, _ := meta.Accessor(res[i]) + acc2, _ := meta.Accessor(res[j]) + if acc1.GetNamespace() != acc2.GetNamespace() { + return acc1.GetNamespace() < acc2.GetNamespace() + } + return acc1.GetName() < acc2.GetName() + }) + return res, nil +} + +func DefaultWatchReactor(watchInterface watch.Interface, err error) WatchReactionFunc { + return func(action Action) (bool, watch.Interface, error) { + return true, watchInterface, err + } +} + +// SimpleReactor is a Reactor. Each reaction function is attached to a given verb,resource tuple. "*" in either field matches everything for that value. +// For instance, *,pods matches all verbs on pods. This allows for easier composition of reaction functions +type SimpleReactor struct { + Verb string + Resource string + + Reaction ReactionFunc +} + +func (r *SimpleReactor) Handles(action Action) bool { + verbCovers := r.Verb == "*" || r.Verb == action.GetVerb() + if !verbCovers { + return false + } + + return resourceCovers(r.Resource, action) +} + +func (r *SimpleReactor) React(action Action) (bool, runtime.Object, error) { + return r.Reaction(action) +} + +// SimpleWatchReactor is a WatchReactor. Each reaction function is attached to a given resource. "*" matches everything for that value. +// For instance, *,pods matches all verbs on pods. This allows for easier composition of reaction functions +type SimpleWatchReactor struct { + Resource string + + Reaction WatchReactionFunc +} + +func (r *SimpleWatchReactor) Handles(action Action) bool { + return resourceCovers(r.Resource, action) +} + +func (r *SimpleWatchReactor) React(action Action) (bool, watch.Interface, error) { + return r.Reaction(action) +} + +// SimpleProxyReactor is a ProxyReactor. Each reaction function is attached to a given resource. "*" matches everything for that value. +// For instance, *,pods matches all verbs on pods. This allows for easier composition of reaction functions. +type SimpleProxyReactor struct { + Resource string + + Reaction ProxyReactionFunc +} + +func (r *SimpleProxyReactor) Handles(action Action) bool { + return resourceCovers(r.Resource, action) +} + +func (r *SimpleProxyReactor) React(action Action) (bool, restclient.ResponseWrapper, error) { + return r.Reaction(action) +} + +func resourceCovers(resource string, action Action) bool { + if resource == "*" { + return true + } + + if resource == action.GetResource().Resource { + return true + } + + if index := strings.Index(resource, "/"); index != -1 && + resource[:index] == action.GetResource().Resource && + resource[index+1:] == action.GetSubresource() { + return true + } + + return false +} diff --git a/vendor/k8s.io/client-go/testing/interface.go b/vendor/k8s.io/client-go/testing/interface.go new file mode 100644 index 0000000000..266c6ba3f5 --- /dev/null +++ b/vendor/k8s.io/client-go/testing/interface.go @@ -0,0 +1,66 @@ +/* +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 testing + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" +) + +type FakeClient interface { + // Tracker gives access to the ObjectTracker internal to the fake client. + Tracker() ObjectTracker + + // AddReactor appends a reactor to the end of the chain. + AddReactor(verb, resource string, reaction ReactionFunc) + + // PrependReactor adds a reactor to the beginning of the chain. + PrependReactor(verb, resource string, reaction ReactionFunc) + + // AddWatchReactor appends a reactor to the end of the chain. + AddWatchReactor(resource string, reaction WatchReactionFunc) + + // PrependWatchReactor adds a reactor to the beginning of the chain. + PrependWatchReactor(resource string, reaction WatchReactionFunc) + + // AddProxyReactor appends a reactor to the end of the chain. + AddProxyReactor(resource string, reaction ProxyReactionFunc) + + // PrependProxyReactor adds a reactor to the beginning of the chain. + PrependProxyReactor(resource string, reaction ProxyReactionFunc) + + // Invokes records the provided Action and then invokes the ReactionFunc that + // handles the action if one exists. defaultReturnObj is expected to be of the + // same type a normal call would return. + Invokes(action Action, defaultReturnObj runtime.Object) (runtime.Object, error) + + // InvokesWatch records the provided Action and then invokes the ReactionFunc + // that handles the action if one exists. + InvokesWatch(action Action) (watch.Interface, error) + + // InvokesProxy records the provided Action and then invokes the ReactionFunc + // that handles the action if one exists. + InvokesProxy(action Action) restclient.ResponseWrapper + + // ClearActions clears the history of actions called on the fake client. + ClearActions() + + // Actions returns a chronologically ordered slice fake actions called on the + // fake client. + Actions() []Action +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 2b7f81be54..7867e66356 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -263,7 +263,7 @@ github.com/opencontainers/go-digest github.com/opencontainers/selinux/go-selinux github.com/opencontainers/selinux/pkg/pwalk github.com/opencontainers/selinux/pkg/pwalkdir -# github.com/oracle/oci-go-sdk/v65 v65.40.1 +# github.com/oracle/oci-go-sdk/v65 v65.49.2 ## explicit; go 1.13 github.com/oracle/oci-go-sdk/v65/common github.com/oracle/oci-go-sdk/v65/common/auth @@ -326,8 +326,6 @@ github.com/spf13/viper # github.com/stoewer/go-strcase v1.2.0 ## explicit; go 1.11 github.com/stoewer/go-strcase -# github.com/stretchr/testify v1.8.1 -## explicit; go 1.13 # github.com/subosito/gotenv v1.2.0 ## explicit github.com/subosito/gotenv @@ -470,8 +468,9 @@ golang.org/x/oauth2 golang.org/x/oauth2/internal # golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 ## explicit +golang.org/x/sync/semaphore golang.org/x/sync/singleflight -# golang.org/x/sys v0.6.0 +# golang.org/x/sys v0.8.0 ## explicit; go 1.17 golang.org/x/sys/cpu golang.org/x/sys/execabs @@ -961,6 +960,7 @@ k8s.io/client-go/applyconfigurations/storage/v1beta1 k8s.io/client-go/discovery k8s.io/client-go/discovery/cached k8s.io/client-go/discovery/cached/memory +k8s.io/client-go/discovery/fake k8s.io/client-go/dynamic k8s.io/client-go/dynamic/dynamicinformer k8s.io/client-go/dynamic/dynamiclister @@ -1031,57 +1031,108 @@ k8s.io/client-go/informers/storage/v1 k8s.io/client-go/informers/storage/v1alpha1 k8s.io/client-go/informers/storage/v1beta1 k8s.io/client-go/kubernetes +k8s.io/client-go/kubernetes/fake k8s.io/client-go/kubernetes/scheme k8s.io/client-go/kubernetes/typed/admissionregistration/v1 +k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1 +k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1 +k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1 +k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake k8s.io/client-go/kubernetes/typed/apps/v1 +k8s.io/client-go/kubernetes/typed/apps/v1/fake k8s.io/client-go/kubernetes/typed/apps/v1beta1 +k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake k8s.io/client-go/kubernetes/typed/apps/v1beta2 +k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake k8s.io/client-go/kubernetes/typed/authentication/v1 +k8s.io/client-go/kubernetes/typed/authentication/v1/fake k8s.io/client-go/kubernetes/typed/authentication/v1alpha1 +k8s.io/client-go/kubernetes/typed/authentication/v1alpha1/fake k8s.io/client-go/kubernetes/typed/authentication/v1beta1 +k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake k8s.io/client-go/kubernetes/typed/authorization/v1 +k8s.io/client-go/kubernetes/typed/authorization/v1/fake k8s.io/client-go/kubernetes/typed/authorization/v1beta1 +k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake k8s.io/client-go/kubernetes/typed/autoscaling/v1 +k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake k8s.io/client-go/kubernetes/typed/autoscaling/v2 +k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1 +k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2 +k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake k8s.io/client-go/kubernetes/typed/batch/v1 +k8s.io/client-go/kubernetes/typed/batch/v1/fake k8s.io/client-go/kubernetes/typed/batch/v1beta1 +k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake k8s.io/client-go/kubernetes/typed/certificates/v1 +k8s.io/client-go/kubernetes/typed/certificates/v1/fake k8s.io/client-go/kubernetes/typed/certificates/v1beta1 +k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake k8s.io/client-go/kubernetes/typed/coordination/v1 +k8s.io/client-go/kubernetes/typed/coordination/v1/fake k8s.io/client-go/kubernetes/typed/coordination/v1beta1 +k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake k8s.io/client-go/kubernetes/typed/core/v1 +k8s.io/client-go/kubernetes/typed/core/v1/fake k8s.io/client-go/kubernetes/typed/discovery/v1 +k8s.io/client-go/kubernetes/typed/discovery/v1/fake k8s.io/client-go/kubernetes/typed/discovery/v1beta1 +k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake k8s.io/client-go/kubernetes/typed/events/v1 +k8s.io/client-go/kubernetes/typed/events/v1/fake k8s.io/client-go/kubernetes/typed/events/v1beta1 +k8s.io/client-go/kubernetes/typed/events/v1beta1/fake k8s.io/client-go/kubernetes/typed/extensions/v1beta1 +k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1 +k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1 +k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2 +k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3 +k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/fake k8s.io/client-go/kubernetes/typed/networking/v1 +k8s.io/client-go/kubernetes/typed/networking/v1/fake k8s.io/client-go/kubernetes/typed/networking/v1alpha1 +k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake k8s.io/client-go/kubernetes/typed/networking/v1beta1 +k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake k8s.io/client-go/kubernetes/typed/node/v1 +k8s.io/client-go/kubernetes/typed/node/v1/fake k8s.io/client-go/kubernetes/typed/node/v1alpha1 +k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake k8s.io/client-go/kubernetes/typed/node/v1beta1 +k8s.io/client-go/kubernetes/typed/node/v1beta1/fake k8s.io/client-go/kubernetes/typed/policy/v1 +k8s.io/client-go/kubernetes/typed/policy/v1/fake k8s.io/client-go/kubernetes/typed/policy/v1beta1 +k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake k8s.io/client-go/kubernetes/typed/rbac/v1 +k8s.io/client-go/kubernetes/typed/rbac/v1/fake k8s.io/client-go/kubernetes/typed/rbac/v1alpha1 +k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake k8s.io/client-go/kubernetes/typed/rbac/v1beta1 +k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake k8s.io/client-go/kubernetes/typed/resource/v1alpha1 +k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake k8s.io/client-go/kubernetes/typed/scheduling/v1 +k8s.io/client-go/kubernetes/typed/scheduling/v1/fake k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1 +k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake k8s.io/client-go/kubernetes/typed/scheduling/v1beta1 +k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake k8s.io/client-go/kubernetes/typed/storage/v1 +k8s.io/client-go/kubernetes/typed/storage/v1/fake k8s.io/client-go/kubernetes/typed/storage/v1alpha1 +k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake k8s.io/client-go/kubernetes/typed/storage/v1beta1 +k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake k8s.io/client-go/listers/admissionregistration/v1 k8s.io/client-go/listers/admissionregistration/v1alpha1 k8s.io/client-go/listers/admissionregistration/v1beta1 @@ -1139,6 +1190,7 @@ k8s.io/client-go/pkg/apis/clientauthentication/v1beta1 k8s.io/client-go/pkg/version k8s.io/client-go/plugin/pkg/client/auth/exec k8s.io/client-go/rest +k8s.io/client-go/rest/fake k8s.io/client-go/rest/watch k8s.io/client-go/restmapper k8s.io/client-go/scale @@ -1149,6 +1201,7 @@ k8s.io/client-go/scale/scheme/appsv1beta2 k8s.io/client-go/scale/scheme/autoscalingv1 k8s.io/client-go/scale/scheme/extensionsint k8s.io/client-go/scale/scheme/extensionsv1beta1 +k8s.io/client-go/testing k8s.io/client-go/tools/auth k8s.io/client-go/tools/cache k8s.io/client-go/tools/clientcmd