├── .editorconfig ├── .github ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE ├── PULL_REQUEST_TEMPLATE └── workflows │ ├── automerge.yaml │ └── ci.yaml ├── .gitignore ├── .golangci.yaml ├── .old_zuul.yaml ├── CHANGELOG.md ├── CODEOWNERS ├── FAQ.md ├── LICENSE ├── MIGRATING.md ├── Makefile ├── README.md ├── STYLEGUIDE.md ├── acceptance ├── README.md ├── clients │ └── clients.go ├── openstack │ ├── apigw │ │ └── v2 │ │ │ ├── acl_policy_test.go │ │ │ ├── api_test.go │ │ │ ├── app_auth_test.go │ │ │ ├── app_code_test.go │ │ │ ├── app_test.go │ │ │ ├── authorizer_test.go │ │ │ ├── cert_test.go │ │ │ ├── channel_test.go │ │ │ ├── domain_test.go │ │ │ ├── env_test.go │ │ │ ├── env_vars_test.go │ │ │ ├── gateway_test.go │ │ │ ├── group_test.go │ │ │ ├── response_test.go │ │ │ ├── signature_key_test.go │ │ │ ├── special_throttle_test.go │ │ │ └── throttling_policy_test.go │ ├── autoscaling │ │ ├── helpers.go │ │ ├── v1 │ │ │ ├── configurations_test.go │ │ │ ├── groups_test.go │ │ │ ├── instances_test.go │ │ │ ├── lifecycle_hooks_test.go │ │ │ └── policies_test.go │ │ └── v2 │ │ │ └── policies_test.go │ ├── cbr │ │ └── v3 │ │ │ ├── backups_test.go │ │ │ ├── helpers.go │ │ │ ├── policies_test.go │ │ │ ├── tags_test.go │ │ │ ├── tasks_test.go │ │ │ └── vaults_test.go │ ├── cce │ │ ├── helpers.go │ │ ├── v1 │ │ │ └── nodes_test.go │ │ └── v3 │ │ │ ├── addnode_test.go │ │ │ ├── addons_test.go │ │ │ ├── clusters_test.go │ │ │ ├── kubeconfig_test.go │ │ │ ├── nodepool_test.go │ │ │ └── nodes_test.go │ ├── cci │ │ └── v2 │ │ │ ├── configmap_test.go │ │ │ ├── namespace_test.go │ │ │ ├── network_test.go │ │ │ ├── pod_test.go │ │ │ └── secret_test.go │ ├── ces │ │ └── v1 │ │ │ ├── alarms_test.go │ │ │ ├── events_test.go │ │ │ ├── metricdata_test.go │ │ │ ├── metrics_test.go │ │ │ └── quotas_test.go │ ├── cfw │ │ ├── acl │ │ │ └── acl_test.go │ │ ├── addressgroup │ │ │ └── addressgroup_test.go │ │ ├── blackwhitelist │ │ │ └── blackwhitelist_test.go │ │ ├── dns │ │ │ └── dns_test.go │ │ ├── eip │ │ │ └── eip_test.go │ │ ├── helper.go │ │ ├── ips │ │ │ └── ips_test.go │ │ ├── management │ │ │ └── firewall_test.go │ │ └── servicegroup │ │ │ └── servicegroup_test.go │ ├── client_test.go │ ├── common.go │ ├── compute │ │ └── v2 │ │ │ └── servers_test.go │ ├── csbs │ │ └── v1 │ │ │ ├── backup_test.go │ │ │ ├── common.go │ │ │ └── policies_test.go │ ├── css │ │ └── v1 │ │ │ ├── certificates_test.go │ │ │ ├── change_cluser_name_test.go │ │ │ ├── change_password_test.go │ │ │ ├── cluster_add_nodes_test.go │ │ │ ├── cluster_scale_in_test.go │ │ │ ├── cluster_update_flavor_test.go │ │ │ ├── cluster_update_sg_test.go │ │ │ ├── cluster_update_sm_test.go │ │ │ ├── clusters_test.go │ │ │ ├── configurations_test.go │ │ │ ├── flavors_test.go │ │ │ ├── restart_cluster_test.go │ │ │ └── snapshots_test.go │ ├── cts │ │ ├── helpers.go │ │ ├── v1 │ │ │ └── trackers_test.go │ │ ├── v2 │ │ │ └── traces_test.go │ │ └── v3 │ │ │ ├── keyevents_test.go │ │ │ └── trackers_test.go │ ├── dataarts │ │ ├── v1.1 │ │ │ ├── clusters_test.go │ │ │ ├── helpers.go │ │ │ └── links_test.go │ │ └── v1 │ │ │ ├── connections_test.go │ │ │ ├── jobs_execution_test.go │ │ │ ├── jobs_test.go │ │ │ ├── resources_test.go │ │ │ └── scripts_test.go │ ├── dcaas │ │ ├── v2 │ │ │ ├── dcaas_acc_test.go │ │ │ ├── direct_connect_endpoint_group_test.go │ │ │ ├── direct_connect_test.go │ │ │ ├── virtual_gateway_test.go │ │ │ └── virtual_interface_test.go │ │ └── v3 │ │ │ ├── hosted_connect_test.go │ │ │ ├── virtual_gateway_test.go │ │ │ └── virtual_interface_test.go │ ├── dcs │ │ ├── v1 │ │ │ ├── backup_test.go │ │ │ ├── configs_test.go │ │ │ └── helpers.go │ │ └── v2 │ │ │ ├── configs_test.go │ │ │ ├── helpers.go │ │ │ ├── instance_test.go │ │ │ └── ssl_test.go │ ├── ddm │ │ ├── v1 │ │ │ ├── helper.go │ │ │ ├── instances_test.go │ │ │ └── schemas_test.go │ │ ├── v2 │ │ │ └── instances_test.go │ │ └── v3 │ │ │ ├── accounts_test.go │ │ │ └── instances_test.go │ ├── dds │ │ └── v3 │ │ │ ├── backups_test.go │ │ │ ├── configuration_test.go │ │ │ ├── flavors_test.go │ │ │ ├── instances_test.go │ │ │ └── restore_test.go │ ├── dis │ │ └── v2 │ │ │ └── dis_test.go │ ├── dms │ │ ├── v1 │ │ │ └── instances_test.go │ │ └── v2 │ │ │ ├── instances_management_test.go │ │ │ ├── instances_old_test.go │ │ │ ├── instances_smart_connect_test.go │ │ │ ├── instances_test.go │ │ │ ├── products_test.go │ │ │ └── users_test.go │ ├── dns │ │ └── zones_test.go │ ├── drs │ │ └── v3 │ │ │ └── tasks_test.go │ ├── dws │ │ ├── v1 │ │ │ └── dws_test.go │ │ └── v2 │ │ │ └── node_types_test.go │ ├── ecs │ │ └── v1 │ │ │ └── cloudservers_test.go │ ├── elb │ │ └── v3 │ │ │ ├── certificates_test.go │ │ │ ├── flavors_test.go │ │ │ ├── helpers.go │ │ │ ├── ipgroups_test.go │ │ │ ├── listeners_test.go │ │ │ ├── loadbalancers_test.go │ │ │ ├── logs_test.go │ │ │ ├── members_test.go │ │ │ ├── monitors_test.go │ │ │ ├── policies_test.go │ │ │ ├── pools_test.go │ │ │ ├── rules_test.go │ │ │ └── security_policy_test.go │ ├── er │ │ ├── associations_test.go │ │ ├── flow_logs_test.go │ │ ├── helpers.go │ │ ├── propagations_test.go │ │ ├── route_tables_test.go │ │ ├── router_test.go │ │ ├── routes_test.go │ │ └── vpc_attachments_test.go │ ├── evpn │ │ ├── connection_test.go │ │ ├── customer_gateway_test.go │ │ └── gateway_test.go │ ├── evs │ │ └── v2 │ │ │ └── evs_test.go │ ├── fgs │ │ └── v2 │ │ │ ├── alias_test.go │ │ │ ├── async_invoke_test.go │ │ │ ├── events_test.go │ │ │ ├── functiongraph_test.go │ │ │ ├── invocation_test.go │ │ │ ├── quota_test.go │ │ │ ├── reserved_test.go │ │ │ ├── tags_test.go │ │ │ ├── trigger_test.go │ │ │ └── utils_test.go │ ├── gaussdb │ │ └── v3 │ │ │ └── db_test.go │ ├── hss │ │ └── v5 │ │ │ ├── event_test.go │ │ │ └── server_group_test.go │ ├── identity │ │ ├── v3.0 │ │ │ ├── acl_test.go │ │ │ ├── agency_test.go │ │ │ ├── critical_operations_test.go │ │ │ └── users_test.go │ │ └── v3 │ │ │ ├── agency_test.go │ │ │ ├── catalog_test.go │ │ │ ├── domains_test.go │ │ │ ├── endpoint_test.go │ │ │ ├── fed_mappings_test.go │ │ │ ├── fed_providers_test.go │ │ │ ├── groups_test.go │ │ │ ├── identity.go │ │ │ ├── pkg.go │ │ │ ├── policies_test.go │ │ │ ├── projects_test.go │ │ │ ├── regions_test.go │ │ │ ├── roles_test.go │ │ │ ├── service_test.go │ │ │ ├── token_test.go │ │ │ └── users_test.go │ ├── ims │ │ ├── common.go │ │ ├── create_image_from_ECS_test.go │ │ ├── create_image_obs_test.go │ │ ├── create_whole_image_from_ECS_test.go │ │ └── members_test.go │ ├── kms │ │ └── v1 │ │ │ ├── grants_test.go │ │ │ └── keys_test.go │ ├── lts │ │ └── v2 │ │ │ ├── lts_alarm_test.go │ │ │ ├── lts_host_access_test.go │ │ │ ├── lts_host_test.go │ │ │ ├── lts_log_collection_test.go │ │ │ ├── lts_message_template_test.go │ │ │ ├── lts_quick_search_test.go │ │ │ ├── lts_structuring_test.go │ │ │ ├── lts_test.go │ │ │ └── lts_transfer_test.go │ ├── mrs │ │ └── v1 │ │ │ └── clusters_test.go │ ├── networking │ │ ├── v1 │ │ │ ├── bandwidths_test.go │ │ │ ├── eips_test.go │ │ │ ├── helpers.go │ │ │ ├── routetables_test.go │ │ │ ├── subnet_test.go │ │ │ └── vpc_test.go │ │ └── v2 │ │ │ ├── bandwidths_test.go │ │ │ ├── extensions │ │ │ ├── dnatrulest_test.go │ │ │ ├── helpers.go │ │ │ ├── lbaas_v2 │ │ │ │ ├── certificates_test.go │ │ │ │ ├── helpers.go │ │ │ │ └── monitors_test.go │ │ │ ├── natgateways_test.go │ │ │ ├── snatrules_test.go │ │ │ └── vpnaas │ │ │ │ └── ikepolicies_test.go │ │ │ ├── fw_rule_test.go │ │ │ ├── peering │ │ │ ├── peerings.go │ │ │ └── peerings_test.go │ │ │ ├── routes │ │ │ ├── route.go │ │ │ └── route_test.go │ │ │ └── sgs │ │ │ └── sg_test.go │ ├── obs │ │ └── v1 │ │ │ ├── bucket │ │ │ ├── obs_acl_test.go │ │ │ ├── obs_bucket_test.go │ │ │ ├── obs_custom_domain_test.go │ │ │ ├── obs_inventory_test.go │ │ │ ├── obs_lifecycle_test.go │ │ │ ├── obs_policy_test.go │ │ │ ├── obs_replication_test.go │ │ │ └── obs_worm_policy_test.go │ │ │ └── object │ │ │ └── obs_acl_test.go │ ├── pkg.go │ ├── rds │ │ └── v3 │ │ │ ├── configurations_test.go │ │ │ ├── flavors_test.go │ │ │ ├── helpers.go │ │ │ └── rds_test.go │ ├── rms │ │ └── v1 │ │ │ ├── advanced_queries_test.go │ │ │ ├── compliance_test.go │ │ │ ├── history_test.go │ │ │ ├── query_test.go │ │ │ ├── recorder_test.go │ │ │ ├── regions_test.go │ │ │ └── relations_test.go │ ├── sdrs │ │ └── v1 │ │ │ ├── helpers.go │ │ │ └── protectedinstances_test.go │ ├── sfs_turbo │ │ └── v1 │ │ │ ├── helpers.go │ │ │ └── sfs_turbo_test.go │ ├── smn │ │ └── v2 │ │ │ ├── helpers.go │ │ │ ├── subscriptions_test.go │ │ │ └── topicattributes_test.go │ ├── swr │ │ └── v2 │ │ │ ├── common.go │ │ │ ├── domain_test.go │ │ │ ├── organizations_test.go │ │ │ └── repositories_test.go │ ├── tms │ │ └── tags_test.go │ ├── vbs │ │ └── v2 │ │ │ └── backups_test.go │ ├── vpc │ │ ├── v1 │ │ │ ├── eip_test.go │ │ │ └── vpc_test.go │ │ └── v3 │ │ │ └── vpc_test.go │ ├── vpcep │ │ ├── endpoints_test.go │ │ └── services_test.go │ ├── waf-premium │ │ └── v1 │ │ │ ├── certificate_test.go │ │ │ ├── helpers.go │ │ │ ├── host_test.go │ │ │ ├── instance_test.go │ │ │ ├── policy_test.go │ │ │ └── rule_test.go │ └── waf │ │ └── v1 │ │ ├── alarmnotifications_test.go │ │ ├── ccattackprotection_rules_test.go │ │ ├── certificates_test.go │ │ ├── datamasking_rules_test.go │ │ ├── domains_test.go │ │ └── webtamper_rules_test.go └── tools │ ├── pkg.go │ └── tools.go ├── auth_aksk_options.go ├── auth_option_provider.go ├── auth_options.go ├── doc.go ├── endpoint_search.go ├── errors.go ├── go.mod ├── go.sum ├── internal ├── build │ ├── doc.go │ ├── errs.go │ ├── headers.go │ ├── headers_test.go │ ├── query_string.go │ ├── query_string_test.go │ ├── request_body.go │ ├── request_body_test.go │ ├── tags.go │ └── tags_test.go ├── extract │ ├── doc.go │ ├── json.go │ └── json_test.go ├── multierr │ └── multierr.go ├── pkg.go ├── testing │ ├── pkg.go │ └── util_test.go └── util.go ├── openstack ├── antiddos │ └── v1 │ │ └── antiddos │ │ ├── API-en.md │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ ├── doc.go │ │ ├── fixtures.go │ │ └── requests_test.go │ │ └── url.go ├── apigw │ └── v2 │ │ ├── acl │ │ ├── BindPolicy.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── ListAPIBoundPolicy.go │ │ ├── ListAPIUnboundPolicy.go │ │ ├── ListBoundPolicies.go │ │ ├── UnbindPolicy.go │ │ └── Update.go │ │ ├── api │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── GetApiHistory.go │ │ ├── List.go │ │ ├── ManageApi.go │ │ ├── SwitchApiVersion.go │ │ └── Update.go │ │ ├── app │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── ResetSecret.go │ │ ├── Update.go │ │ └── VerifyApp.go │ │ ├── app_auth │ │ ├── CancelAuth.go │ │ ├── CreateAuth.go │ │ ├── GetBoundApis.go │ │ ├── GetBoundApps.go │ │ └── GetUnboundApis.go │ │ ├── app_code │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── GenerateAppCode.go │ │ ├── Get.go │ │ ├── List.go │ │ └── ListAppsCodes.go │ │ ├── authorizer │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go │ │ ├── cert │ │ ├── Bind.go │ │ ├── BindCertToDomain.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── Unbind.go │ │ ├── UnbindCertFromDomain.go │ │ └── Update.go │ │ ├── channel │ │ ├── AddMembers.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── DeleteMember.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── ListMembers.go │ │ ├── Update.go │ │ └── UpdateMembers.go │ │ ├── domain │ │ ├── AssignCertificate.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── GetCertificate.go │ │ ├── UnbindCertificate.go │ │ └── Update.go │ │ ├── env │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── List.go │ │ └── Update.go │ │ ├── env_vars │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ └── List.go │ │ ├── gateway │ │ ├── ConfigureFeature.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── DisableEIP.go │ │ ├── DisableIngressAccess.go │ │ ├── DisableIngressELB.go │ │ ├── EnableEIP.go │ │ ├── EnableIngressAccess.go │ │ ├── EnableIngressELB.go │ │ ├── Get.go │ │ ├── GetTags.go │ │ ├── List.go │ │ ├── ListGatewayFeatures.go │ │ ├── ListSupportedFeatures.go │ │ ├── QueryProgress.go │ │ ├── Update.go │ │ ├── UpdateEIP.go │ │ └── UpdateTags.go │ │ ├── group │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go │ │ ├── key │ │ ├── BindKey.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── List.go │ │ ├── ListAPIBoundKeys.go │ │ ├── ListAPIUnboundKeys.go │ │ ├── ListBoundKeys.go │ │ ├── UnbindKey.go │ │ └── Update.go │ │ ├── response │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── DeleteErrorType.go │ │ ├── Get.go │ │ ├── GetErrorType.go │ │ ├── List.go │ │ ├── Update.go │ │ └── UpdateErrorType.go │ │ ├── tr_policy │ │ ├── BindPolicy.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── ListAPIBoundPolicy.go │ │ ├── ListAPIUnboundPolicy.go │ │ ├── ListBoundPolicies.go │ │ ├── UnbindPolicy.go │ │ └── Update.go │ │ └── tr_specials │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── List.go │ │ └── Update.go ├── auth_env.go ├── autoscaling │ ├── v1 │ │ ├── configurations │ │ │ ├── BatchDeleteScalingConfigs.go │ │ │ ├── create.go │ │ │ ├── delete.go │ │ │ ├── get.go │ │ │ └── list.go │ │ ├── groups │ │ │ ├── action.go │ │ │ ├── create.go │ │ │ ├── delete.go │ │ │ ├── get.go │ │ │ ├── list.go │ │ │ ├── results.go │ │ │ └── update.go │ │ ├── instances │ │ │ ├── batch.go │ │ │ ├── delete.go │ │ │ └── list.go │ │ ├── lifecycle_hooks │ │ │ ├── Common.go │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── Get.go │ │ │ ├── List.go │ │ │ └── Update.go │ │ ├── policies │ │ │ ├── ListScalingPolicyExecuteLogs.go │ │ │ ├── action.go │ │ │ ├── batch_action.go │ │ │ ├── create.go │ │ │ ├── delete.go │ │ │ ├── get.go │ │ │ ├── list.go │ │ │ └── update.go │ │ ├── quotas │ │ │ ├── ShowPolicyAndInstanceQuota.go │ │ │ └── ShowResourceQuota.go │ │ └── tags │ │ │ ├── actions.go │ │ │ ├── get.go │ │ │ └── list.go │ └── v2 │ │ ├── logs │ │ └── ListScalingActivityLogs.go │ │ └── policies │ │ ├── create.go │ │ ├── delete.go │ │ ├── get.go │ │ └── update.go ├── blockstorage │ ├── v2 │ │ ├── snapshots │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ ├── urls.go │ │ │ └── util.go │ │ └── volumes │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ │ ├── urls.go │ │ │ └── util.go │ └── v3 │ │ ├── snapshots │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ ├── urls.go │ │ └── util.go │ │ ├── volumes │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ ├── urls.go │ │ └── util.go │ │ └── volumetypes │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ ├── doc.go │ │ ├── fixtures.go │ │ └── requests_test.go │ │ └── urls.go ├── bms │ └── v2 │ │ ├── flavors │ │ ├── list.go │ │ ├── results.go │ │ └── testing │ │ │ └── requests_test.go │ │ ├── keypairs │ │ ├── list.go │ │ ├── results.go │ │ └── testing │ │ │ └── requests_test.go │ │ ├── nics │ │ ├── get.go │ │ ├── list.go │ │ ├── results.go │ │ └── testing │ │ │ └── requests_test.go │ │ ├── servers │ │ ├── get.go │ │ ├── list.go │ │ ├── results.go │ │ └── testing │ │ │ └── requests_test.go │ │ └── tags │ │ ├── create.go │ │ ├── delete.go │ │ ├── get.go │ │ └── testing │ │ └── requests_test.go ├── cbr │ └── v3 │ │ ├── backups │ │ ├── AddSharingMember.go │ │ ├── Delete.go │ │ ├── DeleteSharingMember.go │ │ ├── Get.go │ │ ├── GetMember.go │ │ ├── List.go │ │ ├── ListSharingMembers.go │ │ ├── ReplicateBackup.go │ │ ├── RestoreBackup.go │ │ ├── UpdateSharingMember.go │ │ └── results.go │ │ ├── checkpoint │ │ ├── Create.go │ │ ├── Get.go │ │ └── Replicate.go │ │ ├── policies │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── Update.go │ │ ├── results.go │ │ └── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ ├── tags │ │ ├── ShowVaultResourceInstances.go │ │ └── Tag.go │ │ ├── tasks │ │ ├── Get.go │ │ ├── List.go │ │ └── results.go │ │ └── vaults │ │ ├── AssociateResources.go │ │ ├── BindPolicy.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── DissociateResources.go │ │ ├── Get.go │ │ ├── MigrateResources.go │ │ ├── UnbindPolicy.go │ │ ├── Update.go │ │ └── results.go ├── cce │ ├── v1 │ │ └── nodes │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ └── v3 │ │ ├── addons │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── GetTemplates.go │ │ ├── ListAddonInstances.go │ │ ├── ListTemplates.go │ │ ├── Update.go │ │ ├── WaitCompleteion.go │ │ └── common.go │ │ ├── clusters │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── GetCert.go │ │ ├── GetCertWithExpiration.go │ │ ├── List.go │ │ ├── Update.go │ │ ├── UpdateMasterIP.go │ │ ├── common.go │ │ └── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ ├── common │ │ └── common_tests.go │ │ ├── nodepools │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── Update.go │ │ ├── common.go │ │ └── doc.go │ │ └── nodes │ │ ├── AddNode.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── Job.go │ │ ├── List.go │ │ ├── RemoveNode.go │ │ ├── Reset.go │ │ ├── Update.go │ │ ├── common.go │ │ ├── doc.go │ │ └── testing │ │ ├── doc.go │ │ ├── fixtures.go │ │ └── requests_test.go ├── cci │ └── v2 │ │ ├── configmap │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── Update.go │ │ └── common.go │ │ ├── namespace │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── common.go │ │ ├── network │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Put.go │ │ ├── pod │ │ ├── ConnectGet.go │ │ ├── ConnectPost.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── Put.go │ │ └── common.go │ │ └── secret │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ └── Put.go ├── ces │ └── v1 │ │ ├── alarms │ │ ├── create_alarm.go │ │ ├── delete_alarm.go │ │ ├── list_alarms.go │ │ ├── results.go │ │ ├── show_alarm.go │ │ └── update_alarm_action.go │ │ ├── events │ │ ├── CreateEvents.go │ │ ├── ListEventDetail.go │ │ └── ListEvents.go │ │ ├── metricdata │ │ ├── batch_list_metric_data.go │ │ ├── create_metric_data.go │ │ ├── list_metric_data.go │ │ └── show_event_data.go │ │ ├── metrics │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ └── quotas │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go ├── cfw │ ├── v1 │ │ ├── acl │ │ │ ├── Common.go │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── Get.go │ │ │ ├── List.go │ │ │ ├── SetRulePriority.go │ │ │ └── Update.go │ │ ├── addressgroup │ │ │ ├── AddGroupMember.go │ │ │ ├── Common.go │ │ │ ├── CreateAddressGroup.go │ │ │ ├── DeleteAddressGroup.go │ │ │ ├── DeleteGroupMember.go │ │ │ ├── GetAddressGroup.go │ │ │ ├── GetGroupMember.go │ │ │ ├── ListAddressGroups.go │ │ │ ├── ListGroupMembers.go │ │ │ └── UpdateAddressGroup.go │ │ ├── blackwhitelist │ │ │ ├── Common.go │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── GetBlackWhiteList.go │ │ │ ├── GetBlackWhiteListRule.go │ │ │ └── Update.go │ │ ├── dns │ │ │ ├── AddDomainNames.go │ │ │ ├── Common.go │ │ │ ├── CreateDomainNameGroup.go │ │ │ ├── DeleteDomainNameGroup.go │ │ │ ├── DeleteDomainNames.go │ │ │ ├── GetDomainNameGroup.go │ │ │ ├── GetDomainNameInfo.go │ │ │ ├── ListDomainNameGroups.go │ │ │ ├── ListDomainNames.go │ │ │ └── UpdateDomainNameGroup.go │ │ ├── eip │ │ │ ├── ChangeEIPProtection.go │ │ │ └── List.go │ │ ├── ips │ │ │ ├── GetFeatureStatus.go │ │ │ ├── GetProtectionMode.go │ │ │ ├── SetFeatureStatus.go │ │ │ └── SetProtectionMode.go │ │ ├── management │ │ │ ├── ChangeEWProtectionStatus.go │ │ │ ├── Common.go │ │ │ ├── CreateEWFirewall.go │ │ │ ├── Get.go │ │ │ ├── GetEWFirewall.go │ │ │ ├── GetProtectedVPCs.go │ │ │ └── List.go │ │ └── servicegroup │ │ │ ├── AddGroupMember.go │ │ │ ├── Common.go │ │ │ ├── CreateServiceGroup.go │ │ │ ├── DeleteGroupMember.go │ │ │ ├── DeleteServiceGroup.go │ │ │ ├── GetGroupMember.go │ │ │ ├── GetServiceGroup.go │ │ │ ├── ListGroupMembers.go │ │ │ ├── ListServiceGroups.go │ │ │ └── UpdateServiceGroup.go │ ├── v2 │ │ └── management │ │ │ ├── Common.go │ │ │ ├── Create.go │ │ │ ├── CreateTag.go │ │ │ └── Delete.go │ └── v3 │ │ └── job │ │ └── Get.go ├── client.go ├── common │ ├── extensions │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ ├── metadata │ │ └── metadata.go │ ├── pointerto │ │ ├── doc.go │ │ ├── pointers.go │ │ └── pointers_test.go │ ├── structs │ │ └── structs.go │ └── tags │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go ├── compute │ └── v2 │ │ ├── extensions │ │ ├── aggregates │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── attachinterfaces │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── availabilityzones │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── bootfromvolume │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── defsecrules │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── delegate.go │ │ ├── diskconfig │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── testing │ │ │ │ ├── doc.go │ │ │ │ └── requests_test.go │ │ ├── doc.go │ │ ├── evacuate │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── extendedserverattributes │ │ │ ├── doc.go │ │ │ ├── results.go │ │ │ └── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ ├── extendedstatus │ │ │ ├── doc.go │ │ │ └── results.go │ │ ├── floatingips │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── hypervisors │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── keypairs │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── limits │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── lockunlock │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── request_test.go │ │ ├── migrate │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── networks │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── pauseunpause │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ ├── quotasets │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── rescueunrescue │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── resetstate │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── schedulerhints │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ └── testing │ │ │ │ ├── doc.go │ │ │ │ └── requests_test.go │ │ ├── secgroups │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── servergroups │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── serverusage │ │ │ ├── doc.go │ │ │ ├── results.go │ │ │ └── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ ├── services │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── startstop │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ ├── suspendresume │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ ├── tags │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ │ ├── tenantnetworks │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── testing │ │ │ ├── delegate_test.go │ │ │ ├── doc.go │ │ │ └── fixtures.go │ │ ├── usage │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ └── volumeattach │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── flavors │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ └── servers │ │ ├── doc.go │ │ ├── errors.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ ├── doc.go │ │ ├── fixtures.go │ │ ├── requests_test.go │ │ └── results_test.go │ │ ├── urls.go │ │ └── util.go ├── csbs │ └── v1 │ │ ├── backup │ │ ├── CountBackups.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── ExecBackupPolicy.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── results.go │ │ └── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ ├── policies │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── Update.go │ │ ├── results.go │ │ └── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── resource │ │ ├── CreateRestorationTask.go │ │ ├── GetResBackupCapabilities.go │ │ └── GetResRestorationCapabilities.go ├── css │ └── v1 │ │ ├── certifcates │ │ └── Get.go │ │ ├── clusters │ │ ├── AddClusterNodes.go │ │ ├── ChangeClusterName.go │ │ ├── ChangePassword.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── DisablePublicAccess.go │ │ ├── DisablePublicWhitelist.go │ │ ├── DownloadCertificate.go │ │ ├── EnablePublicAccess.go │ │ ├── EnablePublicWhitelist.go │ │ ├── ExtendCluster.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── RestartCluster.go │ │ ├── ScaleInCluster.go │ │ ├── UpdateClusterFlavor.go │ │ ├── UpdatePublicAccess.go │ │ ├── UpdateSecurityGroup.go │ │ ├── UpdateSecurityMode.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── util.go │ │ ├── flavors │ │ ├── List.go │ │ ├── results.go │ │ └── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ ├── parameter-configuration │ │ ├── List.go │ │ ├── ListTask.go │ │ └── Modify.go │ │ └── snapshots │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Disable.go │ │ ├── Enable.go │ │ ├── List.go │ │ ├── PolicyCreate.go │ │ ├── PolicyGet.go │ │ ├── UpdateConfiguration.go │ │ └── results.go ├── cts │ ├── v1 │ │ └── tracker │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── Get.go │ │ │ ├── Update.go │ │ │ └── results.go │ ├── v2 │ │ └── traces │ │ │ └── List.go │ └── v3 │ │ ├── keyevent │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── List.go │ │ └── Update.go │ │ └── tracker │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── List.go │ │ └── Update.go ├── dataarts │ ├── v1.1 │ │ ├── cluster │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── Get.go │ │ │ ├── List.go │ │ │ ├── Restart.go │ │ │ ├── Start.go │ │ │ ├── Stop.go │ │ │ └── common.go │ │ ├── job │ │ │ ├── CreateRandom.go │ │ │ ├── CreateSpecific.go │ │ │ ├── Delete.go │ │ │ ├── Get.go │ │ │ ├── GetHistory.go │ │ │ ├── GetStatus.go │ │ │ ├── Start.go │ │ │ ├── Stop.go │ │ │ ├── Update.go │ │ │ └── common.go │ │ └── link │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── Get.go │ │ │ ├── Update.go │ │ │ └── common.go │ └── v1 │ │ ├── connection │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Export.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go │ │ ├── job │ │ ├── BatchExportJob.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── ExecuteImmediately.go │ │ ├── ExportJob.go │ │ ├── Get.go │ │ ├── GetJobFile.go │ │ ├── GetJobInstance.go │ │ ├── GetJobInstanceList.go │ │ ├── GetRunningStatus.go │ │ ├── GetSystemTask.go │ │ ├── ImportJob.go │ │ ├── List.go │ │ ├── RetryInstance.go │ │ ├── Start.go │ │ ├── Stop.go │ │ ├── StopInstance.go │ │ ├── Update.go │ │ └── common.go │ │ ├── resource │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── Update.go │ │ └── common.go │ │ └── script │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Execute.go │ │ ├── Get.go │ │ ├── GetExecution.go │ │ ├── List.go │ │ ├── Stop.go │ │ ├── Update.go │ │ └── common.go ├── dcaas │ ├── v2 │ │ ├── dc-endpoint-group │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── Get.go │ │ │ ├── List.go │ │ │ └── Update.go │ │ ├── direct-connect │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── Get.go │ │ │ ├── List.go │ │ │ └── Update.go │ │ ├── virtual-gateway │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── Get.go │ │ │ ├── List.go │ │ │ └── Update.go │ │ └── virtual-interface │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── Get.go │ │ │ ├── List.go │ │ │ └── Update.go │ └── v3 │ │ ├── hosted-connect │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go │ │ ├── virtual-gateway │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go │ │ └── virtual-interface │ │ ├── Create.go │ │ ├── CreatePeer.go │ │ ├── Delete.go │ │ ├── DeletePeer.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── Update.go │ │ └── UpdatePeer.go ├── dcs │ ├── v1 │ │ ├── backups │ │ │ ├── BackupInstance.go │ │ │ ├── DeleteBackupFile.go │ │ │ ├── ListBackupRecords.go │ │ │ ├── ListRestoreRecords.go │ │ │ └── RestoreInstance.go │ │ ├── configs │ │ │ ├── List.go │ │ │ └── Update.go │ │ ├── instance │ │ │ ├── ListDCSStatistics.go │ │ │ ├── ListDCSStatus.go │ │ │ ├── RestartOrFlushInstances.go │ │ │ └── UpdatePassword.go │ │ ├── lifecycle │ │ │ ├── BatchDelete.go │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── Extend.go │ │ │ ├── Get.go │ │ │ ├── List.go │ │ │ └── Update.go │ │ ├── migration │ │ │ └── CreateMigrationTask.go │ │ └── others │ │ │ ├── GetProducts.go │ │ │ ├── ListAvailableZones.go │ │ │ ├── ListMaintenanceWindows.go │ │ │ └── ShowTenantQuota.go │ └── v2 │ │ ├── configs │ │ ├── Get.go │ │ └── Update.go │ │ ├── instance │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── Resize.go │ │ ├── Restart.go │ │ ├── Update.go │ │ └── UpdatePassword.go │ │ ├── others │ │ ├── ListAvailableZones.go │ │ └── ListFlavors.go │ │ ├── ssl │ │ ├── DownloadCert.go │ │ ├── Get.go │ │ └── Update.go │ │ ├── tags │ │ ├── Create.go │ │ └── Delete.go │ │ └── whitelists │ │ ├── Get.go │ │ └── Put.go ├── ddm │ ├── v1 │ │ ├── instances │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── ModifyName.go │ │ │ ├── ModifySecurityGroup.go │ │ │ ├── QueryInstanceDetails.go │ │ │ ├── QueryInstances.go │ │ │ ├── QueryNodeDetails.go │ │ │ ├── QueryNodes.go │ │ │ ├── ReloadTableData.go │ │ │ ├── RestartInstance.go │ │ │ └── SyncDataNode.go │ │ └── schemas │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── QueryAvailableDBInstances.go │ │ │ ├── QuerySchemaDetails.go │ │ │ └── QuerySchemas.go │ ├── v2 │ │ └── instances │ │ │ ├── ModifyDBReadPolicy.go │ │ │ ├── QueryEngineInfo.go │ │ │ ├── QueryNodeClasses.go │ │ │ ├── ScaleIn.go │ │ │ └── ScaleOut.go │ └── v3 │ │ ├── accounts │ │ └── ManageAdminPassword.go │ │ └── instances │ │ ├── ChangeNodeClass.go │ │ ├── ModifyParameters.go │ │ └── QueryParameters.go ├── dds │ └── v3 │ │ ├── backups │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── GetBackupPolicy.go │ │ ├── List.go │ │ ├── ListBackupLinks.go │ │ ├── ModifyBackupPolicy.go │ │ └── job.go │ │ ├── configurations │ │ ├── Apply.go │ │ ├── Get.go │ │ ├── GetInstanceConfig.go │ │ └── List.go │ │ ├── connection │ │ ├── KillSessions.go │ │ ├── ListConnections.go │ │ └── ListSessions.go │ │ ├── flavors │ │ └── List.go │ │ ├── instances │ │ ├── AddNode.go │ │ ├── BindEIP.go │ │ ├── ChangePassword.go │ │ ├── Create.go │ │ ├── CrossCIDRAccess.go │ │ ├── Delete.go │ │ ├── EnableConfigIp.go │ │ ├── GetRecyclePolicy.go │ │ ├── GetRecycledInstances.go │ │ ├── List.go │ │ ├── ManageSSL.go │ │ ├── ModifyInternalIp.go │ │ ├── ModifyPort.go │ │ ├── ModifySG.go │ │ ├── ModifySpec.go │ │ ├── Restart.go │ │ ├── RestoreToNew.go │ │ ├── RestoreToOriginal.go │ │ ├── RestoreToPIT.go │ │ ├── ScaleStorage.go │ │ ├── SetRecyclePolicy.go │ │ ├── Switchover.go │ │ ├── UnbindEIP.go │ │ ├── UpdateName.go │ │ └── job.go │ │ ├── job │ │ └── Get.go │ │ └── logs │ │ ├── Create.go │ │ ├── Delete.go │ │ └── List.go ├── deh │ └── v1 │ │ ├── common │ │ └── common_tests.go │ │ └── hosts │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ ├── fixtures.go │ │ └── requests_test.go │ │ └── urls.go ├── dis │ └── v2 │ │ ├── apps │ │ ├── CreateApp.go │ │ ├── DeleteApp.go │ │ ├── GetApp.go │ │ ├── GetAppStatus.go │ │ └── ListApp.go │ │ ├── checkpoints │ │ ├── CommitCheckpoint.go │ │ ├── DeleteCheckpoint.go │ │ └── GetCheckpoint.go │ │ ├── data │ │ ├── GetCursor.go │ │ ├── GetRecords.go │ │ └── PutRecords.go │ │ ├── dump │ │ ├── CreateCloudTableDumpTask.go │ │ ├── CreateDLIDumpTask.go │ │ ├── CreateDWSDumpTask.go │ │ ├── CreateMRSDumpTask.go │ │ ├── CreateOBSDumpTask.go │ │ ├── DeleteTransferTask.go │ │ ├── GetTransferTask.go │ │ ├── ListTransferTasks.go │ │ └── TransferTaskAction.go │ │ ├── monitors │ │ ├── GetPartitionMonitor.go │ │ └── GetStreamMonitor.go │ │ └── streams │ │ ├── CreatePolicyRule.go │ │ ├── CreateStream.go │ │ ├── DeleteStream.go │ │ ├── GetPolicyRule.go │ │ ├── GetStream.go │ │ ├── ListStreams.go │ │ ├── UpdatePartitionCount.go │ │ └── UpdateStream.go ├── dms │ ├── v1 │ │ ├── availablezones │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ │ ├── instances │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ │ ├── maintainwindows │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ │ ├── permissions │ │ │ ├── Create.go │ │ │ └── List.go │ │ ├── products │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ │ └── topics │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ └── v2 │ │ ├── availablezones │ │ └── Get.go │ │ ├── instances │ │ ├── ChangePassword.go │ │ ├── lifecycle │ │ │ ├── BatchRestartDelete.go │ │ │ ├── Create.go │ │ │ ├── CreateDepr.go │ │ │ ├── Delete.go │ │ │ ├── Get.go │ │ │ ├── GetConfig.go │ │ │ ├── List.go │ │ │ ├── PutConfig.go │ │ │ └── Update.go │ │ ├── management │ │ │ ├── BatchDeleteConsumerGroup.go │ │ │ ├── ConfAutoTopicCreation.go │ │ │ ├── CreateConsumerGroup.go │ │ │ ├── DeleteConsumerGroup.go │ │ │ ├── GetConsumerGroup.go │ │ │ ├── GetConsumerGroupDetails.go │ │ │ ├── GetCoordinator.go │ │ │ ├── GetDiskUsage.go │ │ │ ├── GetMetadata.go │ │ │ ├── InitPartitionReassigning.go │ │ │ ├── ListConsumerGroups.go │ │ │ ├── ReassignReplicas.go │ │ │ ├── ResetConsumerGroupOffset.go │ │ │ ├── ResetPassword.go │ │ │ └── UpdateCrossVpc.go │ │ └── specification │ │ │ ├── Extend.go │ │ │ └── Get.go │ │ ├── maintainwindows │ │ └── Get.go │ │ ├── products │ │ └── List.go │ │ ├── smart_connect │ │ ├── CreateTask.go │ │ ├── DeleteTask.go │ │ ├── Disable.go │ │ ├── Enable.go │ │ ├── GetTask.go │ │ ├── ListTasks.go │ │ ├── PauseTask.go │ │ ├── RestartTask.go │ │ └── StartOrRestartTask.go │ │ ├── topics │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go │ │ └── users │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── List.go │ │ └── ResetPassword.go ├── dns │ └── v2 │ │ ├── nameservers │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── ptrrecords │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── recordsets │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ └── zones │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ ├── doc.go │ │ ├── fixtures.go │ │ └── requests_test.go │ │ └── urls.go ├── doc.go ├── drs │ └── v3 │ │ └── public │ │ ├── BatchCheckResults.go │ │ ├── BatchCreateTasks.go │ │ ├── BatchDeleteTasks.go │ │ ├── BatchListTaskDetails.go │ │ ├── BatchListTaskStatus.go │ │ ├── BatchModifyTask.go │ │ ├── BatchSetSpeed.go │ │ ├── BatchStartTasks.go │ │ ├── BatchTestConnections.go │ │ └── PreCheckTask.go ├── dws │ ├── v1 │ │ ├── cluster │ │ │ ├── CreateCluster.go │ │ │ ├── DeleteCluster.go │ │ │ ├── ListClusterDetails.go │ │ │ ├── ListClusters.go │ │ │ ├── ResetPassword.go │ │ │ ├── ResizeCluster.go │ │ │ └── RestartCluster.go │ │ ├── snapshot │ │ │ ├── CreateSnapshot.go │ │ │ ├── DeleteSnapshot.go │ │ │ ├── ListSnapshotDetails.go │ │ │ ├── ListSnapshots.go │ │ │ └── RestoreCluster.go │ │ └── tag │ │ │ ├── BatchAddDeleteTags.go │ │ │ ├── CreateClusterTag.go │ │ │ ├── DeleteClusterTag.go │ │ │ ├── ListAllTags.go │ │ │ ├── ListClusterTags.go │ │ │ └── ListClustersByTags.go │ └── v2 │ │ └── cluster │ │ └── ListNodeTypes.go ├── ecs │ └── v1 │ │ ├── auto_recovery │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── block_devices │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── cloudservers │ │ ├── requests.go │ │ ├── results.go │ │ ├── results_job.go │ │ └── urls.go │ │ ├── cloudservertags │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ └── tags │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go ├── elb │ └── v3 │ │ ├── certificates │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── flavors │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── ipgroups │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── DeleteIpsFromList.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── Update.go │ │ └── UpdateIpList.go │ │ ├── listeners │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── loadbalancers │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── log │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go │ │ ├── members │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── monitors │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── policies │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── pools │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── rules │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ └── security_policy │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── ListSystemPolicies.go │ │ └── Update.go ├── endpoint_location.go ├── endpoint_util.go ├── er │ └── v3 │ │ ├── association │ │ ├── Create.go │ │ ├── Delete.go │ │ └── List.go │ │ ├── flow-logs │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Disable.go │ │ ├── Enable.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go │ │ ├── instance │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go │ │ ├── propagation │ │ ├── Create.go │ │ ├── Delete.go │ │ └── List.go │ │ ├── route │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── ListStatic.go │ │ └── Update.go │ │ ├── route_table │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go │ │ ├── tags │ │ ├── Create.go │ │ ├── Delete.go │ │ └── List.go │ │ └── vpc │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go ├── errors.go ├── evpn │ └── v5 │ │ ├── connection-monitoring │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ └── List.go │ │ ├── connection │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go │ │ ├── customer-gateway │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go │ │ ├── gateway │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── ListAZs.go │ │ └── Update.go │ │ ├── quota │ │ └── Get.go │ │ └── tags │ │ ├── Create.go │ │ ├── Delete.go │ │ └── List.go ├── evs │ ├── extensions │ │ ├── quotasets │ │ │ ├── delete.go │ │ │ ├── get.go │ │ │ ├── get_usage.go │ │ │ ├── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── update.go │ │ ├── schedulerstats │ │ │ ├── list.go │ │ │ └── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ ├── services │ │ │ ├── list.go │ │ │ └── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ ├── volumeactions │ │ │ ├── attach.go │ │ │ ├── begin_detaching.go │ │ │ ├── detach.go │ │ │ ├── extend_size.go │ │ │ ├── force_delete.go │ │ │ ├── initialize_connection.go │ │ │ ├── reserve.go │ │ │ ├── terminate_connection.go │ │ │ ├── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ ├── unreserve.go │ │ │ └── upload_image.go │ │ └── volumetenants.go │ ├── noauth │ │ ├── new_block_storage_no_auth.go │ │ └── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ ├── v1 │ │ ├── apiversions │ │ │ ├── get.go │ │ │ ├── list.go │ │ │ └── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ ├── snapshots │ │ │ ├── create.go │ │ │ ├── delete.go │ │ │ ├── get.go │ │ │ ├── list.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── update_metadata.go │ │ ├── volumes │ │ │ ├── create.go │ │ │ ├── delete.go │ │ │ ├── get.go │ │ │ ├── list.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── update.go │ │ └── volumetypes │ │ │ ├── create.go │ │ │ ├── delete.go │ │ │ ├── get.go │ │ │ ├── list.go │ │ │ └── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ ├── v2 │ │ ├── cloudvolumes │ │ │ └── List.go │ │ ├── snapshots │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ ├── urls.go │ │ │ └── util.go │ │ └── tags │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ └── v3 │ │ └── volumes │ │ ├── requests.go │ │ ├── results.go │ │ ├── results_job.go │ │ └── urls.go ├── fgs │ └── v2 │ │ ├── alias │ │ ├── CreateAlias.go │ │ ├── DeleteAlias.go │ │ ├── GetAlias.go │ │ ├── ListAlias.go │ │ ├── ListVersion.go │ │ ├── PublishVersion.go │ │ └── UpdateAlias.go │ │ ├── async_config │ │ ├── Delete.go │ │ ├── Get.go │ │ └── Update.go │ │ ├── events │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go │ │ ├── function │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Export.go │ │ ├── GetCode.go │ │ ├── GetMetadata.go │ │ ├── Import.go │ │ ├── List.go │ │ ├── UpdateCode.go │ │ ├── UpdateMaxInstances.go │ │ ├── UpdateMetadata.go │ │ └── UpdateStatus.go │ │ ├── invoke │ │ ├── InvokeAsync.go │ │ └── InvokeSync.go │ │ ├── quotas │ │ └── ListQuotas.go │ │ ├── reserved │ │ ├── List.go │ │ ├── ListConfigs.go │ │ └── Update.go │ │ ├── tags │ │ ├── Create.go │ │ ├── Delete.go │ │ └── GetResourceTags.go │ │ ├── trigger │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── DeleteTriggers.go │ │ ├── Get.go │ │ ├── GetTriggers.go │ │ └── Update.go │ │ └── util │ │ ├── EnableLts.go │ │ ├── GetLts.go │ │ ├── GetTemplate.go │ │ ├── ListStats.go │ │ └── ListStatsPeriod.go ├── gaussdb │ └── v3 │ │ ├── ListConfigurations.go │ │ ├── ShowEngineVersion.go │ │ ├── ShowFlavors.go │ │ ├── ShowJobInfo.go │ │ ├── backup │ │ ├── CreateBackup.go │ │ ├── GetPolicy.go │ │ ├── ListBackups.go │ │ └── UpdatePolicy.go │ │ ├── instance │ │ ├── ChangeSpec.go │ │ ├── CreateInstance.go │ │ ├── CreateReadonlyNode.go │ │ ├── DeleteInstance.go │ │ ├── DeleteReadonlyNode.go │ │ ├── GetInstance.go │ │ ├── ListInstances.go │ │ ├── ResetPassword.go │ │ └── UpdateName.go │ │ └── util.go ├── hss │ └── v5 │ │ ├── event │ │ ├── List.go │ │ ├── ListAlarmWhitelist.go │ │ └── Operate.go │ │ ├── host │ │ ├── ChangeProtectionStatus.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── List.go │ │ ├── ListHost.go │ │ └── Update.go │ │ └── quota │ │ └── List.go ├── identity │ ├── v3.0 │ │ ├── acl │ │ │ ├── GetAPIACLPolicy.go │ │ │ ├── GetConsoleACLPolicy.go │ │ │ ├── UpdateAPIACLPolicy.go │ │ │ └── UpdateConsoleACLPolicy.go │ │ ├── agency │ │ │ ├── CheckAgencyAllProjects.go │ │ │ ├── GrantAgenctAllProjects.go │ │ │ ├── ListAgencyAllProjects.go │ │ │ └── RemoveAgencyAllProjects.go │ │ ├── security │ │ │ ├── GetLoginAuthPolicy.go │ │ │ ├── GetLoginProtectionConfiguration.go │ │ │ ├── GetOperationProtectionPolicy.go │ │ │ ├── GetPasswordPolicy.go │ │ │ ├── GetUserMfaDevice.go │ │ │ ├── ListLoginProtectionConfiguration.go │ │ │ ├── ListUserMfaDevices.go │ │ │ ├── UpdateLoginAuthPolicy.go │ │ │ ├── UpdateLoginProtectionConfiguration.go │ │ │ ├── UpdateOperationProtectionPolicy.go │ │ │ └── UpdatePasswordPolicy.go │ │ └── users │ │ │ ├── CreateUser.go │ │ │ ├── GetUser.go │ │ │ ├── ModifyUser.go │ │ │ └── ModifyUserAdmin.go │ └── v3 │ │ ├── agency │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── catalog │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── catalog_test.go │ │ │ └── fixtures.go │ │ └── urls.go │ │ ├── credentials │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── domains │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── endpoints │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── extensions │ │ └── trusts │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ ├── federation │ │ ├── mappings │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── metadata │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── protocols │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── providers │ │ │ ├── CreateOIDC.go │ │ │ ├── GetOIDC.go │ │ │ ├── UpdateOIDC.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ └── urls.go │ │ ├── groups │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── policies │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── projects │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── regions │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── roles │ │ ├── CheckGroupAllProjects.go │ │ ├── QueryGroupAllProjects.go │ │ ├── RemoveGroupAllProjects.go │ │ ├── UpdateGroupAllProjects.go │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── services │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── tokens │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ ├── requests_test.go │ │ │ └── results_test.go │ │ └── urls.go │ │ └── users │ │ ├── ChangePassword.go │ │ ├── CreateBindingDevice.go │ │ ├── CreateMfaDevice.go │ │ ├── DeleteBindingDevice.go │ │ ├── DeleteMfaDevice.go │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ ├── fixtures.go │ │ └── requests_test.go │ │ └── urls.go ├── image │ └── v2 │ │ ├── images │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── Update.go │ │ └── Upload.go │ │ └── members │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go ├── ims │ ├── v1 │ │ ├── images │ │ │ ├── CreateDataImage.go │ │ │ ├── CreateWholeImageFromCBRorCSBS.go │ │ │ ├── CreateWholeImageFromECS.go │ │ │ ├── ExportImage.go │ │ │ └── RegisterImage.go │ │ ├── members │ │ │ ├── BatchAddMembers.go │ │ │ ├── BatchDeleteMembers.go │ │ │ └── BatchUpdateMembers.go │ │ ├── others │ │ │ ├── CopyImageInRegion.go │ │ │ ├── ShowImageQuota.go │ │ │ └── ShowJob.go │ │ └── tags │ │ │ ├── CreateOrUpdateTags.go │ │ │ └── ListTags.go │ └── v2 │ │ ├── images │ │ ├── CreateImageFromDisk.go │ │ ├── CreateImageFromECS.go │ │ ├── CreateImageFromOBS.go │ │ ├── ImportImageQuick.go │ │ ├── ListImages.go │ │ └── UpdateImage.go │ │ ├── members │ │ ├── GetMember.go │ │ └── ListMembers.go │ │ └── tags │ │ ├── AddImageTag.go │ │ ├── BatchAddOrDeleteTags.go │ │ ├── DeleteImageTag.go │ │ ├── ListImageByTags.go │ │ ├── ListImageTags.go │ │ └── ListImagesTags.go ├── kms │ └── v1 │ │ ├── grants │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ └── keys │ │ ├── CancelDelete.go │ │ ├── Create.go │ │ ├── DataEncryptGet.go │ │ ├── Decrypt.go │ │ ├── Delete.go │ │ ├── DeleteCMKImport.go │ │ ├── DisableKey.go │ │ ├── DisableKeyRotation.go │ │ ├── EnableKey.go │ │ ├── EnableKeyRotation.go │ │ ├── Encrypt.go │ │ ├── EncryptDEKGet.go │ │ ├── Get.go │ │ ├── GetCMKImport.go │ │ ├── GetKeyRotationStatus.go │ │ ├── ImportCMKMaterial.go │ │ ├── List.go │ │ ├── UpdateAlias.go │ │ ├── UpdateDes.go │ │ └── UpdateKeyRotationInterval.go ├── loader.go ├── loader_test.go ├── lts │ └── v2 │ │ ├── access-config │ │ ├── Create.go │ │ ├── CreateCross.go │ │ ├── Delete.go │ │ ├── List.go │ │ └── Update.go │ │ ├── alarm │ │ ├── CreateKeywordRule.go │ │ ├── DeleteKeywordRule.go │ │ ├── ListHistory.go │ │ ├── ListKeywordRules.go │ │ ├── ListTopic.go │ │ └── UpdateKeywordRule.go │ │ ├── cloud-structuring │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── ListCustom.go │ │ ├── ListCustomBrief.go │ │ └── Update.go │ │ ├── groups │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── List.go │ │ └── Update.go │ │ ├── host-groups │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── List.go │ │ ├── ListHost.go │ │ └── Update.go │ │ ├── log-collection │ │ ├── Disable.go │ │ └── Enable.go │ │ ├── message-template │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── Preview.go │ │ └── Update.go │ │ ├── quick-search │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── ListCriterias.go │ │ └── ListGroupCriterias.go │ │ ├── streams │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── List.go │ │ ├── ListLogs.go │ │ ├── ListStreams.go │ │ └── Update.go │ │ ├── tags │ │ └── Manage.go │ │ └── transfers │ │ ├── Create.go │ │ ├── CreateLogDumpObs.go │ │ ├── Delete.go │ │ ├── List.go │ │ └── Update.go ├── mrs │ └── v1 │ │ ├── cluster │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── ListHosts.go │ │ ├── Update.go │ │ └── util.go │ │ ├── job │ │ ├── Create.go │ │ ├── Delete.go │ │ └── Get.go │ │ └── tags │ │ └── requests.go ├── networking │ ├── v1 │ │ ├── bandwidths │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ │ ├── common │ │ │ └── common_tests.go │ │ ├── eips │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ │ ├── flowlogs │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ │ ├── routetables │ │ │ ├── Action.go │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── Get.go │ │ │ ├── List.go │ │ │ └── Update.go │ │ ├── subnets │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ └── vpcs │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ ├── doc.go │ │ │ └── requests_test.go │ │ │ └── urls.go │ └── v2 │ │ ├── apiversions │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── bandwidths │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── common │ │ └── common_tests.go │ │ ├── extensions │ │ ├── delegate.go │ │ ├── dnatrules │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── Get.go │ │ │ └── List.go │ │ ├── elb │ │ │ ├── backendecs │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ │ ├── certificate │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ │ ├── healthcheck │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ │ ├── job.go │ │ │ ├── listeners │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ │ ├── loadbalancers │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ │ └── quotas │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ ├── elbaas │ │ │ ├── backendmember │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ │ ├── doc.go │ │ │ ├── healthcheck │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ │ ├── job.go │ │ │ ├── listeners │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ │ └── loadbalancer_elbs │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ ├── external │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ ├── requests_test.go │ │ │ │ └── results_test.go │ │ ├── extradhcpopts │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ └── results.go │ │ ├── fwaas │ │ │ ├── doc.go │ │ │ ├── firewalls │ │ │ │ ├── doc.go │ │ │ │ ├── errors.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ │ ├── doc.go │ │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ │ ├── policies │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ │ ├── doc.go │ │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ │ ├── routerinsertion │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── testing │ │ │ │ │ ├── doc.go │ │ │ │ │ └── requests_test.go │ │ │ └── rules │ │ │ │ ├── doc.go │ │ │ │ ├── errors.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ ├── fwaas_v2 │ │ │ ├── doc.go │ │ │ ├── firewall_groups │ │ │ │ ├── errors.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ │ ├── policies │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ │ ├── routerinsertion │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ └── results.go │ │ │ └── rules │ │ │ │ ├── errors.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ ├── hw_snatrules │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ │ ├── layer3 │ │ │ ├── doc.go │ │ │ ├── floatingips │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ │ ├── doc.go │ │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ │ └── routers │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ ├── lbaas │ │ │ ├── doc.go │ │ │ ├── members │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ │ ├── doc.go │ │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ │ ├── monitors │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ │ ├── doc.go │ │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ │ ├── pools │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ │ ├── doc.go │ │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ │ └── vips │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ ├── lbaas_v2 │ │ │ ├── certificates │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ │ ├── doc.go │ │ │ ├── l7policies │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ │ ├── listeners │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ │ ├── loadbalancers │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ │ ├── monitors │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ │ ├── pools │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ │ └── whitelists │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ ├── natgateways │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ │ ├── networkipavailabilities │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── portsbinding │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ ├── portsecurity │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ └── results.go │ │ ├── provider │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── testing │ │ │ │ ├── doc.go │ │ │ │ └── results_test.go │ │ ├── qos │ │ │ └── ruletypes │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ ├── rbacpolicies │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── security │ │ │ ├── doc.go │ │ │ ├── groups │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ │ └── rules │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── results.go │ │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ └── requests_test.go │ │ │ │ └── urls.go │ │ ├── snatrules │ │ │ ├── Create.go │ │ │ ├── Delete.go │ │ │ ├── Get.go │ │ │ └── List.go │ │ ├── subnetpools │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── testing │ │ │ ├── delegate_test.go │ │ │ └── doc.go │ │ └── vpnaas │ │ │ ├── endpointgroups │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ │ ├── ikepolicies │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ │ ├── ipsecpolicies │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ │ ├── services │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ │ └── siteconnections │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ ├── networks │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── peerings │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── ports │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── routes │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ └── subnets │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ ├── doc.go │ │ ├── fixtures.go │ │ ├── requests_test.go │ │ └── results_test.go │ │ └── urls.go ├── objectstorage │ └── v1 │ │ ├── accounts │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── containers │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── objects │ │ ├── doc.go │ │ ├── errors.go │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ └── swauth │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go ├── obs │ ├── auth.go │ ├── authV2.go │ ├── authV4.go │ ├── client_base.go │ ├── client_bucket.go │ ├── client_object.go │ ├── client_other.go │ ├── client_part.go │ ├── client_resume.go │ ├── conf.go │ ├── const.go │ ├── convert.go │ ├── error.go │ ├── http.go │ ├── log.go │ ├── model_base.go │ ├── model_bucket.go │ ├── model_header.go │ ├── model_object.go │ ├── model_other.go │ ├── model_part.go │ ├── model_response.go │ ├── pool.go │ ├── temporary_createSignedUrl.go │ ├── temporary_other.go │ ├── temporary_signedUrl.go │ ├── trait.go │ ├── transfer.go │ └── util.go ├── rds │ ├── v1 │ │ ├── datastores │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ │ ├── flavors │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ │ ├── instances │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ │ └── tags │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ └── urls.go │ └── v3 │ │ ├── backups │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── List.go │ │ ├── ListRestoreTimes.go │ │ ├── RestorePITR.go │ │ ├── RestoreToNew.go │ │ ├── ShowBackupPolicy.go │ │ ├── Update.go │ │ └── results.go │ │ ├── configurations │ │ ├── Apply.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── GetForInstance.go │ │ ├── List.go │ │ ├── Update.go │ │ └── UpdateInstanceConfiguration.go │ │ ├── flavors │ │ ├── ListDatastores.go │ │ ├── ListFlavors.go │ │ └── ListStorageTypes.go │ │ ├── instances │ │ ├── AttachEip.go │ │ ├── ChangeFailoverMode.go │ │ ├── ChangeFailoverStrategy.go │ │ ├── ChangeOpsWindow.go │ │ ├── Create.go │ │ ├── CreateReplica.go │ │ ├── Delete.go │ │ ├── EnlargeVolume.go │ │ ├── GetAutoScaling.go │ │ ├── List.go │ │ ├── ListCollations.go │ │ ├── ManageAutoScaling.go │ │ ├── MigrateFollower.go │ │ ├── Resize.go │ │ ├── Restart.go │ │ ├── SingleToHa.go │ │ ├── StartFailover.go │ │ ├── StartupInstance.go │ │ ├── StopInstance.go │ │ ├── UpdateInstanceName.go │ │ └── job.go │ │ ├── logs │ │ ├── ListErrorLog.go │ │ └── ListSlowLog.go │ │ └── security │ │ ├── SetSecurityGroup.go │ │ ├── SwitchSsl.go │ │ ├── UpdateDataIp.go │ │ └── UpdatePort.go ├── rms │ ├── advanced │ │ ├── CreateQuery.go │ │ ├── DeleteQuery.go │ │ ├── GetQuery.go │ │ ├── ListQueries.go │ │ ├── ListSchemas.go │ │ ├── RunQuery.go │ │ └── UpdateQuery.go │ ├── compliance │ │ ├── AddRule.go │ │ ├── DeleteRule.go │ │ ├── DisableRule.go │ │ ├── EnableRule.go │ │ ├── GetPolicy.go │ │ ├── GetRule.go │ │ ├── GetRuleStatus.go │ │ ├── ListAllPolicies.go │ │ ├── ListAllRuleCompliance.go │ │ ├── ListAllUserCompliance.go │ │ ├── ListResCompliance.go │ │ ├── ListRules.go │ │ ├── RunEval.go │ │ ├── UpdateCompliance.go │ │ └── UpdateRule.go │ ├── history │ │ └── ListChangeRecords.go │ ├── query │ │ ├── GetAnyResource.go │ │ ├── GetCount.go │ │ ├── GetRecordedResource.go │ │ ├── GetResource.go │ │ ├── ListAllResources.go │ │ ├── ListAllResourcesTags.go │ │ ├── ListRecordeResourceTags.go │ │ ├── ListRecordedResources.go │ │ ├── ListRecordedResourcesSummary.go │ │ ├── ListResourcesSummary.go │ │ ├── ListServices.go │ │ └── ListSpecificType.go │ ├── recorder │ │ ├── DeleteRecorder.go │ │ ├── GetRecorder.go │ │ └── UpdateRecorder.go │ ├── region │ │ └── GetRegions.go │ └── relations │ │ └── ListRelations.go ├── rts │ └── v1 │ │ ├── softwareconfig │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── softwaredeployment │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── stackevents │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── stackresources │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── stacks │ │ ├── doc.go │ │ ├── environment.go │ │ ├── environment_test.go │ │ ├── errors.go │ │ ├── fixtures.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── template.go │ │ ├── template_test.go │ │ ├── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ ├── urls.go │ │ ├── utils.go │ │ └── utils_test.go │ │ └── stacktemplates │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ ├── fixtures.go │ │ └── requests_test.go │ │ └── urls.go ├── sdrs │ └── v1 │ │ ├── attachreplication │ │ ├── requests.go │ │ ├── results_job.go │ │ └── urls.go │ │ ├── domains │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── drill │ │ ├── requests.go │ │ ├── results.go │ │ ├── results_job.go │ │ └── urls.go │ │ ├── protectedinstances │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── Update.go │ │ ├── results.go │ │ └── results_job.go │ │ ├── protectiongroups │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Disable.go │ │ ├── Enable.go │ │ ├── Get.go │ │ ├── Update.go │ │ ├── results.go │ │ └── results_job.go │ │ └── replications │ │ ├── requests.go │ │ ├── results.go │ │ ├── results_job.go │ │ └── urls.go ├── sfs │ └── v2 │ │ ├── common │ │ └── common_tests.go │ │ └── shares │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ ├── fixtures.go │ │ └── request_test.go │ │ └── urls.go ├── sfs_turbo │ └── v1 │ │ └── shares │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go ├── smn │ └── v2 │ │ ├── subscriptions │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ ├── topicattributes │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go │ │ └── topics │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go ├── swr │ └── v2 │ │ ├── domains │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── ListSharedReposDetails.go │ │ └── Update.go │ │ ├── organizations │ │ ├── Create.go │ │ ├── CreatePermissions.go │ │ ├── Delete.go │ │ ├── DeletePermissions.go │ │ ├── Get.go │ │ ├── GetPermissions.go │ │ ├── List.go │ │ └── UpdatePermissions.go │ │ └── repositories │ │ ├── Create.go │ │ ├── CreatePermissions.go │ │ ├── Delete.go │ │ ├── DeleteByTag.go │ │ ├── DeletePermissions.go │ │ ├── Get.go │ │ ├── GetPermissions.go │ │ ├── List.go │ │ ├── ListTags.go │ │ ├── Update.go │ │ └── UpdatePermissions.go ├── testing │ ├── client_test.go │ ├── doc.go │ ├── endpoint_location_test.go │ └── endpoint_util_test.go ├── tms │ └── v1 │ │ └── tags │ │ ├── requests.go │ │ ├── results.go │ │ └── urls.go ├── utils │ ├── base_endpoint.go │ ├── choose_version.go │ ├── testing │ │ ├── choose_version_test.go │ │ └── doc.go │ └── utils.go ├── vbs │ └── v2 │ │ ├── backups │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── results_job.go │ │ ├── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── common │ │ └── common_tests.go │ │ ├── policies │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ ├── shares │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ └── urls.go │ │ └── tags │ │ ├── doc.go │ │ ├── requests.go │ │ ├── results.go │ │ ├── testing │ │ ├── fixtures.go │ │ └── requests_test.go │ │ └── urls.go ├── vpc │ ├── v1 │ │ ├── bandwidths │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ │ ├── doc.go │ │ │ │ ├── fixtures.go │ │ │ │ └── requests_test.go │ │ │ └── urls.go │ │ └── publicips │ │ │ ├── doc.go │ │ │ ├── requests.go │ │ │ ├── results.go │ │ │ ├── testing │ │ │ ├── doc.go │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ │ └── urls.go │ └── v3 │ │ └── vpcs │ │ ├── AddSecondaryCIDR.go │ │ ├── Get.go │ │ ├── List.go │ │ └── RemoveSecondaryCIDR.go ├── vpcep │ └── v1 │ │ ├── endpoints │ │ ├── BatchWhitelist.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── GetWhitelist.go │ │ ├── List.go │ │ └── testing │ │ │ ├── fixtures.go │ │ │ └── requests_test.go │ │ ├── quota │ │ └── Get.go │ │ └── services │ │ ├── Action.go │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── GetBasicInfo.go │ │ ├── List.go │ │ ├── ListConnections.go │ │ ├── ListPublic.go │ │ ├── Update.go │ │ └── testing │ │ ├── fixtures.go │ │ └── requests_test.go ├── waf-premium │ └── v1 │ │ ├── certificates │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ └── List.go │ │ ├── hosts │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── Update.go │ │ └── UpdateProtectStatus.go │ │ ├── instances │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ ├── Update.go │ │ └── Upgrade.go │ │ ├── policies │ │ ├── Create.go │ │ ├── Delete.go │ │ ├── Get.go │ │ ├── List.go │ │ └── Update.go │ │ └── rules │ │ ├── ChangeRuleStatus.go │ │ ├── CreateAntiCrawler.go │ │ ├── CreateAntiLeakage.go │ │ ├── CreateAntiTamper.go │ │ ├── CreateBlacklist.go │ │ ├── CreateCc.go │ │ ├── CreateCustom.go │ │ ├── CreateGeoIp.go │ │ ├── CreateIgnore.go │ │ ├── CreateKnownAttackSource.go │ │ ├── CreatePrivacy.go │ │ ├── CreateReferenceTable.go │ │ ├── Delete.go │ │ ├── GetAntiCrawler.go │ │ ├── GetAntiLeakage.go │ │ ├── GetAntiTamper.go │ │ ├── GetBlacklist.go │ │ ├── GetCc.go │ │ ├── GetCustom.go │ │ ├── GetGeoIp.go │ │ ├── GetIgnore.go │ │ ├── GetKnowAttackSource.go │ │ ├── GetPrivacy.go │ │ ├── GetReferenceTable.go │ │ ├── ListAntiCrawler.go │ │ ├── ListAntiLeakage.go │ │ ├── ListAntiTamper.go │ │ ├── ListBlacklist.go │ │ ├── ListCc.go │ │ ├── ListCustom.go │ │ ├── ListGeoIp.go │ │ ├── ListIgnore.go │ │ ├── ListKnownAttackSource.go │ │ ├── ListPrivacy.go │ │ ├── ListReferenceTable.go │ │ ├── UpdateAntiCrawler.go │ │ ├── UpdateAntiLeakage.go │ │ ├── UpdateAntiTamper.go │ │ ├── UpdateBlacklist.go │ │ ├── UpdateCc.go │ │ ├── UpdateCustom.go │ │ ├── UpdateGeoIp.go │ │ ├── UpdateIgnore.go │ │ ├── UpdateKnownAttackSource.go │ │ ├── UpdatePrivacy.go │ │ └── UpdateReferenceTable.go └── waf │ └── v1 │ ├── alarmnotifications │ ├── requests.go │ ├── results.go │ └── urls.go │ ├── ccattackprotection_rules │ ├── requests.go │ ├── results.go │ └── urls.go │ ├── certificates │ ├── requests.go │ ├── results.go │ └── urls.go │ ├── datamasking_rules │ ├── requests.go │ ├── results.go │ └── urls.go │ ├── domains │ ├── requests.go │ ├── results.go │ └── urls.go │ ├── falsealarmmasking_rules │ ├── requests.go │ ├── results.go │ └── urls.go │ ├── policies │ ├── requests.go │ ├── results.go │ └── urls.go │ ├── preciseprotection_rules │ ├── requests.go │ ├── results.go │ └── urls.go │ ├── webtamperprotection_rules │ ├── requests.go │ ├── results.go │ └── urls.go │ └── whiteblackip_rules │ ├── requests.go │ ├── results.go │ └── urls.go ├── pagination ├── http.go ├── info.go ├── linked.go ├── marker.go ├── offset.go ├── pager.go ├── pkg.go ├── single.go └── testing │ ├── doc.go │ ├── info_test.go │ ├── linked_test.go │ ├── marker_test.go │ ├── pagination_test.go │ └── single_test.go ├── params.go ├── params_test.go ├── provider_client.go ├── results.go ├── results_job.go ├── script ├── acceptancetest ├── bootstrap ├── cibuild ├── coverage ├── format └── unittest ├── service_client.go ├── service_client_extension.go ├── signer_helper.go ├── testhelper ├── client │ └── fake.go ├── convenience.go ├── doc.go ├── fixture │ └── helper.go └── http_responses.go ├── testing ├── doc.go ├── endpoint_search_test.go ├── params_test.go ├── provider_client_test.go ├── results_test.go ├── service_client_test.go └── util_test.go └── util.go /.github/ISSUE_TEMPLATE: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE: -------------------------------------------------------------------------------- 1 | 2 | 3 | ### What this PR does / why we need it 4 | 5 | ### Which issue this PR fixes 6 | 7 | 8 | ### Special notes for your reviewer 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/*.swp 2 | .idea 3 | .DS_Store 4 | .env 5 | *.env 6 | .vscode 7 | -------------------------------------------------------------------------------- /.golangci.yaml: -------------------------------------------------------------------------------- 1 | linters-settings: 2 | staticcheck: 3 | checks: 4 | - all 5 | # Exclude some staticcheck messages 6 | - '-SA1008' # "content-length" is not canonical, avoid OBS headers warnings 7 | - '-SA1019' # deprecations, used to avoid Extract... deprecation warnings 8 | run: 9 | timeout: 5m 10 | -------------------------------------------------------------------------------- /.old_zuul.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - project: 3 | merge-mode: squash-merge 4 | vars: 5 | functest_project_name: "eu-de_zuul_go" 6 | check: 7 | jobs: 8 | - noop 9 | - otc-golangci-lint 10 | - golang-make-vet 11 | - golang-make-test 12 | check-post: 13 | jobs: 14 | - golang-make-functional 15 | gate: 16 | jobs: 17 | - noop 18 | - otc-golangci-lint 19 | - golang-make-vet 20 | - golang-make-test 21 | - golang-make-functional 22 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentelekomcloud/gophertelekomcloud/f9d4b890682d7c54d85dd3218ea9b7b1dd75a1fc/CHANGELOG.md -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentelekomcloud/gophertelekomcloud/f9d4b890682d7c54d85dd3218ea9b7b1dd75a1fc/CODEOWNERS -------------------------------------------------------------------------------- /acceptance/openstack/css/v1/certificates_test.go: -------------------------------------------------------------------------------- 1 | package v1 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/opentelekomcloud/gophertelekomcloud/acceptance/clients" 7 | c "github.com/opentelekomcloud/gophertelekomcloud/openstack/css/v1/certifcates" 8 | th "github.com/opentelekomcloud/gophertelekomcloud/testhelper" 9 | ) 10 | 11 | func TestCertificateDownload(t *testing.T) { 12 | t.Skip("No need to run this test in CI not secure") 13 | client, err := clients.NewCssV1Client() 14 | th.AssertNoErr(t, err) 15 | _, err = c.Get(client) 16 | th.AssertNoErr(t, err) 17 | } 18 | -------------------------------------------------------------------------------- /acceptance/openstack/identity/v3/pkg.go: -------------------------------------------------------------------------------- 1 | package v3 2 | -------------------------------------------------------------------------------- /acceptance/openstack/pkg.go: -------------------------------------------------------------------------------- 1 | // +build acceptance 2 | 3 | package openstack 4 | -------------------------------------------------------------------------------- /acceptance/tools/pkg.go: -------------------------------------------------------------------------------- 1 | package tools 2 | -------------------------------------------------------------------------------- /auth_option_provider.go: -------------------------------------------------------------------------------- 1 | package golangsdk 2 | 3 | // AuthOptionsProvider presents the base of an auth options implementation 4 | type AuthOptionsProvider interface { 5 | GetIdentityEndpoint() string 6 | } 7 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/opentelekomcloud/gophertelekomcloud 2 | 3 | go 1.20 4 | 5 | require ( 6 | github.com/stretchr/testify v1.7.1 7 | golang.org/x/crypto v0.31.0 8 | gopkg.in/yaml.v2 v2.3.0 9 | ) 10 | 11 | require ( 12 | github.com/davecgh/go-spew v1.1.1 // indirect 13 | github.com/pmezard/go-difflib v1.0.0 // indirect 14 | golang.org/x/sys v0.28.0 // indirect 15 | gopkg.in/yaml.v3 v3.0.0 // indirect 16 | ) 17 | -------------------------------------------------------------------------------- /internal/build/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package build contains internal methods for building request parts: query string, headers, body. 3 | */ 4 | package build 5 | -------------------------------------------------------------------------------- /internal/build/errs.go: -------------------------------------------------------------------------------- 1 | package build 2 | 3 | import "errors" 4 | 5 | // ErrNilOpts used to be returned in case opts passed are nil. 6 | // This can be expected in some cases. 7 | var ErrNilOpts = errors.New("nil options provided") 8 | -------------------------------------------------------------------------------- /internal/extract/doc.go: -------------------------------------------------------------------------------- 1 | // Package extract contains functions for extracting JSON results into given structure or slice pointers. 2 | // Those are wrappers over `json.Marshal` and `json.Unmarshal` functions with additional validation built it 3 | package extract 4 | -------------------------------------------------------------------------------- /internal/pkg.go: -------------------------------------------------------------------------------- 1 | package internal 2 | -------------------------------------------------------------------------------- /internal/testing/pkg.go: -------------------------------------------------------------------------------- 1 | package testing 2 | -------------------------------------------------------------------------------- /openstack/antiddos/v1/antiddos/testing/doc.go: -------------------------------------------------------------------------------- 1 | package testing 2 | -------------------------------------------------------------------------------- /openstack/apigw/v2/acl/Delete.go: -------------------------------------------------------------------------------- 1 | package acl 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, gatewayID, aclID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "acls", aclID), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/acl/Get.go: -------------------------------------------------------------------------------- 1 | package acl 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, gatewayID, aclID string) (*AclResp, error) { 9 | raw, err := client.Get(client.ServiceURL("apigw", "instances", gatewayID, "acls", aclID), 10 | nil, nil) 11 | if err != nil { 12 | return nil, err 13 | } 14 | 15 | var res AclResp 16 | err = extract.Into(raw.Body, &res) 17 | return &res, err 18 | } 19 | -------------------------------------------------------------------------------- /openstack/apigw/v2/acl/UnbindPolicy.go: -------------------------------------------------------------------------------- 1 | package acl 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func UnbindPolicy(client *golangsdk.ServiceClient, gatewayID, aclBindId string) (err error) { 8 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "acl-bindings", aclBindId), nil) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/apigw/v2/api/Delete.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, gatewayID, envID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "apis", envID), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/api/Get.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, gatewayID, apiID string) (*ApiResp, error) { 9 | raw, err := client.Get(client.ServiceURL("apigw", "instances", gatewayID, "apis", apiID), 10 | nil, nil) 11 | if err != nil { 12 | return nil, err 13 | } 14 | 15 | var res ApiResp 16 | err = extract.Into(raw.Body, &res) 17 | return &res, err 18 | } 19 | -------------------------------------------------------------------------------- /openstack/apigw/v2/app/Delete.go: -------------------------------------------------------------------------------- 1 | package app 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, gatewayID, appID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "apps", appID), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/app/Get.go: -------------------------------------------------------------------------------- 1 | package app 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, gatewayID, appID string) (*AppResp, error) { 9 | raw, err := client.Get(client.ServiceURL("apigw", "instances", gatewayID, "apps", appID), 10 | nil, nil) 11 | if err != nil { 12 | return nil, err 13 | } 14 | 15 | var res AppResp 16 | err = extract.Into(raw.Body, &res) 17 | return &res, err 18 | } 19 | -------------------------------------------------------------------------------- /openstack/apigw/v2/app_auth/CancelAuth.go: -------------------------------------------------------------------------------- 1 | package app_auth 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, gatewayID, appAuthID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "app-auths", appAuthID), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/app_code/Delete.go: -------------------------------------------------------------------------------- 1 | package app_code 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, gatewayID, appID, appCodeID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "apps", appID, 7 | "app-codes", appCodeID), nil) 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /openstack/apigw/v2/authorizer/Delete.go: -------------------------------------------------------------------------------- 1 | package authorizer 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, gatewayID, authorizerID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "authorizers", authorizerID), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/cert/Delete.go: -------------------------------------------------------------------------------- 1 | package cert 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, certID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "certificates", certID), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/channel/Delete.go: -------------------------------------------------------------------------------- 1 | package channel 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, gatewayID, channelID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "vpc-channels", channelID), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/channel/DeleteMember.go: -------------------------------------------------------------------------------- 1 | package channel 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func DeleteMember(client *golangsdk.ServiceClient, gatewayID, channelID, memberID string) (err error) { 8 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "vpc-channels", channelID, "members", memberID), nil) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/apigw/v2/env/Delete.go: -------------------------------------------------------------------------------- 1 | package env 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, gatewayID, envID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "envs", envID), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/env_vars/Delete.go: -------------------------------------------------------------------------------- 1 | package env_vars 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, gatewayID, envVarID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "env-variables", envVarID), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/env_vars/Get.go: -------------------------------------------------------------------------------- 1 | package env_vars 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, gatewayID, envVarID string) (*EnvVarsResp, error) { 9 | raw, err := client.Get(client.ServiceURL("apigw", "instances", gatewayID, "env-variables", envVarID), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res EnvVarsResp 15 | err = extract.Into(raw.Body, &res) 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/apigw/v2/gateway/Delete.go: -------------------------------------------------------------------------------- 1 | package gateway 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", id), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/gateway/DisableEIP.go: -------------------------------------------------------------------------------- 1 | package gateway 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func DisableEIP(client *golangsdk.ServiceClient, id string) error { 8 | _, err := client.Delete(client.ServiceURL("apigw", "instances", id, "nat-eip"), &golangsdk.RequestOpts{ 9 | OkCodes: []int{204}, 10 | }) 11 | if err != nil { 12 | return err 13 | } 14 | 15 | return nil 16 | } 17 | -------------------------------------------------------------------------------- /openstack/apigw/v2/gateway/DisableIngressAccess.go: -------------------------------------------------------------------------------- 1 | package gateway 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // DisableIngressAccess is a method to unbind the eip associated with an existing APIG dedicated instance. 6 | func DisableIngressAccess(client *golangsdk.ServiceClient, instanceId string) error { 7 | _, err := client.Delete(client.ServiceURL("apigw", "instances", instanceId, "eip"), nil) 8 | return err 9 | } 10 | -------------------------------------------------------------------------------- /openstack/apigw/v2/gateway/DisableIngressELB.go: -------------------------------------------------------------------------------- 1 | package gateway 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // DisableElbIngressAccess is a method to unbind the ingress eip associated with an existing APIG dedicated instance. 6 | // Supported only when load balancer_provider is set to elb. 7 | func DisableElbIngressAccess(client *golangsdk.ServiceClient, instanceId string) error { 8 | _, err := client.Delete(client.ServiceURL("apigw", "instances", instanceId, "ingress-eip"), nil) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /openstack/apigw/v2/gateway/GetTags.go: -------------------------------------------------------------------------------- 1 | package gateway 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/openstack/common/tags" 6 | ) 7 | 8 | func GetTags(client *golangsdk.ServiceClient, instanceId string) ([]tags.ResourceTag, error) { 9 | var r struct { 10 | Tags []tags.ResourceTag `json:"tags"` 11 | } 12 | _, err := client.Get(client.ServiceURL("apigw", "instances", instanceId, "instance-tags"), &r, nil) 13 | return r.Tags, err 14 | } 15 | -------------------------------------------------------------------------------- /openstack/apigw/v2/group/Delete.go: -------------------------------------------------------------------------------- 1 | package group 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, gatewayID, groupID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "api-groups", groupID), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/group/Get.go: -------------------------------------------------------------------------------- 1 | package group 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, gatewayID, groupID string) (*GroupResp, error) { 9 | raw, err := client.Get(client.ServiceURL("apigw", "instances", gatewayID, "api-groups", groupID), 10 | nil, nil) 11 | if err != nil { 12 | return nil, err 13 | } 14 | 15 | var res GroupResp 16 | err = extract.Into(raw.Body, &res) 17 | return &res, err 18 | } 19 | -------------------------------------------------------------------------------- /openstack/apigw/v2/key/Delete.go: -------------------------------------------------------------------------------- 1 | package key 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, gatewayID, groupID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "signs", groupID), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/key/UnbindKey.go: -------------------------------------------------------------------------------- 1 | package key 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func UnbindKey(client *golangsdk.ServiceClient, gatewayID, signBindingID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "sign-bindings", signBindingID), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/response/Delete.go: -------------------------------------------------------------------------------- 1 | package response 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, gatewayID, groupID, id string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "api-groups", groupID, "gateway-responses", id), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/response/DeleteErrorType.go: -------------------------------------------------------------------------------- 1 | package response 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func DeleteErrorType(client *golangsdk.ServiceClient, gatewayID, groupID, id, respType string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "api-groups", groupID, "gateway-responses", id, respType), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/tr_policy/Delete.go: -------------------------------------------------------------------------------- 1 | package throttling_policy 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, gatewayID, throttleID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "throttles", throttleID), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/tr_policy/UnbindPolicy.go: -------------------------------------------------------------------------------- 1 | package throttling_policy 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func UnbindPolicy(client *golangsdk.ServiceClient, gatewayID, throttleBindID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "throttle-bindings", throttleBindID), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/apigw/v2/tr_specials/Delete.go: -------------------------------------------------------------------------------- 1 | package special_policy 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, gatewayID, throttleID, strategyID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("apigw", "instances", gatewayID, "throttles", throttleID, 7 | "throttle-specials", strategyID), nil) 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /openstack/autoscaling/v1/configurations/delete.go: -------------------------------------------------------------------------------- 1 | package configurations 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("scaling_configuration", id), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/autoscaling/v1/groups/delete.go: -------------------------------------------------------------------------------- 1 | package groups 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | type DeleteOpts struct { 6 | ScalingGroupId string 7 | ForceDelete *bool `q:"force_delete"` 8 | } 9 | 10 | func Delete(client *golangsdk.ServiceClient, opts DeleteOpts) (err error) { 11 | url, err := golangsdk.NewURLBuilder().WithEndpoints("scaling_group", opts.ScalingGroupId).WithQueryParams(&opts).Build() 12 | if err != nil { 13 | return 14 | } 15 | 16 | _, err = client.Delete(client.ServiceURL(url.String()), nil) 17 | return 18 | } 19 | -------------------------------------------------------------------------------- /openstack/autoscaling/v1/groups/get.go: -------------------------------------------------------------------------------- 1 | package groups 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*Group, error) { 9 | raw, err := client.Get(client.ServiceURL("scaling_group", id), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res Group 15 | err = extract.IntoStructPtr(raw.Body, &res, "scaling_group") 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/autoscaling/v1/policies/delete.go: -------------------------------------------------------------------------------- 1 | package policies 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("scaling_policy", id), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/autoscaling/v1/tags/get.go: -------------------------------------------------------------------------------- 1 | package tags 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*ResourceTags, error) { 9 | raw, err := client.Get(client.ServiceURL("scaling_group_tag", id, "tags"), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res ResourceTags 15 | err = extract.Into(raw.Body, &res) 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/autoscaling/v2/policies/delete.go: -------------------------------------------------------------------------------- 1 | package policies 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("scaling_policy", id), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/blockstorage/v2/snapshots/doc.go: -------------------------------------------------------------------------------- 1 | // Package snapshots provides information and interaction with snapshots in the 2 | // OpenStack Block Storage service. A snapshot is a point in time copy of the 3 | // data contained in an external storage volume, and can be controlled 4 | // programmatically. 5 | package snapshots 6 | -------------------------------------------------------------------------------- /openstack/blockstorage/v2/snapshots/testing/doc.go: -------------------------------------------------------------------------------- 1 | // snapshots_v2 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/blockstorage/v2/volumes/doc.go: -------------------------------------------------------------------------------- 1 | // Package volumes provides information and interaction with volumes in the 2 | // OpenStack Block Storage service. A volume is a detachable block storage 3 | // device, akin to a USB hard drive. It can only be attached to one instance at 4 | // a time. 5 | package volumes 6 | -------------------------------------------------------------------------------- /openstack/blockstorage/v2/volumes/testing/doc.go: -------------------------------------------------------------------------------- 1 | // volumes_v2 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/blockstorage/v3/snapshots/doc.go: -------------------------------------------------------------------------------- 1 | // Package snapshots provides information and interaction with snapshots in the 2 | // OpenStack Block Storage service. A snapshot is a point in time copy of the 3 | // data contained in an external storage volume, and can be controlled 4 | // programmatically. 5 | package snapshots 6 | -------------------------------------------------------------------------------- /openstack/blockstorage/v3/snapshots/testing/doc.go: -------------------------------------------------------------------------------- 1 | // snapshots_v3 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/blockstorage/v3/volumes/doc.go: -------------------------------------------------------------------------------- 1 | // Package volumes provides information and interaction with volumes in the 2 | // OpenStack Block Storage service. A volume is a detachable block storage 3 | // device, akin to a USB hard drive. It can only be attached to one instance at 4 | // a time. 5 | package volumes 6 | -------------------------------------------------------------------------------- /openstack/blockstorage/v3/volumes/testing/doc.go: -------------------------------------------------------------------------------- 1 | // volumes_v3 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/blockstorage/v3/volumetypes/testing/doc.go: -------------------------------------------------------------------------------- 1 | // volume_types 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/bms/v2/tags/delete.go: -------------------------------------------------------------------------------- 1 | package tags 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // Delete will permanently delete a particular tag based on its unique ID. 6 | func Delete(c *golangsdk.ServiceClient, serverId string) (err error) { 7 | _, err = c.Delete(c.ServiceURL("servers", serverId, "tags"), nil) 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /openstack/bms/v2/tags/get.go: -------------------------------------------------------------------------------- 1 | package tags 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | // Get retrieves a particular tag based on its unique ID. 9 | func Get(c *golangsdk.ServiceClient, serverId string) ([]string, error) { 10 | raw, err := c.Get(c.ServiceURL("servers", serverId, "tags"), nil, nil) 11 | if err != nil { 12 | return nil, err 13 | } 14 | 15 | var res []string 16 | err = extract.IntoSlicePtr(raw.Body, &res, "tags") 17 | return res, err 18 | } 19 | -------------------------------------------------------------------------------- /openstack/cbr/v3/backups/Delete.go: -------------------------------------------------------------------------------- 1 | package backups 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("backups", id), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/cbr/v3/backups/DeleteSharingMember.go: -------------------------------------------------------------------------------- 1 | package backups 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func DeleteSharingMember(client *golangsdk.ServiceClient, id, memberID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("backups", id, "members", memberID), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/cbr/v3/backups/Get.go: -------------------------------------------------------------------------------- 1 | package backups 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*Backup, error) { 9 | raw, err := client.Get(client.ServiceURL("backups", id), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res Backup 15 | err = extract.IntoStructPtr(raw.Body, &res, "backup") 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/cbr/v3/backups/GetMember.go: -------------------------------------------------------------------------------- 1 | package backups 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func GetSharingMember(client *golangsdk.ServiceClient, id, memberID string) (*Member, error) { 9 | raw, err := client.Get(client.ServiceURL("backups", id, "members", memberID), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res Member 15 | err = extract.IntoStructPtr(raw.Body, &res, "member") 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/cbr/v3/checkpoint/Get.go: -------------------------------------------------------------------------------- 1 | package checkpoint 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*Checkpoint, error) { 9 | raw, err := client.Get(client.ServiceURL("checkpoints", id), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res Checkpoint 15 | err = extract.IntoStructPtr(raw.Body, &res, "checkpoint") 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/cbr/v3/policies/Delete.go: -------------------------------------------------------------------------------- 1 | package policies 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("policies", id), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/cbr/v3/policies/Get.go: -------------------------------------------------------------------------------- 1 | package policies 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*Policy, error) { 9 | raw, err := client.Get(client.ServiceURL("policies", id), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res Policy 15 | err = extract.IntoStructPtr(raw.Body, &res, "policy") 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/cbr/v3/tasks/Get.go: -------------------------------------------------------------------------------- 1 | package tasks 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*OperationLog, error) { 9 | raw, err := client.Get(client.ServiceURL("operation-logs", id), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res OperationLog 15 | err = extract.IntoStructPtr(raw.Body, &res, "operation_log") 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/cbr/v3/vaults/Delete.go: -------------------------------------------------------------------------------- 1 | package vaults 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("vaults", id), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/cbr/v3/vaults/Get.go: -------------------------------------------------------------------------------- 1 | package vaults 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*Vault, error) { 9 | raw, err := client.Get(client.ServiceURL("vaults", id), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res Vault 15 | return &res, extract.IntoStructPtr(raw.Body, &res, "vault") 16 | } 17 | -------------------------------------------------------------------------------- /openstack/cce/v3/addons/GetTemplates.go: -------------------------------------------------------------------------------- 1 | package addons 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func GetTemplates(client *golangsdk.ServiceClient) (*AddonTemplateList, error) { 9 | raw, err := client.Get(client.ServiceURL("addontemplates"), nil, &golangsdk.RequestOpts{ 10 | OkCodes: []int{200}, 11 | }) 12 | if err != nil { 13 | return nil, err 14 | } 15 | 16 | var res AddonTemplateList 17 | return &res, extract.Into(raw.Body, &res) 18 | } 19 | -------------------------------------------------------------------------------- /openstack/cce/v3/clusters/testing/doc.go: -------------------------------------------------------------------------------- 1 | // cluster unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/cce/v3/common/common_tests.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/testhelper/client" 6 | ) 7 | 8 | const TokenID = client.TokenID 9 | 10 | func ServiceClient() *golangsdk.ServiceClient { 11 | sc := client.ServiceClient() 12 | sc.ResourceBase = sc.Endpoint + "api/" + "v3/" + "projects/" + "c59fd21fd2a94963b822d8985b884673/" 13 | return sc 14 | } 15 | -------------------------------------------------------------------------------- /openstack/cce/v3/nodes/testing/doc.go: -------------------------------------------------------------------------------- 1 | // node unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/cci/v2/pod/ConnectGet.go: -------------------------------------------------------------------------------- 1 | package pod 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func ConnectGet(client *golangsdk.ServiceClient, namespace string, name string) error { 8 | // GET /apis/cci/v2/namespaces/{namespace}/pods/{name}/exec 9 | _, err := client.Get(client.ServiceURL("namespaces", namespace, "pods", name, "exec"), nil, &golangsdk.RequestOpts{ 10 | OkCodes: []int{200}, 11 | MoreHeaders: map[string]string{ 12 | "Content-Type": "application/json", 13 | }, 14 | }) 15 | 16 | return err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/ces/v1/alarms/delete_alarm.go: -------------------------------------------------------------------------------- 1 | package alarms 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func DeleteAlarm(client *golangsdk.ServiceClient, id string) (err error) { 6 | // DELETE /V1.0/{project_id}/alarms/{alarm_id} 7 | _, err = client.Delete(client.ServiceURL("alarms", id), nil) 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /openstack/ces/v1/metrics/urls.go: -------------------------------------------------------------------------------- 1 | package metrics 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // GET /V1.0/{project_id}/metrics 6 | func metricsURL(c *golangsdk.ServiceClient) string { 7 | return c.ServiceURL("metrics") 8 | } 9 | -------------------------------------------------------------------------------- /openstack/ces/v1/quotas/requests.go: -------------------------------------------------------------------------------- 1 | package quotas 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func ShowQuotas(client *golangsdk.ServiceClient) (r ShowQuotasResult) { 6 | _, r.Err = client.Get(quotasURL(client), &r.Body, nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/ces/v1/quotas/urls.go: -------------------------------------------------------------------------------- 1 | package quotas 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // GET /V1.0/{project_id}/quotas 6 | func quotasURL(c *golangsdk.ServiceClient) string { 7 | return c.ServiceURL("quotas") 8 | } 9 | -------------------------------------------------------------------------------- /openstack/cfw/v1/acl/Delete.go: -------------------------------------------------------------------------------- 1 | package acl 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // This function is used to delete an ACL rule. 6 | func DeleteACLRule(client *golangsdk.ServiceClient, ruleId string) error { 7 | // DELETE /v1/{project_id}/acl-rule/{acl_rule_id} 8 | _, err := client.Delete(client.ServiceURL("acl-rule", ruleId), &golangsdk.RequestOpts{ 9 | OkCodes: []int{200}, 10 | MoreHeaders: map[string]string{"Content-Type": "application/json"}, 11 | }) 12 | return err 13 | } 14 | -------------------------------------------------------------------------------- /openstack/cfw/v2/management/Common.go: -------------------------------------------------------------------------------- 1 | package management 2 | 3 | type CreateTags struct { 4 | // Resource tag key. 5 | Key string `json:"key,omitempty"` 6 | 7 | // Resource tag value. 8 | Value string `json:"value,omitempty"` 9 | } 10 | 11 | type Tags struct { 12 | // Resource tag key. 13 | Key string `json:"key"` 14 | // Resource tag value. 15 | Value string `json:"value"` 16 | } 17 | -------------------------------------------------------------------------------- /openstack/common/extensions/testing/doc.go: -------------------------------------------------------------------------------- 1 | // common extensions unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/common/extensions/urls.go: -------------------------------------------------------------------------------- 1 | package extensions 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // ExtensionURL generates the URL for an extension resource by name. 6 | func ExtensionURL(c *golangsdk.ServiceClient, name string) string { 7 | return c.ServiceURL("extensions", name) 8 | } 9 | 10 | // ListExtensionURL generates the URL for the extensions resource collection. 11 | func ListExtensionURL(c *golangsdk.ServiceClient) string { 12 | return c.ServiceURL("extensions") 13 | } 14 | -------------------------------------------------------------------------------- /openstack/common/metadata/metadata.go: -------------------------------------------------------------------------------- 1 | package metadata 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 7 | ) 8 | 9 | // result is a struct wrapper for a metadata map 10 | type result struct { 11 | Metadata map[string]interface{} `json:"metadata"` 12 | } 13 | 14 | func Extract(reader io.Reader) (map[string]interface{}, error) { 15 | metadata := new(result) 16 | err := extract.Into(reader, metadata) 17 | if err != nil { 18 | return nil, err 19 | } 20 | 21 | return metadata.Metadata, nil 22 | } 23 | -------------------------------------------------------------------------------- /openstack/common/pointerto/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package pointerto provides functions for simple pointer wrapping: type -> *type. 3 | 4 | After moving to Go 1.18+ this should be replaced (with deprecation) with a single generic function. 5 | */ 6 | package pointerto 7 | -------------------------------------------------------------------------------- /openstack/common/pointerto/pointers.go: -------------------------------------------------------------------------------- 1 | package pointerto 2 | 3 | // Int returns pointer to given int value. 4 | func Int(src int) *int { 5 | return &src 6 | } 7 | 8 | func Int64(src int64) *int64 { 9 | return &src 10 | } 11 | 12 | // String returns pointer to given string value. 13 | func String(src string) *string { 14 | return &src 15 | } 16 | 17 | // Bool returns pointer to given bool value. 18 | func Bool(src bool) *bool { 19 | return &src 20 | } 21 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/attachinterfaces/testing/doc.go: -------------------------------------------------------------------------------- 1 | // attachinterfaces unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/availabilityzones/testing/doc.go: -------------------------------------------------------------------------------- 1 | // availabilityzones unittests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/availabilityzones/urls.go: -------------------------------------------------------------------------------- 1 | package availabilityzones 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func listURL(c *golangsdk.ServiceClient) string { 6 | return c.ServiceURL("os-availability-zone") 7 | } 8 | 9 | func listDetailURL(c *golangsdk.ServiceClient) string { 10 | return c.ServiceURL("os-availability-zone", "detail") 11 | } 12 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/bootfromvolume/results.go: -------------------------------------------------------------------------------- 1 | package bootfromvolume 2 | 3 | import ( 4 | os "github.com/opentelekomcloud/gophertelekomcloud/openstack/compute/v2/servers" 5 | ) 6 | 7 | // CreateResult temporarily contains the response from a Create call. 8 | // It embeds the standard servers.CreateResults type and so can be used the 9 | // same way as a standard server request result. 10 | type CreateResult struct { 11 | os.CreateResult 12 | } 13 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/bootfromvolume/testing/doc.go: -------------------------------------------------------------------------------- 1 | // bootfromvolume unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/bootfromvolume/urls.go: -------------------------------------------------------------------------------- 1 | package bootfromvolume 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func createURL(c *golangsdk.ServiceClient) string { 6 | return c.ServiceURL("os-volumes_boot") 7 | } 8 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/defsecrules/testing/doc.go: -------------------------------------------------------------------------------- 1 | // defsecrules unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/defsecrules/urls.go: -------------------------------------------------------------------------------- 1 | package defsecrules 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const rulepath = "os-security-group-default-rules" 6 | 7 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 8 | return c.ServiceURL(rulepath, id) 9 | } 10 | 11 | func rootURL(c *golangsdk.ServiceClient) string { 12 | return c.ServiceURL(rulepath) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/diskconfig/results.go: -------------------------------------------------------------------------------- 1 | package diskconfig 2 | 3 | type ServerDiskConfigExt struct { 4 | // DiskConfig is the disk configuration of the server. 5 | DiskConfig DiskConfig `json:"OS-DCF:diskConfig"` 6 | } 7 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/diskconfig/testing/doc.go: -------------------------------------------------------------------------------- 1 | // diskconfig unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/doc.go: -------------------------------------------------------------------------------- 1 | // Package extensions provides information and interaction with the 2 | // different extensions available for the OpenStack Compute service. 3 | package extensions 4 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/evacuate/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package evacuate provides functionality to evacuates servers that have been 3 | provisioned by the OpenStack Compute service from a failed host to a new host. 4 | 5 | Example to Evacuate a Server from a Host 6 | 7 | serverID := "b16ba811-199d-4ffd-8839-ba96c1185a67" 8 | err := evacuate.Evacuate(computeClient, serverID, evacuate.EvacuateOpts{}).ExtractErr() 9 | if err != nil { 10 | panic(err) 11 | } 12 | */ 13 | package evacuate 14 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/evacuate/testing/doc.go: -------------------------------------------------------------------------------- 1 | // compute_extensions_evacuate_v2 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/evacuate/urls.go: -------------------------------------------------------------------------------- 1 | package evacuate 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func actionURL(client *golangsdk.ServiceClient, id string) string { 8 | return client.ServiceURL("servers", id, "action") 9 | } 10 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/extendedserverattributes/testing/doc.go: -------------------------------------------------------------------------------- 1 | package testing 2 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/floatingips/testing/doc.go: -------------------------------------------------------------------------------- 1 | // floatingips unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/keypairs/testing/doc.go: -------------------------------------------------------------------------------- 1 | // keypairs unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/limits/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package limits shows rate and limit information for a tenant/project. 3 | 4 | Example to Retrieve Limits for a Tenant 5 | 6 | getOpts := limits.GetOpts{ 7 | TenantID: "tenant-id", 8 | } 9 | 10 | limits, err := limits.Get(computeClient, getOpts).Extract() 11 | if err != nil { 12 | panic(err) 13 | } 14 | 15 | fmt.Printf("%+v\n", limits) 16 | */ 17 | package limits 18 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/limits/urls.go: -------------------------------------------------------------------------------- 1 | package limits 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | const resourcePath = "limits" 8 | 9 | func getURL(c *golangsdk.ServiceClient) string { 10 | return c.ServiceURL(resourcePath) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/lockunlock/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package lockunlock provides functionality to lock and unlock servers that 3 | have been provisioned by the OpenStack Compute service. 4 | 5 | Example to Lock and Unlock a Server 6 | 7 | serverID := "47b6b7b7-568d-40e4-868c-d5c41735532e" 8 | 9 | err := lockunlock.Lock(computeClient, serverID).ExtractErr() 10 | if err != nil { 11 | panic(err) 12 | } 13 | 14 | err = lockunlock.Unlock(computeClient, serverID).ExtractErr() 15 | if err != nil { 16 | panic(err) 17 | } 18 | */ 19 | package lockunlock 20 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/lockunlock/results.go: -------------------------------------------------------------------------------- 1 | package lockunlock 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | // LockResult and UnlockResult are the responses from a Lock and Unlock 8 | // operations respectively. Call their ExtractErr methods to determine if the 9 | // requests suceeded or failed. 10 | type LockResult struct { 11 | golangsdk.ErrResult 12 | } 13 | 14 | type UnlockResult struct { 15 | golangsdk.ErrResult 16 | } 17 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/lockunlock/testing/doc.go: -------------------------------------------------------------------------------- 1 | // unlocklock unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/migrate/results.go: -------------------------------------------------------------------------------- 1 | package migrate 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | // MigrateResult is the response from a Migrate operation. Call its ExtractErr 8 | // method to determine if the request suceeded or failed. 9 | type MigrateResult struct { 10 | golangsdk.ErrResult 11 | } 12 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/migrate/testing/doc.go: -------------------------------------------------------------------------------- 1 | // compute_extensions_startstop_v2 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/migrate/urls.go: -------------------------------------------------------------------------------- 1 | package migrate 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func actionURL(client *golangsdk.ServiceClient, id string) string { 8 | return client.ServiceURL("servers", id, "action") 9 | } 10 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/networks/testing/doc.go: -------------------------------------------------------------------------------- 1 | // networks unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/networks/urls.go: -------------------------------------------------------------------------------- 1 | package networks 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const resourcePath = "os-networks" 6 | 7 | func resourceURL(c *golangsdk.ServiceClient) string { 8 | return c.ServiceURL(resourcePath) 9 | } 10 | 11 | func listURL(c *golangsdk.ServiceClient) string { 12 | return resourceURL(c) 13 | } 14 | 15 | func getURL(c *golangsdk.ServiceClient, id string) string { 16 | return c.ServiceURL(resourcePath, id) 17 | } 18 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/pauseunpause/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package pauseunpause provides functionality to pause and unpause servers that 3 | have been provisioned by the OpenStack Compute service. 4 | 5 | Example to Pause and Unpause a Server 6 | 7 | serverID := "32c8baf7-1cdb-4cc2-bc31-c3a55b89f56b" 8 | err := pauseunpause.Pause(computeClient, serverID).ExtractErr() 9 | if err != nil { 10 | panic(err) 11 | } 12 | 13 | err = pauseunpause.Unpause(computeClient, serverID).ExtractErr() 14 | if err != nil { 15 | panic(err) 16 | } 17 | */ 18 | package pauseunpause 19 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/pauseunpause/results.go: -------------------------------------------------------------------------------- 1 | package pauseunpause 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // PauseResult is the response from a Pause operation. Call its ExtractErr 6 | // method to determine if the request succeeded or failed. 7 | type PauseResult struct { 8 | golangsdk.ErrResult 9 | } 10 | 11 | // UnpauseResult is the response from an Unpause operation. Call its ExtractErr 12 | // method to determine if the request succeeded or failed. 13 | type UnpauseResult struct { 14 | golangsdk.ErrResult 15 | } 16 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/pauseunpause/testing/doc.go: -------------------------------------------------------------------------------- 1 | // pauseunpause unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/quotasets/testing/doc.go: -------------------------------------------------------------------------------- 1 | // quotasets unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/rescueunrescue/testing/doc.go: -------------------------------------------------------------------------------- 1 | package testing 2 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/rescueunrescue/urls.go: -------------------------------------------------------------------------------- 1 | package rescueunrescue 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func actionURL(client *golangsdk.ServiceClient, id string) string { 6 | return client.ServiceURL("servers", id, "action") 7 | } 8 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/resetstate/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package resetstate provides functionality to reset the state of a server that has 3 | been provisioned by the OpenStack Compute service. 4 | 5 | Example to Reset a Server 6 | 7 | serverID := "47b6b7b7-568d-40e4-868c-d5c41735532e" 8 | err := resetstate.ResetState(client, id, resetstate.StateActive).ExtractErr() 9 | if err != nil { 10 | panic(err) 11 | } 12 | */ 13 | package resetstate 14 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/resetstate/results.go: -------------------------------------------------------------------------------- 1 | package resetstate 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | // ResetResult is the response of a ResetState operation. Call its ExtractErr 8 | // method to determine if the request suceeded or failed. 9 | type ResetResult struct { 10 | golangsdk.ErrResult 11 | } 12 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/resetstate/testing/doc.go: -------------------------------------------------------------------------------- 1 | package testing 2 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/resetstate/urls.go: -------------------------------------------------------------------------------- 1 | package resetstate 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func actionURL(client *golangsdk.ServiceClient, id string) string { 8 | return client.ServiceURL("servers", id, "action") 9 | } 10 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/schedulerhints/testing/doc.go: -------------------------------------------------------------------------------- 1 | // schedulerhints unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/secgroups/testing/doc.go: -------------------------------------------------------------------------------- 1 | // secgroups unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/servergroups/testing/doc.go: -------------------------------------------------------------------------------- 1 | // servergroups unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/serverusage/testing/doc.go: -------------------------------------------------------------------------------- 1 | package testing 2 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/services/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package services returns information about the compute services in the OpenStack 3 | cloud. 4 | 5 | Example of Retrieving list of all services 6 | 7 | allPages, err := services.List(computeClient).AllPages() 8 | if err != nil { 9 | panic(err) 10 | } 11 | 12 | allServices, err := services.ExtractServices(allPages) 13 | if err != nil { 14 | panic(err) 15 | } 16 | 17 | for _, service := range allServices { 18 | fmt.Printf("%+v\n", service) 19 | } 20 | */ 21 | 22 | package services 23 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/services/requests.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/pagination" 6 | ) 7 | 8 | // List makes a request against the API to list services. 9 | func List(client *golangsdk.ServiceClient) pagination.Pager { 10 | return pagination.NewPager(client, listURL(client), func(r pagination.PageResult) pagination.Page { 11 | return ServicePage{pagination.SinglePageBase(r)} 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/services/urls.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func listURL(c *golangsdk.ServiceClient) string { 6 | return c.ServiceURL("os-services") 7 | } 8 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/startstop/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package startstop provides functionality to start and stop servers that have 3 | been provisioned by the OpenStack Compute service. 4 | 5 | Example to Stop and Start a Server 6 | 7 | serverID := "47b6b7b7-568d-40e4-868c-d5c41735532e" 8 | 9 | err := startstop.Stop(computeClient, serverID).ExtractErr() 10 | if err != nil { 11 | panic(err) 12 | } 13 | 14 | err := startstop.Start(computeClient, serverID).ExtractErr() 15 | if err != nil { 16 | panic(err) 17 | } 18 | */ 19 | package startstop 20 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/startstop/results.go: -------------------------------------------------------------------------------- 1 | package startstop 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // StartResult is the response from a Start operation. Call its ExtractErr 6 | // method to determine if the request succeeded or failed. 7 | type StartResult struct { 8 | golangsdk.ErrResult 9 | } 10 | 11 | // StopResult is the response from Stop operation. Call its ExtractErr 12 | // method to determine if the request succeeded or failed. 13 | type StopResult struct { 14 | golangsdk.ErrResult 15 | } 16 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/startstop/testing/doc.go: -------------------------------------------------------------------------------- 1 | // startstop unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/suspendresume/results.go: -------------------------------------------------------------------------------- 1 | package suspendresume 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // SuspendResult is the response from a Suspend operation. Call its 6 | // ExtractErr method to determine if the request succeeded or failed. 7 | type SuspendResult struct { 8 | golangsdk.ErrResult 9 | } 10 | 11 | // UnsuspendResult is the response from an Unsuspend operation. Call 12 | // its ExtractErr method to determine if the request succeeded or failed. 13 | type UnsuspendResult struct { 14 | golangsdk.ErrResult 15 | } 16 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/suspendresume/testing/doc.go: -------------------------------------------------------------------------------- 1 | // suspendresume unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/tags/urls.go: -------------------------------------------------------------------------------- 1 | package tags 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func createURL(c *golangsdk.ServiceClient, server_id string) string { 8 | return c.ServiceURL("servers", server_id, "tags") 9 | } 10 | 11 | func getURL(c *golangsdk.ServiceClient, server_id string) string { 12 | return c.ServiceURL("servers", server_id, "tags") 13 | } 14 | 15 | func deleteURL(c *golangsdk.ServiceClient, server_id string) string { 16 | return c.ServiceURL("servers", server_id, "tags") 17 | } 18 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/tenantnetworks/testing/doc.go: -------------------------------------------------------------------------------- 1 | // tenantnetworks unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/tenantnetworks/urls.go: -------------------------------------------------------------------------------- 1 | package tenantnetworks 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const resourcePath = "os-tenant-networks" 6 | 7 | func resourceURL(c *golangsdk.ServiceClient) string { 8 | return c.ServiceURL(resourcePath) 9 | } 10 | 11 | func listURL(c *golangsdk.ServiceClient) string { 12 | return resourceURL(c) 13 | } 14 | 15 | func getURL(c *golangsdk.ServiceClient, id string) string { 16 | return c.ServiceURL(resourcePath, id) 17 | } 18 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/testing/doc.go: -------------------------------------------------------------------------------- 1 | // extensions unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/usage/testing/doc.go: -------------------------------------------------------------------------------- 1 | // simple tenant usage unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/usage/urls.go: -------------------------------------------------------------------------------- 1 | package usage 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const resourcePath = "os-simple-tenant-usage" 6 | 7 | func allTenantsURL(client *golangsdk.ServiceClient) string { 8 | return client.ServiceURL(resourcePath) 9 | } 10 | 11 | func getTenantURL(client *golangsdk.ServiceClient, tenantID string) string { 12 | return client.ServiceURL(resourcePath, tenantID) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/compute/v2/extensions/volumeattach/testing/doc.go: -------------------------------------------------------------------------------- 1 | // volumeattach unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/flavors/testing/doc.go: -------------------------------------------------------------------------------- 1 | // flavors unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/compute/v2/servers/testing/doc.go: -------------------------------------------------------------------------------- 1 | // servers unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/csbs/v1/backup/Delete.go: -------------------------------------------------------------------------------- 1 | package backup 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // Delete will delete an existing backup. 6 | func Delete(client *golangsdk.ServiceClient, checkpointID string) (err error) { 7 | // https://{endpoint}/v1/{project_id}/providers/{provider_id}/checkpoints/{checkpoint_id} 8 | _, err = client.Delete(client.ServiceURL("providers", ProviderID, "checkpoints", checkpointID), &golangsdk.RequestOpts{ 9 | OkCodes: []int{200}, 10 | }) 11 | return 12 | } 13 | -------------------------------------------------------------------------------- /openstack/csbs/v1/policies/Delete.go: -------------------------------------------------------------------------------- 1 | package policies 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // Delete will delete an existing backup policy. 6 | func Delete(client *golangsdk.ServiceClient, policyId string) (err error) { 7 | _, err = client.Delete(client.ServiceURL("policies", policyId), &golangsdk.RequestOpts{ 8 | OkCodes: []int{200}, 9 | }) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /openstack/css/v1/clusters/Delete.go: -------------------------------------------------------------------------------- 1 | package clusters 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("clusters", id), &golangsdk.RequestOpts{ 7 | OkCodes: []int{200}, 8 | MoreHeaders: map[string]string{ 9 | "Content-Type": "application/json", 10 | }, 11 | }) 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /openstack/css/v1/clusters/DisablePublicWhitelist.go: -------------------------------------------------------------------------------- 1 | package clusters 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // DisablePublicWhitelist function is used to disable whitelist for a single ip 6 | func DisablePublicWhitelist(client *golangsdk.ServiceClient, clusterID string) error { 7 | _, err := client.Put(client.ServiceURL("clusters", clusterID, "public", "whitelist", "close"), nil, nil, &golangsdk.RequestOpts{ 8 | OkCodes: []int{200}, 9 | }) 10 | return err 11 | } 12 | -------------------------------------------------------------------------------- /openstack/css/v1/clusters/Get.go: -------------------------------------------------------------------------------- 1 | package clusters 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*Cluster, error) { 9 | raw, err := client.Get(client.ServiceURL("clusters", id), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res Cluster 15 | err = extract.Into(raw.Body, &res) 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/css/v1/clusters/List.go: -------------------------------------------------------------------------------- 1 | package clusters 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func List(client *golangsdk.ServiceClient) ([]Cluster, error) { 9 | raw, err := client.Get(client.ServiceURL("clusters"), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res []Cluster 15 | err = extract.IntoSlicePtr(raw.Body, &res, "clusters") 16 | return res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/css/v1/clusters/RestartCluster.go: -------------------------------------------------------------------------------- 1 | package clusters 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // RestartCluster function is used to restart a cluster. 6 | func RestartCluster(client *golangsdk.ServiceClient, clusterID string) error { 7 | _, err := client.Post(client.ServiceURL("clusters", clusterID, "restart"), nil, nil, &golangsdk.RequestOpts{ 8 | OkCodes: []int{200}, 9 | }) 10 | return err 11 | } 12 | -------------------------------------------------------------------------------- /openstack/css/v1/flavors/List.go: -------------------------------------------------------------------------------- 1 | package flavors 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func List(client *golangsdk.ServiceClient) ([]Version, error) { 9 | raw, err := client.Get(client.ServiceURL("flavors"), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res []Version 15 | err = extract.IntoSlicePtr(raw.Body, &res, "versions") 16 | return res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/css/v1/snapshots/Delete.go: -------------------------------------------------------------------------------- 1 | package snapshots 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // Delete will delete the existing Snapshot ID with the provided ID. 6 | func Delete(client *golangsdk.ServiceClient, clusterId, id string) (err error) { 7 | _, err = client.Delete(client.ServiceURL("clusters", clusterId, "index_snapshot", id), &golangsdk.RequestOpts{ 8 | OkCodes: []int{200}, 9 | MoreHeaders: map[string]string{"Content-Type": "application/json"}, 10 | }) 11 | return 12 | } 13 | -------------------------------------------------------------------------------- /openstack/css/v1/snapshots/Disable.go: -------------------------------------------------------------------------------- 1 | package snapshots 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // Disable will disable the Snapshot function with the provided ID. 6 | func Disable(client *golangsdk.ServiceClient, clusterId string) (err error) { 7 | _, err = client.Delete(client.ServiceURL("clusters", clusterId, "index_snapshots"), &golangsdk.RequestOpts{ 8 | OkCodes: []int{200}, 9 | MoreHeaders: map[string]string{ 10 | "content-type": "application/json", 11 | }, 12 | }) 13 | return 14 | } 15 | -------------------------------------------------------------------------------- /openstack/css/v1/snapshots/Enable.go: -------------------------------------------------------------------------------- 1 | package snapshots 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // Enable will enable the Snapshot function with the provided ID. 6 | func Enable(client *golangsdk.ServiceClient, clusterId string) (err error) { 7 | _, err = client.Post(client.ServiceURL("clusters", clusterId, "index_snapshot/auto_setting"), nil, nil, &golangsdk.RequestOpts{ 8 | OkCodes: []int{200}, 9 | MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, 10 | }) 11 | return 12 | } 13 | -------------------------------------------------------------------------------- /openstack/cts/v3/keyevent/Delete.go: -------------------------------------------------------------------------------- 1 | package keyevent 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | type DeleteOpts struct { 8 | NotificationId []string `q:"notification_id"` 9 | } 10 | 11 | func Delete(client *golangsdk.ServiceClient, opts DeleteOpts) (err error) { 12 | q, err := golangsdk.BuildQueryString(opts) 13 | if err != nil { 14 | return 15 | } 16 | 17 | // DELETE /v3/{project_id}/notifications 18 | url := client.ServiceURL("notifications") + q.String() 19 | _, err = client.Delete(url, nil) 20 | return 21 | } 22 | -------------------------------------------------------------------------------- /openstack/dataarts/v1.1/job/Delete.go: -------------------------------------------------------------------------------- 1 | package job 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | // Delete is used to delete a job. 8 | // Send request DELETE /v1.1/{project_id}/clusters/{cluster_id}/cdm/job/{job_name} 9 | func Delete(client *golangsdk.ServiceClient, clusterId, jobName string) error { 10 | _, err := client.Delete(client.ServiceURL(clustersEndpoint, clusterId, cdmEndpoint, jobEndpoint, jobName), nil) 11 | if err != nil { 12 | return err 13 | } 14 | 15 | return nil 16 | } 17 | -------------------------------------------------------------------------------- /openstack/dataarts/v1.1/job/common.go: -------------------------------------------------------------------------------- 1 | package job 2 | 3 | const ( 4 | HeaderXLanguage = "X-Language" 5 | HeaderContentType = "Content-Type" 6 | 7 | ApplicationJson = "application/json" 8 | ) 9 | 10 | const ( 11 | clustersEndpoint = "clusters" 12 | jobEndpoint = "job" 13 | cdmEndpoint = "cdm" 14 | ) 15 | 16 | type JobId struct { 17 | JobId string `json:"jobId"` 18 | } 19 | -------------------------------------------------------------------------------- /openstack/dataarts/v1.1/link/common.go: -------------------------------------------------------------------------------- 1 | package link 2 | 3 | const ( 4 | clustersEndpoint = "clusters" 5 | cdmEndpoint = "cdm" 6 | linkEndpoint = "link" 7 | ) 8 | 9 | type JobId struct { 10 | JobId string `json:"jobId"` 11 | } 12 | -------------------------------------------------------------------------------- /openstack/dataarts/v1/job/common.go: -------------------------------------------------------------------------------- 1 | package job 2 | 3 | const ( 4 | HeaderWorkspace = "workspace" 5 | HeaderContentType = "Content-Type" 6 | 7 | ApplicationJson = "application/json" 8 | ) 9 | 10 | const ( 11 | jobsEndpoint = "jobs" 12 | instancesEndpoint = "instances" 13 | stopEndpoint = "stop" 14 | ) 15 | -------------------------------------------------------------------------------- /openstack/dataarts/v1/resource/common.go: -------------------------------------------------------------------------------- 1 | package resource 2 | 3 | const ( 4 | HeaderWorkspace = "workspace" 5 | HeaderContentType = "Content-Type" 6 | 7 | ApplicationJson = "application/json" 8 | ) 9 | 10 | const resourcesEndpoint = "resources" 11 | -------------------------------------------------------------------------------- /openstack/dataarts/v1/script/common.go: -------------------------------------------------------------------------------- 1 | package script 2 | 3 | const ( 4 | HeaderWorkspace = "workspace" 5 | HeaderContentType = "Content-Type" 6 | 7 | ApplicationJson = "application/json" 8 | ) 9 | 10 | const instancesEndpoint = "instances" 11 | 12 | const scriptsEndpoint = "scripts" 13 | -------------------------------------------------------------------------------- /openstack/dcaas/v2/dc-endpoint-group/Delete.go: -------------------------------------------------------------------------------- 1 | package dc_endpoint_group 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // Delete is used to delete a Direct Connect endpoint group 6 | func Delete(c *golangsdk.ServiceClient, id string) (err error) { 7 | _, err = c.Delete(c.ServiceURL("dcaas", "dc-endpoint-groups", id), &golangsdk.RequestOpts{ 8 | OkCodes: []int{200, 201, 204}, 9 | }) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /openstack/dcaas/v2/direct-connect/Delete.go: -------------------------------------------------------------------------------- 1 | package direct_connect 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // Delete will permanently delete a particular DirectConnect based on its 6 | // unique ID. 7 | 8 | func Delete(c *golangsdk.ServiceClient, id string) (err error) { 9 | _, err = c.Delete(c.ServiceURL("dcaas", "direct-connects", id), &golangsdk.RequestOpts{ 10 | OkCodes: []int{200, 201, 204}, 11 | }) 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /openstack/dcaas/v2/virtual-gateway/Delete.go: -------------------------------------------------------------------------------- 1 | package virtual_gateway 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // Delete will permanently delete a particular VirtualGateway based on its 6 | // unique ID. 7 | 8 | func Delete(c *golangsdk.ServiceClient, id string) (err error) { 9 | _, err = c.Delete(c.ServiceURL("dcaas", "virtual-gateways", id), &golangsdk.RequestOpts{ 10 | OkCodes: []int{200, 201, 204}, 11 | }) 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /openstack/dcaas/v2/virtual-interface/Delete.go: -------------------------------------------------------------------------------- 1 | package virtual_interface 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // Delete will permanently delete a particular VirtualInterface based on its 6 | // unique ID. 7 | 8 | func Delete(c *golangsdk.ServiceClient, id string) (err error) { 9 | _, err = c.Delete(c.ServiceURL("dcaas", "virtual-interfaces", id), &golangsdk.RequestOpts{ 10 | OkCodes: []int{200, 201, 204}, 11 | }) 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /openstack/dcaas/v3/hosted-connect/Delete.go: -------------------------------------------------------------------------------- 1 | package hosted_connect 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(c *golangsdk.ServiceClient, id string) (err error) { 6 | _, err = c.Delete(c.ServiceURL("dcaas", "hosted-connects", id), &golangsdk.RequestOpts{ 7 | OkCodes: []int{200, 201, 204}, 8 | }) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/dcaas/v3/virtual-gateway/Delete.go: -------------------------------------------------------------------------------- 1 | package virtual_gateway 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(c *golangsdk.ServiceClient, id string) (err error) { 6 | _, err = c.Delete(c.ServiceURL("dcaas", "virtual-gateways", id), &golangsdk.RequestOpts{ 7 | OkCodes: []int{200, 201, 204}, 8 | }) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/dcaas/v3/virtual-gateway/Get.go: -------------------------------------------------------------------------------- 1 | package virtual_gateway 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(c *golangsdk.ServiceClient, id string) (*VirtualGateway, error) { 9 | raw, err := c.Get(c.ServiceURL("dcaas", "virtual-gateways", id), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res VirtualGateway 15 | err = extract.IntoStructPtr(raw.Body, &res, "virtual_gateway") 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/dcaas/v3/virtual-interface/Delete.go: -------------------------------------------------------------------------------- 1 | package virtual_interface 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // Delete will permanently delete a particular VirtualInterface based on its 6 | // unique ID. 7 | 8 | func Delete(c *golangsdk.ServiceClient, id string) (err error) { 9 | _, err = c.Delete(c.ServiceURL("dcaas", "virtual-interfaces", id), &golangsdk.RequestOpts{ 10 | OkCodes: []int{200, 201, 204}, 11 | }) 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /openstack/dcaas/v3/virtual-interface/DeletePeer.go: -------------------------------------------------------------------------------- 1 | package virtual_interface 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func DeletePeer(c *golangsdk.ServiceClient, id string) (err error) { 6 | _, err = c.Delete(c.ServiceURL("dcaas", "vif-peers", id), &golangsdk.RequestOpts{ 7 | OkCodes: []int{200, 201, 204}, 8 | }) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/dcs/v1/backups/DeleteBackupFile.go: -------------------------------------------------------------------------------- 1 | package backups 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func DeleteBackupFile(client *golangsdk.ServiceClient, instancesId string, backupId string) (err error) { 8 | _, err = client.Delete(client.ServiceURL("instances", instancesId, "backups", backupId), &golangsdk.RequestOpts{ 9 | OkCodes: []int{200}, 10 | }) 11 | 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /openstack/dcs/v1/lifecycle/Delete.go: -------------------------------------------------------------------------------- 1 | package lifecycle 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // Delete an instance by id 6 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 7 | _, err = client.Delete(client.ServiceURL("instances", id), nil) 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /openstack/dcs/v2/instance/Delete.go: -------------------------------------------------------------------------------- 1 | package instance 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("instances", id), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/dds/v3/backups/Delete.go: -------------------------------------------------------------------------------- 1 | package backups 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, backupId string) (*Job, error) { 6 | // DELETE https://{Endpoint}/v3/{project_id}/backups/{backup_id} 7 | raw, err := client.Delete(client.ServiceURL("backups", backupId), &golangsdk.RequestOpts{ 8 | OkCodes: []int{200}, 9 | }) 10 | return extractJob(err, raw) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/dds/v3/backups/job.go: -------------------------------------------------------------------------------- 1 | package backups 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 7 | ) 8 | 9 | type Job struct { 10 | JobId string `json:"job_id"` 11 | BackupId string `json:"backup_id"` 12 | } 13 | 14 | func extractJob(err error, raw *http.Response) (*Job, error) { 15 | if err != nil { 16 | return nil, err 17 | } 18 | 19 | var res Job 20 | err = extract.Into(raw.Body, &res) 21 | return &res, err 22 | } 23 | -------------------------------------------------------------------------------- /openstack/dds/v3/instances/Delete.go: -------------------------------------------------------------------------------- 1 | package instances 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, instanceId string) (*string, error) { 6 | // DELETE https://{Endpoint}/v3/{project_id}/instances/{instance_id} 7 | raw, err := client.Delete(client.ServiceURL("instances", instanceId), nil) 8 | return ExtractJob(err, raw) 9 | } 10 | -------------------------------------------------------------------------------- /openstack/dds/v3/instances/Switchover.go: -------------------------------------------------------------------------------- 1 | package instances 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Switchover(client *golangsdk.ServiceClient, instanceId string) (*string, error) { 6 | raw, err := client.Post(client.ServiceURL("instances", instanceId, "switchover"), nil, nil, &golangsdk.RequestOpts{ 7 | OkCodes: []int{200, 202}, 8 | }) 9 | return ExtractJob(err, raw) 10 | } 11 | -------------------------------------------------------------------------------- /openstack/dds/v3/instances/UnbindEIP.go: -------------------------------------------------------------------------------- 1 | package instances 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func UnBindEIP(client *golangsdk.ServiceClient, nodeId string) (*string, error) { 8 | raw, err := client.Post(client.ServiceURL("nodes", nodeId, "unbind-eip"), nil, nil, &golangsdk.RequestOpts{ 9 | OkCodes: []int{200, 202}, 10 | MoreHeaders: map[string]string{"Content-Type": "application/json"}, 11 | }) 12 | return ExtractJob(err, raw) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/dds/v3/instances/job.go: -------------------------------------------------------------------------------- 1 | package instances 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 7 | ) 8 | 9 | type JobId struct { 10 | JobId string `json:"job_id"` 11 | } 12 | 13 | func ExtractJob(err error, raw *http.Response) (*string, error) { 14 | if err != nil { 15 | return nil, err 16 | } 17 | 18 | var res JobId 19 | err = extract.Into(raw.Body, &res) 20 | return &res.JobId, err 21 | } 22 | -------------------------------------------------------------------------------- /openstack/deh/v1/common/common_tests.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/testhelper/client" 6 | ) 7 | 8 | const TokenID = client.TokenID 9 | 10 | // Fake project id to use. 11 | const ProjectID = "17fbda95add24720a4038ba4b1c705ed" 12 | 13 | func ServiceClient() *golangsdk.ServiceClient { 14 | sc := client.ServiceClient() 15 | sc.ResourceBase = sc.Endpoint + ProjectID + "/" 16 | sc.ProjectID = ProjectID 17 | return sc 18 | } 19 | -------------------------------------------------------------------------------- /openstack/deh/v1/hosts/urls.go: -------------------------------------------------------------------------------- 1 | package hosts 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const resourcePath = "dedicated-hosts" 6 | 7 | func rootURL(c *golangsdk.ServiceClient) string { 8 | return c.ServiceURL(resourcePath) 9 | } 10 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 11 | return c.ServiceURL(resourcePath, id) 12 | } 13 | func listServerURL(c *golangsdk.ServiceClient, id string) string { 14 | return c.ServiceURL(resourcePath, id, "servers") 15 | } 16 | -------------------------------------------------------------------------------- /openstack/dis/v2/apps/DeleteApp.go: -------------------------------------------------------------------------------- 1 | package apps 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func DeleteApp(client *golangsdk.ServiceClient, appName string) (err error) { 6 | // DELETE /v2/{project_id}/apps/{app_name} 7 | _, err = client.Delete(client.ServiceURL("apps", appName), nil) 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /openstack/dis/v2/streams/DeleteStream.go: -------------------------------------------------------------------------------- 1 | package streams 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func DeleteStream(client *golangsdk.ServiceClient, streamName string) (err error) { 6 | // DELETE /v2/{project_id}/streams/{stream_name} 7 | _, err = client.Delete(client.ServiceURL("streams", streamName), &golangsdk.RequestOpts{ 8 | MoreHeaders: map[string]string{"Content-Type": "application/json"}, JSONBody: nil, 9 | }) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /openstack/dms/v1/availablezones/requests.go: -------------------------------------------------------------------------------- 1 | package availablezones 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | // Get available zones 8 | func Get(client *golangsdk.ServiceClient) (r GetResult) { 9 | _, r.Err = client.Get(getURL(client), &r.Body, nil) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /openstack/dms/v1/availablezones/urls.go: -------------------------------------------------------------------------------- 1 | package availablezones 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/opentelekomcloud/gophertelekomcloud" 7 | ) 8 | 9 | // endpoint/availablezones 10 | const resourcePath = "availableZones" 11 | 12 | // getURL will build the get url of get function 13 | func getURL(client *golangsdk.ServiceClient) string { 14 | // remove projectid from endpoint 15 | return strings.Replace(client.ServiceURL(resourcePath), "/"+client.ProjectID, "", -1) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/dms/v1/maintainwindows/requests.go: -------------------------------------------------------------------------------- 1 | package maintainwindows 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | // Get maintain windows 8 | func Get(client *golangsdk.ServiceClient) (r GetResult) { 9 | _, r.Err = client.Get(getURL(client), &r.Body, nil) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /openstack/dms/v1/maintainwindows/urls.go: -------------------------------------------------------------------------------- 1 | package maintainwindows 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/opentelekomcloud/gophertelekomcloud" 7 | ) 8 | 9 | // endpoint/instances/maintain-windows 10 | const resourcePath = "instances/maintain-windows" 11 | 12 | // getURL will build the get url of get function 13 | func getURL(client *golangsdk.ServiceClient) string { 14 | // remove projectid from endpoint 15 | return strings.Replace(client.ServiceURL(resourcePath), "/"+client.ProjectID, "", -1) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/dms/v1/products/requests.go: -------------------------------------------------------------------------------- 1 | package products 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | // Get products 8 | func Get(client *golangsdk.ServiceClient, engine string) (r GetResult) { 9 | _, r.Err = client.Get(getURL(client, engine), &r.Body, nil) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /openstack/dms/v1/products/urls.go: -------------------------------------------------------------------------------- 1 | package products 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/opentelekomcloud/gophertelekomcloud" 7 | ) 8 | 9 | // endpoint/products 10 | const resourcePath = "products" 11 | 12 | // getURL will build the get url of get function 13 | func getURL(client *golangsdk.ServiceClient, engine string) string { 14 | // remove projectid from endpoint 15 | return strings.Replace(client.ServiceURL(resourcePath+"?engine="+engine), "/"+client.ProjectID, "", -1) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/dms/v2/instances/lifecycle/Delete.go: -------------------------------------------------------------------------------- 1 | package lifecycle 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // Delete an instance by id 6 | func Delete(client *golangsdk.ServiceClient, id string) error { 7 | _, err := client.Delete(client.ServiceURL("instances", id), &golangsdk.RequestOpts{ 8 | OkCodes: []int{204}, 9 | }) 10 | return err 11 | } 12 | -------------------------------------------------------------------------------- /openstack/dns/v2/nameservers/requests.go: -------------------------------------------------------------------------------- 1 | package nameservers 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | type ListNameserversRequest struct { 8 | Name string `json:"name,omitempty"` 9 | } 10 | 11 | func List(client *golangsdk.ServiceClient, zoneID string) (r GetResult) { 12 | url := baseURL(client, zoneID) 13 | _, r.Err = client.Get(url, &r.Body, nil) 14 | 15 | return 16 | } 17 | -------------------------------------------------------------------------------- /openstack/dns/v2/nameservers/urls.go: -------------------------------------------------------------------------------- 1 | package nameservers 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func baseURL(c *golangsdk.ServiceClient, zoneID string) string { 6 | return c.ServiceURL("zones", zoneID, "nameservers") 7 | } 8 | -------------------------------------------------------------------------------- /openstack/dns/v2/ptrrecords/urls.go: -------------------------------------------------------------------------------- 1 | package ptrrecords 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func baseURL(c *golangsdk.ServiceClient, region string, floatingip_id string) string { 6 | return c.ServiceURL("reverse/floatingips", region+":"+floatingip_id) 7 | } 8 | 9 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 10 | return c.ServiceURL("reverse/floatingips", id) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/dns/v2/recordsets/testing/doc.go: -------------------------------------------------------------------------------- 1 | // recordsets unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/dns/v2/recordsets/urls.go: -------------------------------------------------------------------------------- 1 | package recordsets 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func baseURL(c *golangsdk.ServiceClient, zoneID string) string { 6 | return c.ServiceURL("zones", zoneID, "recordsets") 7 | } 8 | 9 | func rrsetURL(c *golangsdk.ServiceClient, zoneID string, rrsetID string) string { 10 | return c.ServiceURL("zones", zoneID, "recordsets", rrsetID) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/dns/v2/zones/testing/doc.go: -------------------------------------------------------------------------------- 1 | // zones unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package openstack contains resources for the individual OpenStack projects 3 | supported in Gophercloud. It also includes functions to authenticate to an 4 | OpenStack cloud and for provisioning various service-level clients. 5 | 6 | Example of Creating a Service Client 7 | 8 | ao, err := openstack.AuthOptionsFromEnv() 9 | provider, err := openstack.AuthenticatedClient(ao) 10 | client, err := openstack.NewNetworkV2(client, golangsdk.EndpointOpts{ 11 | Region: utils.GetRegion(ao), 12 | }) 13 | */ 14 | package openstack 15 | -------------------------------------------------------------------------------- /openstack/dws/v1/snapshot/DeleteSnapshot.go: -------------------------------------------------------------------------------- 1 | package snapshot 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/openstack" 6 | ) 7 | 8 | func DeleteSnapshot(client *golangsdk.ServiceClient, snapshotId string) error { 9 | // DELETE /v1.0/{project_id}/snapshots/{snapshot_id} 10 | _, err := client.Delete(client.ServiceURL("snapshots", snapshotId), openstack.StdRequestOpts()) 11 | return err 12 | } 13 | -------------------------------------------------------------------------------- /openstack/dws/v1/tag/DeleteClusterTag.go: -------------------------------------------------------------------------------- 1 | package tag 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | type DeleteClusterTagOpts struct { 6 | // Resource ID 7 | ClusterId string 8 | // Tag key 9 | Key string 10 | } 11 | 12 | func DeleteCluster(client *golangsdk.ServiceClient, opts DeleteClusterTagOpts) error { 13 | // DELETE /v1.0/{project_id}/clusters/{resource_id}/tags/{key} 14 | _, err := client.Delete(client.ServiceURL("clusters", opts.ClusterId, "tags", opts.Key), nil) 15 | return err 16 | } 17 | -------------------------------------------------------------------------------- /openstack/ecs/v1/auto_recovery/results.go: -------------------------------------------------------------------------------- 1 | package auto_recovery 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | type AutoRecovery struct { 6 | SupportAutoRecovery string `json:"support_auto_recovery"` 7 | } 8 | 9 | type GetResult struct { 10 | golangsdk.Result 11 | } 12 | 13 | func (r GetResult) Extract() (*AutoRecovery, error) { 14 | s := &AutoRecovery{} 15 | return s, r.ExtractInto(s) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/ecs/v1/auto_recovery/urls.go: -------------------------------------------------------------------------------- 1 | package auto_recovery 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "cloudservers" 7 | resourcePath = "autorecovery" 8 | ) 9 | 10 | func updateURL(c *golangsdk.ServiceClient, id string) string { 11 | return c.ServiceURL(rootPath, id, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return updateURL(c, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/ecs/v1/block_devices/requests.go: -------------------------------------------------------------------------------- 1 | package block_devices 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Get(c *golangsdk.ServiceClient, server_id string, volume_id string) (r GetResult) { 8 | _, r.Err = c.Get(getURL(c, server_id, volume_id), &r.Body, nil) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/ecs/v1/block_devices/urls.go: -------------------------------------------------------------------------------- 1 | package block_devices 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func getURL(c *golangsdk.ServiceClient, server_id string, volume_id string) string { 6 | return c.ServiceURL("cloudservers", server_id, "block_device", volume_id) 7 | } 8 | -------------------------------------------------------------------------------- /openstack/ecs/v1/cloudservertags/urls.go: -------------------------------------------------------------------------------- 1 | package cloudservertags 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "cloudservers" 7 | resourcePath = "tags" 8 | actionPath = "tags/action" 9 | ) 10 | 11 | func actionURL(c *golangsdk.ServiceClient, id string) string { 12 | return c.ServiceURL(rootPath, id, actionPath) 13 | } 14 | 15 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 16 | return c.ServiceURL(rootPath, id, resourcePath) 17 | } 18 | -------------------------------------------------------------------------------- /openstack/ecs/v1/tags/urls.go: -------------------------------------------------------------------------------- 1 | package tags 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "servers" 7 | resourcePath = "tags" 8 | actionPath = "tags/action" 9 | ) 10 | 11 | func actionURL(c *golangsdk.ServiceClient, id string) string { 12 | return c.ServiceURL(rootPath, id, actionPath) 13 | } 14 | 15 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 16 | return c.ServiceURL(rootPath, id, resourcePath) 17 | } 18 | -------------------------------------------------------------------------------- /openstack/elb/v3/certificates/urls.go: -------------------------------------------------------------------------------- 1 | package certificates 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | const ( 8 | resourcePath = "certificates" 9 | ) 10 | 11 | func rootURL(c *golangsdk.ServiceClient) string { 12 | return c.ServiceURL(resourcePath) 13 | } 14 | 15 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 16 | return c.ServiceURL(resourcePath, id) 17 | } 18 | -------------------------------------------------------------------------------- /openstack/elb/v3/flavors/urls.go: -------------------------------------------------------------------------------- 1 | package flavors 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | const ( 8 | resourcePath = "flavors" 9 | ) 10 | 11 | func listURL(sc *golangsdk.ServiceClient) string { 12 | return sc.ServiceURL(resourcePath) 13 | } 14 | 15 | func getURL(sc *golangsdk.ServiceClient, flavorID string) string { 16 | return sc.ServiceURL(resourcePath, flavorID) 17 | } 18 | -------------------------------------------------------------------------------- /openstack/elb/v3/ipgroups/Delete.go: -------------------------------------------------------------------------------- 1 | package ipgroups 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | // Delete will permanently delete a particular IpGroup based on its 8 | // unique ID. 9 | func Delete(c *golangsdk.ServiceClient, id string) (err error) { 10 | _, err = c.Delete(c.ServiceURL("ipgroups", id), nil) 11 | return 12 | } 13 | -------------------------------------------------------------------------------- /openstack/elb/v3/listeners/urls.go: -------------------------------------------------------------------------------- 1 | package listeners 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | const ( 8 | resourcePath = "listeners" 9 | ) 10 | 11 | func rootURL(c *golangsdk.ServiceClient) string { 12 | return c.ServiceURL(resourcePath) 13 | } 14 | 15 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 16 | return c.ServiceURL(resourcePath, id) 17 | } 18 | -------------------------------------------------------------------------------- /openstack/elb/v3/log/Delete.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Delete(c *golangsdk.ServiceClient, id string) (err error) { 8 | // DELETE /v3/{project_id}/elb/logtanks/{logtank_id} 9 | _, err = c.Delete(c.ServiceURL("logtanks", id), nil) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /openstack/elb/v3/log/Get.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*Log, error) { 9 | // GET /v3/{project_id}/elb/logtanks/{logtank_id} 10 | raw, err := client.Get(client.ServiceURL("logtanks", id), nil, nil) 11 | if err != nil { 12 | return nil, err 13 | } 14 | 15 | var res Log 16 | err = extract.Into(raw.Body, &res) 17 | return &res, err 18 | } 19 | -------------------------------------------------------------------------------- /openstack/elb/v3/members/urls.go: -------------------------------------------------------------------------------- 1 | package members 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | resourcePath = "pools" 7 | memberPath = "members" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient, poolID string) string { 11 | return c.ServiceURL(resourcePath, poolID, memberPath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, poolID string, memberID string) string { 15 | return c.ServiceURL(resourcePath, poolID, memberPath, memberID) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/elb/v3/monitors/urls.go: -------------------------------------------------------------------------------- 1 | package monitors 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | resourcePath = "healthmonitors" 7 | ) 8 | 9 | func rootURL(client *golangsdk.ServiceClient) string { 10 | return client.ServiceURL(resourcePath) 11 | } 12 | 13 | func resourceURL(client *golangsdk.ServiceClient, id string) string { 14 | return client.ServiceURL(resourcePath, id) 15 | } 16 | -------------------------------------------------------------------------------- /openstack/elb/v3/policies/urls.go: -------------------------------------------------------------------------------- 1 | package policies 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | const ( 8 | basePath = "l7policies" 9 | ) 10 | 11 | func baseURL(client *golangsdk.ServiceClient) string { 12 | return client.ServiceURL(basePath) 13 | } 14 | 15 | func resourceURL(client *golangsdk.ServiceClient, id string) string { 16 | return client.ServiceURL(basePath, id) 17 | } 18 | -------------------------------------------------------------------------------- /openstack/elb/v3/pools/urls.go: -------------------------------------------------------------------------------- 1 | package pools 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | resourcePath = "pools" 7 | ) 8 | 9 | func rootURL(client *golangsdk.ServiceClient) string { 10 | return client.ServiceURL(resourcePath) 11 | } 12 | 13 | func resourceURL(client *golangsdk.ServiceClient, poolID string) string { 14 | return client.ServiceURL(resourcePath, poolID) 15 | } 16 | -------------------------------------------------------------------------------- /openstack/elb/v3/rules/urls.go: -------------------------------------------------------------------------------- 1 | package rules 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | const ( 8 | policyBasePath = "l7policies" 9 | ruleBasePath = "rules" 10 | ) 11 | 12 | func baseURL(client *golangsdk.ServiceClient, policyID string) string { 13 | return client.ServiceURL(policyBasePath, policyID, ruleBasePath) 14 | } 15 | 16 | func resourceURL(client *golangsdk.ServiceClient, policyID, id string) string { 17 | return client.ServiceURL(policyBasePath, policyID, ruleBasePath, id) 18 | } 19 | -------------------------------------------------------------------------------- /openstack/elb/v3/security_policy/Delete.go: -------------------------------------------------------------------------------- 1 | package security_policy 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 8 | _, err = client.Delete(client.ServiceURL("security-policies", id), &golangsdk.RequestOpts{ 9 | OkCodes: []int{204}, 10 | MoreHeaders: map[string]string{"Content-Type": "application/json"}, 11 | }) 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /openstack/er/v3/flow-logs/Delete.go: -------------------------------------------------------------------------------- 1 | package flow_logs 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, routerID, flowLogID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("enterprise-router", routerID, "flow-logs", flowLogID), &golangsdk.RequestOpts{ 7 | OkCodes: []int{202}, 8 | }) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/er/v3/instance/Delete.go: -------------------------------------------------------------------------------- 1 | package instance 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, instanceID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("enterprise-router", "instances", instanceID), &golangsdk.RequestOpts{ 7 | OkCodes: []int{202}, 8 | }) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/er/v3/instance/Get.go: -------------------------------------------------------------------------------- 1 | package instance 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, instanceID string) (*RouterInstanceResp, error) { 9 | raw, err := client.Get(client.ServiceURL("enterprise-router", "instances", instanceID), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res RouterInstanceResp 15 | err = extract.Into(raw.Body, &res) 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/er/v3/route/Delete.go: -------------------------------------------------------------------------------- 1 | package route 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, routeTableId, routeId string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("enterprise-router", "route-tables", routeTableId, "static-routes", routeId), &golangsdk.RequestOpts{ 7 | OkCodes: []int{202}, 8 | }) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/er/v3/route_table/Delete.go: -------------------------------------------------------------------------------- 1 | package route_table 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, erId, routeTableId string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("enterprise-router", erId, "route-tables", routeTableId), &golangsdk.RequestOpts{ 7 | OkCodes: []int{202}, 8 | }) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/er/v3/tags/Delete.go: -------------------------------------------------------------------------------- 1 | package tags 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Delete(client *golangsdk.ServiceClient, resourceType, resourceId string, key string) error { 8 | _, err := client.Delete(client.ServiceURL(resourceType, resourceId, "tags", key), &golangsdk.RequestOpts{ 9 | OkCodes: []int{204}, 10 | }) 11 | return err 12 | } 13 | -------------------------------------------------------------------------------- /openstack/er/v3/vpc/Delete.go: -------------------------------------------------------------------------------- 1 | package vpc 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, erId, vpcId string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("enterprise-router", erId, "vpc-attachments", vpcId), &golangsdk.RequestOpts{ 7 | OkCodes: []int{202}, 8 | }) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/evpn/v5/connection-monitoring/Delete.go: -------------------------------------------------------------------------------- 1 | package connection_monitoring 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 8 | _, err = client.Delete(client.ServiceURL("connection-monitors", id), nil) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/evpn/v5/connection/Delete.go: -------------------------------------------------------------------------------- 1 | package connection 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 8 | _, err = client.Delete(client.ServiceURL("vpn-connection", id), nil) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/evpn/v5/connection/Get.go: -------------------------------------------------------------------------------- 1 | package connection 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, connectionId string) (*Connection, error) { 9 | raw, err := client.Get(client.ServiceURL("vpn-connection", connectionId), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res Connection 15 | err = extract.IntoStructPtr(raw.Body, &res, "vpn_connection") 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/evpn/v5/customer-gateway/Delete.go: -------------------------------------------------------------------------------- 1 | package customer_gateway 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 8 | _, err = client.Delete(client.ServiceURL("customer-gateways", id), nil) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/evpn/v5/gateway/Delete.go: -------------------------------------------------------------------------------- 1 | package gateway 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 8 | _, err = client.Delete(client.ServiceURL("vpn-gateways", id), nil) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/evpn/v5/gateway/Get.go: -------------------------------------------------------------------------------- 1 | package gateway 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, gatewayId string) (*Gateway, error) { 9 | raw, err := client.Get(client.ServiceURL("vpn-gateways", gatewayId), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res Gateway 15 | err = extract.IntoStructPtr(raw.Body, &res, "vpn_gateway") 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/evs/extensions/quotasets/delete.go: -------------------------------------------------------------------------------- 1 | package quotasets 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, projectID string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("os-quota-sets", projectID), &golangsdk.RequestOpts{ 7 | OkCodes: []int{200}, 8 | }) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/evs/extensions/volumeactions/begin_detaching.go: -------------------------------------------------------------------------------- 1 | package volumeactions 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func BeginDetaching(client *golangsdk.ServiceClient, id string) (err error) { 6 | b := map[string]interface{}{"os-begin_detaching": make(map[string]interface{})} 7 | _, err = client.Post(client.ServiceURL("volumes", id, "action"), b, nil, nil) 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /openstack/evs/extensions/volumeactions/force_delete.go: -------------------------------------------------------------------------------- 1 | package volumeactions 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func ForceDelete(client *golangsdk.ServiceClient, id string) (err error) { 8 | _, err = client.Post(client.ServiceURL("volumes", id, "action"), map[string]interface{}{"os-force_delete": ""}, nil, nil) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/evs/extensions/volumeactions/reserve.go: -------------------------------------------------------------------------------- 1 | package volumeactions 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Reserve(client *golangsdk.ServiceClient, id string) (err error) { 6 | b := map[string]interface{}{"os-reserve": make(map[string]interface{})} 7 | _, err = client.Post(client.ServiceURL("volumes", id, "action"), b, nil, &golangsdk.RequestOpts{ 8 | OkCodes: []int{200, 201, 202}, 9 | }) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /openstack/evs/extensions/volumeactions/unreserve.go: -------------------------------------------------------------------------------- 1 | package volumeactions 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Unreserve(client *golangsdk.ServiceClient, id string) (err error) { 6 | b := map[string]interface{}{"os-unreserve": make(map[string]interface{})} 7 | _, err = client.Post(client.ServiceURL("volumes", id, "action"), b, nil, &golangsdk.RequestOpts{ 8 | OkCodes: []int{200, 201, 202}, 9 | }) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /openstack/evs/extensions/volumetenants.go: -------------------------------------------------------------------------------- 1 | package extensions 2 | 3 | type VolumeTenantExt struct { 4 | // TenantID is the id of the project that owns the volume. 5 | TenantID string `json:"os-vol-tenant-attr:tenant_id"` 6 | } 7 | -------------------------------------------------------------------------------- /openstack/evs/noauth/testing/fixtures.go: -------------------------------------------------------------------------------- 1 | package testing 2 | 3 | // NoAuthResult is the expected result of the noauth Service Client 4 | type NoAuthResult struct { 5 | TokenID string 6 | Endpoint string 7 | } 8 | 9 | var naTestResult = NoAuthResult{ 10 | TokenID: "user:test", 11 | Endpoint: "http://cinder:8776/v2/test/", 12 | } 13 | 14 | var naResult = NoAuthResult{ 15 | TokenID: "admin:admin", 16 | Endpoint: "http://cinder:8776/v2/admin/", 17 | } 18 | 19 | var errorResult = "CinderEndpoint is required" 20 | -------------------------------------------------------------------------------- /openstack/evs/v1/apiversions/get.go: -------------------------------------------------------------------------------- 1 | package apiversions 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/opentelekomcloud/gophertelekomcloud" 7 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 8 | ) 9 | 10 | func Get(client *golangsdk.ServiceClient, v string) (*APIVersion, error) { 11 | raw, err := client.Get(client.ServiceURL(strings.TrimRight(v, "/")+"/"), nil, nil) 12 | if err != nil { 13 | return nil, err 14 | } 15 | 16 | var res APIVersion 17 | err = extract.IntoStructPtr(raw.Body, &res, "version") 18 | return &res, err 19 | } 20 | -------------------------------------------------------------------------------- /openstack/evs/v1/snapshots/delete.go: -------------------------------------------------------------------------------- 1 | package snapshots 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("snapshots", id), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/evs/v1/snapshots/get.go: -------------------------------------------------------------------------------- 1 | package snapshots 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*Snapshot, error) { 9 | raw, err := client.Get(client.ServiceURL("snapshots", id), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res Snapshot 15 | err = extract.IntoStructPtr(raw.Body, &res, "snapshot") 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/evs/v1/volumes/delete.go: -------------------------------------------------------------------------------- 1 | package volumes 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("volumes", id), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/evs/v1/volumes/get.go: -------------------------------------------------------------------------------- 1 | package volumes 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*Volume, error) { 9 | raw, err := client.Get(client.ServiceURL("volumes", id), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res Volume 15 | err = extract.IntoStructPtr(raw.Body, &res, "volume") 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/evs/v1/volumetypes/delete.go: -------------------------------------------------------------------------------- 1 | package volumetypes 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("types", id), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/evs/v1/volumetypes/get.go: -------------------------------------------------------------------------------- 1 | package volumetypes 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*VolumeType, error) { 9 | raw, err := client.Get(client.ServiceURL("types", id), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res VolumeType 15 | err = extract.IntoStructPtr(raw.Body, &res, "volume_type") 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/evs/v2/tags/urls.go: -------------------------------------------------------------------------------- 1 | package tags 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func createURL(c *golangsdk.ServiceClient, resource_type, resource_id string) string { 8 | return c.ServiceURL("os-vendor-tags", resource_type, resource_id) 9 | } 10 | 11 | func getURL(c *golangsdk.ServiceClient, resource_type, resource_id string) string { 12 | return c.ServiceURL("os-vendor-tags", resource_type, resource_id) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/evs/v3/volumes/urls.go: -------------------------------------------------------------------------------- 1 | package volumes 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func createURL(c *golangsdk.ServiceClient) string { 6 | return c.ServiceURL("cloudvolumes") 7 | } 8 | 9 | func getURL(c *golangsdk.ServiceClient, id string) string { 10 | return c.ServiceURL("os-vendor-volumes", id) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/fgs/v2/alias/DeleteAlias.go: -------------------------------------------------------------------------------- 1 | package alias 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, funcURN, aliasName string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("fgs", "functions", funcURN, "aliases", aliasName), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/fgs/v2/alias/GetAlias.go: -------------------------------------------------------------------------------- 1 | package alias 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func GetAlias(client *golangsdk.ServiceClient, funcURN, aliasName string) (*FuncAliases, error) { 9 | raw, err := client.Get(client.ServiceURL("fgs", "functions", funcURN, "aliases", aliasName), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res *FuncAliases 15 | err = extract.Into(raw.Body, &res) 16 | return res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/fgs/v2/async_config/Delete.go: -------------------------------------------------------------------------------- 1 | package async_config 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, funcURN string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("fgs", "functions", funcURN, "async-invoke-config"), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/fgs/v2/async_config/Get.go: -------------------------------------------------------------------------------- 1 | package async_config 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, funcURN string) (*AsyncInvokeResp, error) { 9 | raw, err := client.Get(client.ServiceURL("fgs", "functions", funcURN, "async-invoke-config"), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res AsyncInvokeResp 15 | err = extract.Into(raw.Body, &res) 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/fgs/v2/events/Delete.go: -------------------------------------------------------------------------------- 1 | package events 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, funcURN, eventId string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("fgs", "functions", funcURN, "events", eventId), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/fgs/v2/events/Get.go: -------------------------------------------------------------------------------- 1 | package events 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, funcURN, eventId string) (*Event, error) { 9 | raw, err := client.Get(client.ServiceURL("fgs", "functions", funcURN, "events", eventId), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res Event 15 | err = extract.Into(raw.Body, &res) 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/fgs/v2/function/Delete.go: -------------------------------------------------------------------------------- 1 | package function 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Delete(client *golangsdk.ServiceClient, funcURN string) (err error) { 8 | _, err = client.Delete(client.ServiceURL("fgs", "functions", funcURN), nil) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/fgs/v2/function/UpdateStatus.go: -------------------------------------------------------------------------------- 1 | package function 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func UpdateStatus(client *golangsdk.ServiceClient, funcUrn, state string) (err error) { 8 | _, err = client.Put(client.ServiceURL("fgs", "functions", funcUrn, "collect", state), nil, nil, &golangsdk.RequestOpts{ 9 | OkCodes: []int{200}, 10 | }) 11 | return 12 | } 13 | -------------------------------------------------------------------------------- /openstack/fgs/v2/tags/Delete.go: -------------------------------------------------------------------------------- 1 | package tags 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/build" 6 | ) 7 | 8 | func DeleteResourceTag(client *golangsdk.ServiceClient, opts TagsActionOpts) error { 9 | b, err := build.RequestBody(opts, "") 10 | if err != nil { 11 | return err 12 | } 13 | 14 | _, err = client.DeleteWithBody(client.ServiceURL("functions", opts.Id, "tags", "delete"), b, nil) 15 | return err 16 | } 17 | -------------------------------------------------------------------------------- /openstack/fgs/v2/trigger/Delete.go: -------------------------------------------------------------------------------- 1 | package trigger 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, funcURN, triggerType, triggerId string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("fgs", "triggers", funcURN, triggerType, triggerId), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/fgs/v2/trigger/DeleteTriggers.go: -------------------------------------------------------------------------------- 1 | package trigger 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func DeleteTriggers(client *golangsdk.ServiceClient, funcURN string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("fgs", "triggers", funcURN), nil) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /openstack/fgs/v2/trigger/GetTriggers.go: -------------------------------------------------------------------------------- 1 | package trigger 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func GetTriggers(client *golangsdk.ServiceClient, funcURN string) ([]TriggerFuncResp, error) { 9 | raw, err := client.Get(client.ServiceURL("fgs", "triggers", funcURN), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res []TriggerFuncResp 15 | err = extract.IntoSlicePtr(raw.Body, &res, "") 16 | return res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/fgs/v2/util/EnableLts.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func EnableFuncLts(client *golangsdk.ServiceClient) error { 8 | _, err := client.Post(client.ServiceURL("fgs", "functions", "enable-lts-logs"), nil, nil, &golangsdk.RequestOpts{ 9 | OkCodes: []int{200}, 10 | }) 11 | return err 12 | } 13 | -------------------------------------------------------------------------------- /openstack/fgs/v2/util/ListStatsPeriod.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func ListStatsPeriod(client *golangsdk.ServiceClient, funcURN, period string) (*StatResp, error) { 9 | raw, err := client.Get(client.ServiceURL("fgs", "functions", funcURN, "statistics", period), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res StatResp 15 | err = extract.Into(raw.Body, &res) 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/identity/v3.0/agency/CheckAgencyAllProjects.go: -------------------------------------------------------------------------------- 1 | package agency 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func CheckAgencyAllProjects(client *golangsdk.ServiceClient, domainId, agencyId, roleId string) (err error) { 6 | // HEAD /v3.0/OS-INHERIT/domains/{domain_id}/agencies/{agency_id}/roles/{role_id}/inherited_to_projects 7 | _, err = client.Head(client.ServiceURL("OS-INHERIT", "domains", domainId, "agencies", agencyId, "roles", roleId, "inherited_to_projects"), nil) 8 | return err 9 | } 10 | -------------------------------------------------------------------------------- /openstack/identity/v3.0/agency/RemoveAgencyAllProjects.go: -------------------------------------------------------------------------------- 1 | package agency 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func RemoveAgencyAllProjects(client *golangsdk.ServiceClient, domainId, agencyId, roleId string) (err error) { 6 | // DELETE /v3.0/OS-INHERIT/domains/{domain_id}/agencies/{agency_id}/roles/{role_id}/inherited_to_projects 7 | _, err = client.Delete(client.ServiceURL("OS-INHERIT", "domains", domainId, "agencies", agencyId, "roles", roleId, "inherited_to_projects"), nil) 8 | return err 9 | } 10 | -------------------------------------------------------------------------------- /openstack/identity/v3/catalog/requests.go: -------------------------------------------------------------------------------- 1 | package catalog 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/pagination" 6 | ) 7 | 8 | // List enumerates the services available to a specific user. 9 | func List(client *golangsdk.ServiceClient) pagination.Pager { 10 | url := listURL(client) 11 | return pagination.NewPager(client, url, func(r pagination.PageResult) pagination.Page { 12 | return CatalogPage{pagination.LinkedPageBase{PageResult: r}} 13 | }) 14 | } 15 | -------------------------------------------------------------------------------- /openstack/identity/v3/catalog/urls.go: -------------------------------------------------------------------------------- 1 | package catalog 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func listURL(client *golangsdk.ServiceClient) string { 6 | return client.ServiceURL("auth", "catalog") 7 | } 8 | -------------------------------------------------------------------------------- /openstack/identity/v3/endpoints/testing/doc.go: -------------------------------------------------------------------------------- 1 | // endpoints unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/identity/v3/endpoints/urls.go: -------------------------------------------------------------------------------- 1 | package endpoints 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func listURL(client *golangsdk.ServiceClient) string { 6 | return client.ServiceURL("endpoints") 7 | } 8 | 9 | func endpointURL(client *golangsdk.ServiceClient, endpointID string) string { 10 | return client.ServiceURL("endpoints", endpointID) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/identity/v3/extensions/trusts/testing/doc.go: -------------------------------------------------------------------------------- 1 | // trusts unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/identity/v3/federation/mappings/urls.go: -------------------------------------------------------------------------------- 1 | package mappings 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/openstack/identity/v3/federation" 6 | ) 7 | 8 | const rootPath = "mappings" 9 | 10 | func listURL(client *golangsdk.ServiceClient) string { 11 | return client.ServiceURL(federation.BaseURL, rootPath) 12 | } 13 | 14 | func mappingURL(client *golangsdk.ServiceClient, mappingID string) string { 15 | return client.ServiceURL(federation.BaseURL, rootPath, mappingID) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/identity/v3/federation/metadata/urls.go: -------------------------------------------------------------------------------- 1 | package metadata 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/openstack/identity/v3/federation" 6 | ) 7 | 8 | func metadataURL(client *golangsdk.ServiceClient, provider, protocol string) string { 9 | return client.ServiceURL( 10 | federation.BaseURL, 11 | federation.ProvidersURL, provider, 12 | federation.ProtocolsURL, protocol, 13 | "metadata", 14 | ) 15 | } 16 | -------------------------------------------------------------------------------- /openstack/identity/v3/federation/providers/urls.go: -------------------------------------------------------------------------------- 1 | package providers 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/openstack/identity/v3/federation" 6 | ) 7 | 8 | const identityProvider = "identity_providers" 9 | 10 | func listURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(federation.BaseURL, identityProvider) 12 | } 13 | 14 | func providerURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(federation.BaseURL, identityProvider, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/identity/v3/federation/urls.go: -------------------------------------------------------------------------------- 1 | package federation 2 | 3 | const ( 4 | BaseURL = "OS-FEDERATION" 5 | ProvidersURL = "identity_providers" 6 | ProtocolsURL = "protocols" 7 | ) 8 | -------------------------------------------------------------------------------- /openstack/identity/v3/roles/testing/doc.go: -------------------------------------------------------------------------------- 1 | // roles unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/identity/v3/services/testing/doc.go: -------------------------------------------------------------------------------- 1 | // services unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/identity/v3/tokens/testing/doc.go: -------------------------------------------------------------------------------- 1 | // tokens unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/identity/v3/tokens/urls.go: -------------------------------------------------------------------------------- 1 | package tokens 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func tokenURL(c *golangsdk.ServiceClient) string { 6 | return c.ServiceURL("auth", "tokens") 7 | } 8 | -------------------------------------------------------------------------------- /openstack/image/v2/images/Upload.go: -------------------------------------------------------------------------------- 1 | package images 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/opentelekomcloud/gophertelekomcloud" 7 | ) 8 | 9 | // Upload uploads an image file. 10 | func Upload(client *golangsdk.ServiceClient, id string, data io.Reader) (err error) { 11 | // PUT /v2/images/{image_id}/file 12 | _, err = client.Put(client.ServiceURL("images", id, "file"), data, nil, &golangsdk.RequestOpts{ 13 | MoreHeaders: map[string]string{"Content-Type": "application/octet-stream"}, 14 | OkCodes: []int{204}, 15 | }) 16 | 17 | return 18 | } 19 | -------------------------------------------------------------------------------- /openstack/kms/v1/grants/urls.go: -------------------------------------------------------------------------------- 1 | package grants 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | resourcePath = "kms" 7 | ) 8 | 9 | func createURL(c *golangsdk.ServiceClient) string { 10 | return c.ServiceURL(resourcePath, "create-grant") 11 | } 12 | 13 | func deleteURL(c *golangsdk.ServiceClient) string { 14 | return c.ServiceURL(resourcePath, "revoke-grant") 15 | } 16 | 17 | func listURL(c *golangsdk.ServiceClient) string { 18 | return c.ServiceURL(resourcePath, "list-grants") 19 | } 20 | -------------------------------------------------------------------------------- /openstack/lts/v2/alarm/DeleteKeywordRule.go: -------------------------------------------------------------------------------- 1 | package alarm 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func DeleteKeywordRule(client *golangsdk.ServiceClient, ruleId string) (err error) { 6 | // DELETE /v2/{project_id}/lts/alarms/keywords-alarm-rule/{keywords_alarm_rule_id} 7 | _, err = client.Delete(client.ServiceURL("lts", "alarms", "keywords-alarm-rule", ruleId), &golangsdk.RequestOpts{ 8 | MoreHeaders: map[string]string{ 9 | "content-type": "application/json", 10 | }, 11 | OkCodes: []int{200}, 12 | }) 13 | return 14 | } 15 | -------------------------------------------------------------------------------- /openstack/lts/v2/groups/Delete.go: -------------------------------------------------------------------------------- 1 | package groups 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // Delete a log group by id 6 | func Delete(client *golangsdk.ServiceClient, groupId string) (err error) { 7 | // DELETE /v2/{project_id}/groups/{log_group_id} 8 | _, err = client.Delete(client.ServiceURL("groups", groupId), &golangsdk.RequestOpts{ 9 | MoreHeaders: map[string]string{ 10 | "content-type": "application/json", 11 | }, 12 | }) 13 | return 14 | } 15 | -------------------------------------------------------------------------------- /openstack/lts/v2/log-collection/Disable.go: -------------------------------------------------------------------------------- 1 | package log_collection 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Disable(client *golangsdk.ServiceClient) error { 8 | // POST /v2/{project_id}/collection/disable 9 | _, err := client.Post(client.ServiceURL("collection", "disable"), nil, nil, &golangsdk.RequestOpts{ 10 | OkCodes: []int{200}, 11 | MoreHeaders: map[string]string{"Content-Type": "application/json"}, 12 | }) 13 | if err != nil { 14 | return err 15 | } 16 | return err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/lts/v2/log-collection/Enable.go: -------------------------------------------------------------------------------- 1 | package log_collection 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Enable(client *golangsdk.ServiceClient) error { 8 | // POST /v2/{project_id}/collection/enable 9 | _, err := client.Post(client.ServiceURL("collection", "enable"), nil, nil, &golangsdk.RequestOpts{ 10 | OkCodes: []int{200}, 11 | MoreHeaders: map[string]string{"Content-Type": "application/json"}, 12 | }) 13 | if err != nil { 14 | return err 15 | } 16 | return err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/mrs/v1/cluster/Delete.go: -------------------------------------------------------------------------------- 1 | package cluster 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/openstack" 6 | ) 7 | 8 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 9 | // DELETE /v1.1/{project_id}/clusters/{cluster_id} 10 | _, err = client.Delete(client.ServiceURL("clusters", id), openstack.StdRequestOpts()) 11 | return 12 | } 13 | -------------------------------------------------------------------------------- /openstack/mrs/v1/cluster/util.go: -------------------------------------------------------------------------------- 1 | package cluster 2 | 3 | func ExpandComponent(strComponents []string) []ComponentList { 4 | var components []ComponentList 5 | for _, v := range strComponents { 6 | components = append(components, ComponentList{ 7 | ComponentName: v, 8 | }) 9 | } 10 | return components 11 | } 12 | -------------------------------------------------------------------------------- /openstack/mrs/v1/job/Delete.go: -------------------------------------------------------------------------------- 1 | package job 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/openstack" 6 | ) 7 | 8 | func Delete(c *golangsdk.ServiceClient, id string) (err error) { 9 | _, err = c.Delete(c.ServiceURL("job-executions", id), openstack.StdRequestOpts()) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /openstack/networking/v1/bandwidths/urls.go: -------------------------------------------------------------------------------- 1 | package bandwidths 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const resourcePath = "bandwidths" 6 | 7 | func resourceURL(client *golangsdk.ServiceClient, id string) string { 8 | return client.ServiceURL(client.ProjectID, resourcePath, id) 9 | } 10 | 11 | func listURL(client *golangsdk.ServiceClient) string { 12 | return client.ServiceURL(client.ProjectID, resourcePath) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/networking/v1/common/common_tests.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/testhelper/client" 6 | ) 7 | 8 | const TokenID = client.TokenID 9 | 10 | // Fake project id to use. 11 | const ProjectID = "85636478b0bd8e67e89469c7749d4127" 12 | 13 | func ServiceClient() *golangsdk.ServiceClient { 14 | sc := client.ServiceClient() 15 | sc.ResourceBase = sc.Endpoint + "v1/" 16 | sc.ProjectID = ProjectID 17 | return sc 18 | } 19 | -------------------------------------------------------------------------------- /openstack/networking/v1/eips/urls.go: -------------------------------------------------------------------------------- 1 | package eips 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const resourcePath = "publicips" 6 | 7 | func rootURL(client *golangsdk.ServiceClient) string { 8 | return client.ServiceURL(client.ProjectID, resourcePath) 9 | } 10 | 11 | func resourceURL(client *golangsdk.ServiceClient, id string) string { 12 | return client.ServiceURL(client.ProjectID, resourcePath, id) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/networking/v1/routetables/Delete.go: -------------------------------------------------------------------------------- 1 | package routetables 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/openstack" 6 | ) 7 | 8 | // Delete will permanently delete a particular route table based on its unique ID 9 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 10 | // DELETE /v1.1/{project_id}/clusters/{cluster_id} 11 | _, err = client.Delete(client.ServiceURL(client.ProjectID, "routetables", id), openstack.StdRequestOpts()) 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /openstack/networking/v1/routetables/Get.go: -------------------------------------------------------------------------------- 1 | package routetables 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*RouteTable, error) { 9 | raw, err := client.Get(client.ServiceURL(client.ProjectID, "routetables", id), nil, nil) 10 | if err != nil { 11 | return nil, err 12 | } 13 | 14 | var res RouteTable 15 | err = extract.IntoStructPtr(raw.Body, &res, "routetable") 16 | return &res, err 17 | } 18 | -------------------------------------------------------------------------------- /openstack/networking/v1/subnets/testing/doc.go: -------------------------------------------------------------------------------- 1 | // VPCs unit tests 2 | 3 | package testing 4 | -------------------------------------------------------------------------------- /openstack/networking/v1/vpcs/testing/doc.go: -------------------------------------------------------------------------------- 1 | // vpcs unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v1/vpcs/urls.go: -------------------------------------------------------------------------------- 1 | package vpcs 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const resourcePath = "vpcs" 6 | 7 | func rootURL(c *golangsdk.ServiceClient) string { 8 | return c.ServiceURL(c.ProjectID, resourcePath) 9 | } 10 | 11 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 12 | return c.ServiceURL(c.ProjectID, resourcePath, id) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/networking/v2/apiversions/testing/doc.go: -------------------------------------------------------------------------------- 1 | // apiversions unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/apiversions/urls.go: -------------------------------------------------------------------------------- 1 | package apiversions 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/opentelekomcloud/gophertelekomcloud" 7 | ) 8 | 9 | func apiVersionsURL(c *golangsdk.ServiceClient) string { 10 | return c.Endpoint 11 | } 12 | 13 | func apiInfoURL(c *golangsdk.ServiceClient, version string) string { 14 | return c.Endpoint + strings.TrimRight(version, "/") + "/" 15 | } 16 | -------------------------------------------------------------------------------- /openstack/networking/v2/common/common_tests.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/testhelper/client" 6 | ) 7 | 8 | const TokenID = client.TokenID 9 | 10 | func ServiceClient() *golangsdk.ServiceClient { 11 | sc := client.ServiceClient() 12 | sc.ResourceBase = sc.Endpoint + "v2.0/" 13 | return sc 14 | } 15 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/dnatrules/Delete.go: -------------------------------------------------------------------------------- 1 | package dnatrules 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 8 | // DELETE /v2.0/dnat_rules/{dnat_rule_id} 9 | _, err = client.Delete(client.ServiceURL("dnat_rules", id), &golangsdk.RequestOpts{ 10 | OkCodes: []int{204}, 11 | }) 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/dnatrules/Get.go: -------------------------------------------------------------------------------- 1 | package dnatrules 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*DnatRule, error) { 9 | // GET /v2.0/dnat_rules/{dnat_rule_id} 10 | raw, err := client.Get(client.ServiceURL("dnat_rules", id), nil, nil) 11 | if err != nil { 12 | return nil, err 13 | } 14 | 15 | var res DnatRule 16 | return &res, extract.IntoStructPtr(raw.Body, &res, "dnat_rule") 17 | } 18 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/elb/certificate/urls.go: -------------------------------------------------------------------------------- 1 | package certificate 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "elbaas" 7 | resourcePath = "certificate" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(c.ProjectID, rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(c.ProjectID, rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/elb/healthcheck/urls.go: -------------------------------------------------------------------------------- 1 | package healthcheck 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "elbaas" 7 | resourcePath = "healthcheck" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(c.ProjectID, rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(c.ProjectID, rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/elb/listeners/urls.go: -------------------------------------------------------------------------------- 1 | package listeners 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "elbaas" 7 | resourcePath = "listeners" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(c.ProjectID, rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(c.ProjectID, rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/elb/loadbalancers/urls.go: -------------------------------------------------------------------------------- 1 | package loadbalancers 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "elbaas" 7 | resourcePath = "loadbalancers" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(c.ProjectID, rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(c.ProjectID, rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/elb/quotas/requests.go: -------------------------------------------------------------------------------- 1 | package quotas 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | // Get retrieves a particular Loadbalancer based on its unique ID. 8 | func Get(c *golangsdk.ServiceClient) (r GetResult) { 9 | _, r.Err = c.Get(rootURL(c), &r.Body, nil) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/elb/quotas/urls.go: -------------------------------------------------------------------------------- 1 | package quotas 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "elbaas" 7 | resourcePath = "quotas" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(c.ProjectID, rootPath, resourcePath) 12 | } 13 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/elbaas/doc.go: -------------------------------------------------------------------------------- 1 | // Package lbaas_v2 provides information and interaction with the Load Balancer 2 | // as a Service v2 extension for the OpenStack Networking service. 3 | // lbaas v2 api docs: http://developer.openstack.org/api-ref-networking-v2-ext.html#lbaas-v2.0 4 | // lbaas v2 api schema: https://github.com/openstack/neutron-lbaas/blob/master/neutron_lbaas/extensions/loadbalancerv2.py 5 | package elbaas 6 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/elbaas/healthcheck/urls.go: -------------------------------------------------------------------------------- 1 | package healthcheck 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "elbaas" 7 | resourcePath = "healthcheck" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/elbaas/listeners/urls.go: -------------------------------------------------------------------------------- 1 | package listeners 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "elbaas" 7 | resourcePath = "listeners" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/external/results.go: -------------------------------------------------------------------------------- 1 | package external 2 | 3 | // NetworkExternalExt represents a decorated form of a Network with based on the 4 | // "external-net" extension. 5 | type NetworkExternalExt struct { 6 | // Specifies whether the network is an external network or not. 7 | External bool `json:"router:external"` 8 | } 9 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/external/testing/doc.go: -------------------------------------------------------------------------------- 1 | // external unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas/doc.go: -------------------------------------------------------------------------------- 1 | // Package fwaas provides information and interaction with the Firewall 2 | // as a Service extension for the OpenStack Networking service. 3 | package fwaas 4 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas/firewalls/errors.go: -------------------------------------------------------------------------------- 1 | package firewalls 2 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas/firewalls/testing/doc.go: -------------------------------------------------------------------------------- 1 | // firewalls unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas/firewalls/urls.go: -------------------------------------------------------------------------------- 1 | package firewalls 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "fw" 7 | resourcePath = "firewalls" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas/policies/testing/doc.go: -------------------------------------------------------------------------------- 1 | // policies unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas/routerinsertion/results.go: -------------------------------------------------------------------------------- 1 | package routerinsertion 2 | 3 | // FirewallExt is an extension to the base Firewall object 4 | type FirewallExt struct { 5 | // RouterIDs are the routers that the firewall is attached to. 6 | RouterIDs []string `json:"router_ids"` 7 | } 8 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas/routerinsertion/testing/doc.go: -------------------------------------------------------------------------------- 1 | // routerinsertion unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas/rules/errors.go: -------------------------------------------------------------------------------- 1 | package rules 2 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas/rules/testing/doc.go: -------------------------------------------------------------------------------- 1 | // rules unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas/rules/urls.go: -------------------------------------------------------------------------------- 1 | package rules 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "fw" 7 | resourcePath = "firewall_rules" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas_v2/doc.go: -------------------------------------------------------------------------------- 1 | // Package fwaas provides information and interaction with the Firewall 2 | // as a Service extension for the OpenStack Networking service. 3 | package fwaas_v2 4 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas_v2/firewall_groups/errors.go: -------------------------------------------------------------------------------- 1 | package firewall_groups 2 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas_v2/firewall_groups/urls.go: -------------------------------------------------------------------------------- 1 | package firewall_groups 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "fwaas" 7 | resourcePath = "firewall_groups" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas_v2/routerinsertion/doc.go: -------------------------------------------------------------------------------- 1 | // Package routerinsertion implements the fwaasrouterinsertion FWaaS extension. 2 | package routerinsertion 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas_v2/routerinsertion/results.go: -------------------------------------------------------------------------------- 1 | package routerinsertion 2 | 3 | // FirewallGroupExt is an extension to the base Firewall group object 4 | type FirewallGroupExt struct { 5 | // PortIDs are the ports that the firewall group is attached to. 6 | PortIDs []string `json:"ports"` 7 | } 8 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas_v2/rules/errors.go: -------------------------------------------------------------------------------- 1 | package rules 2 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/fwaas_v2/rules/urls.go: -------------------------------------------------------------------------------- 1 | package rules 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "fwaas" 7 | resourcePath = "firewall_rules" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/hw_snatrules/urls.go: -------------------------------------------------------------------------------- 1 | package hw_snatrules 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const resourcePath = "snat_rules" 6 | 7 | func rootURL(c *golangsdk.ServiceClient) string { 8 | return c.ServiceURL(resourcePath) 9 | } 10 | 11 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 12 | return c.ServiceURL(resourcePath, id) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/layer3/doc.go: -------------------------------------------------------------------------------- 1 | // Package layer3 provides access to the Layer-3 networking extension for the 2 | // OpenStack Neutron service. This extension allows API users to route packets 3 | // between subnets, forward packets from internal networks to external ones, 4 | // and access instances from external networks through floating IPs. 5 | package layer3 6 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/layer3/floatingips/testing/doc.go: -------------------------------------------------------------------------------- 1 | // floatingips unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/layer3/floatingips/urls.go: -------------------------------------------------------------------------------- 1 | package floatingips 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const resourcePath = "floatingips" 6 | 7 | func rootURL(c *golangsdk.ServiceClient) string { 8 | return c.ServiceURL(resourcePath) 9 | } 10 | 11 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 12 | return c.ServiceURL(resourcePath, id) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/layer3/routers/testing/doc.go: -------------------------------------------------------------------------------- 1 | // routers unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas/doc.go: -------------------------------------------------------------------------------- 1 | // Package lbaas provides information and interaction with the Load Balancer 2 | // as a Service extension for the OpenStack Networking service. 3 | package lbaas 4 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas/members/testing/doc.go: -------------------------------------------------------------------------------- 1 | // members unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas/members/urls.go: -------------------------------------------------------------------------------- 1 | package members 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "lb" 7 | resourcePath = "members" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas/monitors/testing/doc.go: -------------------------------------------------------------------------------- 1 | // monitors unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas/monitors/urls.go: -------------------------------------------------------------------------------- 1 | package monitors 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "lb" 7 | resourcePath = "health_monitors" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas/pools/testing/doc.go: -------------------------------------------------------------------------------- 1 | // pools unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas/vips/testing/doc.go: -------------------------------------------------------------------------------- 1 | // vips unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas/vips/urls.go: -------------------------------------------------------------------------------- 1 | package vips 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "lb" 7 | resourcePath = "vips" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas_v2/certificates/urls.go: -------------------------------------------------------------------------------- 1 | package certificates 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "lbaas" 7 | resourcePath = "certificates" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas_v2/doc.go: -------------------------------------------------------------------------------- 1 | // Package lbaas_v2 provides information and interaction with the Load Balancer 2 | // as a Service v2 extension for the OpenStack Networking service. 3 | package lbaas_v2 4 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas_v2/l7policies/testing/doc.go: -------------------------------------------------------------------------------- 1 | // l7policies unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas_v2/listeners/testing/doc.go: -------------------------------------------------------------------------------- 1 | // listeners unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas_v2/listeners/urls.go: -------------------------------------------------------------------------------- 1 | package listeners 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "lbaas" 7 | resourcePath = "listeners" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas_v2/loadbalancers/testing/doc.go: -------------------------------------------------------------------------------- 1 | // loadbalancers unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas_v2/monitors/testing/doc.go: -------------------------------------------------------------------------------- 1 | // monitors unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas_v2/monitors/urls.go: -------------------------------------------------------------------------------- 1 | package monitors 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "lbaas" 7 | resourcePath = "healthmonitors" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas_v2/pools/testing/doc.go: -------------------------------------------------------------------------------- 1 | // pools unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/lbaas_v2/whitelists/urls.go: -------------------------------------------------------------------------------- 1 | package whitelists 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "lbaas" 7 | resourcePath = "whitelists" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/natgateways/urls.go: -------------------------------------------------------------------------------- 1 | package natgateways 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const resourcePath = "nat_gateways" 6 | 7 | func rootURL(c *golangsdk.ServiceClient) string { 8 | return c.ServiceURL(resourcePath) 9 | } 10 | 11 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 12 | return c.ServiceURL(resourcePath, id) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/networkipavailabilities/testing/doc.go: -------------------------------------------------------------------------------- 1 | // networkipavailabilities unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/portsbinding/doc.go: -------------------------------------------------------------------------------- 1 | // Package portsbinding provides information and interaction with the port 2 | // binding extension for the OpenStack Networking service. 3 | package portsbinding 4 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/portsbinding/testing/doc.go: -------------------------------------------------------------------------------- 1 | // portsbindings unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/portsecurity/results.go: -------------------------------------------------------------------------------- 1 | package portsecurity 2 | 3 | type PortSecurityExt struct { 4 | // PortSecurityEnabled specifies whether port security is enabled or 5 | // disabled. 6 | PortSecurityEnabled bool `json:"port_security_enabled"` 7 | } 8 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/provider/testing/doc.go: -------------------------------------------------------------------------------- 1 | // provider unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/qos/ruletypes/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package ruletypes contains functionality for working with Neutron 'quality of service' rule-type resources. 3 | 4 | Example: You can list rule-types in the following way: 5 | 6 | page, err := ruletypes.ListRuleTypes(client).AllPages() 7 | if err != nil { 8 | return 9 | } 10 | 11 | rules, err := ruletypes.ExtractRuleTypes(page) 12 | if err != nil { 13 | return 14 | } 15 | 16 | fmt.Printf("%v <- Rule Types\n", rules) 17 | 18 | */ 19 | package ruletypes 20 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/qos/ruletypes/requests.go: -------------------------------------------------------------------------------- 1 | package ruletypes 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/pagination" 6 | ) 7 | 8 | // ListRuleTypes returns the list of rule types from the server 9 | func ListRuleTypes(c *golangsdk.ServiceClient) (result pagination.Pager) { 10 | return pagination.NewPager(c, listRuleTypesURL(c), func(r pagination.PageResult) pagination.Page { 11 | return ListRuleTypesPage{pagination.SinglePageBase(r)} 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/qos/ruletypes/testing/doc.go: -------------------------------------------------------------------------------- 1 | // qos unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/qos/ruletypes/testing/fixtures.go: -------------------------------------------------------------------------------- 1 | package testing 2 | 3 | const ( 4 | ListRuleTypesResponse = ` 5 | { 6 | "rule_types": [ 7 | { 8 | "type": "bandwidth_limit" 9 | }, 10 | { 11 | "type": "dscp_marking" 12 | }, 13 | { 14 | "type": "minimum_bandwidth" 15 | } 16 | ] 17 | } 18 | ` 19 | ) 20 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/qos/ruletypes/urls.go: -------------------------------------------------------------------------------- 1 | package ruletypes 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func listRuleTypesURL(c *golangsdk.ServiceClient) string { 6 | return c.ServiceURL("qos", "rule-types") 7 | } 8 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/rbacpolicies/testing/doc.go: -------------------------------------------------------------------------------- 1 | // Package testing includes rbac unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/security/groups/testing/doc.go: -------------------------------------------------------------------------------- 1 | // groups unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/security/groups/urls.go: -------------------------------------------------------------------------------- 1 | package groups 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const rootPath = "security-groups" 6 | 7 | func rootURL(c *golangsdk.ServiceClient) string { 8 | return c.ServiceURL(rootPath) 9 | } 10 | 11 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 12 | return c.ServiceURL(rootPath, id) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/security/rules/testing/doc.go: -------------------------------------------------------------------------------- 1 | // rules unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/security/rules/urls.go: -------------------------------------------------------------------------------- 1 | package rules 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const rootPath = "security-group-rules" 6 | 7 | func rootURL(c *golangsdk.ServiceClient) string { 8 | return c.ServiceURL(rootPath) 9 | } 10 | 11 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 12 | return c.ServiceURL(rootPath, id) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/snatrules/Delete.go: -------------------------------------------------------------------------------- 1 | package snatrules 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 8 | // DELETE /v2.0/snat_rules/{snat_rule_id} 9 | _, err = client.Delete(client.ServiceURL("snat_rules", id), &golangsdk.RequestOpts{ 10 | OkCodes: []int{204}, 11 | }) 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/snatrules/Get.go: -------------------------------------------------------------------------------- 1 | package snatrules 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*SnatRule, error) { 9 | // GET /v2.0/snat_rules/{snat_rule_id} 10 | raw, err := client.Get(client.ServiceURL("snat_rules", id), nil, nil) 11 | if err != nil { 12 | return nil, err 13 | } 14 | 15 | var res SnatRule 16 | return &res, extract.IntoStructPtr(raw.Body, &res, "snat_rule") 17 | } 18 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/subnetpools/testing/doc.go: -------------------------------------------------------------------------------- 1 | // subnetpools unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/testing/doc.go: -------------------------------------------------------------------------------- 1 | // extensions unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/vpnaas/endpointgroups/urls.go: -------------------------------------------------------------------------------- 1 | package endpointgroups 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "vpn" 7 | resourcePath = "endpoint-groups" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/vpnaas/ikepolicies/urls.go: -------------------------------------------------------------------------------- 1 | package ikepolicies 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "vpn" 7 | resourcePath = "ikepolicies" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/vpnaas/ipsecpolicies/urls.go: -------------------------------------------------------------------------------- 1 | package ipsecpolicies 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "vpn" 7 | resourcePath = "ipsecpolicies" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/vpnaas/services/urls.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "vpn" 7 | resourcePath = "vpnservices" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/extensions/vpnaas/siteconnections/urls.go: -------------------------------------------------------------------------------- 1 | package siteconnections 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "vpn" 7 | resourcePath = "ipsec-site-connections" 8 | ) 9 | 10 | func rootURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/networking/v2/networks/testing/doc.go: -------------------------------------------------------------------------------- 1 | // networks unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/peerings/testing/doc.go: -------------------------------------------------------------------------------- 1 | // peerings unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/ports/testing/doc.go: -------------------------------------------------------------------------------- 1 | // ports unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/networking/v2/routes/testing/doc.go: -------------------------------------------------------------------------------- 1 | package testing 2 | -------------------------------------------------------------------------------- /openstack/networking/v2/routes/urls.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const resourcePath = "routes" 6 | const rootPath = "vpc" 7 | 8 | func rootURL(c *golangsdk.ServiceClient) string { 9 | return c.ServiceURL(rootPath, resourcePath) 10 | } 11 | 12 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 13 | return c.ServiceURL(rootPath, resourcePath, id) 14 | } 15 | -------------------------------------------------------------------------------- /openstack/networking/v2/subnets/testing/doc.go: -------------------------------------------------------------------------------- 1 | // subnets unit tests 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/objectstorage/v1/accounts/urls.go: -------------------------------------------------------------------------------- 1 | package accounts 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func getURL(c *golangsdk.ServiceClient) string { 6 | return c.Endpoint 7 | } 8 | 9 | func updateURL(c *golangsdk.ServiceClient) string { 10 | return getURL(c) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/objectstorage/v1/objects/errors.go: -------------------------------------------------------------------------------- 1 | package objects 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // ErrWrongChecksum is the error when the checksum generated for an object 6 | // doesn't match the ETAG header. 7 | type ErrWrongChecksum struct { 8 | golangsdk.BaseError 9 | } 10 | 11 | func (e ErrWrongChecksum) Error() string { 12 | return "Local checksum does not match API ETag header" 13 | } 14 | -------------------------------------------------------------------------------- /openstack/objectstorage/v1/swauth/urls.go: -------------------------------------------------------------------------------- 1 | package swauth 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func getURL(c *golangsdk.ProviderClient) string { 6 | return c.IdentityBase + "auth/v1.0" 7 | } 8 | -------------------------------------------------------------------------------- /openstack/obs/client_other.go: -------------------------------------------------------------------------------- 1 | package obs 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | // Refresh refreshes ak, sk and securityToken for obsClient. 8 | func (obsClient ObsClient) Refresh(ak, sk, securityToken string) { 9 | sp := &securityProvider{ak: strings.TrimSpace(ak), sk: strings.TrimSpace(sk), securityToken: strings.TrimSpace(securityToken)} 10 | obsClient.conf.securityProvider = sp 11 | } 12 | 13 | // Close closes ObsClient. 14 | func (obsClient ObsClient) Close() { 15 | obsClient.conf.transport.CloseIdleConnections() 16 | } 17 | -------------------------------------------------------------------------------- /openstack/obs/error.go: -------------------------------------------------------------------------------- 1 | package obs 2 | 3 | import ( 4 | "encoding/xml" 5 | "fmt" 6 | ) 7 | 8 | type ObsError struct { 9 | BaseModel 10 | Status string 11 | XMLName xml.Name `xml:"Error"` 12 | Code string `xml:"Code"` 13 | Message string `xml:"Message"` 14 | Resource string `xml:"Resource"` 15 | HostId string `xml:"HostId"` 16 | } 17 | 18 | func (err ObsError) Error() string { 19 | return fmt.Sprintf("obs: service returned error: Status=%s, Code=%s, Message=%s, RequestId=%s", 20 | err.Status, err.Code, err.Message, err.RequestId) 21 | } 22 | -------------------------------------------------------------------------------- /openstack/obs/model_header.go: -------------------------------------------------------------------------------- 1 | package obs 2 | 3 | // ISseHeader defines the sse encryption header 4 | type ISseHeader interface { 5 | GetEncryption() string 6 | GetKey() string 7 | } 8 | 9 | // SseKmsHeader defines the SseKms header 10 | type SseKmsHeader struct { 11 | Encryption string 12 | Key string 13 | isObs bool 14 | } 15 | 16 | // SseCHeader defines the SseC header 17 | type SseCHeader struct { 18 | Encryption string 19 | Key string 20 | KeyMD5 string 21 | } 22 | -------------------------------------------------------------------------------- /openstack/rds/v1/datastores/urls.go: -------------------------------------------------------------------------------- 1 | package datastores 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func listURL(c *golangsdk.ServiceClient, dataStoreName string) string { 6 | return c.ServiceURL("datastores", dataStoreName, "versions") 7 | } 8 | -------------------------------------------------------------------------------- /openstack/rds/v1/flavors/results.go: -------------------------------------------------------------------------------- 1 | package flavors 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | type Flavor struct { 6 | ID string `json:"id"` 7 | Name string `json:"name"` 8 | Ram int `json:"ram"` 9 | SpecCode string `json:"specCode"` 10 | } 11 | 12 | type ListResult struct { 13 | golangsdk.Result 14 | } 15 | 16 | func (lr ListResult) Extract() ([]Flavor, error) { 17 | var a struct { 18 | Flavors []Flavor `json:"flavors"` 19 | } 20 | err := lr.Result.ExtractInto(&a) 21 | return a.Flavors, err 22 | } 23 | -------------------------------------------------------------------------------- /openstack/rds/v1/flavors/urls.go: -------------------------------------------------------------------------------- 1 | package flavors 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func listURL(c *golangsdk.ServiceClient, dataStoreID string, region string) string { 6 | 7 | return c.ResourceBaseURL() + "flavors?dbId=" + dataStoreID + "®ion=" + region 8 | } 9 | -------------------------------------------------------------------------------- /openstack/rds/v1/tags/urls.go: -------------------------------------------------------------------------------- 1 | package tags 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 6 | return c.ServiceURL(id, "tags") 7 | } 8 | -------------------------------------------------------------------------------- /openstack/rds/v3/backups/Delete.go: -------------------------------------------------------------------------------- 1 | package backups 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(c *golangsdk.ServiceClient, backupId string) (err error) { 6 | // DELETE https://{Endpoint}/v3/{project_id}/backups/{backup_id} 7 | _, err = c.Delete(c.ServiceURL("backups", backupId), &golangsdk.RequestOpts{ 8 | OkCodes: []int{200, 201, 204}, 9 | }) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /openstack/rds/v3/instances/Delete.go: -------------------------------------------------------------------------------- 1 | package instances 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, instanceId string) (*string, error) { 6 | // DELETE https://{Endpoint}/v3/{project_id}/instances/{instance_id} 7 | raw, err := client.Delete(client.ServiceURL("instances", instanceId), nil) 8 | return extraJob(err, raw) 9 | } 10 | -------------------------------------------------------------------------------- /openstack/rds/v3/instances/StopInstance.go: -------------------------------------------------------------------------------- 1 | package instances 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func StopInstance(client *golangsdk.ServiceClient, instanceId string) (*string, error) { 8 | // POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/action/shutdown 9 | raw, err := client.Post(client.ServiceURL("instances", instanceId, "action", "shutdown"), struct{}{}, nil, &golangsdk.RequestOpts{ 10 | OkCodes: []int{200}, 11 | }) 12 | return extraJob(err, raw) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/rms/advanced/DeleteQuery.go: -------------------------------------------------------------------------------- 1 | package advanced 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func DeleteQuery(client *golangsdk.ServiceClient, domainId, queryId string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("resource-manager", "domains", domainId, "stored-queries", queryId), &golangsdk.RequestOpts{ 7 | OkCodes: []int{200}, 8 | }) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/rms/compliance/DeleteRule.go: -------------------------------------------------------------------------------- 1 | package compliance 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, domainId, id string) (err error) { 6 | _, err = client.Delete(client.ServiceURL("resource-manager", "domains", domainId, "policy-assignments", id), &golangsdk.RequestOpts{ 7 | OkCodes: []int{200}, 8 | }) 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /openstack/rms/compliance/DisableRule.go: -------------------------------------------------------------------------------- 1 | package compliance 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func DisableRule(client *golangsdk.ServiceClient, domainId, id string) (err error) { 6 | // POST /v1/resource-manager/domains/{domain_id}/policy-assignments/{policy_assignment_id}/disable 7 | _, err = client.Post(client.ServiceURL("resource-manager", "domains", domainId, "policy-assignments", id, "disable"), nil, nil, &golangsdk.RequestOpts{ 8 | OkCodes: []int{202}, 9 | }) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /openstack/rms/compliance/EnableRule.go: -------------------------------------------------------------------------------- 1 | package compliance 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func EnableRule(client *golangsdk.ServiceClient, domainId, id string) (err error) { 8 | // POST /v1/resource-manager/domains/{domain_id}/policy-assignments/{policy_assignment_id}/enable 9 | _, err = client.Post(client.ServiceURL("resource-manager", "domains", domainId, "policy-assignments", id, "enable"), nil, nil, &golangsdk.RequestOpts{ 10 | OkCodes: []int{202}, 11 | }) 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /openstack/rms/compliance/RunEval.go: -------------------------------------------------------------------------------- 1 | package compliance 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func RunEval(client *golangsdk.ServiceClient, domainId, id string) (err error) { 6 | // POST /v1/resource-manager/domains/{domain_id}/policy-assignments/{policy_assignment_id}/policy-states/run-evaluation 7 | _, err = client.Post(client.ServiceURL("resource-manager", "domains", domainId, "policy-assignments", id, "policy-states", "run-evaluation"), nil, nil, &golangsdk.RequestOpts{ 8 | OkCodes: []int{202}, 9 | }) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /openstack/rms/recorder/DeleteRecorder.go: -------------------------------------------------------------------------------- 1 | package recorder 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func DeleteRecorder(client *golangsdk.ServiceClient, domainId string) (err error) { 8 | // DELETE /v1/resource-manager/domains/{domain_id}/tracker-config 9 | _, err = client.Delete(client.ServiceURL("resource-manager", "domains", domainId, "tracker-config"), &golangsdk.RequestOpts{ 10 | OkCodes: []int{200}, 11 | }) 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /openstack/rts/v1/softwareconfig/urls.go: -------------------------------------------------------------------------------- 1 | package softwareconfig 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const resourcePath = "software_configs" 6 | 7 | func rootURL(c *golangsdk.ServiceClient) string { 8 | return c.ServiceURL(resourcePath) 9 | } 10 | 11 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 12 | return c.ServiceURL(resourcePath, id) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/rts/v1/softwaredeployment/urls.go: -------------------------------------------------------------------------------- 1 | package softwaredeployment 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const resourcePath = "software_deployments" 6 | 7 | func rootURL(c *golangsdk.ServiceClient) string { 8 | return c.ServiceURL(resourcePath) 9 | } 10 | 11 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 12 | return c.ServiceURL(resourcePath, id) 13 | } 14 | -------------------------------------------------------------------------------- /openstack/rts/v1/stackevents/doc.go: -------------------------------------------------------------------------------- 1 | // Package stackevents provides operations for finding, listing, and retrieving 2 | // stack events. Stack events are events that take place on stacks such as 3 | // updating and abandoning. 4 | package stackevents 5 | -------------------------------------------------------------------------------- /openstack/rts/v1/stackevents/testing/doc.go: -------------------------------------------------------------------------------- 1 | // orchestration_stackevents_v1 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/rts/v1/stackevents/urls.go: -------------------------------------------------------------------------------- 1 | package stackevents 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func listURL(c *golangsdk.ServiceClient, stackName, stackID string) string { 6 | return c.ServiceURL("stacks", stackName, stackID, "events") 7 | } 8 | -------------------------------------------------------------------------------- /openstack/rts/v1/stackresources/doc.go: -------------------------------------------------------------------------------- 1 | // Package stackresources provides operations for working with stack resources. 2 | package stackresources 3 | -------------------------------------------------------------------------------- /openstack/rts/v1/stackresources/testing/doc.go: -------------------------------------------------------------------------------- 1 | // orchestration_stackresources_v1 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/rts/v1/stackresources/urls.go: -------------------------------------------------------------------------------- 1 | package stackresources 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func listURL(c *golangsdk.ServiceClient, stackName string) string { 6 | return c.ServiceURL("stacks", stackName, "resources") 7 | } 8 | -------------------------------------------------------------------------------- /openstack/rts/v1/stacktemplates/doc.go: -------------------------------------------------------------------------------- 1 | // Package stacktemplates provides operations for working with Heat templates. 2 | package stacktemplates 3 | -------------------------------------------------------------------------------- /openstack/rts/v1/stacktemplates/requests.go: -------------------------------------------------------------------------------- 1 | package stacktemplates 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | // Get retreives data for the given stack template. 6 | func Get(c *golangsdk.ServiceClient, stackName, stackID string) (r GetResult) { 7 | _, r.Err = c.Get(getURL(c, stackName, stackID), &r.Body, nil) 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /openstack/rts/v1/stacktemplates/urls.go: -------------------------------------------------------------------------------- 1 | package stacktemplates 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func getURL(c *golangsdk.ServiceClient, stackName, stackID string) string { 6 | return c.ServiceURL("stacks", stackName, stackID, "template") 7 | } 8 | -------------------------------------------------------------------------------- /openstack/sdrs/v1/attachreplication/urls.go: -------------------------------------------------------------------------------- 1 | package attachreplication 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func createURL(c *golangsdk.ServiceClient, instanceID string) string { 6 | return c.ServiceURL("protected-instances", instanceID, "attachreplication") 7 | } 8 | 9 | func deleteURL(c *golangsdk.ServiceClient, instanceID string, replicationID string) string { 10 | return c.ServiceURL("protected-instances", instanceID, "detachreplication", replicationID) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/sdrs/v1/domains/requests.go: -------------------------------------------------------------------------------- 1 | package domains 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | // Get active-active domains 8 | func Get(client *golangsdk.ServiceClient) (r GetResult) { 9 | _, r.Err = client.Get(getURL(client), &r.Body, nil) 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /openstack/sdrs/v1/domains/urls.go: -------------------------------------------------------------------------------- 1 | package domains 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func getURL(c *golangsdk.ServiceClient) string { 6 | return c.ServiceURL("active-domains") 7 | } 8 | -------------------------------------------------------------------------------- /openstack/sdrs/v1/drill/urls.go: -------------------------------------------------------------------------------- 1 | package drill 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func rootURL(c *golangsdk.ServiceClient) string { 6 | return c.ServiceURL("disaster-recovery-drills") 7 | } 8 | 9 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 10 | return c.ServiceURL("disaster-recovery-drills", id) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/sdrs/v1/replications/urls.go: -------------------------------------------------------------------------------- 1 | package replications 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func rootURL(c *golangsdk.ServiceClient) string { 6 | return c.ServiceURL("replications") 7 | } 8 | 9 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 10 | return c.ServiceURL("replications", id) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/sfs/v2/common/common_tests.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/testhelper/client" 6 | ) 7 | 8 | const TokenID = client.TokenID 9 | 10 | // Fake project id to use. 11 | const ProjectID = "17fbda95add24720a4038ba4b1c705ed" 12 | 13 | func ServiceClient() *golangsdk.ServiceClient { 14 | sc := client.ServiceClient() 15 | sc.ResourceBase = sc.Endpoint + "v2/" 16 | sc.ProjectID = ProjectID 17 | return sc 18 | } 19 | -------------------------------------------------------------------------------- /openstack/smn/v2/topicattributes/urls.go: -------------------------------------------------------------------------------- 1 | package topicattributes 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | topics = "topics" 7 | attributes = "attributes" 8 | ) 9 | 10 | func listURL(client *golangsdk.ServiceClient, topicURN string) string { 11 | return client.ServiceURL(topics, topicURN, attributes) 12 | } 13 | 14 | func attributeURL(client *golangsdk.ServiceClient, topicURN, attribute string) string { 15 | return client.ServiceURL(topics, topicURN, attributes, attribute) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/swr/v2/organizations/Delete.go: -------------------------------------------------------------------------------- 1 | package organizations 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, namespace string) (err error) { 6 | // DELETE /v2/manage/namespaces/{namespace} 7 | _, err = client.Delete(client.ServiceURL("manage", "namespaces", namespace), nil) 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /openstack/swr/v2/organizations/DeletePermissions.go: -------------------------------------------------------------------------------- 1 | package organizations 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func DeletePermissions(client *golangsdk.ServiceClient, organization string, userID string) (err error) { 6 | // DELETE /v2/manage/namespaces/{namespace}/access 7 | _, err = client.DeleteWithBody(client.ServiceURL("manage", "namespaces", organization, "access"), []interface{}{userID}, nil) 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /openstack/swr/v2/repositories/Delete.go: -------------------------------------------------------------------------------- 1 | package repositories 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func Delete(client *golangsdk.ServiceClient, organization, repository string) (err error) { 6 | // DELETE /v2/manage/namespaces/{namespace}/repos/{repository} 7 | _, err = client.Delete(client.ServiceURL("manage", "namespaces", organization, "repos", repository), nil) 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /openstack/swr/v2/repositories/DeletePermissions.go: -------------------------------------------------------------------------------- 1 | package repositories 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func DeletePermissions(client *golangsdk.ServiceClient, organization, repository string, userID string) (err error) { 6 | // DELETE /v2/manage/namespaces/{namespace}/repos/{repository}/access 7 | _, err = client.DeleteWithBody(client.ServiceURL("manage", "namespaces", organization, "repos", repository, "access"), []interface{}{userID}, nil) 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /openstack/testing/doc.go: -------------------------------------------------------------------------------- 1 | // openstack 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/tms/v1/tags/urls.go: -------------------------------------------------------------------------------- 1 | package tags 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | rootPath = "predefine_tags" 7 | actionPath = "predefine_tags/action" 8 | ) 9 | 10 | func actionURL(c *golangsdk.ServiceClient) string { 11 | return c.ServiceURL(actionPath) 12 | } 13 | 14 | func rootURL(c *golangsdk.ServiceClient) string { 15 | return c.ServiceURL(rootPath) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/utils/testing/doc.go: -------------------------------------------------------------------------------- 1 | // utils 2 | package testing 3 | -------------------------------------------------------------------------------- /openstack/vbs/v2/common/common_tests.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/testhelper/client" 6 | ) 7 | 8 | const TokenID = client.TokenID 9 | 10 | func ServiceClient() *golangsdk.ServiceClient { 11 | sc := client.ServiceClient() 12 | sc.ResourceBase = sc.Endpoint 13 | return sc 14 | } 15 | -------------------------------------------------------------------------------- /openstack/vbs/v2/shares/urls.go: -------------------------------------------------------------------------------- 1 | package shares 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const rootPath = "os-vendor-backup-sharing" 6 | 7 | func rootURL(c *golangsdk.ServiceClient) string { 8 | return c.ServiceURL(rootPath) 9 | } 10 | 11 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 12 | return c.ServiceURL(rootPath, id) 13 | } 14 | 15 | func listURL(c *golangsdk.ServiceClient) string { 16 | return c.ServiceURL(rootPath, "detail") 17 | } 18 | -------------------------------------------------------------------------------- /openstack/vpc/v1/bandwidths/testing/doc.go: -------------------------------------------------------------------------------- 1 | package testing 2 | -------------------------------------------------------------------------------- /openstack/vpc/v1/bandwidths/urls.go: -------------------------------------------------------------------------------- 1 | package bandwidths 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func GetURL(c *golangsdk.ServiceClient, bandwidthId string) string { 8 | return c.ServiceURL(c.ProjectID, "bandwidths", bandwidthId) 9 | } 10 | 11 | func ListURL(c *golangsdk.ServiceClient) string { 12 | return c.ServiceURL(c.ProjectID, "bandwidths") 13 | } 14 | 15 | func UpdateURL(c *golangsdk.ServiceClient, bandwidthId string) string { 16 | return c.ServiceURL(c.ProjectID, "bandwidths", bandwidthId) 17 | } 18 | -------------------------------------------------------------------------------- /openstack/vpc/v1/publicips/doc.go: -------------------------------------------------------------------------------- 1 | package publicips 2 | -------------------------------------------------------------------------------- /openstack/vpc/v1/publicips/testing/doc.go: -------------------------------------------------------------------------------- 1 | package testing 2 | -------------------------------------------------------------------------------- /openstack/vpcep/v1/endpoints/Delete.go: -------------------------------------------------------------------------------- 1 | package endpoints 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 8 | // DELETE /v1/{project_id}/vpc-endpoints/{vpc_endpoint_id} 9 | _, err = client.Delete(client.ServiceURL("vpc-endpoints", id), &golangsdk.RequestOpts{ 10 | OkCodes: []int{200, 204}, 11 | }) 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /openstack/vpcep/v1/endpoints/Get.go: -------------------------------------------------------------------------------- 1 | package endpoints 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*Endpoint, error) { 9 | // GET /v1/{project_id}/vpc-endpoints/{vpc_endpoint_id} 10 | raw, err := client.Get(client.ServiceURL("vpc-endpoints", id), nil, nil) 11 | if err != nil { 12 | return nil, err 13 | } 14 | 15 | var res Endpoint 16 | return &res, extract.Into(raw.Body, &res) 17 | } 18 | -------------------------------------------------------------------------------- /openstack/vpcep/v1/services/Delete.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 8 | // DELETE /v1/{project_id}/vpc-endpoint-services/{vpc_endpoint_service_id} 9 | _, err = client.Delete(client.ServiceURL("vpc-endpoint-services", id), &golangsdk.RequestOpts{ 10 | OkCodes: []int{200, 204}, 11 | }) 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /openstack/vpcep/v1/services/Get.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*Service, error) { 9 | // GET /v1/{project_id}/vpc-endpoint-services/{vpc_endpoint_service_id} 10 | raw, err := client.Get(client.ServiceURL("vpc-endpoint-services", id), nil, nil) 11 | if err != nil { 12 | return nil, err 13 | } 14 | 15 | var res Service 16 | return &res, extract.Into(raw.Body, &res) 17 | } 18 | -------------------------------------------------------------------------------- /openstack/waf-premium/v1/certificates/Delete.go: -------------------------------------------------------------------------------- 1 | package certificates 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 8 | // DELETE /v1/{project_id}/waf/certificate/{certificate_id} 9 | _, err = client.Delete(client.ServiceURL("waf", "certificate", id), &golangsdk.RequestOpts{ 10 | OkCodes: []int{200}, 11 | MoreHeaders: map[string]string{"Content-Type": "application/json;charset=utf8"}, 12 | }) 13 | return 14 | } 15 | -------------------------------------------------------------------------------- /openstack/waf-premium/v1/instances/Delete.go: -------------------------------------------------------------------------------- 1 | package instances 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 8 | _, err = client.Delete(client.ServiceURL("premium-waf", "instance", id), &golangsdk.RequestOpts{ 9 | OkCodes: []int{200}, 10 | MoreHeaders: map[string]string{"Content-Type": "application/json;charset=utf8"}, 11 | }) 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /openstack/waf-premium/v1/policies/Delete.go: -------------------------------------------------------------------------------- 1 | package policies 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | ) 6 | 7 | func Delete(client *golangsdk.ServiceClient, id string) (err error) { 8 | // DELETE /v1/{project_id}/waf/policy/{policy_id} 9 | _, err = client.Delete(client.ServiceURL("waf", "policy", id), &golangsdk.RequestOpts{ 10 | OkCodes: []int{200}, 11 | MoreHeaders: map[string]string{"Content-Type": "application/json;charset=utf8"}, 12 | }) 13 | return 14 | } 15 | -------------------------------------------------------------------------------- /openstack/waf-premium/v1/policies/Get.go: -------------------------------------------------------------------------------- 1 | package policies 2 | 3 | import ( 4 | "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 | ) 7 | 8 | func Get(client *golangsdk.ServiceClient, id string) (*Policy, error) { 9 | // GET /v1/{project_id}/waf/policy/{policy_id} 10 | raw, err := client.Get(client.ServiceURL("waf", "policy", id), nil, nil) 11 | if err != nil { 12 | return nil, err 13 | } 14 | 15 | var res Policy 16 | return &res, extract.Into(raw.Body, &res) 17 | } 18 | -------------------------------------------------------------------------------- /openstack/waf/v1/alarmnotifications/urls.go: -------------------------------------------------------------------------------- 1 | package alarmnotifications 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | const ( 6 | configPath = "config" 7 | resourcePath = "alert" 8 | ) 9 | 10 | func listURL(client *golangsdk.ServiceClient) string { 11 | return client.ServiceURL(configPath, resourcePath) 12 | } 13 | 14 | func resourceURL(client *golangsdk.ServiceClient, id string) string { 15 | return client.ServiceURL(configPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /openstack/waf/v1/ccattackprotection_rules/urls.go: -------------------------------------------------------------------------------- 1 | package ccattackprotection_rules 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func rootURL(c *golangsdk.ServiceClient, policy_id string) string { 6 | return c.ServiceURL("policy", policy_id, "cc") 7 | } 8 | 9 | func resourceURL(c *golangsdk.ServiceClient, policy_id, id string) string { 10 | return c.ServiceURL("policy", policy_id, "cc", id) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/waf/v1/certificates/urls.go: -------------------------------------------------------------------------------- 1 | package certificates 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func rootURL(c *golangsdk.ServiceClient) string { 6 | return c.ServiceURL("certificate") 7 | } 8 | 9 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 10 | return c.ServiceURL("certificate", id) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/waf/v1/datamasking_rules/urls.go: -------------------------------------------------------------------------------- 1 | package datamasking_rules 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func rootURL(c *golangsdk.ServiceClient, policy_id string) string { 6 | return c.ServiceURL("policy", policy_id, "privacy") 7 | } 8 | 9 | func resourceURL(c *golangsdk.ServiceClient, policy_id, id string) string { 10 | return c.ServiceURL("policy", policy_id, "privacy", id) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/waf/v1/domains/urls.go: -------------------------------------------------------------------------------- 1 | package domains 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func rootURL(c *golangsdk.ServiceClient) string { 6 | return c.ServiceURL("instance") 7 | } 8 | 9 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 10 | return c.ServiceURL("instance", id) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/waf/v1/falsealarmmasking_rules/urls.go: -------------------------------------------------------------------------------- 1 | package falsealarmmasking_rules 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func rootURL(c *golangsdk.ServiceClient, policy_id string) string { 6 | return c.ServiceURL("policy", policy_id, "ignore") 7 | } 8 | 9 | func resourceURL(c *golangsdk.ServiceClient, policy_id, id string) string { 10 | return c.ServiceURL("policy", policy_id, "ignore", id) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/waf/v1/policies/urls.go: -------------------------------------------------------------------------------- 1 | package policies 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func rootURL(c *golangsdk.ServiceClient) string { 6 | return c.ServiceURL("policy") 7 | } 8 | 9 | func resourceURL(c *golangsdk.ServiceClient, id string) string { 10 | return c.ServiceURL("policy", id) 11 | } 12 | 13 | func hostsURL(c *golangsdk.ServiceClient, id string) string { 14 | return c.ServiceURL("policy", id, "hosts") 15 | } 16 | -------------------------------------------------------------------------------- /openstack/waf/v1/preciseprotection_rules/urls.go: -------------------------------------------------------------------------------- 1 | package preciseprotection_rules 2 | 3 | import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func rootURL(c *golangsdk.ServiceClient, policyID string) string { 6 | return c.ServiceURL("policy", policyID, "custom") 7 | } 8 | 9 | func resourceURL(c *golangsdk.ServiceClient, policyID, id string) string { 10 | return c.ServiceURL("policy", policyID, "custom", id) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/waf/v1/webtamperprotection_rules/urls.go: -------------------------------------------------------------------------------- 1 | package webtamperprotection_rules 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func rootURL(c *golangsdk.ServiceClient, policy_id string) string { 6 | return c.ServiceURL("policy", policy_id, "antitamper") 7 | } 8 | 9 | func resourceURL(c *golangsdk.ServiceClient, policy_id, id string) string { 10 | return c.ServiceURL("policy", policy_id, "antitamper", id) 11 | } 12 | -------------------------------------------------------------------------------- /openstack/waf/v1/whiteblackip_rules/urls.go: -------------------------------------------------------------------------------- 1 | package whiteblackip_rules 2 | 3 | import "github.com/opentelekomcloud/gophertelekomcloud" 4 | 5 | func rootURL(c *golangsdk.ServiceClient, policy_id string) string { 6 | return c.ServiceURL("policy", policy_id, "whiteblackip") 7 | } 8 | 9 | func resourceURL(c *golangsdk.ServiceClient, policy_id, id string) string { 10 | return c.ServiceURL("policy", policy_id, "whiteblackip", id) 11 | } 12 | -------------------------------------------------------------------------------- /pagination/pkg.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package pagination contains utilities and convenience structs that implement common pagination idioms within OpenStack APIs. 3 | */ 4 | package pagination 5 | -------------------------------------------------------------------------------- /pagination/testing/doc.go: -------------------------------------------------------------------------------- 1 | // pagination 2 | package testing 3 | -------------------------------------------------------------------------------- /pagination/testing/pagination_test.go: -------------------------------------------------------------------------------- 1 | package testing 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/testhelper" 6 | ) 7 | 8 | func createClient() *golangsdk.ServiceClient { 9 | return &golangsdk.ServiceClient{ 10 | ProviderClient: &golangsdk.ProviderClient{TokenID: "abc123"}, 11 | Endpoint: testhelper.Endpoint(), 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /script/acceptancetest: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Run the acceptance tests. 4 | 5 | exec go test ./acceptance/openstack/... $@ 6 | -------------------------------------------------------------------------------- /script/cibuild: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Test script to be invoked by Travis. 4 | 5 | exec script/unittest -v 6 | -------------------------------------------------------------------------------- /script/coverage: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | n=1 6 | for testpkg in $(go list ./testing ./.../testing); do 7 | covpkg="${testpkg/"/testing"/}" 8 | go test -covermode count -coverprofile "testing_"$n.coverprofile -coverpkg $covpkg $testpkg 2>/dev/null 9 | n=$((n+1)) 10 | done 11 | gocovmerge `ls *.coverprofile` > cover.out 12 | rm *.coverprofile 13 | -------------------------------------------------------------------------------- /script/unittest: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Run the unit tests. 4 | 5 | exec go test ./testing ./.../testing $@ 6 | -------------------------------------------------------------------------------- /testhelper/client/fake.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 | "github.com/opentelekomcloud/gophertelekomcloud/testhelper" 6 | ) 7 | 8 | // Fake token to use. 9 | const TokenID = "cbc36478b0bd8e67e89469c7749d4127" 10 | 11 | // ServiceClient returns a generic service client for use in tests. 12 | func ServiceClient() *golangsdk.ServiceClient { 13 | return &golangsdk.ServiceClient{ 14 | ProviderClient: &golangsdk.ProviderClient{TokenID: TokenID}, 15 | Endpoint: testhelper.Endpoint(), 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /testhelper/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package testhelper container methods that are useful for writing unit tests. 3 | */ 4 | package testhelper 5 | -------------------------------------------------------------------------------- /testing/doc.go: -------------------------------------------------------------------------------- 1 | // golangsdk 2 | package testing 3 | -------------------------------------------------------------------------------- /testing/service_client_test.go: -------------------------------------------------------------------------------- 1 | package testing 2 | 3 | import ( 4 | "testing" 5 | 6 | golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 7 | th "github.com/opentelekomcloud/gophertelekomcloud/testhelper" 8 | ) 9 | 10 | func TestServiceURL(t *testing.T) { 11 | c := &golangsdk.ServiceClient{Endpoint: "http://123.45.67.8/"} 12 | expected := "http://123.45.67.8/more/parts/here" 13 | actual := c.ServiceURL("more", "parts", "here") 14 | th.CheckEquals(t, expected, actual) 15 | } 16 | --------------------------------------------------------------------------------