From ce5fd117ff03b98ed171a68515d5aa5a1c4b83d7 Mon Sep 17 00:00:00 2001 From: "450705171@qq.com" Date: Thu, 16 Feb 2023 09:19:39 +0800 Subject: [PATCH] new code structure --- CHANGELOG | 0 adaptor/pcm_pod/buf.gen.yaml | 17 - adaptor/pcm_pod/buf.yaml | 13 - adaptor/pcm_pod/gen/idl/pod.pb.go | 2087 ---- adaptor/pcm_pod/gen/idl/pod.pb.gw.go | 669 -- adaptor/pcm_pod/gen/idl/pod_grpc.pb.go | 335 - .../gen/openapiv2/idl/pod.swagger.json | 316 - adaptor/pcm_pod/idl/pod.proto | 282 - adaptor/pcm_pod/idl/pod.yaml | 23 - adaptor/pcm_pod/main.go | 58 - adaptor/pcm_pod/server/ali/client.go | 110 - .../server/ali/create_container_group.go | 373 - .../server/ali/delete_container_group.go | 128 - .../server/ali/describe_container_groups.go | 313 - .../server/ali/update_container_group.go | 290 - .../kubernetes/api/core/v1/objectreference.go | 33 - .../server/kubernetes/api/core/v1/register.go | 100 - .../server/kubernetes/api/core/v1/resource.go | 59 - .../server/kubernetes/api/core/v1/types.go | 6325 ------------ .../api/core/v1/zz_generated.deepcopy.go | 5958 ----------- .../pkg/apis/meta/v1/micro_time.go | 181 - .../apimachinery/pkg/apis/meta/v1/time.go | 182 - .../apimachinery/pkg/apis/meta/v1/types.go | 1438 --- .../client-go/kubernetes/clientset.go | 685 -- .../kubernetes/typed/core/v1/core_client.go | 90 - .../client-go/kubernetes/typed/core/v1/pod.go | 537 - .../kubernetes/typed/core/v1/pod_expansion.go | 64 - adaptor/pcm_pod/server/pod.go | 91 - adaptor/pcm_pod/server/podImpl.go | 350 - adaptor/pcm_pod/server/tencent/client.go | 7187 -------------- adaptor/pcm_pod/server/tencent/errors.go | 343 - adaptor/pcm_pod/server/tencent/models.go | 8695 ----------------- adaptor/pcm_pod/service/ali_eci.go | 217 - adaptor/pcm_pod/service/huawei_cci.go | 244 - adaptor/pcm_pod/service/k8s.go | 231 - adaptor/pcm_pod/service/poder.go | 50 - adaptor/pcm_pod/service/tencent_eks.go | 220 - adaptor/pcm_slurm/buf.gen.yaml | 17 - adaptor/pcm_slurm/buf.yaml | 13 - adaptor/pcm_slurm/idl/slurm.proto | 123 - adaptor/pcm_slurm/idl/slurm.yaml | 75 - adaptor/pcm_slurm/idl/slurm_diag.proto | 49 - adaptor/pcm_slurm/idl/slurm_job.proto | 314 - adaptor/pcm_slurm/idl/slurm_node.proto | 56 - adaptor/pcm_slurm/idl/slurm_partition.proto | 54 - adaptor/pcm_slurm/idl/slurm_ping.proto | 14 - adaptor/pcm_slurm/idl/slurm_reservation.proto | 46 - adaptor/pcm_slurm/idl/slurmdb_account.proto | 71 - .../pcm_slurm/idl/slurmdb_accounting.proto | 12 - adaptor/pcm_slurm/idl/slurmdb_assoc.proto | 76 - adaptor/pcm_slurm/idl/slurmdb_cluster.proto | 69 - adaptor/pcm_slurm/idl/slurmdb_coord.proto | 12 - adaptor/pcm_slurm/idl/slurmdb_job.proto | 92 - adaptor/pcm_slurm/idl/slurmdb_qos.proto | 96 - adaptor/pcm_slurm/idl/slurmdb_user.proto | 75 - adaptor/pcm_slurm/idl/slurmdb_wckey.proto | 34 - adaptor/pcm_slurm/idl/static.proto | 12 - adaptor/pcm_slurm/main.go | 30 - adaptor/pcm_slurm/rest/get_nodes.go | 3 - adaptor/pcm_slurm/server/slurm.go | 342 - adaptor/pcm_slurm/server/slurmImpl.go | 313 - .../pcm_slurm/service/common/account_db.go | 130 - .../service/common/association_db.go | 38 - .../pcm_slurm/service/common/cluster_db.go | 97 - adaptor/pcm_slurm/service/common/diag.go | 16 - adaptor/pcm_slurm/service/common/job.go | 30 - adaptor/pcm_slurm/service/common/job_db.go | 23 - .../pcm_slurm/service/common/job_submit.go | 27 - adaptor/pcm_slurm/service/common/node.go | 53 - adaptor/pcm_slurm/service/common/partition.go | 31 - adaptor/pcm_slurm/service/common/ping.go | 31 - adaptor/pcm_slurm/service/common/qos_db.go | 60 - .../pcm_slurm/service/common/reservation.go | 67 - adaptor/pcm_slurm/service/common/slurmer.go | 54 - adaptor/pcm_slurm/service/common/tianhe.go | 12 - adaptor/pcm_slurm/service/common/user_db.go | 195 - adaptor/pcm_slurm/service/common/wckey_db.go | 119 - adaptor/pcm_slurm/service/tianhe/account.go | 82 - .../pcm_slurm/service/tianhe/association.go | 145 - adaptor/pcm_slurm/service/tianhe/cluster.go | 78 - adaptor/pcm_slurm/service/tianhe/converter.go | 134 - adaptor/pcm_slurm/service/tianhe/diag.go | 76 - adaptor/pcm_slurm/service/tianhe/job.go | 116 - adaptor/pcm_slurm/service/tianhe/job_db.go | 139 - .../pcm_slurm/service/tianhe/job_submit.go | 435 - adaptor/pcm_slurm/service/tianhe/node.go | 111 - adaptor/pcm_slurm/service/tianhe/partition.go | 109 - adaptor/pcm_slurm/service/tianhe/qos.go | 159 - .../pcm_slurm/service/tianhe/reservation.go | 101 - adaptor/pcm_vm/buf.gen.yaml | 17 - adaptor/pcm_vm/buf.yaml | 13 - adaptor/pcm_vm/gen/idl/ecs.pb.go | 3049 ------ adaptor/pcm_vm/gen/idl/ecs.pb.gw.go | 841 -- adaptor/pcm_vm/gen/idl/ecs_grpc.pb.go | 411 - .../pcm_vm/gen/openapiv2/idl/ecs.swagger.json | 578 -- adaptor/pcm_vm/idl/ecs.proto | 445 - adaptor/pcm_vm/idl/ecs.yaml | 28 - adaptor/pcm_vm/main.go | 56 - adaptor/pcm_vm/server/ecs.go | 103 - adaptor/pcm_vm/server/ecsImpl.go | 264 - adaptor/pcm_vm/server/ecsImpl_test.go | 82 - adaptor/pcm_vm/server/main_test.go | 33 - adaptor/pcm_vm/service/ali.go | 243 - adaptor/pcm_vm/service/aws.go | 98 - adaptor/pcm_vm/service/ecser.go | 48 - adaptor/pcm_vm/service/ecser_test.go | 62 - adaptor/pcm_vm/service/google.go | 111 - adaptor/pcm_vm/service/harvester.go | 595 -- adaptor/pcm_vm/service/harvester_util.go | 444 - adaptor/pcm_vm/service/huawei.go | 270 - adaptor/pcm_vm/service/main_test.go | 30 - adaptor/pcm_vm/service/tencent.go | 194 - .../slurmCore/api/etc/slurmcore-api.yaml | 15 + .../slurmCore/api/internal/config/config.go | 13 + .../internal/handler/listhistoryjobhandler.go | 28 + .../slurmCore/api/internal/handler/routes.go | 22 + .../api/internal/logic/listhistoryjoblogic.go | 59 + .../api/internal/svc/serviceContext.go | 24 + .../slurmCore/api/internal/types/types.go | 82 + adaptor/slurm/slurmCore/api/slurmCore.api | 96 + adaptor/slurm/slurmCore/api/slurmcore.go | 31 + .../slurmShuguang/rpc/etc/slurmshuguang.yaml | 10 + .../rpc/internal/config/config.go | 8 + .../rpc/internal/config/shuguangConfig.go | 12 + .../rpc/internal/logic/listhistoryjoblogic.go | 135 + .../internal/server/slurmshuguangserver.go | 29 + .../rpc/internal/svc/servicecontext.go | 13 + .../rpc/internal/util/shuguangAuth.go | 207 + .../slurmShuguang/rpc/pb/slurmShuguang.proto | 51 + .../rpc/slurmShuguang/slurmShuguang.pb.go | 510 + .../slurmShuguang/slurmShuguang_grpc.pb.go | 107 + .../slurm/slurmShuguang/rpc/slurmshuguang.go | 39 + .../rpc/slurmshuguangclient/slurmshuguang.go | 40 + .../slurmTianhe/rpc/etc/slurmtianhe.yaml | 3 + .../slurmTianhe/rpc/internal/config/config.go | 7 + .../rpc/internal/logic/listhistoryjoblogic.go | 155 + .../rpc/internal/server/slurmtianheserver.go | 29 + .../rpc/internal/svc/servicecontext.go | 13 + .../slurmTianhe/rpc/pb/slurmTianhe.proto | 71 + .../rpc/slurmTianhe/slurmTianhe.pb.go | 685 ++ .../rpc/slurmTianhe/slurmTianhe_grpc.pb.go | 107 + adaptor/slurm/slurmTianhe/rpc/slurmtianhe.go | 39 + .../rpc/slurmtianheclient/slurmtianhe.go | 40 + common/config/init.go | 34 - common/global/globalVar.go | 10 - common/model/config.go | 86 - common/result/httpResult.go | 85 + common/result/jobResult.go | 44 + common/result/responseBean.go | 21 + common/server/grpc.go | 34 - common/ssh/ssh_util.go | 70 - common/tenanter/access_key.go | 49 - common/tenanter/main_test.go | 32 - common/tenanter/region.go | 162 - common/tenanter/region_test.go | 27 - common/tenanter/tenanter.go | 118 - common/tenanter/tenanter_test.go | 29 - common/tool/coinconvert.go | 19 + common/tool/copier.go | 50 + common/tool/encryption.go | 23 + common/tool/krand.go | 28 + common/tool/krand_test.go | 8 + common/tool/placeholders.go | 15 + common/uniqueid/uniqueid.go | 23 + common/xerr/errCode.go | 16 + common/xerr/errMsg.go | 30 + common/xerr/errors.go | 39 + configs/pcm.yaml | 32 - configs/tenanter-template.yaml | 18 - docs/etc/service/pcm-gateway.service | 19 - docs/etc/service/pcm-pod.service | 19 - docs/etc/service/pcm-slurm.service | 19 - docs/etc/service/pcm-vm.service | 19 - docs/imges/pcm.png | Bin 101517 -> 0 bytes examples/pod/ali.go | 94 - examples/pod/huawei.go | 143 - examples/pod/pcm_ali.go | 105 - examples/pod/pcm_huawei.go | 173 - examples/pod/pcm_tencent.go | 155 - examples/pod/tencent.go | 70 - gateway/main.go | 65 - gen.sh | 21 - go.mod | 210 +- go.sum | 1470 +++ tenant/buf.gen.yaml | 16 - tenant/buf.yaml | 13 - tenant/gen/idl/tenant.pb.go | 1052 -- tenant/gen/idl/tenant_grpc.pb.go | 65 - tenant/gen/openapiv2/idl/tenant.swagger.json | 43 - tenant/idl/tenant.proto | 181 - 190 files changed, 4611 insertions(+), 54098 deletions(-) delete mode 100644 CHANGELOG delete mode 100644 adaptor/pcm_pod/buf.gen.yaml delete mode 100644 adaptor/pcm_pod/buf.yaml delete mode 100644 adaptor/pcm_pod/gen/idl/pod.pb.go delete mode 100644 adaptor/pcm_pod/gen/idl/pod.pb.gw.go delete mode 100644 adaptor/pcm_pod/gen/idl/pod_grpc.pb.go delete mode 100644 adaptor/pcm_pod/gen/openapiv2/idl/pod.swagger.json delete mode 100644 adaptor/pcm_pod/idl/pod.proto delete mode 100644 adaptor/pcm_pod/idl/pod.yaml delete mode 100644 adaptor/pcm_pod/main.go delete mode 100644 adaptor/pcm_pod/server/ali/client.go delete mode 100644 adaptor/pcm_pod/server/ali/create_container_group.go delete mode 100644 adaptor/pcm_pod/server/ali/delete_container_group.go delete mode 100644 adaptor/pcm_pod/server/ali/describe_container_groups.go delete mode 100644 adaptor/pcm_pod/server/ali/update_container_group.go delete mode 100644 adaptor/pcm_pod/server/kubernetes/api/core/v1/objectreference.go delete mode 100644 adaptor/pcm_pod/server/kubernetes/api/core/v1/register.go delete mode 100644 adaptor/pcm_pod/server/kubernetes/api/core/v1/resource.go delete mode 100644 adaptor/pcm_pod/server/kubernetes/api/core/v1/types.go delete mode 100644 adaptor/pcm_pod/server/kubernetes/api/core/v1/zz_generated.deepcopy.go delete mode 100644 adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/apis/meta/v1/micro_time.go delete mode 100644 adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/apis/meta/v1/time.go delete mode 100644 adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/apis/meta/v1/types.go delete mode 100644 adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/clientset.go delete mode 100644 adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/typed/core/v1/core_client.go delete mode 100644 adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/typed/core/v1/pod.go delete mode 100644 adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/typed/core/v1/pod_expansion.go delete mode 100644 adaptor/pcm_pod/server/pod.go delete mode 100644 adaptor/pcm_pod/server/podImpl.go delete mode 100644 adaptor/pcm_pod/server/tencent/client.go delete mode 100644 adaptor/pcm_pod/server/tencent/errors.go delete mode 100644 adaptor/pcm_pod/server/tencent/models.go delete mode 100644 adaptor/pcm_pod/service/ali_eci.go delete mode 100644 adaptor/pcm_pod/service/huawei_cci.go delete mode 100644 adaptor/pcm_pod/service/k8s.go delete mode 100644 adaptor/pcm_pod/service/poder.go delete mode 100644 adaptor/pcm_pod/service/tencent_eks.go delete mode 100644 adaptor/pcm_slurm/buf.gen.yaml delete mode 100644 adaptor/pcm_slurm/buf.yaml delete mode 100644 adaptor/pcm_slurm/idl/slurm.proto delete mode 100644 adaptor/pcm_slurm/idl/slurm.yaml delete mode 100644 adaptor/pcm_slurm/idl/slurm_diag.proto delete mode 100644 adaptor/pcm_slurm/idl/slurm_job.proto delete mode 100644 adaptor/pcm_slurm/idl/slurm_node.proto delete mode 100644 adaptor/pcm_slurm/idl/slurm_partition.proto delete mode 100644 adaptor/pcm_slurm/idl/slurm_ping.proto delete mode 100644 adaptor/pcm_slurm/idl/slurm_reservation.proto delete mode 100644 adaptor/pcm_slurm/idl/slurmdb_account.proto delete mode 100644 adaptor/pcm_slurm/idl/slurmdb_accounting.proto delete mode 100644 adaptor/pcm_slurm/idl/slurmdb_assoc.proto delete mode 100644 adaptor/pcm_slurm/idl/slurmdb_cluster.proto delete mode 100644 adaptor/pcm_slurm/idl/slurmdb_coord.proto delete mode 100644 adaptor/pcm_slurm/idl/slurmdb_job.proto delete mode 100644 adaptor/pcm_slurm/idl/slurmdb_qos.proto delete mode 100644 adaptor/pcm_slurm/idl/slurmdb_user.proto delete mode 100644 adaptor/pcm_slurm/idl/slurmdb_wckey.proto delete mode 100644 adaptor/pcm_slurm/idl/static.proto delete mode 100644 adaptor/pcm_slurm/main.go delete mode 100644 adaptor/pcm_slurm/rest/get_nodes.go delete mode 100644 adaptor/pcm_slurm/server/slurm.go delete mode 100644 adaptor/pcm_slurm/server/slurmImpl.go delete mode 100644 adaptor/pcm_slurm/service/common/account_db.go delete mode 100644 adaptor/pcm_slurm/service/common/association_db.go delete mode 100644 adaptor/pcm_slurm/service/common/cluster_db.go delete mode 100644 adaptor/pcm_slurm/service/common/diag.go delete mode 100644 adaptor/pcm_slurm/service/common/job.go delete mode 100644 adaptor/pcm_slurm/service/common/job_db.go delete mode 100644 adaptor/pcm_slurm/service/common/job_submit.go delete mode 100644 adaptor/pcm_slurm/service/common/node.go delete mode 100644 adaptor/pcm_slurm/service/common/partition.go delete mode 100644 adaptor/pcm_slurm/service/common/ping.go delete mode 100644 adaptor/pcm_slurm/service/common/qos_db.go delete mode 100644 adaptor/pcm_slurm/service/common/reservation.go delete mode 100644 adaptor/pcm_slurm/service/common/slurmer.go delete mode 100644 adaptor/pcm_slurm/service/common/tianhe.go delete mode 100644 adaptor/pcm_slurm/service/common/user_db.go delete mode 100644 adaptor/pcm_slurm/service/common/wckey_db.go delete mode 100644 adaptor/pcm_slurm/service/tianhe/account.go delete mode 100644 adaptor/pcm_slurm/service/tianhe/association.go delete mode 100644 adaptor/pcm_slurm/service/tianhe/cluster.go delete mode 100644 adaptor/pcm_slurm/service/tianhe/converter.go delete mode 100644 adaptor/pcm_slurm/service/tianhe/diag.go delete mode 100644 adaptor/pcm_slurm/service/tianhe/job.go delete mode 100644 adaptor/pcm_slurm/service/tianhe/job_db.go delete mode 100644 adaptor/pcm_slurm/service/tianhe/job_submit.go delete mode 100644 adaptor/pcm_slurm/service/tianhe/node.go delete mode 100644 adaptor/pcm_slurm/service/tianhe/partition.go delete mode 100644 adaptor/pcm_slurm/service/tianhe/qos.go delete mode 100644 adaptor/pcm_slurm/service/tianhe/reservation.go delete mode 100644 adaptor/pcm_vm/buf.gen.yaml delete mode 100644 adaptor/pcm_vm/buf.yaml delete mode 100644 adaptor/pcm_vm/gen/idl/ecs.pb.go delete mode 100644 adaptor/pcm_vm/gen/idl/ecs.pb.gw.go delete mode 100644 adaptor/pcm_vm/gen/idl/ecs_grpc.pb.go delete mode 100644 adaptor/pcm_vm/gen/openapiv2/idl/ecs.swagger.json delete mode 100644 adaptor/pcm_vm/idl/ecs.proto delete mode 100644 adaptor/pcm_vm/idl/ecs.yaml delete mode 100644 adaptor/pcm_vm/main.go delete mode 100644 adaptor/pcm_vm/server/ecs.go delete mode 100644 adaptor/pcm_vm/server/ecsImpl.go delete mode 100644 adaptor/pcm_vm/server/ecsImpl_test.go delete mode 100644 adaptor/pcm_vm/server/main_test.go delete mode 100644 adaptor/pcm_vm/service/ali.go delete mode 100644 adaptor/pcm_vm/service/aws.go delete mode 100644 adaptor/pcm_vm/service/ecser.go delete mode 100644 adaptor/pcm_vm/service/ecser_test.go delete mode 100644 adaptor/pcm_vm/service/google.go delete mode 100644 adaptor/pcm_vm/service/harvester.go delete mode 100644 adaptor/pcm_vm/service/harvester_util.go delete mode 100644 adaptor/pcm_vm/service/huawei.go delete mode 100644 adaptor/pcm_vm/service/main_test.go delete mode 100644 adaptor/pcm_vm/service/tencent.go create mode 100644 adaptor/slurm/slurmCore/api/etc/slurmcore-api.yaml create mode 100644 adaptor/slurm/slurmCore/api/internal/config/config.go create mode 100644 adaptor/slurm/slurmCore/api/internal/handler/listhistoryjobhandler.go create mode 100644 adaptor/slurm/slurmCore/api/internal/handler/routes.go create mode 100644 adaptor/slurm/slurmCore/api/internal/logic/listhistoryjoblogic.go create mode 100644 adaptor/slurm/slurmCore/api/internal/svc/serviceContext.go create mode 100644 adaptor/slurm/slurmCore/api/internal/types/types.go create mode 100644 adaptor/slurm/slurmCore/api/slurmCore.api create mode 100644 adaptor/slurm/slurmCore/api/slurmcore.go create mode 100644 adaptor/slurm/slurmShuguang/rpc/etc/slurmshuguang.yaml create mode 100644 adaptor/slurm/slurmShuguang/rpc/internal/config/config.go create mode 100644 adaptor/slurm/slurmShuguang/rpc/internal/config/shuguangConfig.go create mode 100644 adaptor/slurm/slurmShuguang/rpc/internal/logic/listhistoryjoblogic.go create mode 100644 adaptor/slurm/slurmShuguang/rpc/internal/server/slurmshuguangserver.go create mode 100644 adaptor/slurm/slurmShuguang/rpc/internal/svc/servicecontext.go create mode 100644 adaptor/slurm/slurmShuguang/rpc/internal/util/shuguangAuth.go create mode 100644 adaptor/slurm/slurmShuguang/rpc/pb/slurmShuguang.proto create mode 100644 adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang.pb.go create mode 100644 adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang_grpc.pb.go create mode 100644 adaptor/slurm/slurmShuguang/rpc/slurmshuguang.go create mode 100644 adaptor/slurm/slurmShuguang/rpc/slurmshuguangclient/slurmshuguang.go create mode 100644 adaptor/slurm/slurmTianhe/rpc/etc/slurmtianhe.yaml create mode 100644 adaptor/slurm/slurmTianhe/rpc/internal/config/config.go create mode 100644 adaptor/slurm/slurmTianhe/rpc/internal/logic/listhistoryjoblogic.go create mode 100644 adaptor/slurm/slurmTianhe/rpc/internal/server/slurmtianheserver.go create mode 100644 adaptor/slurm/slurmTianhe/rpc/internal/svc/servicecontext.go create mode 100644 adaptor/slurm/slurmTianhe/rpc/pb/slurmTianhe.proto create mode 100644 adaptor/slurm/slurmTianhe/rpc/slurmTianhe/slurmTianhe.pb.go create mode 100644 adaptor/slurm/slurmTianhe/rpc/slurmTianhe/slurmTianhe_grpc.pb.go create mode 100644 adaptor/slurm/slurmTianhe/rpc/slurmtianhe.go create mode 100644 adaptor/slurm/slurmTianhe/rpc/slurmtianheclient/slurmtianhe.go delete mode 100644 common/config/init.go delete mode 100644 common/global/globalVar.go delete mode 100644 common/model/config.go create mode 100644 common/result/httpResult.go create mode 100644 common/result/jobResult.go create mode 100644 common/result/responseBean.go delete mode 100644 common/server/grpc.go delete mode 100644 common/ssh/ssh_util.go delete mode 100644 common/tenanter/access_key.go delete mode 100644 common/tenanter/main_test.go delete mode 100644 common/tenanter/region.go delete mode 100644 common/tenanter/region_test.go delete mode 100644 common/tenanter/tenanter.go delete mode 100644 common/tenanter/tenanter_test.go create mode 100644 common/tool/coinconvert.go create mode 100644 common/tool/copier.go create mode 100644 common/tool/encryption.go create mode 100644 common/tool/krand.go create mode 100644 common/tool/krand_test.go create mode 100644 common/tool/placeholders.go create mode 100644 common/uniqueid/uniqueid.go create mode 100644 common/xerr/errCode.go create mode 100644 common/xerr/errMsg.go create mode 100644 common/xerr/errors.go delete mode 100644 configs/pcm.yaml delete mode 100644 configs/tenanter-template.yaml delete mode 100644 docs/etc/service/pcm-gateway.service delete mode 100644 docs/etc/service/pcm-pod.service delete mode 100644 docs/etc/service/pcm-slurm.service delete mode 100644 docs/etc/service/pcm-vm.service delete mode 100644 docs/imges/pcm.png delete mode 100644 examples/pod/ali.go delete mode 100644 examples/pod/huawei.go delete mode 100644 examples/pod/pcm_ali.go delete mode 100644 examples/pod/pcm_huawei.go delete mode 100644 examples/pod/pcm_tencent.go delete mode 100644 examples/pod/tencent.go delete mode 100644 gateway/main.go delete mode 100644 gen.sh create mode 100644 go.sum delete mode 100644 tenant/buf.gen.yaml delete mode 100644 tenant/buf.yaml delete mode 100644 tenant/gen/idl/tenant.pb.go delete mode 100644 tenant/gen/idl/tenant_grpc.pb.go delete mode 100644 tenant/gen/openapiv2/idl/tenant.swagger.json delete mode 100644 tenant/idl/tenant.proto diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index e69de29bb..000000000 diff --git a/adaptor/pcm_pod/buf.gen.yaml b/adaptor/pcm_pod/buf.gen.yaml deleted file mode 100644 index c0c90c673..000000000 --- a/adaptor/pcm_pod/buf.gen.yaml +++ /dev/null @@ -1,17 +0,0 @@ -version: v1 -plugins: - - name: go - out: gen - opt: - - paths=source_relative - - name: go-grpc - out: gen - opt: - - paths=source_relative - - name: grpc-gateway - out: gen - opt: - - paths=source_relative - - grpc_api_configuration=idl/pod.yaml - - name: openapiv2 - out: gen/openapiv2 diff --git a/adaptor/pcm_pod/buf.yaml b/adaptor/pcm_pod/buf.yaml deleted file mode 100644 index ea7eb0163..000000000 --- a/adaptor/pcm_pod/buf.yaml +++ /dev/null @@ -1,13 +0,0 @@ -version: v1 -name: buf.build/JCCE/PCM -breaking: - use: - - FILE -lint: - use: - - DEFAULT -# ignore: -# - google/type/datetime.proto -deps: - - buf.build/googleapis/googleapis - - buf.build/grpc-ecosystem/grpc-gateway \ No newline at end of file diff --git a/adaptor/pcm_pod/gen/idl/pod.pb.go b/adaptor/pcm_pod/gen/idl/pod.pb.go deleted file mode 100644 index e5ab3c983..000000000 --- a/adaptor/pcm_pod/gen/idl/pod.pb.go +++ /dev/null @@ -1,2087 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: idl/pod.proto - -package podpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// 云提供商 -type CloudProvider int32 - -const ( - // 0 - 阿里云 - CloudProvider_ali CloudProvider = 0 - // 1 - 腾讯云 - CloudProvider_tencent CloudProvider = 1 - // 2 - 华为云 - CloudProvider_huawei CloudProvider = 2 - // 3 - K8S - CloudProvider_k8s CloudProvider = 3 - // 3 - Harvester - CloudProvider_harvester CloudProvider = 4 -) - -// Enum value maps for CloudProvider. -var ( - CloudProvider_name = map[int32]string{ - 0: "ali", - 1: "tencent", - 2: "huawei", - 3: "k8s", - 4: "harvester", - } - CloudProvider_value = map[string]int32{ - "ali": 0, - "tencent": 1, - "huawei": 2, - "k8s": 3, - "harvester": 4, - } -) - -func (x CloudProvider) Enum() *CloudProvider { - p := new(CloudProvider) - *p = x - return p -} - -func (x CloudProvider) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CloudProvider) Descriptor() protoreflect.EnumDescriptor { - return file_idl_pod_proto_enumTypes[0].Descriptor() -} - -func (CloudProvider) Type() protoreflect.EnumType { - return &file_idl_pod_proto_enumTypes[0] -} - -func (x CloudProvider) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CloudProvider.Descriptor instead. -func (CloudProvider) EnumDescriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{0} -} - -type Region struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // id - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // name - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *Region) Reset() { - *x = Region{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Region) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Region) ProtoMessage() {} - -func (x *Region) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Region.ProtoReflect.Descriptor instead. -func (*Region) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{0} -} - -func (x *Region) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Region) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type PodInstance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云类型 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pod.CloudProvider" json:"provider,omitempty"` - // 账号名称 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // pcm id - PcmId string `protobuf:"bytes,3,opt,name=pcm_id,json=pcmId,proto3" json:"pcm_id,omitempty"` - // 实例id - PodId string `protobuf:"bytes,4,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"` - // 实例名称 - PodName string `protobuf:"bytes,5,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` - // 地域ID - RegionId int32 `protobuf:"varint,6,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` - // 地域Name - RegionName string `protobuf:"bytes,7,opt,name=region_name,json=regionName,proto3" json:"region_name,omitempty"` - // 镜像 - ContainerImage string `protobuf:"bytes,8,opt,name=container_image,json=containerImage,proto3" json:"container_image,omitempty"` - // 容器名称 - ContainerName string `protobuf:"bytes,9,opt,name=container_name,json=containerName,proto3" json:"container_name,omitempty"` - // vcpu数 - CpuPod string `protobuf:"bytes,10,opt,name=cpu_pod,json=cpuPod,proto3" json:"cpu_pod,omitempty"` - // 内存MB - MemoryPod string `protobuf:"bytes,11,opt,name=memory_pod,json=memoryPod,proto3" json:"memory_pod,omitempty"` - // 安全组ID 对应腾讯 SecurityGroupIds(腾讯必需) - SecurityGroupId string `protobuf:"bytes,12,opt,name=security_group_id,json=securityGroupId,proto3" json:"security_group_id,omitempty"` - // 子网ID 对应腾讯 SubnetId(腾讯必需) - SubnetId string `protobuf:"bytes,13,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` - // VPC ID 对应腾讯 VpcId(腾讯必需) - VpcId string `protobuf:"bytes,14,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` - // 名空间 - Namespace string `protobuf:"bytes,15,opt,name=namespace,proto3" json:"namespace,omitempty"` - // 实例状态 - Status string `protobuf:"bytes,16,opt,name=status,proto3" json:"status,omitempty"` -} - -func (x *PodInstance) Reset() { - *x = PodInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PodInstance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PodInstance) ProtoMessage() {} - -func (x *PodInstance) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PodInstance.ProtoReflect.Descriptor instead. -func (*PodInstance) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{1} -} - -func (x *PodInstance) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *PodInstance) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *PodInstance) GetPcmId() string { - if x != nil { - return x.PcmId - } - return "" -} - -func (x *PodInstance) GetPodId() string { - if x != nil { - return x.PodId - } - return "" -} - -func (x *PodInstance) GetPodName() string { - if x != nil { - return x.PodName - } - return "" -} - -func (x *PodInstance) GetRegionId() int32 { - if x != nil { - return x.RegionId - } - return 0 -} - -func (x *PodInstance) GetRegionName() string { - if x != nil { - return x.RegionName - } - return "" -} - -func (x *PodInstance) GetContainerImage() string { - if x != nil { - return x.ContainerImage - } - return "" -} - -func (x *PodInstance) GetContainerName() string { - if x != nil { - return x.ContainerName - } - return "" -} - -func (x *PodInstance) GetCpuPod() string { - if x != nil { - return x.CpuPod - } - return "" -} - -func (x *PodInstance) GetMemoryPod() string { - if x != nil { - return x.MemoryPod - } - return "" -} - -func (x *PodInstance) GetSecurityGroupId() string { - if x != nil { - return x.SecurityGroupId - } - return "" -} - -func (x *PodInstance) GetSubnetId() string { - if x != nil { - return x.SubnetId - } - return "" -} - -func (x *PodInstance) GetVpcId() string { - if x != nil { - return x.VpcId - } - return "" -} - -func (x *PodInstance) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *PodInstance) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -type CreatePodsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 创建请求集合 - CreatePodReq []*CreatePodReq `protobuf:"bytes,1,rep,name=createPodReq,proto3" json:"createPodReq,omitempty"` -} - -func (x *CreatePodsReq) Reset() { - *x = CreatePodsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreatePodsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePodsReq) ProtoMessage() {} - -func (x *CreatePodsReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePodsReq.ProtoReflect.Descriptor instead. -func (*CreatePodsReq) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{2} -} - -func (x *CreatePodsReq) GetCreatePodReq() []*CreatePodReq { - if x != nil { - return x.CreatePodReq - } - return nil -} - -type CreatePodsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - Finished bool `protobuf:"varint,2,opt,name=finished,proto3" json:"finished,omitempty"` - // 请求id,出现问题后提供给云厂商,排查问题 - RequestId []string `protobuf:"bytes,3,rep,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` -} - -func (x *CreatePodsResp) Reset() { - *x = CreatePodsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreatePodsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePodsResp) ProtoMessage() {} - -func (x *CreatePodsResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePodsResp.ProtoReflect.Descriptor instead. -func (*CreatePodsResp) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{3} -} - -func (x *CreatePodsResp) GetFinished() bool { - if x != nil { - return x.Finished - } - return false -} - -func (x *CreatePodsResp) GetRequestId() []string { - if x != nil { - return x.RequestId - } - return nil -} - -type CreatePodReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云类型 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pod.CloudProvider" json:"provider,omitempty"` - // 账号名称 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // 实例id - PodId string `protobuf:"bytes,3,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"` - // 实例名称 - PodName string `protobuf:"bytes,4,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` - // 地域,数据中心 - RegionId int32 `protobuf:"varint,5,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` - // 镜像 - ContainerImage string `protobuf:"bytes,6,opt,name=container_image,json=containerImage,proto3" json:"container_image,omitempty"` - // 容器名称 - ContainerName string `protobuf:"bytes,7,opt,name=container_name,json=containerName,proto3" json:"container_name,omitempty"` - // v cpu数 - CpuPod string `protobuf:"bytes,8,opt,name=cpu_pod,json=cpuPod,proto3" json:"cpu_pod,omitempty"` - // 内存MB - MemoryPod string `protobuf:"bytes,9,opt,name=memory_pod,json=memoryPod,proto3" json:"memory_pod,omitempty"` - // 安全组ID 对应腾讯 SecurityGroupIds(腾讯必需) - SecurityGroupId string `protobuf:"bytes,10,opt,name=security_group_id,json=securityGroupId,proto3" json:"security_group_id,omitempty"` - // 子网ID 对应腾讯 SubnetId(腾讯必需) - SubnetId string `protobuf:"bytes,11,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` - // VPC ID 对应腾讯 VpcId(腾讯必需) - VpcId string `protobuf:"bytes,12,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` - // 名空间 - Namespace string `protobuf:"bytes,13,opt,name=namespace,proto3" json:"namespace,omitempty"` - // 请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 - RequestSource string `protobuf:"bytes,14,opt,name=requestSource,proto3" json:"requestSource,omitempty"` -} - -func (x *CreatePodReq) Reset() { - *x = CreatePodReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreatePodReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePodReq) ProtoMessage() {} - -func (x *CreatePodReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePodReq.ProtoReflect.Descriptor instead. -func (*CreatePodReq) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{4} -} - -func (x *CreatePodReq) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *CreatePodReq) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *CreatePodReq) GetPodId() string { - if x != nil { - return x.PodId - } - return "" -} - -func (x *CreatePodReq) GetPodName() string { - if x != nil { - return x.PodName - } - return "" -} - -func (x *CreatePodReq) GetRegionId() int32 { - if x != nil { - return x.RegionId - } - return 0 -} - -func (x *CreatePodReq) GetContainerImage() string { - if x != nil { - return x.ContainerImage - } - return "" -} - -func (x *CreatePodReq) GetContainerName() string { - if x != nil { - return x.ContainerName - } - return "" -} - -func (x *CreatePodReq) GetCpuPod() string { - if x != nil { - return x.CpuPod - } - return "" -} - -func (x *CreatePodReq) GetMemoryPod() string { - if x != nil { - return x.MemoryPod - } - return "" -} - -func (x *CreatePodReq) GetSecurityGroupId() string { - if x != nil { - return x.SecurityGroupId - } - return "" -} - -func (x *CreatePodReq) GetSubnetId() string { - if x != nil { - return x.SubnetId - } - return "" -} - -func (x *CreatePodReq) GetVpcId() string { - if x != nil { - return x.VpcId - } - return "" -} - -func (x *CreatePodReq) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *CreatePodReq) GetRequestSource() string { - if x != nil { - return x.RequestSource - } - return "" -} - -type CreatePodResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - Finished bool `protobuf:"varint,1,opt,name=finished,proto3" json:"finished,omitempty"` - // 请求id,出现问题后提供给云厂商,排查问题 - RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // podId - PodId string `protobuf:"bytes,3,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"` - // podName - PodName string `protobuf:"bytes,4,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` -} - -func (x *CreatePodResp) Reset() { - *x = CreatePodResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreatePodResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePodResp) ProtoMessage() {} - -func (x *CreatePodResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePodResp.ProtoReflect.Descriptor instead. -func (*CreatePodResp) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{5} -} - -func (x *CreatePodResp) GetFinished() bool { - if x != nil { - return x.Finished - } - return false -} - -func (x *CreatePodResp) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -func (x *CreatePodResp) GetPodId() string { - if x != nil { - return x.PodId - } - return "" -} - -func (x *CreatePodResp) GetPodName() string { - if x != nil { - return x.PodName - } - return "" -} - -type DeletePodReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云类型 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pod.CloudProvider" json:"provider,omitempty"` - // 账号名称 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // pcm id - PcmId string `protobuf:"bytes,3,opt,name=pcm_id,json=pcmId,proto3" json:"pcm_id,omitempty"` - // podId - PodId string `protobuf:"bytes,4,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"` - // podName - PodName string `protobuf:"bytes,5,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` - // namespace - Namespace string `protobuf:"bytes,6,opt,name=namespace,proto3" json:"namespace,omitempty"` - // 地域,数据中心 - RegionId int32 `protobuf:"varint,7,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` - // 请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 - RequestSource string `protobuf:"bytes,8,opt,name=requestSource,proto3" json:"requestSource,omitempty"` -} - -func (x *DeletePodReq) Reset() { - *x = DeletePodReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeletePodReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeletePodReq) ProtoMessage() {} - -func (x *DeletePodReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeletePodReq.ProtoReflect.Descriptor instead. -func (*DeletePodReq) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{6} -} - -func (x *DeletePodReq) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *DeletePodReq) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *DeletePodReq) GetPcmId() string { - if x != nil { - return x.PcmId - } - return "" -} - -func (x *DeletePodReq) GetPodId() string { - if x != nil { - return x.PodId - } - return "" -} - -func (x *DeletePodReq) GetPodName() string { - if x != nil { - return x.PodName - } - return "" -} - -func (x *DeletePodReq) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *DeletePodReq) GetRegionId() int32 { - if x != nil { - return x.RegionId - } - return 0 -} - -func (x *DeletePodReq) GetRequestSource() string { - if x != nil { - return x.RequestSource - } - return "" -} - -type DeletePodResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 删除是否完成 - Finished bool `protobuf:"varint,1,opt,name=finished,proto3" json:"finished,omitempty"` - // 请求id,出现问题后提供给云厂商,排查问题 - RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // podId - PodId string `protobuf:"bytes,3,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"` - // podName - PodName string `protobuf:"bytes,4,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` -} - -func (x *DeletePodResp) Reset() { - *x = DeletePodResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeletePodResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeletePodResp) ProtoMessage() {} - -func (x *DeletePodResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeletePodResp.ProtoReflect.Descriptor instead. -func (*DeletePodResp) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{7} -} - -func (x *DeletePodResp) GetFinished() bool { - if x != nil { - return x.Finished - } - return false -} - -func (x *DeletePodResp) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -func (x *DeletePodResp) GetPodId() string { - if x != nil { - return x.PodId - } - return "" -} - -func (x *DeletePodResp) GetPodName() string { - if x != nil { - return x.PodName - } - return "" -} - -type UpdatePodReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云类型 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pod.CloudProvider" json:"provider,omitempty"` - // 账号名称 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // pcm ID - PcmId string `protobuf:"bytes,3,opt,name=pcm_id,json=pcmId,proto3" json:"pcm_id,omitempty"` - // podId - PodId string `protobuf:"bytes,4,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"` - // podName - PodName string `protobuf:"bytes,5,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` - // namespace - Namespace string `protobuf:"bytes,6,opt,name=namespace,proto3" json:"namespace,omitempty"` - // 地域,数据中心 - RegionId int32 `protobuf:"varint,7,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` - // 镜像 - ContainerImage string `protobuf:"bytes,8,opt,name=container_image,json=containerImage,proto3" json:"container_image,omitempty"` - // 容器名称 - ContainerName string `protobuf:"bytes,9,opt,name=container_name,json=containerName,proto3" json:"container_name,omitempty"` - // v cpu数 - CpuPod string `protobuf:"bytes,10,opt,name=cpu_pod,json=cpuPod,proto3" json:"cpu_pod,omitempty"` - // 内存MB - MemoryPod string `protobuf:"bytes,11,opt,name=memory_pod,json=memoryPod,proto3" json:"memory_pod,omitempty"` - // 重启策略 - RestartPolicy string `protobuf:"bytes,12,opt,name=restart_policy,json=restartPolicy,proto3" json:"restart_policy,omitempty"` - // labels - Labels string `protobuf:"bytes,13,opt,name=labels,proto3" json:"labels,omitempty"` - // 请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 - RequestSource string `protobuf:"bytes,14,opt,name=requestSource,proto3" json:"requestSource,omitempty"` -} - -func (x *UpdatePodReq) Reset() { - *x = UpdatePodReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdatePodReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdatePodReq) ProtoMessage() {} - -func (x *UpdatePodReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdatePodReq.ProtoReflect.Descriptor instead. -func (*UpdatePodReq) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{8} -} - -func (x *UpdatePodReq) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *UpdatePodReq) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *UpdatePodReq) GetPcmId() string { - if x != nil { - return x.PcmId - } - return "" -} - -func (x *UpdatePodReq) GetPodId() string { - if x != nil { - return x.PodId - } - return "" -} - -func (x *UpdatePodReq) GetPodName() string { - if x != nil { - return x.PodName - } - return "" -} - -func (x *UpdatePodReq) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *UpdatePodReq) GetRegionId() int32 { - if x != nil { - return x.RegionId - } - return 0 -} - -func (x *UpdatePodReq) GetContainerImage() string { - if x != nil { - return x.ContainerImage - } - return "" -} - -func (x *UpdatePodReq) GetContainerName() string { - if x != nil { - return x.ContainerName - } - return "" -} - -func (x *UpdatePodReq) GetCpuPod() string { - if x != nil { - return x.CpuPod - } - return "" -} - -func (x *UpdatePodReq) GetMemoryPod() string { - if x != nil { - return x.MemoryPod - } - return "" -} - -func (x *UpdatePodReq) GetRestartPolicy() string { - if x != nil { - return x.RestartPolicy - } - return "" -} - -func (x *UpdatePodReq) GetLabels() string { - if x != nil { - return x.Labels - } - return "" -} - -func (x *UpdatePodReq) GetRequestSource() string { - if x != nil { - return x.RequestSource - } - return "" -} - -type UpdatePodResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 更新是否完成 - Finished bool `protobuf:"varint,1,opt,name=finished,proto3" json:"finished,omitempty"` - // 请求id,出现问题后提供给云厂商,排查问题 - RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // podId - PodId string `protobuf:"bytes,3,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"` - // podName - PodName string `protobuf:"bytes,4,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` -} - -func (x *UpdatePodResp) Reset() { - *x = UpdatePodResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdatePodResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdatePodResp) ProtoMessage() {} - -func (x *UpdatePodResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdatePodResp.ProtoReflect.Descriptor instead. -func (*UpdatePodResp) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{9} -} - -func (x *UpdatePodResp) GetFinished() bool { - if x != nil { - return x.Finished - } - return false -} - -func (x *UpdatePodResp) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -func (x *UpdatePodResp) GetPodId() string { - if x != nil { - return x.PodId - } - return "" -} - -func (x *UpdatePodResp) GetPodName() string { - if x != nil { - return x.PodName - } - return "" -} - -type ListPodDetailReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云名称 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pod.CloudProvider" json:"provider,omitempty"` - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // 区域Id,参考 tenant.proto 中的各个云的区域 - RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` - // 区域名称,各云厂商自定义的region name - RegionName int32 `protobuf:"varint,4,opt,name=region_name,json=regionName,proto3" json:"region_name,omitempty"` - // podID - PodId int32 `protobuf:"varint,5,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"` - // 分页相关参数,页码 - PageNumber int32 `protobuf:"varint,6,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` - // 分页相关参数,每页数量 - PageSize int32 `protobuf:"varint,7,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // 分页相关参数,下一页的token - NextToken string `protobuf:"bytes,8,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` - // namespace - Namespace string `protobuf:"bytes,9,opt,name=namespace,proto3" json:"namespace,omitempty"` -} - -func (x *ListPodDetailReq) Reset() { - *x = ListPodDetailReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListPodDetailReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListPodDetailReq) ProtoMessage() {} - -func (x *ListPodDetailReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListPodDetailReq.ProtoReflect.Descriptor instead. -func (*ListPodDetailReq) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{10} -} - -func (x *ListPodDetailReq) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *ListPodDetailReq) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *ListPodDetailReq) GetRegionId() int32 { - if x != nil { - return x.RegionId - } - return 0 -} - -func (x *ListPodDetailReq) GetRegionName() int32 { - if x != nil { - return x.RegionName - } - return 0 -} - -func (x *ListPodDetailReq) GetPodId() int32 { - if x != nil { - return x.PodId - } - return 0 -} - -func (x *ListPodDetailReq) GetPageNumber() int32 { - if x != nil { - return x.PageNumber - } - return 0 -} - -func (x *ListPodDetailReq) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListPodDetailReq) GetNextToken() string { - if x != nil { - return x.NextToken - } - return "" -} - -func (x *ListPodDetailReq) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -type ListPodDetailResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Pod集合 - Pods []*PodInstance `protobuf:"bytes,1,rep,name=pods,proto3" json:"pods,omitempty"` - // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - Finished bool `protobuf:"varint,2,opt,name=finished,proto3" json:"finished,omitempty"` - // 分页相关参数,页码 - PageNumber int32 `protobuf:"varint,3,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` - // 分页相关参数,每页数量 - PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // 分页相关参数,下一页的token - NextToken string `protobuf:"bytes,5,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` - // 请求id,出现问题后提供给云厂商,排查问题 - RequestId string `protobuf:"bytes,6,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` -} - -func (x *ListPodDetailResp) Reset() { - *x = ListPodDetailResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListPodDetailResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListPodDetailResp) ProtoMessage() {} - -func (x *ListPodDetailResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListPodDetailResp.ProtoReflect.Descriptor instead. -func (*ListPodDetailResp) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{11} -} - -func (x *ListPodDetailResp) GetPods() []*PodInstance { - if x != nil { - return x.Pods - } - return nil -} - -func (x *ListPodDetailResp) GetFinished() bool { - if x != nil { - return x.Finished - } - return false -} - -func (x *ListPodDetailResp) GetPageNumber() int32 { - if x != nil { - return x.PageNumber - } - return 0 -} - -func (x *ListPodDetailResp) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListPodDetailResp) GetNextToken() string { - if x != nil { - return x.NextToken - } - return "" -} - -func (x *ListPodDetailResp) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -type ListPodReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // cloud name - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pod.CloudProvider" json:"provider,omitempty"` - // 命名空间 - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - // 请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 - RequestSource string `protobuf:"bytes,3,opt,name=requestSource,proto3" json:"requestSource,omitempty"` -} - -func (x *ListPodReq) Reset() { - *x = ListPodReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListPodReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListPodReq) ProtoMessage() {} - -func (x *ListPodReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListPodReq.ProtoReflect.Descriptor instead. -func (*ListPodReq) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{12} -} - -func (x *ListPodReq) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *ListPodReq) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ListPodReq) GetRequestSource() string { - if x != nil { - return x.RequestSource - } - return "" -} - -type ListPodResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // pod list - Pods []*PodInstance `protobuf:"bytes,1,rep,name=pods,proto3" json:"pods,omitempty"` -} - -func (x *ListPodResp) Reset() { - *x = ListPodResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListPodResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListPodResp) ProtoMessage() {} - -func (x *ListPodResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListPodResp.ProtoReflect.Descriptor instead. -func (*ListPodResp) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{13} -} - -func (x *ListPodResp) GetPods() []*PodInstance { - if x != nil { - return x.Pods - } - return nil -} - -type GetPodRegionReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // cloud name - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pod.CloudProvider" json:"provider,omitempty"` -} - -func (x *GetPodRegionReq) Reset() { - *x = GetPodRegionReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPodRegionReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPodRegionReq) ProtoMessage() {} - -func (x *GetPodRegionReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPodRegionReq.ProtoReflect.Descriptor instead. -func (*GetPodRegionReq) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{14} -} - -func (x *GetPodRegionReq) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -type GetPodRegionResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // region list - Regions []*Region `protobuf:"bytes,1,rep,name=regions,proto3" json:"regions,omitempty"` -} - -func (x *GetPodRegionResp) Reset() { - *x = GetPodRegionResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPodRegionResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPodRegionResp) ProtoMessage() {} - -func (x *GetPodRegionResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPodRegionResp.ProtoReflect.Descriptor instead. -func (*GetPodRegionResp) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{15} -} - -func (x *GetPodRegionResp) GetRegions() []*Region { - if x != nil { - return x.Regions - } - return nil -} - -type ListPodAllReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ListPodAllReq) Reset() { - *x = ListPodAllReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_pod_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListPodAllReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListPodAllReq) ProtoMessage() {} - -func (x *ListPodAllReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pod_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListPodAllReq.ProtoReflect.Descriptor instead. -func (*ListPodAllReq) Descriptor() ([]byte, []int) { - return file_idl_pod_proto_rawDescGZIP(), []int{16} -} - -var File_idl_pod_proto protoreflect.FileDescriptor - -var file_idl_pod_proto_rawDesc = []byte{ - 0x0a, 0x0d, 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x6f, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x03, 0x70, 0x6f, 0x64, 0x22, 0x2c, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0x85, 0x04, 0x0a, 0x0b, 0x50, 0x6f, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x63, 0x6d, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x63, 0x6d, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, - 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, - 0x64, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, - 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, - 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, - 0x63, 0x70, 0x75, 0x5f, 0x70, 0x6f, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, - 0x70, 0x75, 0x50, 0x6f, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, - 0x70, 0x6f, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x6d, 0x6f, 0x72, - 0x79, 0x50, 0x6f, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, - 0x06, 0x76, 0x70, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x70, 0x63, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x10, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x46, 0x0a, 0x0d, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x12, 0x35, 0x0a, 0x0c, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, - 0x64, 0x52, 0x65, 0x71, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, - 0x65, 0x71, 0x22, 0x4b, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, - 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, - 0xdc, 0x03, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, - 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, - 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, - 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, - 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, - 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x70, 0x75, 0x5f, 0x70, 0x6f, 0x64, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x70, 0x75, 0x50, 0x6f, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, - 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x6f, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, - 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x76, 0x70, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x70, 0x63, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x7c, - 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, - 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, - 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x8b, 0x02, 0x0a, - 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x12, 0x2e, 0x0a, - 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x12, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, - 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x15, 0x0a, 0x06, 0x70, 0x63, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x70, 0x63, 0x6d, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x19, - 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x7c, 0x0a, 0x0d, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, - 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, - 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x19, 0x0a, - 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xd2, 0x03, 0x0a, 0x0c, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x6f, - 0x64, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, - 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, - 0x70, 0x63, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x63, - 0x6d, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, - 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, - 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x17, 0x0a, 0x07, 0x63, 0x70, 0x75, 0x5f, 0x70, 0x6f, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x63, 0x70, 0x75, 0x50, 0x6f, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, - 0x6f, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, - 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x6f, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, - 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x7c, 0x0a, - 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, - 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xb5, 0x02, 0x0a, 0x10, - 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, - 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, - 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, - 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, - 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x22, 0xd1, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x04, 0x70, 0x6f, 0x64, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x50, 0x6f, - 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x70, 0x6f, 0x64, 0x73, 0x12, - 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, - 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, - 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, - 0x65, 0x78, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x80, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, - 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x43, - 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x33, 0x0a, 0x0b, 0x4c, 0x69, - 0x73, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x04, 0x70, 0x6f, 0x64, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x50, 0x6f, - 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x70, 0x6f, 0x64, 0x73, 0x22, - 0x41, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x22, 0x39, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x52, 0x65, - 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x0f, 0x0a, - 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x2a, 0x49, - 0x0a, 0x0d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, - 0x07, 0x0a, 0x03, 0x61, 0x6c, 0x69, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x74, 0x65, 0x6e, 0x63, - 0x65, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x68, 0x75, 0x61, 0x77, 0x65, 0x69, 0x10, - 0x02, 0x12, 0x07, 0x0a, 0x03, 0x6b, 0x38, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x68, 0x61, - 0x72, 0x76, 0x65, 0x73, 0x74, 0x65, 0x72, 0x10, 0x04, 0x32, 0x81, 0x03, 0x0a, 0x0a, 0x50, 0x6f, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x50, 0x6f, 0x64, 0x73, 0x12, 0x12, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x6f, 0x64, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x32, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x12, 0x11, 0x2e, 0x70, - 0x6f, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x1a, - 0x12, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x64, - 0x12, 0x11, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x64, - 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x6f, 0x64, 0x12, 0x11, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3e, 0x0a, 0x0d, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x15, 0x2e, 0x70, - 0x6f, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, - 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x07, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x12, 0x0f, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x4c, 0x69, 0x73, - 0x74, 0x50, 0x6f, 0x64, 0x41, 0x6c, 0x6c, 0x12, 0x12, 0x2e, 0x70, 0x6f, 0x64, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x50, 0x6f, 0x64, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x6f, - 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x42, 0x08, 0x5a, - 0x06, 0x2f, 0x70, 0x6f, 0x64, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_idl_pod_proto_rawDescOnce sync.Once - file_idl_pod_proto_rawDescData = file_idl_pod_proto_rawDesc -) - -func file_idl_pod_proto_rawDescGZIP() []byte { - file_idl_pod_proto_rawDescOnce.Do(func() { - file_idl_pod_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_pod_proto_rawDescData) - }) - return file_idl_pod_proto_rawDescData -} - -var file_idl_pod_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_idl_pod_proto_msgTypes = make([]protoimpl.MessageInfo, 17) -var file_idl_pod_proto_goTypes = []interface{}{ - (CloudProvider)(0), // 0: pod.CloudProvider - (*Region)(nil), // 1: pod.Region - (*PodInstance)(nil), // 2: pod.PodInstance - (*CreatePodsReq)(nil), // 3: pod.CreatePodsReq - (*CreatePodsResp)(nil), // 4: pod.CreatePodsResp - (*CreatePodReq)(nil), // 5: pod.CreatePodReq - (*CreatePodResp)(nil), // 6: pod.CreatePodResp - (*DeletePodReq)(nil), // 7: pod.DeletePodReq - (*DeletePodResp)(nil), // 8: pod.DeletePodResp - (*UpdatePodReq)(nil), // 9: pod.UpdatePodReq - (*UpdatePodResp)(nil), // 10: pod.UpdatePodResp - (*ListPodDetailReq)(nil), // 11: pod.ListPodDetailReq - (*ListPodDetailResp)(nil), // 12: pod.ListPodDetailResp - (*ListPodReq)(nil), // 13: pod.ListPodReq - (*ListPodResp)(nil), // 14: pod.ListPodResp - (*GetPodRegionReq)(nil), // 15: pod.GetPodRegionReq - (*GetPodRegionResp)(nil), // 16: pod.GetPodRegionResp - (*ListPodAllReq)(nil), // 17: pod.ListPodAllReq -} -var file_idl_pod_proto_depIdxs = []int32{ - 0, // 0: pod.PodInstance.provider:type_name -> pod.CloudProvider - 5, // 1: pod.CreatePodsReq.createPodReq:type_name -> pod.CreatePodReq - 0, // 2: pod.CreatePodReq.provider:type_name -> pod.CloudProvider - 0, // 3: pod.DeletePodReq.provider:type_name -> pod.CloudProvider - 0, // 4: pod.UpdatePodReq.provider:type_name -> pod.CloudProvider - 0, // 5: pod.ListPodDetailReq.provider:type_name -> pod.CloudProvider - 2, // 6: pod.ListPodDetailResp.pods:type_name -> pod.PodInstance - 0, // 7: pod.ListPodReq.provider:type_name -> pod.CloudProvider - 2, // 8: pod.ListPodResp.pods:type_name -> pod.PodInstance - 0, // 9: pod.GetPodRegionReq.provider:type_name -> pod.CloudProvider - 1, // 10: pod.GetPodRegionResp.regions:type_name -> pod.Region - 3, // 11: pod.PodService.CreatePods:input_type -> pod.CreatePodsReq - 5, // 12: pod.PodService.CreatePod:input_type -> pod.CreatePodReq - 7, // 13: pod.PodService.DeletePod:input_type -> pod.DeletePodReq - 9, // 14: pod.PodService.UpdatePod:input_type -> pod.UpdatePodReq - 11, // 15: pod.PodService.ListPodDetail:input_type -> pod.ListPodDetailReq - 13, // 16: pod.PodService.ListPod:input_type -> pod.ListPodReq - 17, // 17: pod.PodService.ListPodAll:input_type -> pod.ListPodAllReq - 4, // 18: pod.PodService.CreatePods:output_type -> pod.CreatePodsResp - 6, // 19: pod.PodService.CreatePod:output_type -> pod.CreatePodResp - 8, // 20: pod.PodService.DeletePod:output_type -> pod.DeletePodResp - 10, // 21: pod.PodService.UpdatePod:output_type -> pod.UpdatePodResp - 12, // 22: pod.PodService.ListPodDetail:output_type -> pod.ListPodDetailResp - 14, // 23: pod.PodService.ListPod:output_type -> pod.ListPodResp - 14, // 24: pod.PodService.ListPodAll:output_type -> pod.ListPodResp - 18, // [18:25] is the sub-list for method output_type - 11, // [11:18] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name -} - -func init() { file_idl_pod_proto_init() } -func file_idl_pod_proto_init() { - if File_idl_pod_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_idl_pod_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Region); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PodInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePodsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePodsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePodReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePodResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeletePodReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeletePodResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePodReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePodResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPodDetailReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPodDetailResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPodReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPodResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPodRegionReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPodRegionResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_pod_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPodAllReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_idl_pod_proto_rawDesc, - NumEnums: 1, - NumMessages: 17, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_idl_pod_proto_goTypes, - DependencyIndexes: file_idl_pod_proto_depIdxs, - EnumInfos: file_idl_pod_proto_enumTypes, - MessageInfos: file_idl_pod_proto_msgTypes, - }.Build() - File_idl_pod_proto = out.File - file_idl_pod_proto_rawDesc = nil - file_idl_pod_proto_goTypes = nil - file_idl_pod_proto_depIdxs = nil -} diff --git a/adaptor/pcm_pod/gen/idl/pod.pb.gw.go b/adaptor/pcm_pod/gen/idl/pod.pb.gw.go deleted file mode 100644 index b64b37bb9..000000000 --- a/adaptor/pcm_pod/gen/idl/pod.pb.gw.go +++ /dev/null @@ -1,669 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: idl/pod.proto - -/* -Package podpb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package podpb - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_PodService_CreatePods_0(ctx context.Context, marshaler runtime.Marshaler, client PodServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePodsReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreatePods(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_PodService_CreatePods_0(ctx context.Context, marshaler runtime.Marshaler, server PodServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePodsReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreatePods(ctx, &protoReq) - return msg, metadata, err - -} - -func request_PodService_CreatePod_0(ctx context.Context, marshaler runtime.Marshaler, client PodServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePodReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreatePod(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_PodService_CreatePod_0(ctx context.Context, marshaler runtime.Marshaler, server PodServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePodReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreatePod(ctx, &protoReq) - return msg, metadata, err - -} - -func request_PodService_DeletePod_0(ctx context.Context, marshaler runtime.Marshaler, client PodServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePodReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DeletePod(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_PodService_DeletePod_0(ctx context.Context, marshaler runtime.Marshaler, server PodServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePodReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DeletePod(ctx, &protoReq) - return msg, metadata, err - -} - -func request_PodService_UpdatePod_0(ctx context.Context, marshaler runtime.Marshaler, client PodServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdatePodReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.UpdatePod(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_PodService_UpdatePod_0(ctx context.Context, marshaler runtime.Marshaler, server PodServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdatePodReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.UpdatePod(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_PodService_ListPodDetail_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_PodService_ListPodDetail_0(ctx context.Context, marshaler runtime.Marshaler, client PodServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPodDetailReq - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PodService_ListPodDetail_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListPodDetail(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_PodService_ListPodDetail_0(ctx context.Context, marshaler runtime.Marshaler, server PodServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPodDetailReq - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PodService_ListPodDetail_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListPodDetail(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_PodService_ListPod_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_PodService_ListPod_0(ctx context.Context, marshaler runtime.Marshaler, client PodServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPodReq - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PodService_ListPod_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListPod(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_PodService_ListPod_0(ctx context.Context, marshaler runtime.Marshaler, server PodServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPodReq - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PodService_ListPod_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListPod(ctx, &protoReq) - return msg, metadata, err - -} - -func request_PodService_ListPodAll_0(ctx context.Context, marshaler runtime.Marshaler, client PodServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPodAllReq - var metadata runtime.ServerMetadata - - msg, err := client.ListPodAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_PodService_ListPodAll_0(ctx context.Context, marshaler runtime.Marshaler, server PodServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPodAllReq - var metadata runtime.ServerMetadata - - msg, err := server.ListPodAll(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterPodServiceHandlerServer registers the http handlers for service PodService to "mux". -// UnaryRPC :call PodServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPodServiceHandlerFromEndpoint instead. -func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PodServiceServer) error { - - mux.Handle("POST", pattern_PodService_CreatePods_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pod.PodService/CreatePods", runtime.WithHTTPPathPattern("/apis/pod/createMulti")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PodService_CreatePods_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PodService_CreatePods_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_PodService_CreatePod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pod.PodService/CreatePod", runtime.WithHTTPPathPattern("/apis/pod/create")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PodService_CreatePod_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PodService_CreatePod_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_PodService_DeletePod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pod.PodService/DeletePod", runtime.WithHTTPPathPattern("/apis/pod/delete")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PodService_DeletePod_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PodService_DeletePod_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_PodService_UpdatePod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pod.PodService/UpdatePod", runtime.WithHTTPPathPattern("/apis/pod/delete")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PodService_UpdatePod_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PodService_UpdatePod_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_PodService_ListPodDetail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pod.PodService/ListPodDetail", runtime.WithHTTPPathPattern("/apis/pod/detail")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PodService_ListPodDetail_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PodService_ListPodDetail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_PodService_ListPod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pod.PodService/ListPod", runtime.WithHTTPPathPattern("/apis/pod")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PodService_ListPod_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PodService_ListPod_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_PodService_ListPodAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pod.PodService/ListPodAll", runtime.WithHTTPPathPattern("/apis/pod/all")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PodService_ListPodAll_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PodService_ListPodAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterPodServiceHandlerFromEndpoint is same as RegisterPodServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterPodServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterPodServiceHandler(ctx, mux, conn) -} - -// RegisterPodServiceHandler registers the http handlers for service PodService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterPodServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterPodServiceHandlerClient(ctx, mux, NewPodServiceClient(conn)) -} - -// RegisterPodServiceHandlerClient registers the http handlers for service PodService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PodServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PodServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PodServiceClient" to call the correct interceptors. -func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PodServiceClient) error { - - mux.Handle("POST", pattern_PodService_CreatePods_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pod.PodService/CreatePods", runtime.WithHTTPPathPattern("/apis/pod/createMulti")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PodService_CreatePods_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PodService_CreatePods_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_PodService_CreatePod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pod.PodService/CreatePod", runtime.WithHTTPPathPattern("/apis/pod/create")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PodService_CreatePod_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PodService_CreatePod_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_PodService_DeletePod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pod.PodService/DeletePod", runtime.WithHTTPPathPattern("/apis/pod/delete")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PodService_DeletePod_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PodService_DeletePod_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_PodService_UpdatePod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pod.PodService/UpdatePod", runtime.WithHTTPPathPattern("/apis/pod/delete")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PodService_UpdatePod_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PodService_UpdatePod_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_PodService_ListPodDetail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pod.PodService/ListPodDetail", runtime.WithHTTPPathPattern("/apis/pod/detail")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PodService_ListPodDetail_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PodService_ListPodDetail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_PodService_ListPod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pod.PodService/ListPod", runtime.WithHTTPPathPattern("/apis/pod")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PodService_ListPod_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PodService_ListPod_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_PodService_ListPodAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pod.PodService/ListPodAll", runtime.WithHTTPPathPattern("/apis/pod/all")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PodService_ListPodAll_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PodService_ListPodAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_PodService_CreatePods_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "pod", "createMulti"}, "")) - - pattern_PodService_CreatePod_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "pod", "create"}, "")) - - pattern_PodService_DeletePod_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "pod", "delete"}, "")) - - pattern_PodService_UpdatePod_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "pod", "delete"}, "")) - - pattern_PodService_ListPodDetail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "pod", "detail"}, "")) - - pattern_PodService_ListPod_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"apis", "pod"}, "")) - - pattern_PodService_ListPodAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "pod", "all"}, "")) -) - -var ( - forward_PodService_CreatePods_0 = runtime.ForwardResponseMessage - - forward_PodService_CreatePod_0 = runtime.ForwardResponseMessage - - forward_PodService_DeletePod_0 = runtime.ForwardResponseMessage - - forward_PodService_UpdatePod_0 = runtime.ForwardResponseMessage - - forward_PodService_ListPodDetail_0 = runtime.ForwardResponseMessage - - forward_PodService_ListPod_0 = runtime.ForwardResponseMessage - - forward_PodService_ListPodAll_0 = runtime.ForwardResponseMessage -) diff --git a/adaptor/pcm_pod/gen/idl/pod_grpc.pb.go b/adaptor/pcm_pod/gen/idl/pod_grpc.pb.go deleted file mode 100644 index f5defdddb..000000000 --- a/adaptor/pcm_pod/gen/idl/pod_grpc.pb.go +++ /dev/null @@ -1,335 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: idl/pod.proto - -package podpb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// PodServiceClient is the client API for PodService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type PodServiceClient interface { - // 创建Pods - CreatePods(ctx context.Context, in *CreatePodsReq, opts ...grpc.CallOption) (*CreatePodsResp, error) - // 创建Pod - CreatePod(ctx context.Context, in *CreatePodReq, opts ...grpc.CallOption) (*CreatePodResp, error) - // 删除Pod - DeletePod(ctx context.Context, in *DeletePodReq, opts ...grpc.CallOption) (*DeletePodResp, error) - // 更新Pod - UpdatePod(ctx context.Context, in *UpdatePodReq, opts ...grpc.CallOption) (*UpdatePodResp, error) - // 查询Pod明细 - ListPodDetail(ctx context.Context, in *ListPodDetailReq, opts ...grpc.CallOption) (*ListPodDetailResp, error) - // 查询Pod全量 - 根据云类型 - ListPod(ctx context.Context, in *ListPodReq, opts ...grpc.CallOption) (*ListPodResp, error) - // 查询所有云的Pod - ListPodAll(ctx context.Context, in *ListPodAllReq, opts ...grpc.CallOption) (*ListPodResp, error) -} - -type podServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewPodServiceClient(cc grpc.ClientConnInterface) PodServiceClient { - return &podServiceClient{cc} -} - -func (c *podServiceClient) CreatePods(ctx context.Context, in *CreatePodsReq, opts ...grpc.CallOption) (*CreatePodsResp, error) { - out := new(CreatePodsResp) - err := c.cc.Invoke(ctx, "/pod.PodService/CreatePods", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *podServiceClient) CreatePod(ctx context.Context, in *CreatePodReq, opts ...grpc.CallOption) (*CreatePodResp, error) { - out := new(CreatePodResp) - err := c.cc.Invoke(ctx, "/pod.PodService/CreatePod", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *podServiceClient) DeletePod(ctx context.Context, in *DeletePodReq, opts ...grpc.CallOption) (*DeletePodResp, error) { - out := new(DeletePodResp) - err := c.cc.Invoke(ctx, "/pod.PodService/DeletePod", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *podServiceClient) UpdatePod(ctx context.Context, in *UpdatePodReq, opts ...grpc.CallOption) (*UpdatePodResp, error) { - out := new(UpdatePodResp) - err := c.cc.Invoke(ctx, "/pod.PodService/UpdatePod", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *podServiceClient) ListPodDetail(ctx context.Context, in *ListPodDetailReq, opts ...grpc.CallOption) (*ListPodDetailResp, error) { - out := new(ListPodDetailResp) - err := c.cc.Invoke(ctx, "/pod.PodService/ListPodDetail", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *podServiceClient) ListPod(ctx context.Context, in *ListPodReq, opts ...grpc.CallOption) (*ListPodResp, error) { - out := new(ListPodResp) - err := c.cc.Invoke(ctx, "/pod.PodService/ListPod", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *podServiceClient) ListPodAll(ctx context.Context, in *ListPodAllReq, opts ...grpc.CallOption) (*ListPodResp, error) { - out := new(ListPodResp) - err := c.cc.Invoke(ctx, "/pod.PodService/ListPodAll", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PodServiceServer is the server API for PodService service. -// All implementations must embed UnimplementedPodServiceServer -// for forward compatibility -type PodServiceServer interface { - // 创建Pods - CreatePods(context.Context, *CreatePodsReq) (*CreatePodsResp, error) - // 创建Pod - CreatePod(context.Context, *CreatePodReq) (*CreatePodResp, error) - // 删除Pod - DeletePod(context.Context, *DeletePodReq) (*DeletePodResp, error) - // 更新Pod - UpdatePod(context.Context, *UpdatePodReq) (*UpdatePodResp, error) - // 查询Pod明细 - ListPodDetail(context.Context, *ListPodDetailReq) (*ListPodDetailResp, error) - // 查询Pod全量 - 根据云类型 - ListPod(context.Context, *ListPodReq) (*ListPodResp, error) - // 查询所有云的Pod - ListPodAll(context.Context, *ListPodAllReq) (*ListPodResp, error) - mustEmbedUnimplementedPodServiceServer() -} - -// UnimplementedPodServiceServer must be embedded to have forward compatible implementations. -type UnimplementedPodServiceServer struct { -} - -func (UnimplementedPodServiceServer) CreatePods(context.Context, *CreatePodsReq) (*CreatePodsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreatePods not implemented") -} -func (UnimplementedPodServiceServer) CreatePod(context.Context, *CreatePodReq) (*CreatePodResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreatePod not implemented") -} -func (UnimplementedPodServiceServer) DeletePod(context.Context, *DeletePodReq) (*DeletePodResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeletePod not implemented") -} -func (UnimplementedPodServiceServer) UpdatePod(context.Context, *UpdatePodReq) (*UpdatePodResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdatePod not implemented") -} -func (UnimplementedPodServiceServer) ListPodDetail(context.Context, *ListPodDetailReq) (*ListPodDetailResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListPodDetail not implemented") -} -func (UnimplementedPodServiceServer) ListPod(context.Context, *ListPodReq) (*ListPodResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListPod not implemented") -} -func (UnimplementedPodServiceServer) ListPodAll(context.Context, *ListPodAllReq) (*ListPodResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListPodAll not implemented") -} -func (UnimplementedPodServiceServer) mustEmbedUnimplementedPodServiceServer() {} - -// UnsafePodServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to PodServiceServer will -// result in compilation errors. -type UnsafePodServiceServer interface { - mustEmbedUnimplementedPodServiceServer() -} - -func RegisterPodServiceServer(s grpc.ServiceRegistrar, srv PodServiceServer) { - s.RegisterService(&PodService_ServiceDesc, srv) -} - -func _PodService_CreatePods_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePodsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PodServiceServer).CreatePods(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pod.PodService/CreatePods", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PodServiceServer).CreatePods(ctx, req.(*CreatePodsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _PodService_CreatePod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePodReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PodServiceServer).CreatePod(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pod.PodService/CreatePod", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PodServiceServer).CreatePod(ctx, req.(*CreatePodReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _PodService_DeletePod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeletePodReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PodServiceServer).DeletePod(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pod.PodService/DeletePod", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PodServiceServer).DeletePod(ctx, req.(*DeletePodReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _PodService_UpdatePod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdatePodReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PodServiceServer).UpdatePod(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pod.PodService/UpdatePod", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PodServiceServer).UpdatePod(ctx, req.(*UpdatePodReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _PodService_ListPodDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListPodDetailReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PodServiceServer).ListPodDetail(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pod.PodService/ListPodDetail", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PodServiceServer).ListPodDetail(ctx, req.(*ListPodDetailReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _PodService_ListPod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListPodReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PodServiceServer).ListPod(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pod.PodService/ListPod", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PodServiceServer).ListPod(ctx, req.(*ListPodReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _PodService_ListPodAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListPodAllReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PodServiceServer).ListPodAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pod.PodService/ListPodAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PodServiceServer).ListPodAll(ctx, req.(*ListPodAllReq)) - } - return interceptor(ctx, in, info, handler) -} - -// PodService_ServiceDesc is the grpc.ServiceDesc for PodService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var PodService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "pod.PodService", - HandlerType: (*PodServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreatePods", - Handler: _PodService_CreatePods_Handler, - }, - { - MethodName: "CreatePod", - Handler: _PodService_CreatePod_Handler, - }, - { - MethodName: "DeletePod", - Handler: _PodService_DeletePod_Handler, - }, - { - MethodName: "UpdatePod", - Handler: _PodService_UpdatePod_Handler, - }, - { - MethodName: "ListPodDetail", - Handler: _PodService_ListPodDetail_Handler, - }, - { - MethodName: "ListPod", - Handler: _PodService_ListPod_Handler, - }, - { - MethodName: "ListPodAll", - Handler: _PodService_ListPodAll_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "idl/pod.proto", -} diff --git a/adaptor/pcm_pod/gen/openapiv2/idl/pod.swagger.json b/adaptor/pcm_pod/gen/openapiv2/idl/pod.swagger.json deleted file mode 100644 index 32cfc90d7..000000000 --- a/adaptor/pcm_pod/gen/openapiv2/idl/pod.swagger.json +++ /dev/null @@ -1,316 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "idl/pod.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "PodService" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "podCloudProvider": { - "type": "string", - "enum": [ - "ali", - "tencent", - "huawei", - "k8s", - "harvester" - ], - "default": "ali", - "description": "- ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", - "title": "云提供商" - }, - "podCreatePodReq": { - "type": "object", - "properties": { - "provider": { - "$ref": "#/definitions/podCloudProvider" - }, - "accountName": { - "type": "string", - "title": "账号名称" - }, - "podId": { - "type": "string", - "title": "实例id" - }, - "podName": { - "type": "string", - "title": "实例名称" - }, - "regionId": { - "type": "integer", - "format": "int32", - "title": "地域,数据中心" - }, - "containerImage": { - "type": "string", - "title": "镜像" - }, - "containerName": { - "type": "string", - "title": "容器名称" - }, - "cpuPod": { - "type": "string", - "title": "v cpu数" - }, - "memoryPod": { - "type": "string", - "title": "内存MB" - }, - "securityGroupId": { - "type": "string", - "title": "安全组ID 对应腾讯 SecurityGroupIds(腾讯必需)" - }, - "subnetId": { - "type": "string", - "title": "子网ID 对应腾讯 SubnetId(腾讯必需)" - }, - "vpcId": { - "type": "string", - "title": "VPC ID 对应腾讯 VpcId(腾讯必需)" - }, - "namespace": { - "type": "string", - "title": "名空间" - }, - "requestSource": { - "type": "string", - "title": "请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体" - } - } - }, - "podCreatePodResp": { - "type": "object", - "properties": { - "finished": { - "type": "boolean", - "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" - }, - "requestId": { - "type": "string", - "title": "请求id,出现问题后提供给云厂商,排查问题" - }, - "podId": { - "type": "string", - "title": "podId" - }, - "podName": { - "type": "string", - "title": "podName" - } - } - }, - "podCreatePodsResp": { - "type": "object", - "properties": { - "finished": { - "type": "boolean", - "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" - }, - "requestId": { - "type": "array", - "items": { - "type": "string" - }, - "title": "请求id,出现问题后提供给云厂商,排查问题" - } - } - }, - "podDeletePodResp": { - "type": "object", - "properties": { - "finished": { - "type": "boolean", - "title": "删除是否完成" - }, - "requestId": { - "type": "string", - "title": "请求id,出现问题后提供给云厂商,排查问题" - }, - "podId": { - "type": "string", - "title": "podId" - }, - "podName": { - "type": "string", - "title": "podName" - } - } - }, - "podListPodDetailResp": { - "type": "object", - "properties": { - "pods": { - "type": "array", - "items": { - "$ref": "#/definitions/podPodInstance" - }, - "title": "Pod集合" - }, - "finished": { - "type": "boolean", - "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" - }, - "pageNumber": { - "type": "integer", - "format": "int32", - "title": "分页相关参数,页码" - }, - "pageSize": { - "type": "integer", - "format": "int32", - "title": "分页相关参数,每页数量" - }, - "nextToken": { - "type": "string", - "title": "分页相关参数,下一页的token" - }, - "requestId": { - "type": "string", - "title": "请求id,出现问题后提供给云厂商,排查问题" - } - } - }, - "podListPodResp": { - "type": "object", - "properties": { - "pods": { - "type": "array", - "items": { - "$ref": "#/definitions/podPodInstance" - }, - "title": "pod list" - } - } - }, - "podPodInstance": { - "type": "object", - "properties": { - "provider": { - "$ref": "#/definitions/podCloudProvider" - }, - "accountName": { - "type": "string", - "title": "账号名称" - }, - "pcmId": { - "type": "string", - "title": "pcm id" - }, - "podId": { - "type": "string", - "title": "实例id" - }, - "podName": { - "type": "string", - "title": "实例名称" - }, - "regionId": { - "type": "integer", - "format": "int32", - "title": "地域ID" - }, - "regionName": { - "type": "string", - "title": "地域Name" - }, - "containerImage": { - "type": "string", - "title": "镜像" - }, - "containerName": { - "type": "string", - "title": "容器名称" - }, - "cpuPod": { - "type": "string", - "title": "vcpu数" - }, - "memoryPod": { - "type": "string", - "title": "内存MB" - }, - "securityGroupId": { - "type": "string", - "title": "安全组ID 对应腾讯 SecurityGroupIds(腾讯必需)" - }, - "subnetId": { - "type": "string", - "title": "子网ID 对应腾讯 SubnetId(腾讯必需)" - }, - "vpcId": { - "type": "string", - "title": "VPC ID 对应腾讯 VpcId(腾讯必需)" - }, - "namespace": { - "type": "string", - "title": "名空间" - }, - "status": { - "type": "string", - "title": "实例状态" - } - } - }, - "podUpdatePodResp": { - "type": "object", - "properties": { - "finished": { - "type": "boolean", - "title": "更新是否完成" - }, - "requestId": { - "type": "string", - "title": "请求id,出现问题后提供给云厂商,排查问题" - }, - "podId": { - "type": "string", - "title": "podId" - }, - "podName": { - "type": "string", - "title": "podName" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/adaptor/pcm_pod/idl/pod.proto b/adaptor/pcm_pod/idl/pod.proto deleted file mode 100644 index 16d23579a..000000000 --- a/adaptor/pcm_pod/idl/pod.proto +++ /dev/null @@ -1,282 +0,0 @@ -syntax = "proto3"; -package pod; - -option go_package = "/podpb"; - - -// 云提供商 -enum CloudProvider { - // 0 - 阿里云 - ali = 0; - // 1 - 腾讯云 - tencent = 1; - // 2 - 华为云 - huawei = 2; - // 3 - K8S - k8s = 3; - // 3 - Harvester - harvester = 4; -} - -message Region { - //id - int32 id = 1; - //name - string name = 2; -} - -message PodInstance { - // 云类型 - CloudProvider provider = 1; - // 账号名称 - string account_name = 2; - //pcm id - string pcm_id = 3; - // 实例id - string pod_id = 4; - // 实例名称 - string pod_name = 5; - // 地域ID - int32 region_id = 6; - // 地域Name - string region_name = 7; - // 镜像 - string container_image = 8; - // 容器名称 - string container_name = 9; - // vcpu数 - string cpu_pod = 10; - // 内存MB - string memory_pod = 11; - //安全组ID 对应腾讯 SecurityGroupIds(腾讯必需) - string security_group_id = 12; - //子网ID 对应腾讯 SubnetId(腾讯必需) - string subnet_id = 13; - //VPC ID 对应腾讯 VpcId(腾讯必需) - string vpc_id = 14; - //名空间 - string namespace = 15; - // 实例状态 - string status = 16; -} - - -message CreatePodsReq { - // 创建请求集合 - repeated CreatePodReq createPodReq = 1; -} - -message CreatePodsResp { - // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - bool finished = 2; - // 请求id,出现问题后提供给云厂商,排查问题 - repeated string request_id = 3; -} - -message CreatePodReq { - // 云类型 - CloudProvider provider = 1; - // 账号名称 - string account_name = 2; - // 实例id - string pod_id = 3; - // 实例名称 - string pod_name = 4; - // 地域,数据中心 - int32 region_id = 5; - // 镜像 - string container_image = 6; - // 容器名称 - string container_name = 7; - // v cpu数 - string cpu_pod = 8; - // 内存MB - string memory_pod = 9; - //安全组ID 对应腾讯 SecurityGroupIds(腾讯必需) - string security_group_id = 10; - //子网ID 对应腾讯 SubnetId(腾讯必需) - string subnet_id = 11; - //VPC ID 对应腾讯 VpcId(腾讯必需) - string vpc_id = 12; - //名空间 - string namespace = 13; - //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 - string requestSource = 14; -} - -message CreatePodResp { - // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - bool finished = 1; - // 请求id,出现问题后提供给云厂商,排查问题 - string request_id = 2; - // podId - string pod_id = 3; - // podName - string pod_name = 4; -} - -message DeletePodReq { - // 云类型 - CloudProvider provider = 1; - // 账号名称 - string account_name = 2; - // pcm id - string pcm_id = 3; - // podId - string pod_id = 4; - // podName - string pod_name = 5; - //namespace - string namespace = 6; - // 地域,数据中心 - int32 region_id = 7; - //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 - string requestSource = 8; -} - -message DeletePodResp { - // 删除是否完成 - bool finished = 1; - // 请求id,出现问题后提供给云厂商,排查问题 - string request_id = 2; - // podId - string pod_id = 3; - // podName - string pod_name = 4; -} - -message UpdatePodReq { - // 云类型 - CloudProvider provider = 1; - // 账号名称 - string account_name = 2; - // pcm ID - string pcm_id = 3; - // podId - string pod_id = 4; - // podName - string pod_name = 5; - //namespace - string namespace = 6; - // 地域,数据中心 - int32 region_id = 7; - // 镜像 - string container_image = 8; - // 容器名称 - string container_name = 9; - // v cpu数 - string cpu_pod = 10; - // 内存MB - string memory_pod = 11; - // 重启策略 - string restart_policy = 12; - // labels - string labels = 13; - //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 - string requestSource = 14; -} - -message UpdatePodResp { - // 更新是否完成 - bool finished = 1; - // 请求id,出现问题后提供给云厂商,排查问题 - string request_id = 2; - // podId - string pod_id = 3; - // podName - string pod_name = 4; -} - -message ListPodDetailReq { - // 云名称 - CloudProvider provider = 1; - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - string account_name = 2; - // 区域Id,参考 tenant.proto 中的各个云的区域 - int32 region_id = 3; - // 区域名称,各云厂商自定义的region name - int32 region_name = 4; - - // podID - int32 pod_id = 5; - // 分页相关参数,页码 - int32 page_number = 6; - // 分页相关参数,每页数量 - int32 page_size = 7; - // 分页相关参数,下一页的token - string next_token = 8; - // namespace - string namespace = 9; -} - -message ListPodDetailResp { - // Pod集合 - repeated PodInstance pods = 1; - // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - bool finished = 2; - // 分页相关参数,页码 - int32 page_number = 3; - // 分页相关参数,每页数量 - int32 page_size = 4; - // 分页相关参数,下一页的token - string next_token = 5; - // 请求id,出现问题后提供给云厂商,排查问题 - string request_id = 6; -} - -message ListPodReq { - // cloud name - CloudProvider provider = 1; - //命名空间 - string namespace =2; - //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体 - string requestSource =3; -} - -message ListPodResp { - // pod list - repeated PodInstance pods = 1; -} - -message GetPodRegionReq { - // cloud name - CloudProvider provider = 1; - -} - -message GetPodRegionResp { - // region list - repeated Region regions = 1; -} - - -message ListPodAllReq{} - -// Pod类产品接口 -// 阿里云 - ECI -// 腾讯云 - TKS -// 华为云 - CCI - -service PodService { - - // 创建Pods - rpc CreatePods(CreatePodsReq) returns (CreatePodsResp); - - // 创建Pod - rpc CreatePod(CreatePodReq) returns (CreatePodResp); - - // 删除Pod - rpc DeletePod(DeletePodReq) returns (DeletePodResp); - - // 更新Pod - rpc UpdatePod(UpdatePodReq) returns (UpdatePodResp); - - // 查询Pod明细 - rpc ListPodDetail(ListPodDetailReq) returns (ListPodDetailResp); - - // 查询Pod全量 - 根据云类型 - rpc ListPod(ListPodReq) returns (ListPodResp); - - // 查询所有云的Pod - rpc ListPodAll(ListPodAllReq) returns (ListPodResp); -} \ No newline at end of file diff --git a/adaptor/pcm_pod/idl/pod.yaml b/adaptor/pcm_pod/idl/pod.yaml deleted file mode 100644 index be5473221..000000000 --- a/adaptor/pcm_pod/idl/pod.yaml +++ /dev/null @@ -1,23 +0,0 @@ -type: google.api.Service -config_version: 3 - -http: - rules: - - selector: pod.PodService.CreatePods - post: "/apis/pod/createMulti" - body: "*" - - selector: pod.PodService.CreatePod - post: "/apis/pod/create" - body: "*" - - selector: pod.PodService.DeletePod - post: "/apis/pod/delete" - body: "*" - - selector: pod.PodService.UpdatePod - put: "/apis/pod/delete" - body: "*" - - selector: pod.PodService.ListPodDetail - get: "/apis/pod/detail" - - selector: pod.PodService.ListPod - get: "/apis/pod" - - selector: pod.PodService.ListPodAll - get: "/apis/pod/all" \ No newline at end of file diff --git a/adaptor/pcm_pod/main.go b/adaptor/pcm_pod/main.go deleted file mode 100644 index 422f3bd9b..000000000 --- a/adaptor/pcm_pod/main.go +++ /dev/null @@ -1,58 +0,0 @@ -package main - -import ( - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/gen/idl" - podserver "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server" - "code.gitlink.org.cn/JCCE/PCM.git/common/config" - "code.gitlink.org.cn/JCCE/PCM.git/common/global" - "code.gitlink.org.cn/JCCE/PCM.git/common/server" - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - "flag" - "github.com/golang/glog" - "github.com/pkg/errors" - "go.uber.org/zap" - "google.golang.org/grpc" - "log" -) - -func main() { - var configFile string - flag.StringVar(&configFile, "conf", "configs/tenanter.yaml", "tenanter.yaml") - flag.Parse() - defer glog.Flush() - - if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { - if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { - glog.Fatalf("LoadCloudConfigsFromFile error %+v", err) - } - glog.Warningf("LoadCloudConfigsFromFile empty file path %s", configFile) - } - - glog.Infof("load tenant from file finished") - // 初始化配置以及数据库 - config.InitConfig() - - // 新建一个zap logger实例 - logger, err := zap.NewDevelopment() - if err != nil { - log.Fatalf("cannot create logger: %v", err) - } - if err != nil { - logger.Fatal("cannot open private key", zap.Error(err)) - } - if err != nil { - logger.Fatal("cannot read private key", zap.Error(err)) - } - if err != nil { - logger.Fatal("cannot parse private key", zap.Error(err)) - } - // logger.Sugar().Fatal 直接可以少几行判错的代码 - logger.Sugar().Fatal(server.RunGRPCServer(&server.GRPCConfig{ - Name: "pcm_pod", - Addr: global.S.PodInfo.Address, - RegisterFunc: func(g *grpc.Server) { - podpb.RegisterPodServiceServer(g, &podserver.Server{}) - }, - Logger: logger, - })) -} diff --git a/adaptor/pcm_pod/server/ali/client.go b/adaptor/pcm_pod/server/ali/client.go deleted file mode 100644 index 6b5b9658e..000000000 --- a/adaptor/pcm_pod/server/ali/client.go +++ /dev/null @@ -1,110 +0,0 @@ -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at -// -//http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. -// -// Code generated by Alibaba Cloud SDK Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package ali - -import ( - "github.com/aliyun/alibaba-cloud-sdk-go/sdk" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider" -) - -// Client is the sdk client struct, each func corresponds to an OpenAPI -type Client struct { - sdk.Client -} - -//type AliEci struct { -// cli *alieci.Client -// region tenanter.Region -// tenanter tenanter.Tenanter -//} - -// NewClient creates a sdk client with environment variables -func NewClient() (client *Client, err error) { - client = &Client{} - err = client.Init() - return -} - -// NewClientWithProvider creates a sdk client with providers -// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md -func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error) { - client = &Client{} - var pc provider.Provider - if len(providers) == 0 { - pc = provider.DefaultChain - } else { - pc = provider.NewProviderChain(providers) - } - err = client.InitWithProviderChain(regionId, pc) - return -} - -// NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential -// this is the common api to create a sdk client -func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) { - client = &Client{} - err = client.InitWithOptions(regionId, config, credential) - return -} - -// NewClientWithAccessKey is a shortcut to create sdk client with accesskey -// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md -func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) { - client = &Client{} - err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret) - return -} - -// NewClientWithStsToken is a shortcut to create sdk client with sts token -// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md -func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) { - client = &Client{} - err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken) - return -} - -// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn -// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md -func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) { - client = &Client{} - err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName) - return -} - -// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy -// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md -func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error) { - client = &Client{} - err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy) - return -} - -// NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role -// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md -func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) { - client = &Client{} - err = client.InitWithEcsRamRole(regionId, roleName) - return -} - -// NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair -// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md -func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) { - client = &Client{} - err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration) - return -} diff --git a/adaptor/pcm_pod/server/ali/create_container_group.go b/adaptor/pcm_pod/server/ali/create_container_group.go deleted file mode 100644 index 99f704445..000000000 --- a/adaptor/pcm_pod/server/ali/create_container_group.go +++ /dev/null @@ -1,373 +0,0 @@ -package ali - -import ( - pbpod "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server" - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl" - "errors" - "flag" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" - "github.com/golang/glog" - "strconv" -) - -// CreateContainerGroup invokes the eci.CreateContainerGroup API synchronously -// api document: https://help.aliyun.com/api/eci/createcontainergroup.html -func CreateContainerGroup(request *CreateContainerGroupRequest) (response *CreateContainerGroupResponse, err error) { - - provider := pbpod.CloudProvider(request.ProviderId) - var configFile string - flag.StringVar(&configFile, "confAli", "configs/tenanter.yaml", "tenanter.yaml") - flag.Parse() - defer glog.Flush() - - if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { - if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { - glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) - } - glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) - } - - glog.Infof("load tenant from file finished") - tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(provider)) - var regionId int32 - var cpuPod string - var memoryPod string - container := *request.Container - containerImage := container[0].Image - containerName := container[0].Name - cpuPodFloat, _ := container[0].Cpu.GetValue() - memoryPodFloat, _ := container[0].Memory.GetValue() - switch request.ProviderId { - case 0: - regionId, _ = tenanter.GetAliRegionId(request.RegionId) - cpuPod = strconv.FormatFloat(cpuPodFloat, 'f', 0, 64) - memoryPod = strconv.FormatFloat(memoryPodFloat, 'f', 0, 64) - case 1: - regionId, _ = tenanter.GetTencentRegionId(request.RegionId) - cpuPod = strconv.FormatFloat(cpuPodFloat, 'f', 0, 64) - memoryPod = strconv.FormatFloat(memoryPodFloat, 'f', 0, 64) - case 2: - //华为的CPU和内存数量要进行转换 - regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId) - cpuPod = strconv.FormatFloat(cpuPodFloat*1000, 'f', 0, 64) + "m" - memoryPod = strconv.FormatFloat(memoryPodFloat, 'f', 0, 64) + "Gi" - case 3: - regionId, _ = tenanter.GetK8SRegionId(request.RegionId) - cpuPod = strconv.FormatFloat(cpuPodFloat*1000, 'f', 0, 64) + "m" - memoryPod = strconv.FormatFloat(memoryPodFloat, 'f', 0, 64) + "Gi" - } - - requestPCM := &pbpod.CreatePodReq{ - RequestSource: "ali", - Provider: pbpod.CloudProvider(provider), - AccountName: tenanters[0].AccountName(), - PodName: request.ContainerGroupName, - RegionId: regionId, - ContainerImage: containerImage, - ContainerName: containerName, - CpuPod: cpuPod, - MemoryPod: memoryPod, - SecurityGroupId: "sg-6qlun7hd", - SubnetId: "subnet-mnwfg2fk", - VpcId: "vpc-rkwt40g5", - Namespace: "pcm", - } - - resp, err := server.CreatePod(nil, requestPCM) - - response = &CreateContainerGroupResponse{ - BaseResponse: nil, - RequestId: resp.RequestId, - ContainerGroupId: resp.PodId, - } - - return response, nil -} - -// CreateContainerGroupRequest is the request struct for api CreateContainerGroup -type CreateContainerGroupRequest struct { - *requests.RpcRequest - /*********PCM param************/ - RequestSource string `position:"Query" name:"RequestSource"` - ProviderId int32 `position:"Query" name:"ProviderId"` - AccountName string `position:"Query" name:"AccountName"` - Namespace string `position:"Query" name:"Namespace"` - /*********PCM param************/ - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - RegionId string `position:"Query" name:"RegionId"` - ZoneId string `position:"Query" name:"ZoneId"` - SecurityGroupId string `position:"Query" name:"SecurityGroupId"` - VSwitchId string `position:"Query" name:"VSwitchId"` - ContainerGroupName string `position:"Query" name:"ContainerGroupName"` - RestartPolicy string `position:"Query" name:"RestartPolicy"` - Tag *[]CreateContainerGroupTag `position:"Query" name:"Tag" type:"Repeated"` - ImageRegistryCredential *[]CreateContainerGroupImageRegistryCredential `position:"Query" name:"ImageRegistryCredential" type:"Repeated"` - Container *[]CreateContainerGroupContainer `position:"Query" name:"Container" type:"Repeated"` - Volume *[]CreateContainerGroupVolume `position:"Query" name:"Volume" type:"Repeated"` - EipInstanceId string `position:"Query" name:"EipInstanceId"` - InitContainer *[]CreateContainerGroupInitContainer `position:"Query" name:"InitContainer" type:"Repeated"` - Cpu requests.Float `position:"Query" name:"Cpu"` - Memory requests.Float `position:"Query" name:"Memory"` - ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - DnsPolicy string `position:"Query" name:"DnsPolicy"` - ClientToken string `position:"Query" name:"ClientToken"` - HostAliase *[]CreateContainerGroupHostAliase `position:"Query" name:"HostAliase" type:"Repeated"` - Arn *[]CreateContainerGroupArn `position:"Query" name:"Arn" type:"Repeated"` - InstanceType string `position:"Query" name:"InstanceType"` - SlsEnable requests.Boolean `position:"Query" name:"SlsEnable"` - ImageSnapshotId string `position:"Query" name:"ImageSnapshotId"` - RamRoleName string `position:"Query" name:"RamRoleName"` - NtpServer []string `position:"Query" name:"NtpServer" type:"Repeated"` - TerminationGracePeriodSeconds requests.Integer `position:"Query" name:"TerminationGracePeriodSeconds"` - AutoMatchImageCache requests.Boolean `position:"Query" name:"AutoMatchImageCache"` - VkClientVersion string `position:"Query" name:"VkClientVersion"` - Ipv6AddressCount requests.Integer `position:"Query" name:"Ipv6AddressCount"` - ActiveDeadlineSeconds requests.Integer `position:"Query" name:"ActiveDeadlineSeconds"` - SpotStrategy string `position:"Query" name:"SpotStrategy"` - SpotPriceLimit requests.Float `position:"Query" name:"SpotPriceLimit"` - VSwitchStrategy string `position:"Query" name:"VSwitchStrategy"` - DnsConfig CreateContainerGroupDnsConfig `position:"Query" name:"DnsConfig" type:"Struct"` - SecurityContext CreateContainerGroupSecurityContext `position:"Query" name:"SecurityContext" type:"Struct"` -} - -type CreateContainerGroupTag struct { - Key string `name:"Key"` - Value string `name:"Value"` -} - -type CreateContainerGroupImageRegistryCredential struct { - Server string `name:"Server"` - UserName string `name:"UserName"` - Password string `name:"Password"` -} - -type CreateContainerGroupContainer struct { - Image string `name:"Image"` - Name string `name:"Name"` - Cpu requests.Float `name:"Cpu"` - Memory requests.Float `name:"Memory"` - WorkingDir string `name:"WorkingDir"` - ImagePullPolicy string `name:"ImagePullPolicy"` - Command []string `name:"Command" type:"Repeated"` - Arg []string `name:"Arg" type:"Repeated"` - VolumeMount *[]CreateContainerGroupVolumeMount `name:"VolumeMount" type:"Repeated"` - Port *[]CreateContainerGroupPort `name:"Port" type:"Repeated"` - EnvironmentVar *[]CreateContainerGroupEnvironmentVar `name:"EnvironmentVar" type:"Repeated"` - Stdin requests.Boolean `name:"Stdin"` - StdinOnce requests.Boolean `name:"StdinOnce"` - Tty requests.Boolean `name:"Tty"` - Gpu requests.Integer `name:"Gpu"` - LifecyclePostStartHandlerHttpGetHost string `name:"LifecyclePostStartHandlerHttpGetHost"` - LifecyclePostStartHandlerHttpGetPort requests.Integer `name:"LifecyclePostStartHandlerHttpGetPort"` - LifecyclePostStartHandlerHttpGetPath string `name:"LifecyclePostStartHandlerHttpGetPath"` - LifecyclePostStartHandlerHttpGetScheme string `name:"LifecyclePostStartHandlerHttpGetScheme"` - LifecyclePostStartHandlerHttpGetHttpHeader *[]CreateContainerGroupLifecyclePostStartHandlerHttpGetHttpHeader `name:"LifecyclePostStartHandlerHttpGetHttpHeader" type:"Repeated"` - LifecyclePostStartHandlerExec []string `name:"LifecyclePostStartHandlerExec" type:"Repeated"` - LifecyclePostStartHandlerTcpSocketHost string `name:"LifecyclePostStartHandlerTcpSocketHost"` - LifecyclePostStartHandlerTcpSocketPort requests.Integer `name:"LifecyclePostStartHandlerTcpSocketPort"` - LifecyclePreStopHandlerHttpGetHost string `name:"LifecyclePreStopHandlerHttpGetHost"` - LifecyclePreStopHandlerHttpGetPort requests.Integer `name:"LifecyclePreStopHandlerHttpGetPort"` - LifecyclePreStopHandlerHttpGetPath string `name:"LifecyclePreStopHandlerHttpGetPath"` - LifecyclePreStopHandlerHttpGetScheme string `name:"LifecyclePreStopHandlerHttpGetScheme"` - LifecyclePreStopHandlerHttpGetHttpHeader *[]CreateContainerGroupLifecyclePreStopHandlerHttpGetHttpHeader `name:"LifecyclePreStopHandlerHttpGetHttpHeader" type:"Repeated"` - LifecyclePreStopHandlerExec []string `name:"LifecyclePreStopHandlerExec" type:"Repeated"` - LifecyclePreStopHandlerTcpSocketHost string `name:"LifecyclePreStopHandlerTcpSocketHost"` - LifecyclePreStopHandlerTcpSocketPort requests.Integer `name:"LifecyclePreStopHandlerTcpSocketPort"` - ReadinessProbe CreateContainerGroupReadinessProbe `name:"ReadinessProbe" type:"Struct"` - LivenessProbe CreateContainerGroupLivenessProbe `name:"LivenessProbe" type:"Struct"` - SecurityContext CreateContainerGroupSecurityContext `name:"SecurityContext" type:"Struct"` -} - -type CreateContainerGroupVolume struct { - Name string `name:"Name"` - Type string `name:"Type"` - NFSVolume CreateContainerGroupNFSVolume `name:"NFSVolume" type:"Struct"` - ConfigFileVolume CreateContainerGroupConfigFileVolume `name:"ConfigFileVolume" type:"Struct"` - EmptyDirVolume CreateContainerGroupEmptyDirVolume `name:"EmptyDirVolume" type:"Struct"` - DiskVolume CreateContainerGroupDiskVolume `name:"DiskVolume" type:"Struct"` - FlexVolume CreateContainerGroupFlexVolume `name:"FlexVolume" type:"Struct"` - HostPathVolume CreateContainerGroupHostPathVolume `name:"HostPathVolume" type:"Struct"` -} - -type CreateContainerGroupInitContainer struct { - Name string `name:"Name"` - Image string `name:"Image"` - Cpu requests.Float `name:"Cpu"` - Memory requests.Float `name:"Memory"` - WorkingDir string `name:"WorkingDir"` - ImagePullPolicy string `name:"ImagePullPolicy"` - Command []string `name:"Command" type:"Repeated"` - Arg []string `name:"Arg" type:"Repeated"` - VolumeMount *[]CreateContainerGroupVolumeMount `name:"VolumeMount" type:"Repeated"` - Port *[]CreateContainerGroupPort `name:"Port" type:"Repeated"` - EnvironmentVar *[]CreateContainerGroupEnvironmentVar `name:"EnvironmentVar" type:"Repeated"` - Gpu requests.Integer `name:"Gpu"` - SecurityContext CreateContainerGroupSecurityContext `name:"SecurityContext" type:"Struct"` -} - -type CreateContainerGroupHostAliase struct { - Ip string `name:"Ip"` - Hostname []string `name:"Hostname" type:"Repeated"` -} - -type CreateContainerGroupArn struct { - RoleArn string `name:"RoleArn"` - RoleType string `name:"RoleType"` - AssumeRoleFor string `name:"AssumeRoleFor"` -} - -type CreateContainerGroupDnsConfig struct { - NameServer []string `name:"NameServer"` - Search []string `name:"Search"` - Option *[]CreateContainerGroupOption `name:"Option"` -} - -type CreateContainerGroupSecurityContext struct { - Sysctl *[]CreateContainerGroupSysctl `name:"Sysctl"` -} - -type CreateContainerGroupVolumeMount struct { - MountPath string `name:"MountPath"` - ReadOnly requests.Boolean `name:"ReadOnly"` - Name string `name:"Name"` - SubPath string `name:"SubPath"` -} - -type CreateContainerGroupPort struct { - Protocol string `name:"Protocol"` - Port requests.Integer `name:"Port"` -} - -type CreateContainerGroupEnvironmentVar struct { - Key string `name:"Key"` - Value string `name:"Value"` - FieldRef CreateContainerGroupFieldRef `name:"FieldRef" type:"Struct"` -} - -type CreateContainerGroupFieldRef struct { - FieldPath string `name:"FieldPath"` -} - -type CreateContainerGroupLifecyclePostStartHandlerHttpGetHttpHeader struct { - Name string `name:"Name"` - Value string `name:"Value"` -} - -type CreateContainerGroupLifecyclePreStopHandlerHttpGetHttpHeader struct { - Name string `name:"Name"` - Value string `name:"Value"` -} - -type CreateContainerGroupReadinessProbe struct { - InitialDelaySeconds requests.Integer `name:"InitialDelaySeconds"` - PeriodSeconds requests.Integer `name:"PeriodSeconds"` - SuccessThreshold requests.Integer `name:"SuccessThreshold"` - FailureThreshold requests.Integer `name:"FailureThreshold"` - TimeoutSeconds requests.Integer `name:"TimeoutSeconds"` - HttpGet CreateContainerGroupHttpGet `name:"HttpGet"` - Exec CreateContainerGroupExec `name:"Exec"` - TcpSocket CreateContainerGroupTcpSocket `name:"TcpSocket"` -} - -type CreateContainerGroupHttpGet struct { - Path string `name:"Path"` - Port requests.Integer `name:"Port"` - Scheme string `name:"Scheme"` -} - -type CreateContainerGroupExec struct { - Command []string `name:"Command"` -} - -type CreateContainerGroupTcpSocket struct { - Port requests.Integer `name:"Port"` -} - -type CreateContainerGroupLivenessProbe struct { - InitialDelaySeconds requests.Integer `name:"InitialDelaySeconds"` - PeriodSeconds requests.Integer `name:"PeriodSeconds"` - SuccessThreshold requests.Integer `name:"SuccessThreshold"` - FailureThreshold requests.Integer `name:"FailureThreshold"` - TimeoutSeconds requests.Integer `name:"TimeoutSeconds"` - HttpGet CreateContainerGroupHttpGet `name:"HttpGet"` - Exec CreateContainerGroupExec `name:"Exec"` - TcpSocket CreateContainerGroupTcpSocket `name:"TcpSocket"` -} - -type CreateContainerGroupNFSVolume struct { - Server string `name:"Server"` - Path string `name:"Path"` - ReadOnly requests.Boolean `name:"ReadOnly"` -} - -type CreateContainerGroupConfigFileVolume struct { - ConfigFileToPath *[]CreateContainerGroupConfigFileToPath `name:"ConfigFileToPath"` - DefaultModel requests.Integer `name:"DefaultModel"` -} - -type CreateContainerGroupConfigFileToPath struct { - Content string `name:"Content"` - Path string `name:"Path"` - Mode requests.Integer `name:"Mode"` -} - -type CreateContainerGroupEmptyDirVolume struct { - Medium string `name:"Medium"` -} - -type CreateContainerGroupDiskVolume struct { - DiskId string `name:"DiskId"` - FsType string `name:"FsType"` - DiskSize requests.Integer `name:"DiskSize"` -} - -type CreateContainerGroupFlexVolume struct { - Driver string `name:"Driver"` - FsType string `name:"FsType"` - Options string `name:"Options"` -} - -type CreateContainerGroupHostPathVolume struct { - Type string `name:"Type"` - Path string `name:"Path"` -} - -type CreateContainerGroupOption struct { - Name string `name:"Name"` - Value string `name:"Value"` -} - -type CreateContainerGroupSysctl struct { - Name string `name:"Name"` - Value string `name:"Value"` -} - -// CreateContainerGroupResponse is the response struct for api CreateContainerGroup -type CreateContainerGroupResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - ContainerGroupId string `json:"ContainerGroupId" xml:"ContainerGroupId"` -} - -// CreateCreateContainerGroupRequest creates a request to invoke CreateContainerGroup API -func CreateCreateContainerGroupRequest() (request *CreateContainerGroupRequest) { - request = &CreateContainerGroupRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Eci", "2018-08-08", "CreateContainerGroup", "eci", "openAPI") - return -} - -// CreateCreateContainerGroupResponse creates a response to parse from CreateContainerGroup response -func CreateCreateContainerGroupResponse() (response *CreateContainerGroupResponse) { - response = &CreateContainerGroupResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/adaptor/pcm_pod/server/ali/delete_container_group.go b/adaptor/pcm_pod/server/ali/delete_container_group.go deleted file mode 100644 index f4254012b..000000000 --- a/adaptor/pcm_pod/server/ali/delete_container_group.go +++ /dev/null @@ -1,128 +0,0 @@ -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at -// -//http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. -// -// Code generated by Alibaba Cloud SDK Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package ali - -import ( - pbpod "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server" - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - "errors" - "flag" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" - "github.com/golang/glog" -) - -// DeleteContainerGroup invokes the eci.DeleteContainerGroup API synchronously -// api document: https://help.aliyun.com/api/eci/deletecontainergroup.html -func DeleteContainerGroup(request *DeleteContainerGroupRequest) (response *DeleteContainerGroupResponse, err error) { - - provider := pbpod.CloudProvider(request.ProviderId) - var configFile string - flag.StringVar(&configFile, "confAli", "configs/tenanter.yaml", "tenanter.yaml") - flag.Parse() - defer glog.Flush() - - if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { - if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { - glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) - } - glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) - } - - glog.Infof("load tenant from file finished") - var regionId int32 - var pcmId string - pcmId = request.PcmId - //podId := request.ContainerGroupId - //podName := request.ContainerGroupName - switch request.ProviderId { - case 0: - regionId, _ = tenanter.GetAliRegionId(request.RegionId) - case 1: - regionId, _ = tenanter.GetTencentRegionId(request.RegionId) - case 2: - regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId) - case 3: - regionId, _ = tenanter.GetK8SRegionId(request.RegionId) - } - - requestPCM := &pbpod.DeletePodReq{ - RequestSource: "ali", - Provider: pbpod.CloudProvider(provider), - AccountName: request.AccountName, - PcmId: pcmId, - Namespace: request.Namespace, - RegionId: regionId, - } - - resp, err := server.DeletePod(nil, requestPCM) - - if err != nil { - return nil, err - } - response = &DeleteContainerGroupResponse{ - BaseResponse: nil, - RequestId: resp.RequestId, - } - - return response, err - -} - -// DeleteContainerGroupRequest is the request struct for api DeleteContainerGroup -type DeleteContainerGroupRequest struct { - *requests.RpcRequest - /*********PCM param************/ - RequestSource string `position:"Query" name:"RequestSource"` - ProviderId int32 `position:"Query" name:"ProviderId"` - AccountName string `position:"Query" name:"AccountName"` - Namespace string `position:"Query" name:"Namespace"` - PcmId string `position:"Query" name:"PcmId"` - ContainerGroupName string `position:"Query" name:"ContainerGroupName"` - /*********PCM param************/ - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - RegionId string `position:"Query" name:"RegionId"` - ContainerGroupId string `position:"Query" name:"ContainerGroupId"` - ClientToken string `position:"Query" name:"ClientToken"` - VkClientVersion string `position:"Query" name:"VkClientVersion"` -} - -// DeleteContainerGroupResponse is the response struct for api DeleteContainerGroup -type DeleteContainerGroupResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` -} - -// CreateDeleteContainerGroupRequest creates a request to invoke DeleteContainerGroup API -func CreateDeleteContainerGroupRequest() (request *DeleteContainerGroupRequest) { - request = &DeleteContainerGroupRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Eci", "2018-08-08", "DeleteContainerGroup", "eci", "openAPI") - return -} - -// CreateDeleteContainerGroupResponse creates a response to parse from DeleteContainerGroup response -func CreateDeleteContainerGroupResponse() (response *DeleteContainerGroupResponse) { - response = &DeleteContainerGroupResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/adaptor/pcm_pod/server/ali/describe_container_groups.go b/adaptor/pcm_pod/server/ali/describe_container_groups.go deleted file mode 100644 index ea3eefd47..000000000 --- a/adaptor/pcm_pod/server/ali/describe_container_groups.go +++ /dev/null @@ -1,313 +0,0 @@ -package ali - -import ( - pbpod "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" -) - -// DescribeContainerGroups invokes the eci.DescribeContainerGroups API synchronously -// api document: https://help.aliyun.com/api/eci/describecontainergroups.html -func DescribeContainerGroups(request *DescribeContainerGroupsRequest) (response *DescribeContainerGroupsResponse, err error) { - - provider := pbpod.CloudProvider(request.ProviderId) - containerGroups := make([]DescribeContainerGroupsContainerGroup0, 0) - //trans Ali request to PCM request - requestPCM := &pbpod.ListPodReq{ - RequestSource: "ali", - Provider: provider, - Namespace: "pcm", - } - - resp, err := server.ListPod(nil, requestPCM) - - //trans PCM response pcm_pod set to Ali ContainerGroup set - for k := range resp.Pods { - podId := resp.Pods[k].PodId - podName := resp.Pods[k].PodName - - containerGroup := new(DescribeContainerGroupsContainerGroup0) - containerGroup.ContainerGroupName = podName - containerGroup.ContainerGroupId = podId - - containerGroups = append(containerGroups, *containerGroup) - - } - - response = &DescribeContainerGroupsResponse{ - BaseResponse: nil, - RequestId: "", - NextToken: "", - TotalCount: 0, - ContainerGroups: containerGroups, - } - - return response, nil -} - -// DescribeContainerGroupsRequest is the request struct for api DescribeContainerGroups -type DescribeContainerGroupsRequest struct { - *requests.RpcRequest - /*********PCM param************/ - RequestSource string `position:"Query" name:"RequestSource"` - ProviderId int32 `position:"Query" name:"ProviderId"` - AccountName string `position:"Query" name:"AccountName"` - Namespace string `position:"Query" name:"Namespace"` - /*********PCM param************/ - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - RegionId string `position:"Query" name:"RegionId"` - ZoneId string `position:"Query" name:"ZoneId"` - VSwitchId string `position:"Query" name:"VSwitchId"` - NextToken string `position:"Query" name:"NextToken"` - Limit requests.Integer `position:"Query" name:"Limit"` - Tag *[]DescribeContainerGroupsTag `position:"Query" name:"Tag" type:"Repeated"` - ContainerGroupIds string `position:"Query" name:"ContainerGroupIds"` - ContainerGroupName string `position:"Query" name:"ContainerGroupName"` - Status string `position:"Query" name:"Status"` - VkClientVersion string `position:"Query" name:"VkClientVersion"` - ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - WithEvent requests.Boolean `position:"Query" name:"WithEvent"` -} - -type DescribeContainerGroupsTag struct { - Key string `name:"Key"` - Value string `name:"Value"` -} - -// DescribeContainerGroupsResponse is the response struct for api DescribeContainerGroups -type DescribeContainerGroupsResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - NextToken string `json:"NextToken" xml:"NextToken"` - TotalCount int `json:"TotalCount" xml:"TotalCount"` - ContainerGroups []DescribeContainerGroupsContainerGroup0 `json:"ContainerGroups" xml:"ContainerGroups"` -} - -type DescribeContainerGroupsContainerGroup0 struct { - ContainerGroupId string `json:"ContainerGroupId" xml:"ContainerGroupId"` - ContainerGroupName string `json:"ContainerGroupName" xml:"ContainerGroupName"` - RegionId string `json:"RegionId" xml:"RegionId"` - ZoneId string `json:"ZoneId" xml:"ZoneId"` - Memory float32 `json:"Memory" xml:"Memory"` - Cpu float32 `json:"Cpu" xml:"Cpu"` - VSwitchId string `json:"VSwitchId" xml:"VSwitchId"` - SecurityGroupId string `json:"SecurityGroupId" xml:"SecurityGroupId"` - RestartPolicy string `json:"RestartPolicy" xml:"RestartPolicy"` - IntranetIp string `json:"IntranetIp" xml:"IntranetIp"` - Status string `json:"Status" xml:"Status"` - InternetIp string `json:"InternetIp" xml:"InternetIp"` - CreationTime string `json:"CreationTime" xml:"CreationTime"` - SucceededTime string `json:"SucceededTime" xml:"SucceededTime"` - EniInstanceId string `json:"EniInstanceId" xml:"EniInstanceId"` - InstanceType string `json:"InstanceType" xml:"InstanceType"` - ExpiredTime string `json:"ExpiredTime" xml:"ExpiredTime"` - FailedTime string `json:"FailedTime" xml:"FailedTime"` - RamRoleName string `json:"RamRoleName" xml:"RamRoleName"` - Ipv6Address string `json:"Ipv6Address" xml:"Ipv6Address"` - VpcId string `json:"VpcId" xml:"VpcId"` - Discount int `json:"Discount" xml:"Discount"` - ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` - Tags []DescribeContainerGroupsLabel1 `json:"Tags" xml:"Tags"` - Events []DescribeContainerGroupsEvent1 `json:"Events" xml:"Events"` - Containers []DescribeContainerGroupsContainer1 `json:"Containers" xml:"Containers"` - Volumes []DescribeContainerGroupsVolume1 `json:"Volumes" xml:"Volumes"` - InitContainers []DescribeContainerGroupsContainer1 `json:"InitContainers" xml:"InitContainers"` - HostAliases []DescribeContainerGroupsHostAliase1 `json:"HostAliases" xml:"HostAliases"` - DnsConfig DescribeContainerGroupsDnsConfig1 `json:"DnsConfig" xml:"DnsConfig"` - EciSecurityContext DescribeContainerGroupsEciSecurityContext1 `json:"EciSecurityContext" xml:"EciSecurityContext"` -} - -type DescribeContainerGroupsLabel1 struct { - Key string `json:"Key" xml:"Key"` - Value string `json:"Value" xml:"Value"` -} - -type DescribeContainerGroupsEvent1 struct { - Count int `json:"Count" xml:"Count"` - Type string `json:"Type" xml:"Type"` - Name string `json:"Name" xml:"Name"` - Message string `json:"Message" xml:"Message"` - FirstTimestamp string `json:"FirstTimestamp" xml:"FirstTimestamp"` - LastTimestamp string `json:"LastTimestamp" xml:"LastTimestamp"` - Reason string `json:"Reason" xml:"Reason"` -} - -type DescribeContainerGroupsContainer1 struct { - Name string `json:"Name" xml:"Name"` - Image string `json:"Image" xml:"Image"` - Memory float32 `json:"Memory" xml:"Memory"` - Cpu float32 `json:"Cpu" xml:"Cpu"` - RestartCount int `json:"RestartCount" xml:"RestartCount"` - WorkingDir string `json:"WorkingDir" xml:"WorkingDir"` - ImagePullPolicy string `json:"ImagePullPolicy" xml:"ImagePullPolicy"` - Ready bool `json:"Ready" xml:"Ready"` - Gpu int `json:"Gpu" xml:"Gpu"` - Stdin bool `json:"Stdin" xml:"Stdin"` - StdinOnce bool `json:"StdinOnce" xml:"StdinOnce"` - Tty bool `json:"Tty" xml:"Tty"` - VolumeMounts []DescribeContainerGroupsVolumeMount2 `json:"VolumeMounts" xml:"VolumeMounts"` - Ports []DescribeContainerGroupsPort2 `json:"Ports" xml:"Ports"` - EnvironmentVars []DescribeContainerGroupsEnvironmentVar2 `json:"EnvironmentVars" xml:"EnvironmentVars"` - Commands []string `json:"Commands" xml:"Commands"` - Args []string `json:"Args" xml:"Args"` - PreviousState DescribeContainerGroupsPreviousState2 `json:"PreviousState" xml:"PreviousState"` - CurrentState DescribeContainerGroupsCurrentState2 `json:"CurrentState" xml:"CurrentState"` - ReadinessProbe DescribeContainerGroupsReadinessProbe2 `json:"ReadinessProbe" xml:"ReadinessProbe"` - LivenessProbe DescribeContainerGroupsLivenessProbe2 `json:"LivenessProbe" xml:"LivenessProbe"` - SecurityContext DescribeContainerGroupsSecurityContext2 `json:"SecurityContext" xml:"SecurityContext"` -} - -type DescribeContainerGroupsVolumeMount2 struct { - Name string `json:"Name" xml:"Name"` - MountPath string `json:"MountPath" xml:"MountPath"` - ReadOnly bool `json:"ReadOnly" xml:"ReadOnly"` -} - -type DescribeContainerGroupsPort2 struct { - Port int `json:"Port" xml:"Port"` - Protocol string `json:"Protocol" xml:"Protocol"` -} - -type DescribeContainerGroupsEnvironmentVar2 struct { - Key string `json:"Key" xml:"Key"` - Value string `json:"Value" xml:"Value"` - ValueFrom DescribeContainerGroupsValueFrom3 `json:"ValueFrom" xml:"ValueFrom"` -} - -type DescribeContainerGroupsValueFrom3 struct { - FieldRef DescribeContainerGroupsFieldRef4 `json:"FieldRef" xml:"FieldRef"` -} - -type DescribeContainerGroupsFieldRef4 struct { - FieldPath string `json:"FieldPath" xml:"FieldPath"` -} - -type DescribeContainerGroupsPreviousState2 struct { - State string `json:"State" xml:"State"` - DetailStatus string `json:"DetailStatus" xml:"DetailStatus"` - ExitCode int `json:"ExitCode" xml:"ExitCode"` - StartTime string `json:"StartTime" xml:"StartTime"` - FinishTime string `json:"FinishTime" xml:"FinishTime"` - Reason string `json:"Reason" xml:"Reason"` - Message string `json:"Message" xml:"Message"` - Signal int `json:"Signal" xml:"Signal"` -} - -type DescribeContainerGroupsCurrentState2 struct { - State string `json:"State" xml:"State"` - DetailStatus string `json:"DetailStatus" xml:"DetailStatus"` - ExitCode int `json:"ExitCode" xml:"ExitCode"` - StartTime string `json:"StartTime" xml:"StartTime"` - FinishTime string `json:"FinishTime" xml:"FinishTime"` - Reason string `json:"Reason" xml:"Reason"` - Message string `json:"Message" xml:"Message"` - Signal int `json:"Signal" xml:"Signal"` -} - -type DescribeContainerGroupsReadinessProbe2 struct { - InitialDelaySeconds int `json:"InitialDelaySeconds" xml:"InitialDelaySeconds"` - PeriodSeconds int `json:"PeriodSeconds" xml:"PeriodSeconds"` - TimeoutSeconds int `json:"TimeoutSeconds" xml:"TimeoutSeconds"` - SuccessThreshold int `json:"SuccessThreshold" xml:"SuccessThreshold"` - FailureThreshold int `json:"FailureThreshold" xml:"FailureThreshold"` - Execs []string `json:"Execs" xml:"Execs"` - HttpGet DescribeContainerGroupsHttpGet3 `json:"HttpGet" xml:"HttpGet"` - TcpSocket DescribeContainerGroupsTcpSocket3 `json:"TcpSocket" xml:"TcpSocket"` -} - -type DescribeContainerGroupsHttpGet3 struct { - Path string `json:"Path" xml:"Path"` - Port int `json:"Port" xml:"Port"` - Scheme string `json:"Scheme" xml:"Scheme"` -} - -type DescribeContainerGroupsTcpSocket3 struct { - Host string `json:"Host" xml:"Host"` - Port int `json:"Port" xml:"Port"` -} - -type DescribeContainerGroupsLivenessProbe2 struct { - InitialDelaySeconds int `json:"InitialDelaySeconds" xml:"InitialDelaySeconds"` - PeriodSeconds int `json:"PeriodSeconds" xml:"PeriodSeconds"` - TimeoutSeconds int `json:"TimeoutSeconds" xml:"TimeoutSeconds"` - SuccessThreshold int `json:"SuccessThreshold" xml:"SuccessThreshold"` - FailureThreshold int `json:"FailureThreshold" xml:"FailureThreshold"` - Execs []string `json:"Execs" xml:"Execs"` - HttpGet DescribeContainerGroupsHttpGet3 `json:"HttpGet" xml:"HttpGet"` - TcpSocket DescribeContainerGroupsTcpSocket3 `json:"TcpSocket" xml:"TcpSocket"` -} - -type DescribeContainerGroupsSecurityContext2 struct { - ReadOnlyRootFilesystem bool `json:"ReadOnlyRootFilesystem" xml:"ReadOnlyRootFilesystem"` - RunAsUser int64 `json:"RunAsUser" xml:"RunAsUser"` - Capability DescribeContainerGroupsCapability3 `json:"Capability" xml:"Capability"` -} - -type DescribeContainerGroupsCapability3 struct { - Adds []string `json:"Adds" xml:"Adds"` -} - -type DescribeContainerGroupsVolume1 struct { - Type string `json:"Type" xml:"Type"` - Name string `json:"Name" xml:"Name"` - NFSVolumePath string `json:"NFSVolumePath" xml:"NFSVolumePath"` - NFSVolumeServer string `json:"NFSVolumeServer" xml:"NFSVolumeServer"` - NFSVolumeReadOnly bool `json:"NFSVolumeReadOnly" xml:"NFSVolumeReadOnly"` - DiskVolumeDiskId string `json:"DiskVolumeDiskId" xml:"DiskVolumeDiskId"` - DiskVolumeFsType string `json:"DiskVolumeFsType" xml:"DiskVolumeFsType"` - FlexVolumeDriver string `json:"FlexVolumeDriver" xml:"FlexVolumeDriver"` - FlexVolumeFsType string `json:"FlexVolumeFsType" xml:"FlexVolumeFsType"` - FlexVolumeOptions string `json:"FlexVolumeOptions" xml:"FlexVolumeOptions"` - ConfigFileVolumeConfigFileToPaths []DescribeContainerGroupsConfigFileVolumeConfigFileToPath2 `json:"ConfigFileVolumeConfigFileToPaths" xml:"ConfigFileVolumeConfigFileToPaths"` -} - -type DescribeContainerGroupsConfigFileVolumeConfigFileToPath2 struct { - Content string `json:"Content" xml:"Content"` - Path string `json:"Path" xml:"Path"` -} - -type DescribeContainerGroupsHostAliase1 struct { - Ip string `json:"Ip" xml:"Ip"` - Hostnames []string `json:"Hostnames" xml:"Hostnames"` -} - -type DescribeContainerGroupsDnsConfig1 struct { - Options []DescribeContainerGroupsOption2 `json:"Options" xml:"Options"` - NameServers []string `json:"NameServers" xml:"NameServers"` - Searches []string `json:"Searches" xml:"Searches"` -} - -type DescribeContainerGroupsOption2 struct { - Name string `json:"Name" xml:"Name"` - Value string `json:"Value" xml:"Value"` -} - -type DescribeContainerGroupsEciSecurityContext1 struct { - Sysctls []DescribeContainerGroupsSysctl2 `json:"Sysctls" xml:"Sysctls"` -} - -type DescribeContainerGroupsSysctl2 struct { - Name string `json:"Name" xml:"Name"` - Value string `json:"Value" xml:"Value"` -} - -// CreateDescribeContainerGroupsRequest creates a request to invoke DescribeContainerGroups API -func CreateDescribeContainerGroupsRequest() (request *DescribeContainerGroupsRequest) { - request = &DescribeContainerGroupsRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Eci", "2018-08-08", "DescribeContainerGroups", "eci", "openAPI") - return -} - -// CreateDescribeContainerGroupsResponse creates a response to parse from DescribeContainerGroups response -func CreateDescribeContainerGroupsResponse() (response *DescribeContainerGroupsResponse) { - response = &DescribeContainerGroupsResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/adaptor/pcm_pod/server/ali/update_container_group.go b/adaptor/pcm_pod/server/ali/update_container_group.go deleted file mode 100644 index bcfb4b3bd..000000000 --- a/adaptor/pcm_pod/server/ali/update_container_group.go +++ /dev/null @@ -1,290 +0,0 @@ -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at -// -//http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. -// -// Code generated by Alibaba Cloud SDK Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package ali - -import ( - pbpod "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server" - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - "errors" - "flag" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" - "github.com/golang/glog" -) - -// UpdateContainerGroup invokes the eci.UpdateContainerGroup API synchronously -// api document: https://help.aliyun.com/api/eci/updatecontainergroup.html -func UpdateContainerGroup(request *UpdateContainerGroupRequest) (response *UpdateContainerGroupResponse, err error) { - - provider := pbpod.CloudProvider(request.ProviderId) - var configFile string - flag.StringVar(&configFile, "confAli", "configs/tenanter.yaml", "tenanter.yaml") - flag.Parse() - defer glog.Flush() - - if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { - if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { - glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) - } - glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) - } - - glog.Infof("load tenant from file finished") - var regionId int32 - switch request.ProviderId { - case 0: - regionId, _ = tenanter.GetAliRegionId(request.RegionId) - case 1: - regionId, _ = tenanter.GetTencentRegionId(request.RegionId) - case 2: - regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId) - case 3: - regionId, _ = tenanter.GetK8SRegionId(request.RegionId) - } - containers := *request.Container - - requestPCM := &pbpod.UpdatePodReq{ - RequestSource: "ali", - Provider: pbpod.CloudProvider(provider), - AccountName: request.AccountName, - PcmId: request.PcmId, - PodId: request.ContainerGroupId, - PodName: request.ContainerGroupName, - Namespace: request.Namespace, - RegionId: regionId, - ContainerImage: containers[0].Image, - ContainerName: containers[0].Name, - CpuPod: string(containers[0].Cpu), - MemoryPod: string(containers[0].Memory), - RestartPolicy: request.RestartPolicy, - Labels: "sss", - } - - resp, err := server.UpdatePod(nil, requestPCM) - - response = &UpdateContainerGroupResponse{ - BaseResponse: nil, - RequestId: resp.RequestId, - } - - return response, err -} - -// UpdateContainerGroupRequest is the request struct for api UpdateContainerGroup -type UpdateContainerGroupRequest struct { - *requests.RpcRequest - /*********PCM param************/ - RequestSource string `position:"Query" name:"RequestSource"` - ProviderId int32 `position:"Query" name:"ProviderId"` - AccountName string `position:"Query" name:"AccountName"` - Namespace string `position:"Query" name:"Namespace"` - PcmId string `position:"Query" name:"PcmId"` - PodName string `position:"Query" name:"PodName"` - ContainerGroupName string `position:"Query" name:"ContainerGroupName"` - /*********PCM param************/ - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - RegionId string `position:"Query" name:"RegionId"` - ContainerGroupId string `position:"Query" name:"ContainerGroupId"` - RestartPolicy string `position:"Query" name:"RestartPolicy"` - Tag *[]UpdateContainerGroupTag `position:"Query" name:"Tag" type:"Repeated"` - Volume *[]UpdateContainerGroupVolume `position:"Query" name:"Volume" type:"Repeated"` - Container *[]UpdateContainerGroupContainer `position:"Query" name:"Container" type:"Repeated"` - InitContainer *[]UpdateContainerGroupInitContainer `position:"Query" name:"InitContainer" type:"Repeated"` - ImageRegistryCredential *[]UpdateContainerGroupImageRegistryCredential `position:"Query" name:"ImageRegistryCredential" type:"Repeated"` - ClientToken string `position:"Query" name:"ClientToken"` - Cpu requests.Float `position:"Query" name:"Cpu"` - Memory requests.Float `position:"Query" name:"Memory"` - DnsConfig UpdateContainerGroupDnsConfig `position:"Query" name:"DnsConfig" type:"Struct"` -} - -type UpdateContainerGroupTag struct { - Key string `name:"Key"` - Value string `name:"Value"` -} - -type UpdateContainerGroupVolume struct { - Name string `name:"Name"` - Type string `name:"Type"` - NFSVolume UpdateContainerGroupNFSVolume `name:"NFSVolume" type:"Struct"` - ConfigFileVolume UpdateContainerGroupConfigFileVolume `name:"ConfigFileVolume" type:"Struct"` - EmptyDirVolume UpdateContainerGroupEmptyDirVolume `name:"EmptyDirVolume" type:"Struct"` -} - -type UpdateContainerGroupContainer struct { - Name string `name:"Name"` - Image string `name:"Image"` - Cpu requests.Float `name:"Cpu"` - Memory requests.Float `name:"Memory"` - WorkingDir string `name:"WorkingDir"` - ImagePullPolicy string `name:"ImagePullPolicy"` - Stdin requests.Boolean `name:"Stdin"` - StdinOnce requests.Boolean `name:"StdinOnce"` - Tty requests.Boolean `name:"Tty"` - Command []string `name:"Command" type:"Repeated"` - Arg []string `name:"Arg" type:"Repeated"` - EnvironmentVar []string `name:"EnvironmentVar" type:"Repeated"` - Port []string `name:"Port" type:"Repeated"` - VolumeMount []string `name:"VolumeMount" type:"Repeated"` - Gpu requests.Integer `name:"Gpu"` - ReadinessProbe UpdateContainerGroupReadinessProbe `name:"ReadinessProbe" type:"Struct"` - LivenessProbe UpdateContainerGroupLivenessProbe `name:"LivenessProbe" type:"Struct"` - SecurityContext UpdateContainerGroupSecurityContext `name:"SecurityContext" type:"Struct"` -} - -type UpdateContainerGroupInitContainer struct { - Name string `name:"Name"` - Image string `name:"Image"` - Cpu requests.Float `name:"Cpu"` - Memory requests.Float `name:"Memory"` - WorkingDir string `name:"WorkingDir"` - ImagePullPolicy string `name:"ImagePullPolicy"` - Stdin requests.Boolean `name:"Stdin"` - StdinOnce requests.Boolean `name:"StdinOnce"` - Tty requests.Boolean `name:"Tty"` - Command []string `name:"Command" type:"Repeated"` - Arg []string `name:"Arg" type:"Repeated"` - EnvironmentVar *[]UpdateContainerGroupEnvironmentVar `name:"EnvironmentVar" type:"Repeated"` - Port *[]UpdateContainerGroupPort `name:"Port" type:"Repeated"` - VolumeMount *[]UpdateContainerGroupVolumeMount `name:"VolumeMount" type:"Repeated"` - Gpu requests.Integer `name:"Gpu"` - SecurityContext UpdateContainerGroupSecurityContext `name:"SecurityContext" type:"Struct"` -} - -type UpdateContainerGroupImageRegistryCredential struct { - Server string `name:"Server"` - UserName string `name:"UserName"` - Password string `name:"Password"` -} - -type UpdateContainerGroupDnsConfig struct { - NameServer []string `name:"NameServer"` - Search []string `name:"Search"` - Option *[]UpdateContainerGroupOption `name:"Option"` -} - -type UpdateContainerGroupNFSVolume struct { - Server string `name:"Server"` - Path string `name:"Path"` - ReadOnly requests.Boolean `name:"ReadOnly"` -} - -type UpdateContainerGroupConfigFileVolume struct { - ConfigFileToPath *[]UpdateContainerGroupConfigFileToPath `name:"ConfigFileToPath"` -} - -type UpdateContainerGroupConfigFileToPath struct { - Content string `name:"Content"` - Path string `name:"Path"` -} - -type UpdateContainerGroupEmptyDirVolume struct { - Medium string `name:"Medium"` -} - -type UpdateContainerGroupReadinessProbe struct { - InitialDelaySeconds requests.Integer `name:"InitialDelaySeconds"` - PeriodSeconds requests.Integer `name:"PeriodSeconds"` - SuccessThreshold requests.Integer `name:"SuccessThreshold"` - FailureThreshold requests.Integer `name:"FailureThreshold"` - TimeoutSeconds requests.Integer `name:"TimeoutSeconds"` - TcpSocket UpdateContainerGroupTcpSocket `name:"TcpSocket"` - Exec UpdateContainerGroupExec `name:"Exec"` - HttpGet UpdateContainerGroupHttpGet `name:"HttpGet"` -} - -type UpdateContainerGroupTcpSocket struct { - Port requests.Integer `name:"Port"` -} - -type UpdateContainerGroupExec struct { - Command []string `name:"Command"` -} - -type UpdateContainerGroupHttpGet struct { - Path string `name:"Path"` - Port requests.Integer `name:"Port"` - Scheme string `name:"Scheme"` -} - -type UpdateContainerGroupLivenessProbe struct { - InitialDelaySeconds requests.Integer `name:"InitialDelaySeconds"` - PeriodSeconds requests.Integer `name:"PeriodSeconds"` - SuccessThreshold requests.Integer `name:"SuccessThreshold"` - FailureThreshold requests.Integer `name:"FailureThreshold"` - TimeoutSeconds requests.Integer `name:"TimeoutSeconds"` - TcpSocket UpdateContainerGroupTcpSocket `name:"TcpSocket"` - Exec UpdateContainerGroupExec `name:"Exec"` - HttpGet UpdateContainerGroupHttpGet `name:"HttpGet"` -} - -type UpdateContainerGroupSecurityContext struct { - ReadOnlyRootFilesystem requests.Boolean `name:"ReadOnlyRootFilesystem"` - RunAsUser requests.Integer `name:"RunAsUser"` - Capability UpdateContainerGroupCapability `name:"Capability"` -} - -type UpdateContainerGroupCapability struct { - Add []string `name:"Add"` -} - -type UpdateContainerGroupEnvironmentVar struct { - Key string `name:"Key"` - Value string `name:"Value"` -} - -type UpdateContainerGroupPort struct { - Port requests.Integer `name:"Port"` - Protocol string `name:"Protocol"` -} - -type UpdateContainerGroupVolumeMount struct { - Name string `name:"Name"` - MountPath string `name:"MountPath"` - SubPath string `name:"SubPath"` - ReadOnly requests.Boolean `name:"ReadOnly"` -} - -type UpdateContainerGroupOption struct { - Name string `name:"Name"` - Value string `name:"Value"` -} - -// UpdateContainerGroupResponse is the response struct for api UpdateContainerGroup -type UpdateContainerGroupResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` -} - -// CreateUpdateContainerGroupRequest creates a request to invoke UpdateContainerGroup API -func CreateUpdateContainerGroupRequest() (request *UpdateContainerGroupRequest) { - request = &UpdateContainerGroupRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Eci", "2018-08-08", "UpdateContainerGroup", "eci", "openAPI") - return -} - -// CreateUpdateContainerGroupResponse creates a response to parse from UpdateContainerGroup response -func CreateUpdateContainerGroupResponse() (response *UpdateContainerGroupResponse) { - response = &UpdateContainerGroupResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/adaptor/pcm_pod/server/kubernetes/api/core/v1/objectreference.go b/adaptor/pcm_pod/server/kubernetes/api/core/v1/objectreference.go deleted file mode 100644 index ee5335ee8..000000000 --- a/adaptor/pcm_pod/server/kubernetes/api/core/v1/objectreference.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// IsAnAPIObject allows clients to preemptively get a reference to an API object and pass it to places that -// intend only to get a reference to that object. This simplifies the event recording interface. -func (obj *ObjectReference) SetGroupVersionKind(gvk schema.GroupVersionKind) { - obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() -} - -func (obj *ObjectReference) GroupVersionKind() schema.GroupVersionKind { - return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) -} - -func (obj *ObjectReference) GetObjectKind() schema.ObjectKind { return obj } diff --git a/adaptor/pcm_pod/server/kubernetes/api/core/v1/register.go b/adaptor/pcm_pod/server/kubernetes/api/core/v1/register.go deleted file mode 100644 index 8da1ddead..000000000 --- a/adaptor/pcm_pod/server/kubernetes/api/core/v1/register.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// GroupName is the group name use in this package -const GroupName = "" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &Pod{}, - &PodList{}, - &PodStatusResult{}, - &PodTemplate{}, - &PodTemplateList{}, - &ReplicationController{}, - &ReplicationControllerList{}, - &Service{}, - &ServiceProxyOptions{}, - &ServiceList{}, - &Endpoints{}, - &EndpointsList{}, - &Node{}, - &NodeList{}, - &NodeProxyOptions{}, - &Binding{}, - &Event{}, - &EventList{}, - &List{}, - &LimitRange{}, - &LimitRangeList{}, - &ResourceQuota{}, - &ResourceQuotaList{}, - &Namespace{}, - &NamespaceList{}, - &Secret{}, - &SecretList{}, - &ServiceAccount{}, - &ServiceAccountList{}, - &PersistentVolume{}, - &PersistentVolumeList{}, - &PersistentVolumeClaim{}, - &PersistentVolumeClaimList{}, - &PodAttachOptions{}, - &PodLogOptions{}, - &PodExecOptions{}, - &PodPortForwardOptions{}, - &PodProxyOptions{}, - &ComponentStatus{}, - &ComponentStatusList{}, - &SerializedReference{}, - &RangeAllocation{}, - &ConfigMap{}, - &ConfigMapList{}, - &EphemeralContainers{}, - ) - - // Add common types - scheme.AddKnownTypes(SchemeGroupVersion, &metav1.Status{}) - - // Add the watch version that applies - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/adaptor/pcm_pod/server/kubernetes/api/core/v1/resource.go b/adaptor/pcm_pod/server/kubernetes/api/core/v1/resource.go deleted file mode 100644 index 4e249d03a..000000000 --- a/adaptor/pcm_pod/server/kubernetes/api/core/v1/resource.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "k8s.io/apimachinery/pkg/api/resource" -) - -// Returns string version of ResourceName. -func (rn ResourceName) String() string { - return string(rn) -} - -// Cpu returns the Cpu limit if specified. -func (rl *ResourceList) Cpu() *resource.Quantity { - return rl.Name(ResourceCPU, resource.DecimalSI) -} - -// Memory returns the Memory limit if specified. -func (rl *ResourceList) Memory() *resource.Quantity { - return rl.Name(ResourceMemory, resource.BinarySI) -} - -// Storage returns the Storage limit if specified. -func (rl *ResourceList) Storage() *resource.Quantity { - return rl.Name(ResourceStorage, resource.BinarySI) -} - -// Pods returns the list of pods -func (rl *ResourceList) Pods() *resource.Quantity { - return rl.Name(ResourcePods, resource.DecimalSI) -} - -// StorageEphemeral returns the list of ephemeral storage volumes, if any -func (rl *ResourceList) StorageEphemeral() *resource.Quantity { - return rl.Name(ResourceEphemeralStorage, resource.BinarySI) -} - -// Name returns the resource with name if specified, otherwise it returns a nil quantity with default format. -func (rl *ResourceList) Name(name ResourceName, defaultFormat resource.Format) *resource.Quantity { - if val, ok := (*rl)[name]; ok { - return &val - } - return &resource.Quantity{Format: defaultFormat} -} diff --git a/adaptor/pcm_pod/server/kubernetes/api/core/v1/types.go b/adaptor/pcm_pod/server/kubernetes/api/core/v1/types.go deleted file mode 100644 index 75b61b51c..000000000 --- a/adaptor/pcm_pod/server/kubernetes/api/core/v1/types.go +++ /dev/null @@ -1,6325 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" -) - -const ( - // NamespaceDefault means the object is in the default namespace which is applied when not specified by clients - NamespaceDefault string = "default" - // NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces - NamespaceAll string = "" - // NamespaceNodeLease is the namespace where we place node lease objects (used for node heartbeats) - NamespaceNodeLease string = "kube-node-lease" - // TopologyKeyAny is the service topology key that matches any node - TopologyKeyAny string = "*" -) - -// Volume represents a named volume in a pcm_pod that may be accessed by any container in the pcm_pod. -type Volume struct { - // Volume's name. - // Must be a DNS_LABEL and unique within the pcm_pod. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // VolumeSource represents the location and type of the mounted volume. - // If not specified, the Volume is implied to be an EmptyDir. - // This implied behavior is deprecated and will be removed in a future version. - VolumeSource `json:",inline" protobuf:"bytes,2,opt,name=volumeSource"` -} - -// Represents the source of a volume to mount. -// Only one of its members may be specified. -type VolumeSource struct { - // HostPath represents a pre-existing file or directory on the host - // machine that is directly exposed to the container. This is generally - // used for system agents or other privileged things that are allowed - // to see the host machine. Most containers will NOT need this. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - // --- - // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not - // mount host directories as read/write. - // +optional - HostPath *HostPathVolumeSource `json:"hostPath,omitempty" protobuf:"bytes,1,opt,name=hostPath"` - // EmptyDir represents a temporary directory that shares a pcm_pod's lifetime. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - // +optional - EmptyDir *EmptyDirVolumeSource `json:"emptyDir,omitempty" protobuf:"bytes,2,opt,name=emptyDir"` - // GCEPersistentDisk represents a GCE Disk resource that is attached to a - // kubelet's host machine and then exposed to the pcm_pod. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - // +optional - GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty" protobuf:"bytes,3,opt,name=gcePersistentDisk"` - // AWSElasticBlockStore represents an AWS Disk resource that is attached to a - // kubelet's host machine and then exposed to the pcm_pod. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - // +optional - AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,4,opt,name=awsElasticBlockStore"` - // GitRepo represents a git repository at a particular revision. - // DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an - // EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir - // into the Pod's container. - // +optional - GitRepo *GitRepoVolumeSource `json:"gitRepo,omitempty" protobuf:"bytes,5,opt,name=gitRepo"` - // Secret represents a secret that should populate this volume. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - // +optional - Secret *SecretVolumeSource `json:"secret,omitempty" protobuf:"bytes,6,opt,name=secret"` - // NFS represents an NFS mount on the host that shares a pcm_pod's lifetime - // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - // +optional - NFS *NFSVolumeSource `json:"nfs,omitempty" protobuf:"bytes,7,opt,name=nfs"` - // ISCSI represents an ISCSI Disk resource that is attached to a - // kubelet's host machine and then exposed to the pcm_pod. - // More info: https://examples.k8s.io/volumes/iscsi/README.md - // +optional - ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,8,opt,name=iscsi"` - // Glusterfs represents a Glusterfs mount on the host that shares a pcm_pod's lifetime. - // More info: https://examples.k8s.io/volumes/glusterfs/README.md - // +optional - Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,9,opt,name=glusterfs"` - // PersistentVolumeClaimVolumeSource represents a reference to a - // PersistentVolumeClaim in the same namespace. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - // +optional - PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty" protobuf:"bytes,10,opt,name=persistentVolumeClaim"` - // RBD represents a Rados Block Device mount on the host that shares a pcm_pod's lifetime. - // More info: https://examples.k8s.io/volumes/rbd/README.md - // +optional - RBD *RBDVolumeSource `json:"rbd,omitempty" protobuf:"bytes,11,opt,name=rbd"` - // FlexVolume represents a generic volume resource that is - // provisioned/attached using an exec based plugin. - // +optional - FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"` - // Cinder represents a cinder volume attached and mounted on kubelets host machine. - // More info: https://examples.k8s.io/mysql-cinder-pd/README.md - // +optional - Cinder *CinderVolumeSource `json:"cinder,omitempty" protobuf:"bytes,13,opt,name=cinder"` - // CephFS represents a Ceph FS mount on the host that shares a pcm_pod's lifetime - // +optional - CephFS *CephFSVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,14,opt,name=cephfs"` - // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running - // +optional - Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,15,opt,name=flocker"` - // DownwardAPI represents downward API about the pcm_pod that should populate this volume - // +optional - DownwardAPI *DownwardAPIVolumeSource `json:"downwardAPI,omitempty" protobuf:"bytes,16,opt,name=downwardAPI"` - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pcm_pod. - // +optional - FC *FCVolumeSource `json:"fc,omitempty" protobuf:"bytes,17,opt,name=fc"` - // AzureFile represents an Azure File Service mount on the host and bind mount to the pcm_pod. - // +optional - AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,18,opt,name=azureFile"` - // ConfigMap represents a configMap that should populate this volume - // +optional - ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty" protobuf:"bytes,19,opt,name=configMap"` - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - // +optional - VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,20,opt,name=vsphereVolume"` - // Quobyte represents a Quobyte mount on the host that shares a pcm_pod's lifetime - // +optional - Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,21,opt,name=quobyte"` - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pcm_pod. - // +optional - AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,22,opt,name=azureDisk"` - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,23,opt,name=photonPersistentDisk"` - // Items for all in one resources secrets, configmaps, and downward API - Projected *ProjectedVolumeSource `json:"projected,omitempty" protobuf:"bytes,26,opt,name=projected"` - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - // +optional - PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty" protobuf:"bytes,24,opt,name=portworxVolume"` - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - // +optional - ScaleIO *ScaleIOVolumeSource `json:"scaleIO,omitempty" protobuf:"bytes,25,opt,name=scaleIO"` - // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. - // +optional - StorageOS *StorageOSVolumeSource `json:"storageos,omitempty" protobuf:"bytes,27,opt,name=storageos"` - // CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). - // +optional - CSI *CSIVolumeSource `json:"csi,omitempty" protobuf:"bytes,28,opt,name=csi"` - // Ephemeral represents a volume that is handled by a cluster storage driver. - // The volume's lifecycle is tied to the pcm_pod that defines it - it will be created before the pcm_pod starts, - // and deleted when the pcm_pod is removed. - // - // Use this if: - // a) the volume is only needed while the pcm_pod runs, - // b) features of normal volumes like restoring from snapshot or capacity - // tracking are needed, - // c) the storage driver is specified through a storage class, and - // d) the storage driver supports dynamic volume provisioning through - // a PersistentVolumeClaim (see EphemeralVolumeSource for more - // information on the connection between this volume type - // and PersistentVolumeClaim). - // - // Use PersistentVolumeClaim or one of the vendor-specific - // APIs for volumes that persist for longer than the lifecycle - // of an individual pcm_pod. - // - // Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to - // be used that way - see the documentation of the driver for - // more information. - // - // A pcm_pod can use both types of ephemeral volumes and - // persistent volumes at the same time. - // - // This is a beta feature and only available when the GenericEphemeralVolume - // feature gate is enabled. - // - // +optional - Ephemeral *EphemeralVolumeSource `json:"ephemeral,omitempty" protobuf:"bytes,29,opt,name=ephemeral"` -} - -// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. -// This volume finds the bound PV and mounts that volume for the pcm_pod. A -// PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another -// type of volume that is owned by someone else (the system). -type PersistentVolumeClaimVolumeSource struct { - // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pcm_pod using this volume. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - ClaimName string `json:"claimName" protobuf:"bytes,1,opt,name=claimName"` - // Will force the ReadOnly setting in VolumeMounts. - // Default false. - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"` -} - -// PersistentVolumeSource is similar to VolumeSource but meant for the -// administrator who creates PVs. Exactly one of its members must be set. -type PersistentVolumeSource struct { - // GCEPersistentDisk represents a GCE Disk resource that is attached to a - // kubelet's host machine and then exposed to the pcm_pod. Provisioned by an admin. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - // +optional - GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty" protobuf:"bytes,1,opt,name=gcePersistentDisk"` - // AWSElasticBlockStore represents an AWS Disk resource that is attached to a - // kubelet's host machine and then exposed to the pcm_pod. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - // +optional - AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,2,opt,name=awsElasticBlockStore"` - // HostPath represents a directory on the host. - // Provisioned by a developer or tester. - // This is useful for single-node development and testing only! - // On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - // +optional - HostPath *HostPathVolumeSource `json:"hostPath,omitempty" protobuf:"bytes,3,opt,name=hostPath"` - // Glusterfs represents a Glusterfs volume that is attached to a host and - // exposed to the pcm_pod. Provisioned by an admin. - // More info: https://examples.k8s.io/volumes/glusterfs/README.md - // +optional - Glusterfs *GlusterfsPersistentVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,4,opt,name=glusterfs"` - // NFS represents an NFS mount on the host. Provisioned by an admin. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - // +optional - NFS *NFSVolumeSource `json:"nfs,omitempty" protobuf:"bytes,5,opt,name=nfs"` - // RBD represents a Rados Block Device mount on the host that shares a pcm_pod's lifetime. - // More info: https://examples.k8s.io/volumes/rbd/README.md - // +optional - RBD *RBDPersistentVolumeSource `json:"rbd,omitempty" protobuf:"bytes,6,opt,name=rbd"` - // ISCSI represents an ISCSI Disk resource that is attached to a - // kubelet's host machine and then exposed to the pcm_pod. Provisioned by an admin. - // +optional - ISCSI *ISCSIPersistentVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,7,opt,name=iscsi"` - // Cinder represents a cinder volume attached and mounted on kubelets host machine. - // More info: https://examples.k8s.io/mysql-cinder-pd/README.md - // +optional - Cinder *CinderPersistentVolumeSource `json:"cinder,omitempty" protobuf:"bytes,8,opt,name=cinder"` - // CephFS represents a Ceph FS mount on the host that shares a pcm_pod's lifetime - // +optional - CephFS *CephFSPersistentVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,9,opt,name=cephfs"` - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pcm_pod. - // +optional - FC *FCVolumeSource `json:"fc,omitempty" protobuf:"bytes,10,opt,name=fc"` - // Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pcm_pod for its usage. This depends on the Flocker control service being running - // +optional - Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,11,opt,name=flocker"` - // FlexVolume represents a generic volume resource that is - // provisioned/attached using an exec based plugin. - // +optional - FlexVolume *FlexPersistentVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"` - // AzureFile represents an Azure File Service mount on the host and bind mount to the pcm_pod. - // +optional - AzureFile *AzureFilePersistentVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,13,opt,name=azureFile"` - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - // +optional - VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,14,opt,name=vsphereVolume"` - // Quobyte represents a Quobyte mount on the host that shares a pcm_pod's lifetime - // +optional - Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,15,opt,name=quobyte"` - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pcm_pod. - // +optional - AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,16,opt,name=azureDisk"` - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,17,opt,name=photonPersistentDisk"` - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - // +optional - PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty" protobuf:"bytes,18,opt,name=portworxVolume"` - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - // +optional - ScaleIO *ScaleIOPersistentVolumeSource `json:"scaleIO,omitempty" protobuf:"bytes,19,opt,name=scaleIO"` - // Local represents directly-attached storage with node affinity - // +optional - Local *LocalVolumeSource `json:"local,omitempty" protobuf:"bytes,20,opt,name=local"` - // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pcm_pod - // More info: https://examples.k8s.io/volumes/storageos/README.md - // +optional - StorageOS *StorageOSPersistentVolumeSource `json:"storageos,omitempty" protobuf:"bytes,21,opt,name=storageos"` - // CSI represents storage that is handled by an external CSI driver (Beta feature). - // +optional - CSI *CSIPersistentVolumeSource `json:"csi,omitempty" protobuf:"bytes,22,opt,name=csi"` -} - -const ( - // BetaStorageClassAnnotation represents the beta/previous StorageClass annotation. - // It's currently still used and will be held for backwards compatibility - BetaStorageClassAnnotation = "volume.beta.kubernetes.io/storage-class" - - // MountOptionAnnotation defines mount option annotation used in PVs - MountOptionAnnotation = "volume.beta.kubernetes.io/mount-options" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// PersistentVolume (PV) is a storage resource provisioned by an administrator. -// It is analogous to a node. -// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes -type PersistentVolume struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines a specification of a persistent volume owned by the cluster. - // Provisioned by an administrator. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes - // +optional - Spec PersistentVolumeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Status represents the current information/status for the persistent volume. - // Populated by the system. - // Read-only. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes - // +optional - Status PersistentVolumeStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// PersistentVolumeSpec is the specification of a persistent volume. -type PersistentVolumeSpec struct { - // A description of the persistent volume's resources and capacity. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - // +optional - Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"` - // The actual volume backing the persistent volume. - PersistentVolumeSource `json:",inline" protobuf:"bytes,2,opt,name=persistentVolumeSource"` - // AccessModes contains all ways the volume can be mounted. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes - // +optional - AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,3,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` - // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. - // Expected to be non-nil when bound. - // claim.VolumeName is the authoritative bind between PV and PVC. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding - // +optional - ClaimRef *ObjectReference `json:"claimRef,omitempty" protobuf:"bytes,4,opt,name=claimRef"` - // What happens to a persistent volume when released from its claim. - // Valid options are Retain (default for manually created PersistentVolumes), Delete (default - // for dynamically provisioned PersistentVolumes), and Recycle (deprecated). - // Recycle must be supported by the volume plugin underlying this PersistentVolume. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming - // +optional - PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty" protobuf:"bytes,5,opt,name=persistentVolumeReclaimPolicy,casttype=PersistentVolumeReclaimPolicy"` - // Name of StorageClass to which this persistent volume belongs. Empty value - // means that this volume does not belong to any StorageClass. - // +optional - StorageClassName string `json:"storageClassName,omitempty" protobuf:"bytes,6,opt,name=storageClassName"` - // A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will - // simply fail if one is invalid. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options - // +optional - MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,7,opt,name=mountOptions"` - // volumeMode defines if a volume is intended to be used with a formatted filesystem - // or to remain in raw block state. Value of Filesystem is implied when not included in spec. - // +optional - VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,8,opt,name=volumeMode,casttype=PersistentVolumeMode"` - // NodeAffinity defines constraints that limit what nodes this volume can be accessed from. - // This field influences the scheduling of pods that use this volume. - // +optional - NodeAffinity *VolumeNodeAffinity `json:"nodeAffinity,omitempty" protobuf:"bytes,9,opt,name=nodeAffinity"` -} - -// VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. -type VolumeNodeAffinity struct { - // Required specifies hard node constraints that must be met. - Required *NodeSelector `json:"required,omitempty" protobuf:"bytes,1,opt,name=required"` -} - -// PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes. -type PersistentVolumeReclaimPolicy string - -const ( - // PersistentVolumeReclaimRecycle means the volume will be recycled back into the pool of unbound persistent volumes on release from its claim. - // The volume plugin must support Recycling. - PersistentVolumeReclaimRecycle PersistentVolumeReclaimPolicy = "Recycle" - // PersistentVolumeReclaimDelete means the volume will be deleted from Kubernetes on release from its claim. - // The volume plugin must support Deletion. - PersistentVolumeReclaimDelete PersistentVolumeReclaimPolicy = "Delete" - // PersistentVolumeReclaimRetain means the volume will be left in its current phase (Released) for manual reclamation by the administrator. - // The default policy is Retain. - PersistentVolumeReclaimRetain PersistentVolumeReclaimPolicy = "Retain" -) - -// PersistentVolumeMode describes how a volume is intended to be consumed, either Block or Filesystem. -type PersistentVolumeMode string - -const ( - // PersistentVolumeBlock means the volume will not be formatted with a filesystem and will remain a raw block device. - PersistentVolumeBlock PersistentVolumeMode = "Block" - // PersistentVolumeFilesystem means the volume will be or is formatted with a filesystem. - PersistentVolumeFilesystem PersistentVolumeMode = "Filesystem" -) - -// PersistentVolumeStatus is the current status of a persistent volume. -type PersistentVolumeStatus struct { - // Phase indicates if a volume is available, bound to a claim, or released by a claim. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase - // +optional - Phase PersistentVolumePhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PersistentVolumePhase"` - // A human-readable message indicating details about why the volume is in this state. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` - // Reason is a brief CamelCase string that describes any failure and is meant - // for machine parsing and tidy display in the CLI. - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// PersistentVolumeList is a list of PersistentVolume items. -type PersistentVolumeList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // List of persistent volumes. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes - Items []PersistentVolume `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// PersistentVolumeClaim is a user's request for and claim to a persistent volume -type PersistentVolumeClaim struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the desired characteristics of a volume requested by a pcm_pod author. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - // +optional - Spec PersistentVolumeClaimSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Status represents the current information/status of a persistent volume claim. - // Read-only. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - // +optional - Status PersistentVolumeClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// PersistentVolumeClaimList is a list of PersistentVolumeClaim items. -type PersistentVolumeClaimList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // A list of persistent volume claims. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - Items []PersistentVolumeClaim `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// PersistentVolumeClaimSpec describes the common attributes of storage devices -// and allows a Source for provider-specific attributes -type PersistentVolumeClaimSpec struct { - // AccessModes contains the desired access modes the volume should have. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - // +optional - AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` - // A label query over volumes to consider for binding. - // +optional - Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"` - // Resources represents the minimum resources the volume should have. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - // +optional - Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,2,opt,name=resources"` - // VolumeName is the binding reference to the PersistentVolume backing this claim. - // +optional - VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,3,opt,name=volumeName"` - // Name of the StorageClass required by the claim. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - // +optional - StorageClassName *string `json:"storageClassName,omitempty" protobuf:"bytes,5,opt,name=storageClassName"` - // volumeMode defines what type of volume is required by the claim. - // Value of Filesystem is implied when not included in claim spec. - // +optional - VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,6,opt,name=volumeMode,casttype=PersistentVolumeMode"` - // This field can be used to specify either: - // * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - // * An existing PVC (PersistentVolumeClaim) - // * An existing custom resource that implements data population (Alpha) - // In order to use custom resource types that implement data population, - // the AnyVolumeDataSource feature gate must be enabled. - // If the provisioner or an external controller can support the specified data source, - // it will create a new volume based on the contents of the specified data source. - // +optional - DataSource *TypedLocalObjectReference `json:"dataSource,omitempty" protobuf:"bytes,7,opt,name=dataSource"` -} - -// PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type -type PersistentVolumeClaimConditionType string - -const ( - // PersistentVolumeClaimResizing - a user trigger resize of pvc has been started - PersistentVolumeClaimResizing PersistentVolumeClaimConditionType = "Resizing" - // PersistentVolumeClaimFileSystemResizePending - controller resize is finished and a file system resize is pending on node - PersistentVolumeClaimFileSystemResizePending PersistentVolumeClaimConditionType = "FileSystemResizePending" -) - -// PersistentVolumeClaimCondition contails details about state of pvc -type PersistentVolumeClaimCondition struct { - Type PersistentVolumeClaimConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PersistentVolumeClaimConditionType"` - Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` - // Last time we probed the condition. - // +optional - LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` - // Last time the condition transitioned from one status to another. - // +optional - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` - // Unique, this should be a short, machine understandable string that gives the reason - // for condition's last transition. If it reports "ResizeStarted" that means the underlying - // persistent volume is being resized. - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` - // Human-readable message indicating details about last transition. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` -} - -// PersistentVolumeClaimStatus is the current status of a persistent volume claim. -type PersistentVolumeClaimStatus struct { - // Phase represents the current phase of PersistentVolumeClaim. - // +optional - Phase PersistentVolumeClaimPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PersistentVolumeClaimPhase"` - // AccessModes contains the actual access modes the volume backing the PVC has. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - // +optional - AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,2,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` - // Represents the actual resources of the underlying volume. - // +optional - Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,3,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"` - // Current Condition of persistent volume claim. If underlying persistent volume is being - // resized then the Condition will be set to 'ResizeStarted'. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - Conditions []PersistentVolumeClaimCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"` -} - -type PersistentVolumeAccessMode string - -const ( - // can be mounted in read/write mode to exactly 1 host - ReadWriteOnce PersistentVolumeAccessMode = "ReadWriteOnce" - // can be mounted in read-only mode to many hosts - ReadOnlyMany PersistentVolumeAccessMode = "ReadOnlyMany" - // can be mounted in read/write mode to many hosts - ReadWriteMany PersistentVolumeAccessMode = "ReadWriteMany" -) - -type PersistentVolumePhase string - -const ( - // used for PersistentVolumes that are not available - VolumePending PersistentVolumePhase = "Pending" - // used for PersistentVolumes that are not yet bound - // Available volumes are held by the binder and matched to PersistentVolumeClaims - VolumeAvailable PersistentVolumePhase = "Available" - // used for PersistentVolumes that are bound - VolumeBound PersistentVolumePhase = "Bound" - // used for PersistentVolumes where the bound PersistentVolumeClaim was deleted - // released volumes must be recycled before becoming available again - // this phase is used by the persistent volume claim binder to signal to another process to reclaim the resource - VolumeReleased PersistentVolumePhase = "Released" - // used for PersistentVolumes that failed to be correctly recycled or deleted after being released from a claim - VolumeFailed PersistentVolumePhase = "Failed" -) - -type PersistentVolumeClaimPhase string - -const ( - // used for PersistentVolumeClaims that are not yet bound - ClaimPending PersistentVolumeClaimPhase = "Pending" - // used for PersistentVolumeClaims that are bound - ClaimBound PersistentVolumeClaimPhase = "Bound" - // used for PersistentVolumeClaims that lost their underlying - // PersistentVolume. The claim was bound to a PersistentVolume and this - // volume does not exist any longer and all data on it was lost. - ClaimLost PersistentVolumeClaimPhase = "Lost" -) - -type HostPathType string - -const ( - // For backwards compatible, leave it empty if unset - HostPathUnset HostPathType = "" - // If nothing exists at the given path, an empty directory will be created there - // as needed with file mode 0755, having the same group and ownership with Kubelet. - HostPathDirectoryOrCreate HostPathType = "DirectoryOrCreate" - // A directory must exist at the given path - HostPathDirectory HostPathType = "Directory" - // If nothing exists at the given path, an empty file will be created there - // as needed with file mode 0644, having the same group and ownership with Kubelet. - HostPathFileOrCreate HostPathType = "FileOrCreate" - // A file must exist at the given path - HostPathFile HostPathType = "File" - // A UNIX socket must exist at the given path - HostPathSocket HostPathType = "Socket" - // A character device must exist at the given path - HostPathCharDev HostPathType = "CharDevice" - // A block device must exist at the given path - HostPathBlockDev HostPathType = "BlockDevice" -) - -// Represents a host path mapped into a pcm_pod. -// Host path volumes do not support ownership management or SELinux relabeling. -type HostPathVolumeSource struct { - // Path of the directory on the host. - // If the path is a symlink, it will follow the link to the real path. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - Path string `json:"path" protobuf:"bytes,1,opt,name=path"` - // Type for HostPath Volume - // Defaults to "" - // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - // +optional - Type *HostPathType `json:"type,omitempty" protobuf:"bytes,2,opt,name=type"` -} - -// Represents an empty directory for a pcm_pod. -// Empty directory volumes support ownership management and SELinux relabeling. -type EmptyDirVolumeSource struct { - // What type of storage medium should back this directory. - // The default is "" which means to use the node's default medium. - // Must be an empty string (default) or Memory. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - // +optional - Medium StorageMedium `json:"medium,omitempty" protobuf:"bytes,1,opt,name=medium,casttype=StorageMedium"` - // Total amount of local storage required for this EmptyDir volume. - // The size limit is also applicable for memory medium. - // The maximum usage on memory medium EmptyDir would be the minimum value between - // the SizeLimit specified here and the sum of memory limits of all containers in a pcm_pod. - // The default is nil which means that the limit is undefined. - // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir - // +optional - SizeLimit *resource.Quantity `json:"sizeLimit,omitempty" protobuf:"bytes,2,opt,name=sizeLimit"` -} - -// Represents a Glusterfs mount that lasts the lifetime of a pcm_pod. -// Glusterfs volumes do not support ownership management or SELinux relabeling. -type GlusterfsVolumeSource struct { - // EndpointsName is the endpoint name that details Glusterfs topology. - // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod - EndpointsName string `json:"endpoints" protobuf:"bytes,1,opt,name=endpoints"` - - // Path is the Glusterfs volume path. - // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod - Path string `json:"path" protobuf:"bytes,2,opt,name=path"` - - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. - // Defaults to false. - // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` -} - -// Represents a Glusterfs mount that lasts the lifetime of a pcm_pod. -// Glusterfs volumes do not support ownership management or SELinux relabeling. -type GlusterfsPersistentVolumeSource struct { - // EndpointsName is the endpoint name that details Glusterfs topology. - // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod - EndpointsName string `json:"endpoints" protobuf:"bytes,1,opt,name=endpoints"` - - // Path is the Glusterfs volume path. - // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod - Path string `json:"path" protobuf:"bytes,2,opt,name=path"` - - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. - // Defaults to false. - // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` - - // EndpointsNamespace is the namespace that contains Glusterfs endpoint. - // If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. - // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod - // +optional - EndpointsNamespace *string `json:"endpointsNamespace,omitempty" protobuf:"bytes,4,opt,name=endpointsNamespace"` -} - -// Represents a Rados Block Device mount that lasts the lifetime of a pcm_pod. -// RBD volumes support ownership management and SELinux relabeling. -type RBDVolumeSource struct { - // A collection of Ceph monitors. - // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - CephMonitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` - // The rados image name. - // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - RBDImage string `json:"image" protobuf:"bytes,2,opt,name=image"` - // Filesystem type of the volume that you want to mount. - // Tip: Ensure that the filesystem type is supported by the host operating system. - // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - // TODO: how do we prevent errors in the filesystem from compromising the machine - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"` - // The rados pool name. - // Default is rbd. - // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - // +optional - RBDPool string `json:"pool,omitempty" protobuf:"bytes,4,opt,name=pool"` - // The rados user name. - // Default is admin. - // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - // +optional - RadosUser string `json:"user,omitempty" protobuf:"bytes,5,opt,name=user"` - // Keyring is the path to key ring for RBDUser. - // Default is /etc/ceph/keyring. - // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - // +optional - Keyring string `json:"keyring,omitempty" protobuf:"bytes,6,opt,name=keyring"` - // SecretRef is name of the authentication secret for RBDUser. If provided - // overrides keyring. - // Default is nil. - // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - // +optional - SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,7,opt,name=secretRef"` - // ReadOnly here will force the ReadOnly setting in VolumeMounts. - // Defaults to false. - // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,8,opt,name=readOnly"` -} - -// Represents a Rados Block Device mount that lasts the lifetime of a pcm_pod. -// RBD volumes support ownership management and SELinux relabeling. -type RBDPersistentVolumeSource struct { - // A collection of Ceph monitors. - // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - CephMonitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` - // The rados image name. - // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - RBDImage string `json:"image" protobuf:"bytes,2,opt,name=image"` - // Filesystem type of the volume that you want to mount. - // Tip: Ensure that the filesystem type is supported by the host operating system. - // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - // TODO: how do we prevent errors in the filesystem from compromising the machine - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"` - // The rados pool name. - // Default is rbd. - // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - // +optional - RBDPool string `json:"pool,omitempty" protobuf:"bytes,4,opt,name=pool"` - // The rados user name. - // Default is admin. - // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - // +optional - RadosUser string `json:"user,omitempty" protobuf:"bytes,5,opt,name=user"` - // Keyring is the path to key ring for RBDUser. - // Default is /etc/ceph/keyring. - // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - // +optional - Keyring string `json:"keyring,omitempty" protobuf:"bytes,6,opt,name=keyring"` - // SecretRef is name of the authentication secret for RBDUser. If provided - // overrides keyring. - // Default is nil. - // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - // +optional - SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,7,opt,name=secretRef"` - // ReadOnly here will force the ReadOnly setting in VolumeMounts. - // Defaults to false. - // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,8,opt,name=readOnly"` -} - -// Represents a cinder volume resource in Openstack. -// A Cinder volume must exist before mounting to a container. -// The volume must also be in the same region as the kubelet. -// Cinder volumes support ownership management and SELinux relabeling. -type CinderVolumeSource struct { - // volume id used to identify the volume in cinder. - // More info: https://examples.k8s.io/mysql-cinder-pd/README.md - VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"` - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // More info: https://examples.k8s.io/mysql-cinder-pd/README.md - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // Optional: Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // More info: https://examples.k8s.io/mysql-cinder-pd/README.md - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` - // Optional: points to a secret object containing parameters used to connect - // to OpenStack. - // +optional - SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,4,opt,name=secretRef"` -} - -// Represents a cinder volume resource in Openstack. -// A Cinder volume must exist before mounting to a container. -// The volume must also be in the same region as the kubelet. -// Cinder volumes support ownership management and SELinux relabeling. -type CinderPersistentVolumeSource struct { - // volume id used to identify the volume in cinder. - // More info: https://examples.k8s.io/mysql-cinder-pd/README.md - VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"` - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // More info: https://examples.k8s.io/mysql-cinder-pd/README.md - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // Optional: Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // More info: https://examples.k8s.io/mysql-cinder-pd/README.md - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` - // Optional: points to a secret object containing parameters used to connect - // to OpenStack. - // +optional - SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,4,opt,name=secretRef"` -} - -// Represents a Ceph Filesystem mount that lasts the lifetime of a pcm_pod -// Cephfs volumes do not support ownership management or SELinux relabeling. -type CephFSVolumeSource struct { - // Required: Monitors is a collection of Ceph monitors - // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - Monitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - // +optional - Path string `json:"path,omitempty" protobuf:"bytes,2,opt,name=path"` - // Optional: User is the rados user name, default is admin - // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - // +optional - User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"` - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret - // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - // +optional - SecretFile string `json:"secretFile,omitempty" protobuf:"bytes,4,opt,name=secretFile"` - // Optional: SecretRef is reference to the authentication secret for User, default is empty. - // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - // +optional - SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"` - // Optional: Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"` -} - -// SecretReference represents a Secret Reference. It has enough information to retrieve secret -// in any namespace -type SecretReference struct { - // Name is unique within a namespace to reference a secret resource. - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - // Namespace defines the space within which the secret name must be unique. - // +optional - Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"` -} - -// Represents a Ceph Filesystem mount that lasts the lifetime of a pcm_pod -// Cephfs volumes do not support ownership management or SELinux relabeling. -type CephFSPersistentVolumeSource struct { - // Required: Monitors is a collection of Ceph monitors - // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - Monitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - // +optional - Path string `json:"path,omitempty" protobuf:"bytes,2,opt,name=path"` - // Optional: User is the rados user name, default is admin - // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - // +optional - User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"` - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret - // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - // +optional - SecretFile string `json:"secretFile,omitempty" protobuf:"bytes,4,opt,name=secretFile"` - // Optional: SecretRef is reference to the authentication secret for User, default is empty. - // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - // +optional - SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"` - // Optional: Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"` -} - -// Represents a Flocker volume mounted by the Flocker agent. -// One and only one of datasetName and datasetUUID should be set. -// Flocker volumes do not support ownership management or SELinux relabeling. -type FlockerVolumeSource struct { - // Name of the dataset stored as metadata -> name on the dataset for Flocker - // should be considered as deprecated - // +optional - DatasetName string `json:"datasetName,omitempty" protobuf:"bytes,1,opt,name=datasetName"` - // UUID of the dataset. This is unique identifier of a Flocker dataset - // +optional - DatasetUUID string `json:"datasetUUID,omitempty" protobuf:"bytes,2,opt,name=datasetUUID"` -} - -// StorageMedium defines ways that storage can be allocated to a volume. -type StorageMedium string - -const ( - StorageMediumDefault StorageMedium = "" // use whatever the default is for the node, assume anything we don't explicitly handle is this - StorageMediumMemory StorageMedium = "Memory" // use memory (e.g. tmpfs on linux) - StorageMediumHugePages StorageMedium = "HugePages" // use hugepages - StorageMediumHugePagesPrefix StorageMedium = "HugePages-" // prefix for full medium notation HugePages- -) - -// Protocol defines network protocols supported for things like container ports. -type Protocol string - -const ( - // ProtocolTCP is the TCP protocol. - ProtocolTCP Protocol = "TCP" - // ProtocolUDP is the UDP protocol. - ProtocolUDP Protocol = "UDP" - // ProtocolSCTP is the SCTP protocol. - ProtocolSCTP Protocol = "SCTP" -) - -// Represents a Persistent Disk resource in Google Compute Engine. -// -// A GCE PD must exist before mounting to a container. The disk must -// also be in the same GCE project and zone as the kubelet. A GCE PD -// can only be mounted as read/write once or read-only many times. GCE -// PDs support ownership management and SELinux relabeling. -type GCEPersistentDiskVolumeSource struct { - // Unique name of the PD resource in GCE. Used to identify the disk in GCE. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - PDName string `json:"pdName" protobuf:"bytes,1,opt,name=pdName"` - // Filesystem type of the volume that you want to mount. - // Tip: Ensure that the filesystem type is supported by the host operating system. - // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - // TODO: how do we prevent errors in the filesystem from compromising the machine - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // The partition in the volume that you want to mount. - // If omitted, the default is to mount by volume name. - // Examples: For volume /dev/sda1, you specify the partition as "1". - // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). - // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - // +optional - Partition int32 `json:"partition,omitempty" protobuf:"varint,3,opt,name=partition"` - // ReadOnly here will force the ReadOnly setting in VolumeMounts. - // Defaults to false. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` -} - -// Represents a Quobyte mount that lasts the lifetime of a pcm_pod. -// Quobyte volumes do not support ownership management or SELinux relabeling. -type QuobyteVolumeSource struct { - // Registry represents a single or multiple Quobyte Registry services - // specified as a string as host:port pair (multiple entries are separated with commas) - // which acts as the central registry for volumes - Registry string `json:"registry" protobuf:"bytes,1,opt,name=registry"` - - // Volume is a string that references an already created Quobyte volume by name. - Volume string `json:"volume" protobuf:"bytes,2,opt,name=volume"` - - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. - // Defaults to false. - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` - - // User to map volume access to - // Defaults to serivceaccount user - // +optional - User string `json:"user,omitempty" protobuf:"bytes,4,opt,name=user"` - - // Group to map volume access to - // Default is no group - // +optional - Group string `json:"group,omitempty" protobuf:"bytes,5,opt,name=group"` - - // Tenant owning the given Quobyte volume in the Backend - // Used with dynamically provisioned Quobyte volumes, value is set by the plugin - // +optional - Tenant string `json:"tenant,omitempty" protobuf:"bytes,6,opt,name=tenant"` -} - -// FlexPersistentVolumeSource represents a generic persistent volume resource that is -// provisioned/attached using an exec based plugin. -type FlexPersistentVolumeSource struct { - // Driver is the name of the driver to use for this volume. - Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"` - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // Optional: SecretRef is reference to the secret object containing - // sensitive information to pass to the plugin scripts. This may be - // empty if no secret object is specified. If the secret object - // contains more than one secret, all secrets are passed to the plugin - // scripts. - // +optional - SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"` - // Optional: Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` - // Optional: Extra command options if any. - // +optional - Options map[string]string `json:"options,omitempty" protobuf:"bytes,5,rep,name=options"` -} - -// FlexVolume represents a generic volume resource that is -// provisioned/attached using an exec based plugin. -type FlexVolumeSource struct { - // Driver is the name of the driver to use for this volume. - Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"` - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // Optional: SecretRef is reference to the secret object containing - // sensitive information to pass to the plugin scripts. This may be - // empty if no secret object is specified. If the secret object - // contains more than one secret, all secrets are passed to the plugin - // scripts. - // +optional - SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"` - // Optional: Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` - // Optional: Extra command options if any. - // +optional - Options map[string]string `json:"options,omitempty" protobuf:"bytes,5,rep,name=options"` -} - -// Represents a Persistent Disk resource in AWS. -// -// An AWS EBS disk must exist before mounting to a container. The disk -// must also be in the same AWS zone as the kubelet. An AWS EBS disk -// can only be mounted as read/write once. AWS EBS volumes support -// ownership management and SELinux relabeling. -type AWSElasticBlockStoreVolumeSource struct { - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). - // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"` - // Filesystem type of the volume that you want to mount. - // Tip: Ensure that the filesystem type is supported by the host operating system. - // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - // TODO: how do we prevent errors in the filesystem from compromising the machine - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // The partition in the volume that you want to mount. - // If omitted, the default is to mount by volume name. - // Examples: For volume /dev/sda1, you specify the partition as "1". - // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). - // +optional - Partition int32 `json:"partition,omitempty" protobuf:"varint,3,opt,name=partition"` - // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". - // If omitted, the default is "false". - // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` -} - -// Represents a volume that is populated with the contents of a git repository. -// Git repo volumes do not support ownership management. -// Git repo volumes support SELinux relabeling. -// -// DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an -// EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir -// into the Pod's container. -type GitRepoVolumeSource struct { - // Repository URL - Repository string `json:"repository" protobuf:"bytes,1,opt,name=repository"` - // Commit hash for the specified revision. - // +optional - Revision string `json:"revision,omitempty" protobuf:"bytes,2,opt,name=revision"` - // Target directory name. - // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the - // git repository. Otherwise, if specified, the volume will contain the git repository in - // the subdirectory with the given name. - // +optional - Directory string `json:"directory,omitempty" protobuf:"bytes,3,opt,name=directory"` -} - -// Adapts a Secret into a volume. -// -// The contents of the target Secret's Data field will be presented in a volume -// as files using the keys in the Data field as the file names. -// Secret volumes support ownership management and SELinux relabeling. -type SecretVolumeSource struct { - // Name of the secret in the pcm_pod's namespace to use. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - // +optional - SecretName string `json:"secretName,omitempty" protobuf:"bytes,1,opt,name=secretName"` - // If unspecified, each key-value pair in the Data field of the referenced - // Secret will be projected into the volume as a file whose name is the - // key and content is the value. If specified, the listed keys will be - // projected into the specified paths, and unlisted keys will not be - // present. If a key is specified which is not present in the Secret, - // the volume setup will error unless it is marked optional. Paths must be - // relative and may not contain the '..' path or start with '..'. - // +optional - Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` - // Optional: mode bits used to set permissions on created files by default. - // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - // YAML accepts both octal and decimal values, JSON requires decimal values - // for mode bits. Defaults to 0644. - // Directories within the path are not affected by this setting. - // This might be in conflict with other options that affect the file - // mode, like fsGroup, and the result can be other mode bits set. - // +optional - DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"bytes,3,opt,name=defaultMode"` - // Specify whether the Secret or its keys must be defined - // +optional - Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` -} - -const ( - SecretVolumeSourceDefaultMode int32 = 0644 -) - -// Adapts a secret into a projected volume. -// -// The contents of the target Secret's Data field will be presented in a -// projected volume as files using the keys in the Data field as the file names. -// Note that this is identical to a secret volume source without the default -// mode. -type SecretProjection struct { - LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` - // If unspecified, each key-value pair in the Data field of the referenced - // Secret will be projected into the volume as a file whose name is the - // key and content is the value. If specified, the listed keys will be - // projected into the specified paths, and unlisted keys will not be - // present. If a key is specified which is not present in the Secret, - // the volume setup will error unless it is marked optional. Paths must be - // relative and may not contain the '..' path or start with '..'. - // +optional - Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` - // Specify whether the Secret or its key must be defined - // +optional - Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` -} - -// Represents an NFS mount that lasts the lifetime of a pcm_pod. -// NFS volumes do not support ownership management or SELinux relabeling. -type NFSVolumeSource struct { - // Server is the hostname or IP address of the NFS server. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - Server string `json:"server" protobuf:"bytes,1,opt,name=server"` - - // Path that is exported by the NFS server. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - Path string `json:"path" protobuf:"bytes,2,opt,name=path"` - - // ReadOnly here will force - // the NFS export to be mounted with read-only permissions. - // Defaults to false. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` -} - -// Represents an ISCSI disk. -// ISCSI volumes can only be mounted as read/write once. -// ISCSI volumes support ownership management and SELinux relabeling. -type ISCSIVolumeSource struct { - // iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port - // is other than default (typically TCP ports 860 and 3260). - TargetPortal string `json:"targetPortal" protobuf:"bytes,1,opt,name=targetPortal"` - // Target iSCSI Qualified Name. - IQN string `json:"iqn" protobuf:"bytes,2,opt,name=iqn"` - // iSCSI Target Lun number. - Lun int32 `json:"lun" protobuf:"varint,3,opt,name=lun"` - // iSCSI Interface Name that uses an iSCSI transport. - // Defaults to 'default' (tcp). - // +optional - ISCSIInterface string `json:"iscsiInterface,omitempty" protobuf:"bytes,4,opt,name=iscsiInterface"` - // Filesystem type of the volume that you want to mount. - // Tip: Ensure that the filesystem type is supported by the host operating system. - // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - // TODO: how do we prevent errors in the filesystem from compromising the machine - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,5,opt,name=fsType"` - // ReadOnly here will force the ReadOnly setting in VolumeMounts. - // Defaults to false. - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"` - // iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port - // is other than default (typically TCP ports 860 and 3260). - // +optional - Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"` - // whether support iSCSI Discovery CHAP authentication - // +optional - DiscoveryCHAPAuth bool `json:"chapAuthDiscovery,omitempty" protobuf:"varint,8,opt,name=chapAuthDiscovery"` - // whether support iSCSI Session CHAP authentication - // +optional - SessionCHAPAuth bool `json:"chapAuthSession,omitempty" protobuf:"varint,11,opt,name=chapAuthSession"` - // CHAP Secret for iSCSI target and initiator authentication - // +optional - SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,10,opt,name=secretRef"` - // Custom iSCSI Initiator Name. - // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface - // : will be created for the connection. - // +optional - InitiatorName *string `json:"initiatorName,omitempty" protobuf:"bytes,12,opt,name=initiatorName"` -} - -// ISCSIPersistentVolumeSource represents an ISCSI disk. -// ISCSI volumes can only be mounted as read/write once. -// ISCSI volumes support ownership management and SELinux relabeling. -type ISCSIPersistentVolumeSource struct { - // iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port - // is other than default (typically TCP ports 860 and 3260). - TargetPortal string `json:"targetPortal" protobuf:"bytes,1,opt,name=targetPortal"` - // Target iSCSI Qualified Name. - IQN string `json:"iqn" protobuf:"bytes,2,opt,name=iqn"` - // iSCSI Target Lun number. - Lun int32 `json:"lun" protobuf:"varint,3,opt,name=lun"` - // iSCSI Interface Name that uses an iSCSI transport. - // Defaults to 'default' (tcp). - // +optional - ISCSIInterface string `json:"iscsiInterface,omitempty" protobuf:"bytes,4,opt,name=iscsiInterface"` - // Filesystem type of the volume that you want to mount. - // Tip: Ensure that the filesystem type is supported by the host operating system. - // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - // TODO: how do we prevent errors in the filesystem from compromising the machine - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,5,opt,name=fsType"` - // ReadOnly here will force the ReadOnly setting in VolumeMounts. - // Defaults to false. - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"` - // iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port - // is other than default (typically TCP ports 860 and 3260). - // +optional - Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"` - // whether support iSCSI Discovery CHAP authentication - // +optional - DiscoveryCHAPAuth bool `json:"chapAuthDiscovery,omitempty" protobuf:"varint,8,opt,name=chapAuthDiscovery"` - // whether support iSCSI Session CHAP authentication - // +optional - SessionCHAPAuth bool `json:"chapAuthSession,omitempty" protobuf:"varint,11,opt,name=chapAuthSession"` - // CHAP Secret for iSCSI target and initiator authentication - // +optional - SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,10,opt,name=secretRef"` - // Custom iSCSI Initiator Name. - // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface - // : will be created for the connection. - // +optional - InitiatorName *string `json:"initiatorName,omitempty" protobuf:"bytes,12,opt,name=initiatorName"` -} - -// Represents a Fibre Channel volume. -// Fibre Channel volumes can only be mounted as read/write once. -// Fibre Channel volumes support ownership management and SELinux relabeling. -type FCVolumeSource struct { - // Optional: FC target worldwide names (WWNs) - // +optional - TargetWWNs []string `json:"targetWWNs,omitempty" protobuf:"bytes,1,rep,name=targetWWNs"` - // Optional: FC target lun number - // +optional - Lun *int32 `json:"lun,omitempty" protobuf:"varint,2,opt,name=lun"` - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // TODO: how do we prevent errors in the filesystem from compromising the machine - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"` - // Optional: Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` - // Optional: FC volume world wide identifiers (wwids) - // Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - // +optional - WWIDs []string `json:"wwids,omitempty" protobuf:"bytes,5,rep,name=wwids"` -} - -// AzureFile represents an Azure File Service mount on the host and bind mount to the pcm_pod. -type AzureFileVolumeSource struct { - // the name of secret that contains Azure Storage Account Name and Key - SecretName string `json:"secretName" protobuf:"bytes,1,opt,name=secretName"` - // Share Name - ShareName string `json:"shareName" protobuf:"bytes,2,opt,name=shareName"` - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` -} - -// AzureFile represents an Azure File Service mount on the host and bind mount to the pcm_pod. -type AzureFilePersistentVolumeSource struct { - // the name of secret that contains Azure Storage Account Name and Key - SecretName string `json:"secretName" protobuf:"bytes,1,opt,name=secretName"` - // Share Name - ShareName string `json:"shareName" protobuf:"bytes,2,opt,name=shareName"` - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` - // the namespace of the secret that contains Azure Storage Account Name and Key - // default is the same as the Pod - // +optional - SecretNamespace *string `json:"secretNamespace" protobuf:"bytes,4,opt,name=secretNamespace"` -} - -// Represents a vSphere volume resource. -type VsphereVirtualDiskVolumeSource struct { - // Path that identifies vSphere volume vmdk - VolumePath string `json:"volumePath" protobuf:"bytes,1,opt,name=volumePath"` - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // Storage Policy Based Management (SPBM) profile name. - // +optional - StoragePolicyName string `json:"storagePolicyName,omitempty" protobuf:"bytes,3,opt,name=storagePolicyName"` - // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - // +optional - StoragePolicyID string `json:"storagePolicyID,omitempty" protobuf:"bytes,4,opt,name=storagePolicyID"` -} - -// Represents a Photon Controller persistent disk resource. -type PhotonPersistentDiskVolumeSource struct { - // ID that identifies Photon Controller persistent disk - PdID string `json:"pdID" protobuf:"bytes,1,opt,name=pdID"` - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` -} - -type AzureDataDiskCachingMode string -type AzureDataDiskKind string - -const ( - AzureDataDiskCachingNone AzureDataDiskCachingMode = "None" - AzureDataDiskCachingReadOnly AzureDataDiskCachingMode = "ReadOnly" - AzureDataDiskCachingReadWrite AzureDataDiskCachingMode = "ReadWrite" - - AzureSharedBlobDisk AzureDataDiskKind = "Shared" - AzureDedicatedBlobDisk AzureDataDiskKind = "Dedicated" - AzureManagedDisk AzureDataDiskKind = "Managed" -) - -// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pcm_pod. -type AzureDiskVolumeSource struct { - // The Name of the data disk in the blob storage - DiskName string `json:"diskName" protobuf:"bytes,1,opt,name=diskName"` - // The URI the data disk in the blob storage - DataDiskURI string `json:"diskURI" protobuf:"bytes,2,opt,name=diskURI"` - // Host Caching mode: None, Read Only, Read Write. - // +optional - CachingMode *AzureDataDiskCachingMode `json:"cachingMode,omitempty" protobuf:"bytes,3,opt,name=cachingMode,casttype=AzureDataDiskCachingMode"` - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // +optional - FSType *string `json:"fsType,omitempty" protobuf:"bytes,4,opt,name=fsType"` - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - ReadOnly *bool `json:"readOnly,omitempty" protobuf:"varint,5,opt,name=readOnly"` - // Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared - Kind *AzureDataDiskKind `json:"kind,omitempty" protobuf:"bytes,6,opt,name=kind,casttype=AzureDataDiskKind"` -} - -// PortworxVolumeSource represents a Portworx volume resource. -type PortworxVolumeSource struct { - // VolumeID uniquely identifies a Portworx volume - VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"` - // FSType represents the filesystem type to mount - // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. - FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` -} - -// ScaleIOVolumeSource represents a persistent ScaleIO volume -type ScaleIOVolumeSource struct { - // The host address of the ScaleIO API Gateway. - Gateway string `json:"gateway" protobuf:"bytes,1,opt,name=gateway"` - // The name of the storage system as configured in ScaleIO. - System string `json:"system" protobuf:"bytes,2,opt,name=system"` - // SecretRef references to the secret for ScaleIO user and other - // sensitive information. If this is not provided, Login operation will fail. - SecretRef *LocalObjectReference `json:"secretRef" protobuf:"bytes,3,opt,name=secretRef"` - // Flag to enable/disable SSL communication with Gateway, default false - // +optional - SSLEnabled bool `json:"sslEnabled,omitempty" protobuf:"varint,4,opt,name=sslEnabled"` - // The name of the ScaleIO Protection Domain for the configured storage. - // +optional - ProtectionDomain string `json:"protectionDomain,omitempty" protobuf:"bytes,5,opt,name=protectionDomain"` - // The ScaleIO Storage Pool associated with the protection domain. - // +optional - StoragePool string `json:"storagePool,omitempty" protobuf:"bytes,6,opt,name=storagePool"` - // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. - // Default is ThinProvisioned. - // +optional - StorageMode string `json:"storageMode,omitempty" protobuf:"bytes,7,opt,name=storageMode"` - // The name of a volume already created in the ScaleIO system - // that is associated with this volume source. - VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,8,opt,name=volumeName"` - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". - // Default is "xfs". - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,9,opt,name=fsType"` - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,10,opt,name=readOnly"` -} - -// ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume -type ScaleIOPersistentVolumeSource struct { - // The host address of the ScaleIO API Gateway. - Gateway string `json:"gateway" protobuf:"bytes,1,opt,name=gateway"` - // The name of the storage system as configured in ScaleIO. - System string `json:"system" protobuf:"bytes,2,opt,name=system"` - // SecretRef references to the secret for ScaleIO user and other - // sensitive information. If this is not provided, Login operation will fail. - SecretRef *SecretReference `json:"secretRef" protobuf:"bytes,3,opt,name=secretRef"` - // Flag to enable/disable SSL communication with Gateway, default false - // +optional - SSLEnabled bool `json:"sslEnabled,omitempty" protobuf:"varint,4,opt,name=sslEnabled"` - // The name of the ScaleIO Protection Domain for the configured storage. - // +optional - ProtectionDomain string `json:"protectionDomain,omitempty" protobuf:"bytes,5,opt,name=protectionDomain"` - // The ScaleIO Storage Pool associated with the protection domain. - // +optional - StoragePool string `json:"storagePool,omitempty" protobuf:"bytes,6,opt,name=storagePool"` - // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. - // Default is ThinProvisioned. - // +optional - StorageMode string `json:"storageMode,omitempty" protobuf:"bytes,7,opt,name=storageMode"` - // The name of a volume already created in the ScaleIO system - // that is associated with this volume source. - VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,8,opt,name=volumeName"` - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". - // Default is "xfs" - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,9,opt,name=fsType"` - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,10,opt,name=readOnly"` -} - -// Represents a StorageOS persistent volume resource. -type StorageOSVolumeSource struct { - // VolumeName is the human-readable name of the StorageOS volume. Volume - // names are only unique within a namespace. - VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,1,opt,name=volumeName"` - // VolumeNamespace specifies the scope of the volume within StorageOS. If no - // namespace is specified then the Pod's namespace will be used. This allows the - // Kubernetes name scoping to be mirrored within StorageOS for tighter integration. - // Set VolumeName to any name to override the default behaviour. - // Set to "default" if you are not using namespaces within StorageOS. - // Namespaces that do not pre-exist within StorageOS will be created. - // +optional - VolumeNamespace string `json:"volumeNamespace,omitempty" protobuf:"bytes,2,opt,name=volumeNamespace"` - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"` - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` - // SecretRef specifies the secret to use for obtaining the StorageOS API - // credentials. If not specified, default values will be attempted. - // +optional - SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"` -} - -// Represents a StorageOS persistent volume resource. -type StorageOSPersistentVolumeSource struct { - // VolumeName is the human-readable name of the StorageOS volume. Volume - // names are only unique within a namespace. - VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,1,opt,name=volumeName"` - // VolumeNamespace specifies the scope of the volume within StorageOS. If no - // namespace is specified then the Pod's namespace will be used. This allows the - // Kubernetes name scoping to be mirrored within StorageOS for tighter integration. - // Set VolumeName to any name to override the default behaviour. - // Set to "default" if you are not using namespaces within StorageOS. - // Namespaces that do not pre-exist within StorageOS will be created. - // +optional - VolumeNamespace string `json:"volumeNamespace,omitempty" protobuf:"bytes,2,opt,name=volumeNamespace"` - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"` - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` - // SecretRef specifies the secret to use for obtaining the StorageOS API - // credentials. If not specified, default values will be attempted. - // +optional - SecretRef *ObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"` -} - -// Adapts a ConfigMap into a volume. -// -// The contents of the target ConfigMap's Data field will be presented in a -// volume as files using the keys in the Data field as the file names, unless -// the items element is populated with specific mappings of keys to paths. -// ConfigMap volumes support ownership management and SELinux relabeling. -type ConfigMapVolumeSource struct { - LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` - // If unspecified, each key-value pair in the Data field of the referenced - // ConfigMap will be projected into the volume as a file whose name is the - // key and content is the value. If specified, the listed keys will be - // projected into the specified paths, and unlisted keys will not be - // present. If a key is specified which is not present in the ConfigMap, - // the volume setup will error unless it is marked optional. Paths must be - // relative and may not contain the '..' path or start with '..'. - // +optional - Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` - // Optional: mode bits used to set permissions on created files by default. - // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - // Defaults to 0644. - // Directories within the path are not affected by this setting. - // This might be in conflict with other options that affect the file - // mode, like fsGroup, and the result can be other mode bits set. - // +optional - DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,3,opt,name=defaultMode"` - // Specify whether the ConfigMap or its keys must be defined - // +optional - Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` -} - -const ( - ConfigMapVolumeSourceDefaultMode int32 = 0644 -) - -// Adapts a ConfigMap into a projected volume. -// -// The contents of the target ConfigMap's Data field will be presented in a -// projected volume as files using the keys in the Data field as the file names, -// unless the items element is populated with specific mappings of keys to paths. -// Note that this is identical to a configmap volume source without the default -// mode. -type ConfigMapProjection struct { - LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` - // If unspecified, each key-value pair in the Data field of the referenced - // ConfigMap will be projected into the volume as a file whose name is the - // key and content is the value. If specified, the listed keys will be - // projected into the specified paths, and unlisted keys will not be - // present. If a key is specified which is not present in the ConfigMap, - // the volume setup will error unless it is marked optional. Paths must be - // relative and may not contain the '..' path or start with '..'. - // +optional - Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` - // Specify whether the ConfigMap or its keys must be defined - // +optional - Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` -} - -// ServiceAccountTokenProjection represents a projected service account token -// volume. This projection can be used to insert a service account token into -// the pods runtime filesystem for use against APIs (Kubernetes API Server or -// otherwise). -type ServiceAccountTokenProjection struct { - // Audience is the intended audience of the token. A recipient of a token - // must identify itself with an identifier specified in the audience of the - // token, and otherwise should reject the token. The audience defaults to the - // identifier of the apiserver. - //+optional - Audience string `json:"audience,omitempty" protobuf:"bytes,1,rep,name=audience"` - // ExpirationSeconds is the requested duration of validity of the service - // account token. As the token approaches expiration, the kubelet volume - // plugin will proactively rotate the service account token. The kubelet will - // start trying to rotate the token if the token is older than 80 percent of - // its time to live or if the token is older than 24 hours.Defaults to 1 hour - // and must be at least 10 minutes. - //+optional - ExpirationSeconds *int64 `json:"expirationSeconds,omitempty" protobuf:"varint,2,opt,name=expirationSeconds"` - // Path is the path relative to the mount point of the file to project the - // token into. - Path string `json:"path" protobuf:"bytes,3,opt,name=path"` -} - -// Represents a projected volume source -type ProjectedVolumeSource struct { - // list of volume projections - // +optional - Sources []VolumeProjection `json:"sources" protobuf:"bytes,1,rep,name=sources"` - // Mode bits used to set permissions on created files by default. - // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - // Directories within the path are not affected by this setting. - // This might be in conflict with other options that affect the file - // mode, like fsGroup, and the result can be other mode bits set. - // +optional - DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,2,opt,name=defaultMode"` -} - -// Projection that may be projected along with other supported volume types -type VolumeProjection struct { - // all types below are the supported types for projection into the same volume - - // information about the secret data to project - // +optional - Secret *SecretProjection `json:"secret,omitempty" protobuf:"bytes,1,opt,name=secret"` - // information about the downwardAPI data to project - // +optional - DownwardAPI *DownwardAPIProjection `json:"downwardAPI,omitempty" protobuf:"bytes,2,opt,name=downwardAPI"` - // information about the configMap data to project - // +optional - ConfigMap *ConfigMapProjection `json:"configMap,omitempty" protobuf:"bytes,3,opt,name=configMap"` - // information about the serviceAccountToken data to project - // +optional - ServiceAccountToken *ServiceAccountTokenProjection `json:"serviceAccountToken,omitempty" protobuf:"bytes,4,opt,name=serviceAccountToken"` -} - -const ( - ProjectedVolumeSourceDefaultMode int32 = 0644 -) - -// Maps a string key to a path within a volume. -type KeyToPath struct { - // The key to project. - Key string `json:"key" protobuf:"bytes,1,opt,name=key"` - - // The relative path of the file to map the key to. - // May not be an absolute path. - // May not contain the path element '..'. - // May not start with the string '..'. - Path string `json:"path" protobuf:"bytes,2,opt,name=path"` - // Optional: mode bits used to set permissions on this file. - // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - // If not specified, the volume defaultMode will be used. - // This might be in conflict with other options that affect the file - // mode, like fsGroup, and the result can be other mode bits set. - // +optional - Mode *int32 `json:"mode,omitempty" protobuf:"varint,3,opt,name=mode"` -} - -// Local represents directly-attached storage with node affinity (Beta feature) -type LocalVolumeSource struct { - // The full path to the volume on the node. - // It can be either a directory or block device (disk, partition, ...). - Path string `json:"path" protobuf:"bytes,1,opt,name=path"` - - // Filesystem type to mount. - // It applies only when the Path is a block device. - // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". The default value is to auto-select a fileystem if unspecified. - // +optional - FSType *string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` -} - -// Represents storage that is managed by an external CSI volume driver (Beta feature) -type CSIPersistentVolumeSource struct { - // Driver is the name of the driver to use for this volume. - // Required. - Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"` - - // VolumeHandle is the unique volume name returned by the CSI volume - // plugin’s CreateVolume to refer to the volume on all subsequent calls. - // Required. - VolumeHandle string `json:"volumeHandle" protobuf:"bytes,2,opt,name=volumeHandle"` - - // Optional: The value to pass to ControllerPublishVolumeRequest. - // Defaults to false (read/write). - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` - - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". - // +optional - FSType string `json:"fsType,omitempty" protobuf:"bytes,4,opt,name=fsType"` - - // Attributes of the volume to publish. - // +optional - VolumeAttributes map[string]string `json:"volumeAttributes,omitempty" protobuf:"bytes,5,rep,name=volumeAttributes"` - - // ControllerPublishSecretRef is a reference to the secret object containing - // sensitive information to pass to the CSI driver to complete the CSI - // ControllerPublishVolume and ControllerUnpublishVolume calls. - // This field is optional, and may be empty if no secret is required. If the - // secret object contains more than one secret, all secrets are passed. - // +optional - ControllerPublishSecretRef *SecretReference `json:"controllerPublishSecretRef,omitempty" protobuf:"bytes,6,opt,name=controllerPublishSecretRef"` - - // NodeStageSecretRef is a reference to the secret object containing sensitive - // information to pass to the CSI driver to complete the CSI NodeStageVolume - // and NodeStageVolume and NodeUnstageVolume calls. - // This field is optional, and may be empty if no secret is required. If the - // secret object contains more than one secret, all secrets are passed. - // +optional - NodeStageSecretRef *SecretReference `json:"nodeStageSecretRef,omitempty" protobuf:"bytes,7,opt,name=nodeStageSecretRef"` - - // NodePublishSecretRef is a reference to the secret object containing - // sensitive information to pass to the CSI driver to complete the CSI - // NodePublishVolume and NodeUnpublishVolume calls. - // This field is optional, and may be empty if no secret is required. If the - // secret object contains more than one secret, all secrets are passed. - // +optional - NodePublishSecretRef *SecretReference `json:"nodePublishSecretRef,omitempty" protobuf:"bytes,8,opt,name=nodePublishSecretRef"` - - // ControllerExpandSecretRef is a reference to the secret object containing - // sensitive information to pass to the CSI driver to complete the CSI - // ControllerExpandVolume call. - // This is an alpha field and requires enabling ExpandCSIVolumes feature gate. - // This field is optional, and may be empty if no secret is required. If the - // secret object contains more than one secret, all secrets are passed. - // +optional - ControllerExpandSecretRef *SecretReference `json:"controllerExpandSecretRef,omitempty" protobuf:"bytes,9,opt,name=controllerExpandSecretRef"` -} - -// Represents a source location of a volume to mount, managed by an external CSI driver -type CSIVolumeSource struct { - // Driver is the name of the CSI driver that handles this volume. - // Consult with your admin for the correct name as registered in the cluster. - Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"` - - // Specifies a read-only configuration for the volume. - // Defaults to false (read/write). - // +optional - ReadOnly *bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"` - - // Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". - // If not provided, the empty value is passed to the associated CSI driver - // which will determine the default filesystem to apply. - // +optional - FSType *string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"` - - // VolumeAttributes stores driver-specific properties that are passed to the CSI - // driver. Consult your driver's documentation for supported values. - // +optional - VolumeAttributes map[string]string `json:"volumeAttributes,omitempty" protobuf:"bytes,4,rep,name=volumeAttributes"` - - // NodePublishSecretRef is a reference to the secret object containing - // sensitive information to pass to the CSI driver to complete the CSI - // NodePublishVolume and NodeUnpublishVolume calls. - // This field is optional, and may be empty if no secret is required. If the - // secret object contains more than one secret, all secret references are passed. - // +optional - NodePublishSecretRef *LocalObjectReference `json:"nodePublishSecretRef,omitempty" protobuf:"bytes,5,opt,name=nodePublishSecretRef"` -} - -// Represents an ephemeral volume that is handled by a normal storage driver. -type EphemeralVolumeSource struct { - // Will be used to create a stand-alone PVC to provision the volume. - // The pcm_pod in which this EphemeralVolumeSource is embedded will be the - // owner of the PVC, i.e. the PVC will be deleted together with the - // pcm_pod. The name of the PVC will be `-` where - // `` is the name from the `PodSpec.Volumes` array - // entry. Pod validation will reject the pcm_pod if the concatenated name - // is not valid for a PVC (for example, too long). - // - // An existing PVC with that name that is not owned by the pcm_pod - // will *not* be used for the pcm_pod to avoid using an unrelated - // volume by mistake. Starting the pcm_pod is then blocked until - // the unrelated PVC is removed. If such a pre-created PVC is - // meant to be used by the pcm_pod, the PVC has to updated with an - // owner reference to the pcm_pod once the pcm_pod exists. Normally - // this should not be necessary, but it may be useful when - // manually reconstructing a broken cluster. - // - // This field is read-only and no changes will be made by Kubernetes - // to the PVC after it has been created. - // - // Required, must not be nil. - VolumeClaimTemplate *PersistentVolumeClaimTemplate `json:"volumeClaimTemplate,omitempty" protobuf:"bytes,1,opt,name=volumeClaimTemplate"` - - // ReadOnly is tombstoned to show why 2 is a reserved protobuf tag. - // ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"` -} - -// PersistentVolumeClaimTemplate is used to produce -// PersistentVolumeClaim objects as part of an EphemeralVolumeSource. -type PersistentVolumeClaimTemplate struct { - // May contain labels and annotations that will be copied into the PVC - // when creating it. No other fields are allowed and will be rejected during - // validation. - // - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // The specification for the PersistentVolumeClaim. The entire content is - // copied unchanged into the PVC that gets created from this - // template. The same fields as in a PersistentVolumeClaim - // are also valid here. - Spec PersistentVolumeClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"` -} - -// ContainerPort represents a network port in a single container. -type ContainerPort struct { - // If specified, this must be an IANA_SVC_NAME and unique within the pcm_pod. Each - // named port in a pcm_pod must have a unique name. Name for the port that can be - // referred to by services. - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - // Number of port to expose on the host. - // If specified, this must be a valid port number, 0 < x < 65536. - // If HostNetwork is specified, this must match ContainerPort. - // Most containers do not need this. - // +optional - HostPort int32 `json:"hostPort,omitempty" protobuf:"varint,2,opt,name=hostPort"` - // Number of port to expose on the pcm_pod's IP address. - // This must be a valid port number, 0 < x < 65536. - ContainerPort int32 `json:"containerPort" protobuf:"varint,3,opt,name=containerPort"` - // Protocol for port. Must be UDP, TCP, or SCTP. - // Defaults to "TCP". - // +optional - // +default="TCP" - Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,4,opt,name=protocol,casttype=Protocol"` - // What host IP to bind the external port to. - // +optional - HostIP string `json:"hostIP,omitempty" protobuf:"bytes,5,opt,name=hostIP"` -} - -// VolumeMount describes a mounting of a Volume within a container. -type VolumeMount struct { - // This must match the Name of a Volume. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // Mounted read-only if true, read-write otherwise (false or unspecified). - // Defaults to false. - // +optional - ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"` - // Path within the container at which the volume should be mounted. Must - // not contain ':'. - MountPath string `json:"mountPath" protobuf:"bytes,3,opt,name=mountPath"` - // Path within the volume from which the container's volume should be mounted. - // Defaults to "" (volume's root). - // +optional - SubPath string `json:"subPath,omitempty" protobuf:"bytes,4,opt,name=subPath"` - // mountPropagation determines how mounts are propagated from the host - // to container and the other way around. - // When not set, MountPropagationNone is used. - // This field is beta in 1.10. - // +optional - MountPropagation *MountPropagationMode `json:"mountPropagation,omitempty" protobuf:"bytes,5,opt,name=mountPropagation,casttype=MountPropagationMode"` - // Expanded path within the volume from which the container's volume should be mounted. - // Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - // Defaults to "" (volume's root). - // SubPathExpr and SubPath are mutually exclusive. - // +optional - SubPathExpr string `json:"subPathExpr,omitempty" protobuf:"bytes,6,opt,name=subPathExpr"` -} - -// MountPropagationMode describes mount propagation. -type MountPropagationMode string - -const ( - // MountPropagationNone means that the volume in a container will - // not receive new mounts from the host or other containers, and filesystems - // mounted inside the container won't be propagated to the host or other - // containers. - // Note that this mode corresponds to "private" in Linux terminology. - MountPropagationNone MountPropagationMode = "None" - // MountPropagationHostToContainer means that the volume in a container will - // receive new mounts from the host or other containers, but filesystems - // mounted inside the container won't be propagated to the host or other - // containers. - // Note that this mode is recursively applied to all mounts in the volume - // ("rslave" in Linux terminology). - MountPropagationHostToContainer MountPropagationMode = "HostToContainer" - // MountPropagationBidirectional means that the volume in a container will - // receive new mounts from the host or other containers, and its own mounts - // will be propagated from the container to the host or other containers. - // Note that this mode is recursively applied to all mounts in the volume - // ("rshared" in Linux terminology). - MountPropagationBidirectional MountPropagationMode = "Bidirectional" -) - -// volumeDevice describes a mapping of a raw block device within a container. -type VolumeDevice struct { - // name must match the name of a persistentVolumeClaim in the pcm_pod - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // devicePath is the path inside of the container that the device will be mapped to. - DevicePath string `json:"devicePath" protobuf:"bytes,2,opt,name=devicePath"` -} - -// EnvVar represents an environment variable present in a Container. -type EnvVar struct { - // Name of the environment variable. Must be a C_IDENTIFIER. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - - // Optional: no more than one of the following may be specified. - - // Variable references $(VAR_NAME) are expanded - // using the previous defined environment variables in the container and - // any service environment variables. If a variable cannot be resolved, - // the reference in the input string will be unchanged. The $(VAR_NAME) - // syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped - // references will never be expanded, regardless of whether the variable - // exists or not. - // Defaults to "". - // +optional - Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"` - // Source for the environment variable's value. Cannot be used if value is not empty. - // +optional - ValueFrom *EnvVarSource `json:"valueFrom,omitempty" protobuf:"bytes,3,opt,name=valueFrom"` -} - -// EnvVarSource represents a source for the value of an EnvVar. -type EnvVarSource struct { - // Selects a field of the pcm_pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - // +optional - FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,1,opt,name=fieldRef"` - // Selects a resource of the container: only resources limits and requests - // (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - // +optional - ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,2,opt,name=resourceFieldRef"` - // Selects a key of a ConfigMap. - // +optional - ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty" protobuf:"bytes,3,opt,name=configMapKeyRef"` - // Selects a key of a secret in the pcm_pod's namespace - // +optional - SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty" protobuf:"bytes,4,opt,name=secretKeyRef"` -} - -// ObjectFieldSelector selects an APIVersioned field of an object. -type ObjectFieldSelector struct { - // Version of the schema the FieldPath is written in terms of, defaults to "v1". - // +optional - APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"` - // Path of the field to select in the specified API version. - FieldPath string `json:"fieldPath" protobuf:"bytes,2,opt,name=fieldPath"` -} - -// ResourceFieldSelector represents container resources (cpu, memory) and their output format -type ResourceFieldSelector struct { - // Container name: required for volumes, optional for env vars - // +optional - ContainerName string `json:"containerName,omitempty" protobuf:"bytes,1,opt,name=containerName"` - // Required: resource to select - Resource string `json:"resource" protobuf:"bytes,2,opt,name=resource"` - // Specifies the output format of the exposed resources, defaults to "1" - // +optional - Divisor resource.Quantity `json:"divisor,omitempty" protobuf:"bytes,3,opt,name=divisor"` -} - -// Selects a key from a ConfigMap. -type ConfigMapKeySelector struct { - // The ConfigMap to select from. - LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` - // The key to select. - Key string `json:"key" protobuf:"bytes,2,opt,name=key"` - // Specify whether the ConfigMap or its key must be defined - // +optional - Optional *bool `json:"optional,omitempty" protobuf:"varint,3,opt,name=optional"` -} - -// SecretKeySelector selects a key of a Secret. -type SecretKeySelector struct { - // The name of the secret in the pcm_pod's namespace to select from. - LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` - // The key of the secret to select from. Must be a valid secret key. - Key string `json:"key" protobuf:"bytes,2,opt,name=key"` - // Specify whether the Secret or its key must be defined - // +optional - Optional *bool `json:"optional,omitempty" protobuf:"varint,3,opt,name=optional"` -} - -// EnvFromSource represents the source of a set of ConfigMaps -type EnvFromSource struct { - // An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - // +optional - Prefix string `json:"prefix,omitempty" protobuf:"bytes,1,opt,name=prefix"` - // The ConfigMap to select from - // +optional - ConfigMapRef *ConfigMapEnvSource `json:"configMapRef,omitempty" protobuf:"bytes,2,opt,name=configMapRef"` - // The Secret to select from - // +optional - SecretRef *SecretEnvSource `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"` -} - -// ConfigMapEnvSource selects a ConfigMap to populate the environment -// variables with. -// -// The contents of the target ConfigMap's Data field will represent the -// key-value pairs as environment variables. -type ConfigMapEnvSource struct { - // The ConfigMap to select from. - LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` - // Specify whether the ConfigMap must be defined - // +optional - Optional *bool `json:"optional,omitempty" protobuf:"varint,2,opt,name=optional"` -} - -// SecretEnvSource selects a Secret to populate the environment -// variables with. -// -// The contents of the target Secret's Data field will represent the -// key-value pairs as environment variables. -type SecretEnvSource struct { - // The Secret to select from. - LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` - // Specify whether the Secret must be defined - // +optional - Optional *bool `json:"optional,omitempty" protobuf:"varint,2,opt,name=optional"` -} - -// HTTPHeader describes a custom header to be used in HTTP probes -type HTTPHeader struct { - // The header field name - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // The header field value - Value string `json:"value" protobuf:"bytes,2,opt,name=value"` -} - -// HTTPGetAction describes an action based on HTTP Get requests. -type HTTPGetAction struct { - // Path to access on the HTTP server. - // +optional - Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` - // Name or number of the port to access on the container. - // Number must be in the range 1 to 65535. - // Name must be an IANA_SVC_NAME. - Port intstr.IntOrString `json:"port" protobuf:"bytes,2,opt,name=port"` - // Host name to connect to, defaults to the pcm_pod IP. You probably want to set - // "Host" in httpHeaders instead. - // +optional - Host string `json:"host,omitempty" protobuf:"bytes,3,opt,name=host"` - // Scheme to use for connecting to the host. - // Defaults to HTTP. - // +optional - Scheme URIScheme `json:"scheme,omitempty" protobuf:"bytes,4,opt,name=scheme,casttype=URIScheme"` - // Custom headers to set in the request. HTTP allows repeated headers. - // +optional - HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty" protobuf:"bytes,5,rep,name=httpHeaders"` -} - -// URIScheme identifies the scheme used for connection to a host for Get actions -type URIScheme string - -const ( - // URISchemeHTTP means that the scheme used will be http:// - URISchemeHTTP URIScheme = "HTTP" - // URISchemeHTTPS means that the scheme used will be https:// - URISchemeHTTPS URIScheme = "HTTPS" -) - -// TCPSocketAction describes an action based on opening a socket -type TCPSocketAction struct { - // Number or name of the port to access on the container. - // Number must be in the range 1 to 65535. - // Name must be an IANA_SVC_NAME. - Port intstr.IntOrString `json:"port" protobuf:"bytes,1,opt,name=port"` - // Optional: Host name to connect to, defaults to the pcm_pod IP. - // +optional - Host string `json:"host,omitempty" protobuf:"bytes,2,opt,name=host"` -} - -// ExecAction describes a "run in container" action. -type ExecAction struct { - // Command is the command line to execute inside the container, the working directory for the - // command is root ('/') in the container's filesystem. The command is simply exec'd, it is - // not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - // a shell, you need to explicitly call out to that shell. - // Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - // +optional - Command []string `json:"command,omitempty" protobuf:"bytes,1,rep,name=command"` -} - -// Probe describes a health check to be performed against a container to determine whether it is -// alive or ready to receive traffic. -type Probe struct { - // The action taken to determine the health of a container - Handler `json:",inline" protobuf:"bytes,1,opt,name=handler"` - // Number of seconds after the container has started before liveness probes are initiated. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - // +optional - InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty" protobuf:"varint,2,opt,name=initialDelaySeconds"` - // Number of seconds after which the probe times out. - // Defaults to 1 second. Minimum value is 1. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - // +optional - TimeoutSeconds int32 `json:"timeoutSeconds,omitempty" protobuf:"varint,3,opt,name=timeoutSeconds"` - // How often (in seconds) to perform the probe. - // Default to 10 seconds. Minimum value is 1. - // +optional - PeriodSeconds int32 `json:"periodSeconds,omitempty" protobuf:"varint,4,opt,name=periodSeconds"` - // Minimum consecutive successes for the probe to be considered successful after having failed. - // Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - // +optional - SuccessThreshold int32 `json:"successThreshold,omitempty" protobuf:"varint,5,opt,name=successThreshold"` - // Minimum consecutive failures for the probe to be considered failed after having succeeded. - // Defaults to 3. Minimum value is 1. - // +optional - FailureThreshold int32 `json:"failureThreshold,omitempty" protobuf:"varint,6,opt,name=failureThreshold"` - // Optional duration in seconds the pcm_pod needs to terminate gracefully upon probe failure. - // The grace period is the duration in seconds after the processes running in the pcm_pod are sent - // a termination signal and the time when the processes are forcibly halted with a kill signal. - // Set this value longer than the expected cleanup time for your process. - // If this value is nil, the pcm_pod's terminationGracePeriodSeconds will be used. Otherwise, this - // value overrides the value provided by the pcm_pod spec. - // Value must be non-negative integer. The value zero indicates stop immediately via - // the kill signal (no opportunity to shut down). - // This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. - // +optional - TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" protobuf:"varint,7,opt,name=terminationGracePeriodSeconds"` -} - -// PullPolicy describes a policy for if/when to pull a container image -type PullPolicy string - -const ( - // PullAlways means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - PullAlways PullPolicy = "Always" - // PullNever means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present - PullNever PullPolicy = "Never" - // PullIfNotPresent means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails. - PullIfNotPresent PullPolicy = "IfNotPresent" -) - -// PreemptionPolicy describes a policy for if/when to preempt a pcm_pod. -type PreemptionPolicy string - -const ( - // PreemptLowerPriority means that pcm_pod can preempt other pods with lower priority. - PreemptLowerPriority PreemptionPolicy = "PreemptLowerPriority" - // PreemptNever means that pcm_pod never preempts other pods with lower priority. - PreemptNever PreemptionPolicy = "Never" -) - -// TerminationMessagePolicy describes how termination messages are retrieved from a container. -type TerminationMessagePolicy string - -const ( - // TerminationMessageReadFile is the default behavior and will set the container status message to - // the contents of the container's terminationMessagePath when the container exits. - TerminationMessageReadFile TerminationMessagePolicy = "File" - // TerminationMessageFallbackToLogsOnError will read the most recent contents of the container logs - // for the container status message when the container exits with an error and the - // terminationMessagePath has no contents. - TerminationMessageFallbackToLogsOnError TerminationMessagePolicy = "FallbackToLogsOnError" -) - -// Capability represent POSIX capabilities type -type Capability string - -// Adds and removes POSIX capabilities from running containers. -type Capabilities struct { - // Added capabilities - // +optional - Add []Capability `json:"add,omitempty" protobuf:"bytes,1,rep,name=add,casttype=Capability"` - // Removed capabilities - // +optional - Drop []Capability `json:"drop,omitempty" protobuf:"bytes,2,rep,name=drop,casttype=Capability"` -} - -// ResourceRequirements describes the compute resource requirements. -type ResourceRequirements struct { - // Limits describes the maximum amount of compute resources allowed. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // +optional - Limits ResourceList `json:"limits,omitempty" protobuf:"bytes,1,rep,name=limits,casttype=ResourceList,castkey=ResourceName"` - // Requests describes the minimum amount of compute resources required. - // If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - // otherwise to an implementation-defined value. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // +optional - Requests ResourceList `json:"requests,omitempty" protobuf:"bytes,2,rep,name=requests,casttype=ResourceList,castkey=ResourceName"` -} - -const ( - // TerminationMessagePathDefault means the default path to capture the application termination message running in a container - TerminationMessagePathDefault string = "/dev/termination-log" -) - -// A single application container that you want to run within a pcm_pod. -type Container struct { - // Name of the container specified as a DNS_LABEL. - // Each container in a pcm_pod must have a unique name (DNS_LABEL). - // Cannot be updated. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // Docker image name. - // More info: https://kubernetes.io/docs/concepts/containers/images - // This field is optional to allow higher level config management to default or override - // container images in workload controllers like Deployments and StatefulSets. - // +optional - Image string `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"` - // Entrypoint array. Not executed within a shell. - // The docker image's ENTRYPOINT is used if this is not provided. - // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable - // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax - // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, - // regardless of whether the variable exists or not. - // Cannot be updated. - // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - // +optional - Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"` - // Arguments to the entrypoint. - // The docker image's CMD is used if this is not provided. - // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable - // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax - // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, - // regardless of whether the variable exists or not. - // Cannot be updated. - // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - // +optional - Args []string `json:"args,omitempty" protobuf:"bytes,4,rep,name=args"` - // Container's working directory. - // If not specified, the container runtime's default will be used, which - // might be configured in the container image. - // Cannot be updated. - // +optional - WorkingDir string `json:"workingDir,omitempty" protobuf:"bytes,5,opt,name=workingDir"` - // List of ports to expose from the container. Exposing a port here gives - // the system additional information about the network connections a - // container uses, but is primarily informational. Not specifying a port here - // DOES NOT prevent that port from being exposed. Any port which is - // listening on the default "0.0.0.0" address inside a container will be - // accessible from the network. - // Cannot be updated. - // +optional - // +patchMergeKey=containerPort - // +patchStrategy=merge - // +listType=map - // +listMapKey=containerPort - // +listMapKey=protocol - Ports []ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"` - // List of sources to populate environment variables in the container. - // The keys defined within a source must be a C_IDENTIFIER. All invalid keys - // will be reported as an event when the container is starting. When a key exists in multiple - // sources, the value associated with the last source will take precedence. - // Values defined by an Env with a duplicate key will take precedence. - // Cannot be updated. - // +optional - EnvFrom []EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,19,rep,name=envFrom"` - // List of environment variables to set in the container. - // Cannot be updated. - // +optional - // +patchMergeKey=name - // +patchStrategy=merge - Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"` - // Compute Resources required by this container. - // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // +optional - Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,8,opt,name=resources"` - // Pod volumes to mount into the container's filesystem. - // Cannot be updated. - // +optional - // +patchMergeKey=mountPath - // +patchStrategy=merge - VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` - // volumeDevices is the list of block devices to be used by the container. - // +patchMergeKey=devicePath - // +patchStrategy=merge - // +optional - VolumeDevices []VolumeDevice `json:"volumeDevices,omitempty" patchStrategy:"merge" patchMergeKey:"devicePath" protobuf:"bytes,21,rep,name=volumeDevices"` - // Periodic probe of container liveness. - // Container will be restarted if the probe fails. - // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - // +optional - LivenessProbe *Probe `json:"livenessProbe,omitempty" protobuf:"bytes,10,opt,name=livenessProbe"` - // Periodic probe of container service readiness. - // Container will be removed from service endpoints if the probe fails. - // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - // +optional - ReadinessProbe *Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"` - // StartupProbe indicates that the Pod has successfully initialized. - // If specified, no other probes are executed until this completes successfully. - // If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. - // This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, - // when it might take a long time to load data or warm a cache, than during steady-state operation. - // This cannot be updated. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - // +optional - StartupProbe *Probe `json:"startupProbe,omitempty" protobuf:"bytes,22,opt,name=startupProbe"` - // Actions that the management system should take in response to container lifecycle events. - // Cannot be updated. - // +optional - Lifecycle *Lifecycle `json:"lifecycle,omitempty" protobuf:"bytes,12,opt,name=lifecycle"` - // Optional: Path at which the file to which the container's termination message - // will be written is mounted into the container's filesystem. - // Message written is intended to be brief final status, such as an assertion failure message. - // Will be truncated by the node if greater than 4096 bytes. The total message length across - // all containers will be limited to 12kb. - // Defaults to /dev/termination-log. - // Cannot be updated. - // +optional - TerminationMessagePath string `json:"terminationMessagePath,omitempty" protobuf:"bytes,13,opt,name=terminationMessagePath"` - // Indicate how the termination message should be populated. File will use the contents of - // terminationMessagePath to populate the container status message on both success and failure. - // FallbackToLogsOnError will use the last chunk of container log output if the termination - // message file is empty and the container exited with an error. - // The log output is limited to 2048 bytes or 80 lines, whichever is smaller. - // Defaults to File. - // Cannot be updated. - // +optional - TerminationMessagePolicy TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty" protobuf:"bytes,20,opt,name=terminationMessagePolicy,casttype=TerminationMessagePolicy"` - // Image pull policy. - // One of Always, Never, IfNotPresent. - // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. - // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images - // +optional - ImagePullPolicy PullPolicy `json:"imagePullPolicy,omitempty" protobuf:"bytes,14,opt,name=imagePullPolicy,casttype=PullPolicy"` - // Security options the pcm_pod should run with. - // More info: https://kubernetes.io/docs/concepts/policy/security-context/ - // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - // +optional - SecurityContext *SecurityContext `json:"securityContext,omitempty" protobuf:"bytes,15,opt,name=securityContext"` - - // Variables for interactive containers, these have very specialized use-cases (e.g. debugging) - // and shouldn't be used for general purpose containers. - - // Whether this container should allocate a buffer for stdin in the container runtime. If this - // is not set, reads from stdin in the container will always result in EOF. - // Default is false. - // +optional - Stdin bool `json:"stdin,omitempty" protobuf:"varint,16,opt,name=stdin"` - // Whether the container runtime should close the stdin channel after it has been opened by - // a single attach. When stdin is true the stdin stream will remain open across multiple attach - // sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the - // first client attaches to stdin, and then remains open and accepts data until the client disconnects, - // at which time stdin is closed and remains closed until the container is restarted. If this - // flag is false, a container processes that reads from stdin will never receive an EOF. - // Default is false - // +optional - StdinOnce bool `json:"stdinOnce,omitempty" protobuf:"varint,17,opt,name=stdinOnce"` - // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. - // Default is false. - // +optional - TTY bool `json:"tty,omitempty" protobuf:"varint,18,opt,name=tty"` -} - -// Handler defines a specific action that should be taken -// TODO: pass structured data to these actions, and document that data here. -type Handler struct { - // One and only one of the following should be specified. - // Exec specifies the action to take. - // +optional - Exec *ExecAction `json:"exec,omitempty" protobuf:"bytes,1,opt,name=exec"` - // HTTPGet specifies the http request to perform. - // +optional - HTTPGet *HTTPGetAction `json:"httpGet,omitempty" protobuf:"bytes,2,opt,name=httpGet"` - // TCPSocket specifies an action involving a TCP port. - // TCP hooks not yet supported - // TODO: implement a realistic TCP lifecycle hook - // +optional - TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"` -} - -// Lifecycle describes actions that the management system should take in response to container lifecycle -// events. For the PostStart and PreStop lifecycle handlers, management of the container blocks -// until the action is complete, unless the container process fails, in which case the handler is aborted. -type Lifecycle struct { - // PostStart is called immediately after a container is created. If the handler fails, - // the container is terminated and restarted according to its restart policy. - // Other management of the container blocks until the hook completes. - // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - // +optional - PostStart *Handler `json:"postStart,omitempty" protobuf:"bytes,1,opt,name=postStart"` - // PreStop is called immediately before a container is terminated due to an - // API request or management event such as liveness/startup probe failure, - // preemption, resource contention, etc. The handler is not called if the - // container crashes or exits. The reason for termination is passed to the - // handler. The Pod's termination grace period countdown begins before the - // PreStop hooked is executed. Regardless of the outcome of the handler, the - // container will eventually terminate within the Pod's termination grace - // period. Other management of the container blocks until the hook completes - // or until the termination grace period is reached. - // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - // +optional - PreStop *Handler `json:"preStop,omitempty" protobuf:"bytes,2,opt,name=preStop"` -} - -type ConditionStatus string - -// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. -// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes -// can't decide if a resource is in the condition or not. In the future, we could add other -// intermediate conditions, e.g. ConditionDegraded. -const ( - ConditionTrue ConditionStatus = "True" - ConditionFalse ConditionStatus = "False" - ConditionUnknown ConditionStatus = "Unknown" -) - -// ContainerStateWaiting is a waiting state of a container. -type ContainerStateWaiting struct { - // (brief) reason the container is not yet running. - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason"` - // Message regarding why the container is not yet running. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` -} - -// ContainerStateRunning is a running state of a container. -type ContainerStateRunning struct { - // Time at which the container was last (re-)started - // +optional - StartedAt metav1.Time `json:"startedAt,omitempty" protobuf:"bytes,1,opt,name=startedAt"` -} - -// ContainerStateTerminated is a terminated state of a container. -type ContainerStateTerminated struct { - // Exit status from the last termination of the container - ExitCode int32 `json:"exitCode" protobuf:"varint,1,opt,name=exitCode"` - // Signal from the last termination of the container - // +optional - Signal int32 `json:"signal,omitempty" protobuf:"varint,2,opt,name=signal"` - // (brief) reason from the last termination of the container - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` - // Message regarding the last termination of the container - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"` - // Time at which previous execution of the container started - // +optional - StartedAt metav1.Time `json:"startedAt,omitempty" protobuf:"bytes,5,opt,name=startedAt"` - // Time at which the container last terminated - // +optional - FinishedAt metav1.Time `json:"finishedAt,omitempty" protobuf:"bytes,6,opt,name=finishedAt"` - // Container's ID in the format 'docker://' - // +optional - ContainerID string `json:"containerID,omitempty" protobuf:"bytes,7,opt,name=containerID"` -} - -// ContainerState holds a possible state of container. -// Only one of its members may be specified. -// If none of them is specified, the default one is ContainerStateWaiting. -type ContainerState struct { - // Details about a waiting container - // +optional - Waiting *ContainerStateWaiting `json:"waiting,omitempty" protobuf:"bytes,1,opt,name=waiting"` - // Details about a running container - // +optional - Running *ContainerStateRunning `json:"running,omitempty" protobuf:"bytes,2,opt,name=running"` - // Details about a terminated container - // +optional - Terminated *ContainerStateTerminated `json:"terminated,omitempty" protobuf:"bytes,3,opt,name=terminated"` -} - -// ContainerStatus contains details for the current status of this container. -type ContainerStatus struct { - // This must be a DNS_LABEL. Each container in a pcm_pod must have a unique name. - // Cannot be updated. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // Details about the container's current condition. - // +optional - State ContainerState `json:"state,omitempty" protobuf:"bytes,2,opt,name=state"` - // Details about the container's last termination condition. - // +optional - LastTerminationState ContainerState `json:"lastState,omitempty" protobuf:"bytes,3,opt,name=lastState"` - // Specifies whether the container has passed its readiness probe. - Ready bool `json:"ready" protobuf:"varint,4,opt,name=ready"` - // The number of times the container has been restarted, currently based on - // the number of dead containers that have not yet been removed. - // Note that this is calculated from dead containers. But those containers are subject to - // garbage collection. This value will get capped at 5 by GC. - RestartCount int32 `json:"restartCount" protobuf:"varint,5,opt,name=restartCount"` - // The image the container is running. - // More info: https://kubernetes.io/docs/concepts/containers/images - // TODO(dchen1107): Which image the container is running with? - Image string `json:"image" protobuf:"bytes,6,opt,name=image"` - // ImageID of the container's image. - ImageID string `json:"imageID" protobuf:"bytes,7,opt,name=imageID"` - // Container's ID in the format 'docker://'. - // +optional - ContainerID string `json:"containerID,omitempty" protobuf:"bytes,8,opt,name=containerID"` - // Specifies whether the container has passed its startup probe. - // Initialized as false, becomes true after startupProbe is considered successful. - // Resets to false when the container is restarted, or if kubelet loses state temporarily. - // Is always true when no startupProbe is defined. - // +optional - Started *bool `json:"started,omitempty" protobuf:"varint,9,opt,name=started"` -} - -// PodPhase is a label for the condition of a pcm_pod at the current time. -type PodPhase string - -// These are the valid statuses of pods. -const ( - // PodPending means the pcm_pod has been accepted by the system, but one or more of the containers - // has not been started. This includes time before being bound to a node, as well as time spent - // pulling images onto the host. - PodPending PodPhase = "Pending" - // PodRunning means the pcm_pod has been bound to a node and all of the containers have been started. - // At least one container is still running or is in the process of being restarted. - PodRunning PodPhase = "Running" - // PodSucceeded means that all containers in the pcm_pod have voluntarily terminated - // with a container exit code of 0, and the system is not going to restart any of these containers. - PodSucceeded PodPhase = "Succeeded" - // PodFailed means that all containers in the pcm_pod have terminated, and at least one container has - // terminated in a failure (exited with a non-zero exit code or was stopped by the system). - PodFailed PodPhase = "Failed" - // PodUnknown means that for some reason the state of the pcm_pod could not be obtained, typically due - // to an error in communicating with the host of the pcm_pod. - PodUnknown PodPhase = "Unknown" -) - -// PodConditionType is a valid value for PodCondition.Type -type PodConditionType string - -// These are valid conditions of pcm_pod. -const ( - // ContainersReady indicates whether all containers in the pcm_pod are ready. - ContainersReady PodConditionType = "ContainersReady" - // PodInitialized means that all init containers in the pcm_pod have started successfully. - PodInitialized PodConditionType = "Initialized" - // PodReady means the pcm_pod is able to service requests and should be added to the - // load balancing pools of all matching services. - PodReady PodConditionType = "Ready" - // PodScheduled represents status of the scheduling process for this pcm_pod. - PodScheduled PodConditionType = "PodScheduled" -) - -// These are reasons for a pcm_pod's transition to a condition. -const ( - // PodReasonUnschedulable reason in PodScheduled PodCondition means that the scheduler - // can't schedule the pcm_pod right now, for example due to insufficient resources in the cluster. - PodReasonUnschedulable = "Unschedulable" -) - -// PodCondition contains details for the current condition of this pcm_pod. -type PodCondition struct { - // Type is the type of the condition. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - Type PodConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PodConditionType"` - // Status is the status of the condition. - // Can be True, False, Unknown. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` - // Last time we probed the condition. - // +optional - LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` - // Last time the condition transitioned from one status to another. - // +optional - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` - // Unique, one-word, CamelCase reason for the condition's last transition. - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` - // Human-readable message indicating details about last transition. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` -} - -// RestartPolicy describes how the container should be restarted. -// Only one of the following restart policies may be specified. -// If none of the following policies is specified, the default one -// is RestartPolicyAlways. -type RestartPolicy string - -const ( - RestartPolicyAlways RestartPolicy = "Always" - RestartPolicyOnFailure RestartPolicy = "OnFailure" - RestartPolicyNever RestartPolicy = "Never" -) - -// DNSPolicy defines how a pcm_pod's DNS will be configured. -type DNSPolicy string - -const ( - // DNSClusterFirstWithHostNet indicates that the pcm_pod should use cluster DNS - // first, if it is available, then fall back on the default - // (as determined by kubelet) DNS settings. - DNSClusterFirstWithHostNet DNSPolicy = "ClusterFirstWithHostNet" - - // DNSClusterFirst indicates that the pcm_pod should use cluster DNS - // first unless hostNetwork is true, if it is available, then - // fall back on the default (as determined by kubelet) DNS settings. - DNSClusterFirst DNSPolicy = "ClusterFirst" - - // DNSDefault indicates that the pcm_pod should use the default (as - // determined by kubelet) DNS settings. - DNSDefault DNSPolicy = "Default" - - // DNSNone indicates that the pcm_pod should use empty DNS settings. DNS - // parameters such as nameservers and search paths should be defined via - // DNSConfig. - DNSNone DNSPolicy = "None" -) - -const ( - // DefaultTerminationGracePeriodSeconds indicates the default duration in - // seconds a pcm_pod needs to terminate gracefully. - DefaultTerminationGracePeriodSeconds = 30 -) - -// A node selector represents the union of the results of one or more label queries -// over a set of nodes; that is, it represents the OR of the selectors represented -// by the node selector terms. -type NodeSelector struct { - //Required. A list of node selector terms. The terms are ORed. - NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms" protobuf:"bytes,1,rep,name=nodeSelectorTerms"` -} - -// A null or empty node selector term matches no objects. The requirements of -// them are ANDed. -// The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. -type NodeSelectorTerm struct { - // A list of node selector requirements by node's labels. - // +optional - MatchExpressions []NodeSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,1,rep,name=matchExpressions"` - // A list of node selector requirements by node's fields. - // +optional - MatchFields []NodeSelectorRequirement `json:"matchFields,omitempty" protobuf:"bytes,2,rep,name=matchFields"` -} - -// A node selector requirement is a selector that contains values, a key, and an operator -// that relates the key and values. -type NodeSelectorRequirement struct { - // The label key that the selector applies to. - Key string `json:"key" protobuf:"bytes,1,opt,name=key"` - // Represents a key's relationship to a set of values. - // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - Operator NodeSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=NodeSelectorOperator"` - // An array of string values. If the operator is In or NotIn, - // the values array must be non-empty. If the operator is Exists or DoesNotExist, - // the values array must be empty. If the operator is Gt or Lt, the values - // array must have a single element, which will be interpreted as an integer. - // This array is replaced during a strategic merge patch. - // +optional - Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` -} - -// A node selector operator is the set of operators that can be used in -// a node selector requirement. -type NodeSelectorOperator string - -const ( - NodeSelectorOpIn NodeSelectorOperator = "In" - NodeSelectorOpNotIn NodeSelectorOperator = "NotIn" - NodeSelectorOpExists NodeSelectorOperator = "Exists" - NodeSelectorOpDoesNotExist NodeSelectorOperator = "DoesNotExist" - NodeSelectorOpGt NodeSelectorOperator = "Gt" - NodeSelectorOpLt NodeSelectorOperator = "Lt" -) - -// A topology selector term represents the result of label queries. -// A null or empty topology selector term matches no objects. -// The requirements of them are ANDed. -// It provides a subset of functionality as NodeSelectorTerm. -// This is an alpha feature and may change in the future. -type TopologySelectorTerm struct { - // A list of topology selector requirements by labels. - // +optional - MatchLabelExpressions []TopologySelectorLabelRequirement `json:"matchLabelExpressions,omitempty" protobuf:"bytes,1,rep,name=matchLabelExpressions"` -} - -// A topology selector requirement is a selector that matches given label. -// This is an alpha feature and may change in the future. -type TopologySelectorLabelRequirement struct { - // The label key that the selector applies to. - Key string `json:"key" protobuf:"bytes,1,opt,name=key"` - // An array of string values. One value must match the label to be selected. - // Each entry in Values is ORed. - Values []string `json:"values" protobuf:"bytes,2,rep,name=values"` -} - -// Affinity is a group of affinity scheduling rules. -type Affinity struct { - // Describes node affinity scheduling rules for the pcm_pod. - // +optional - NodeAffinity *NodeAffinity `json:"nodeAffinity,omitempty" protobuf:"bytes,1,opt,name=nodeAffinity"` - // Describes pcm_pod affinity scheduling rules (e.g. co-locate this pcm_pod in the same node, zone, etc. as some other pcm_pod(s)). - // +optional - PodAffinity *PodAffinity `json:"podAffinity,omitempty" protobuf:"bytes,2,opt,name=podAffinity"` - // Describes pcm_pod anti-affinity scheduling rules (e.g. avoid putting this pcm_pod in the same node, zone, etc. as some other pcm_pod(s)). - // +optional - PodAntiAffinity *PodAntiAffinity `json:"podAntiAffinity,omitempty" protobuf:"bytes,3,opt,name=podAntiAffinity"` -} - -// Pod affinity is a group of inter pcm_pod affinity scheduling rules. -type PodAffinity struct { - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. - // If the affinity requirements specified by this field are not met at - // scheduling time, the pcm_pod will not be scheduled onto the node. - // If the affinity requirements specified by this field cease to be met - // at some point during pcm_pod execution (e.g. due to a pcm_pod label update), the - // system will try to eventually evict the pcm_pod from its node. - // When there are multiple elements, the lists of nodes corresponding to each - // podAffinityTerm are intersected, i.e. all terms must be satisfied. - // +optional - // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` - - // If the affinity requirements specified by this field are not met at - // scheduling time, the pcm_pod will not be scheduled onto the node. - // If the affinity requirements specified by this field cease to be met - // at some point during pcm_pod execution (e.g. due to a pcm_pod label update), the - // system may or may not try to eventually evict the pcm_pod from its node. - // When there are multiple elements, the lists of nodes corresponding to each - // podAffinityTerm are intersected, i.e. all terms must be satisfied. - // +optional - RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,rep,name=requiredDuringSchedulingIgnoredDuringExecution"` - // The scheduler will prefer to schedule pods to nodes that satisfy - // the affinity expressions specified by this field, but it may choose - // a node that violates one or more of the expressions. The node that is - // most preferred is the one with the greatest sum of weights, i.e. - // for each node that meets all of the scheduling requirements (resource - // request, requiredDuringScheduling affinity expressions, etc.), - // compute a sum by iterating through the elements of this field and adding - // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - // node(s) with the highest sum are the most preferred. - // +optional - PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"` -} - -// Pod anti affinity is a group of inter pcm_pod anti affinity scheduling rules. -type PodAntiAffinity struct { - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. - // If the anti-affinity requirements specified by this field are not met at - // scheduling time, the pcm_pod will not be scheduled onto the node. - // If the anti-affinity requirements specified by this field cease to be met - // at some point during pcm_pod execution (e.g. due to a pcm_pod label update), the - // system will try to eventually evict the pcm_pod from its node. - // When there are multiple elements, the lists of nodes corresponding to each - // podAffinityTerm are intersected, i.e. all terms must be satisfied. - // +optional - // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` - - // If the anti-affinity requirements specified by this field are not met at - // scheduling time, the pcm_pod will not be scheduled onto the node. - // If the anti-affinity requirements specified by this field cease to be met - // at some point during pcm_pod execution (e.g. due to a pcm_pod label update), the - // system may or may not try to eventually evict the pcm_pod from its node. - // When there are multiple elements, the lists of nodes corresponding to each - // podAffinityTerm are intersected, i.e. all terms must be satisfied. - // +optional - RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,rep,name=requiredDuringSchedulingIgnoredDuringExecution"` - // The scheduler will prefer to schedule pods to nodes that satisfy - // the anti-affinity expressions specified by this field, but it may choose - // a node that violates one or more of the expressions. The node that is - // most preferred is the one with the greatest sum of weights, i.e. - // for each node that meets all of the scheduling requirements (resource - // request, requiredDuringScheduling anti-affinity expressions, etc.), - // compute a sum by iterating through the elements of this field and adding - // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - // node(s) with the highest sum are the most preferred. - // +optional - PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"` -} - -// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) -type WeightedPodAffinityTerm struct { - // weight associated with matching the corresponding podAffinityTerm, - // in the range 1-100. - Weight int32 `json:"weight" protobuf:"varint,1,opt,name=weight"` - // Required. A pcm_pod affinity term, associated with the corresponding weight. - PodAffinityTerm PodAffinityTerm `json:"podAffinityTerm" protobuf:"bytes,2,opt,name=podAffinityTerm"` -} - -// Defines a set of pods (namely those matching the labelSelector -// relative to the given namespace(s)) that this pcm_pod should be -// co-located (affinity) or not co-located (anti-affinity) with, -// where co-located is defined as running on a node whose value of -// the label with key matches that of any node on which -// a pcm_pod of the set of pods is running -type PodAffinityTerm struct { - // A label query over a set of resources, in this case pods. - // +optional - LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"` - // namespaces specifies a static list of namespace names that the term applies to. - // The term is applied to the union of the namespaces listed in this field - // and the ones selected by namespaceSelector. - // null or empty namespaces list and null namespaceSelector means "this pcm_pod's namespace" - // +optional - Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,2,rep,name=namespaces"` - // This pcm_pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - // the labelSelector in the specified namespaces, where co-located is defined as running on a node - // whose value of the label with key topologyKey matches that of any node on which any of the - // selected pods is running. - // Empty topologyKey is not allowed. - TopologyKey string `json:"topologyKey" protobuf:"bytes,3,opt,name=topologyKey"` - // A label query over the set of namespaces that the term applies to. - // The term is applied to the union of the namespaces selected by this field - // and the ones listed in the namespaces field. - // null selector and null or empty namespaces list means "this pcm_pod's namespace". - // An empty selector ({}) matches all namespaces. - // This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled. - // +optional - NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,4,opt,name=namespaceSelector"` -} - -// Node affinity is a group of node affinity scheduling rules. -type NodeAffinity struct { - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. - // If the affinity requirements specified by this field are not met at - // scheduling time, the pcm_pod will not be scheduled onto the node. - // If the affinity requirements specified by this field cease to be met - // at some point during pcm_pod execution (e.g. due to an update), the system - // will try to eventually evict the pcm_pod from its node. - // +optional - // RequiredDuringSchedulingRequiredDuringExecution *NodeSelector `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` - - // If the affinity requirements specified by this field are not met at - // scheduling time, the pcm_pod will not be scheduled onto the node. - // If the affinity requirements specified by this field cease to be met - // at some point during pcm_pod execution (e.g. due to an update), the system - // may or may not try to eventually evict the pcm_pod from its node. - // +optional - RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,opt,name=requiredDuringSchedulingIgnoredDuringExecution"` - // The scheduler will prefer to schedule pods to nodes that satisfy - // the affinity expressions specified by this field, but it may choose - // a node that violates one or more of the expressions. The node that is - // most preferred is the one with the greatest sum of weights, i.e. - // for each node that meets all of the scheduling requirements (resource - // request, requiredDuringScheduling affinity expressions, etc.), - // compute a sum by iterating through the elements of this field and adding - // "weight" to the sum if the node matches the corresponding matchExpressions; the - // node(s) with the highest sum are the most preferred. - // +optional - PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"` -} - -// An empty preferred scheduling term matches all objects with implicit weight 0 -// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). -type PreferredSchedulingTerm struct { - // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - Weight int32 `json:"weight" protobuf:"varint,1,opt,name=weight"` - // A node selector term, associated with the corresponding weight. - Preference NodeSelectorTerm `json:"preference" protobuf:"bytes,2,opt,name=preference"` -} - -// The node this Taint is attached to has the "effect" on -// any pcm_pod that does not tolerate the Taint. -type Taint struct { - // Required. The taint key to be applied to a node. - Key string `json:"key" protobuf:"bytes,1,opt,name=key"` - // The taint value corresponding to the taint key. - // +optional - Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"` - // Required. The effect of the taint on pods - // that do not tolerate the taint. - // Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - Effect TaintEffect `json:"effect" protobuf:"bytes,3,opt,name=effect,casttype=TaintEffect"` - // TimeAdded represents the time at which the taint was added. - // It is only written for NoExecute taints. - // +optional - TimeAdded *metav1.Time `json:"timeAdded,omitempty" protobuf:"bytes,4,opt,name=timeAdded"` -} - -type TaintEffect string - -const ( - // Do not allow new pods to schedule onto the node unless they tolerate the taint, - // but allow all pods submitted to Kubelet without going through the scheduler - // to start, and allow all already-running pods to continue running. - // Enforced by the scheduler. - TaintEffectNoSchedule TaintEffect = "NoSchedule" - // Like TaintEffectNoSchedule, but the scheduler tries not to schedule - // new pods onto the node, rather than prohibiting new pods from scheduling - // onto the node entirely. Enforced by the scheduler. - TaintEffectPreferNoSchedule TaintEffect = "PreferNoSchedule" - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. - // Like TaintEffectNoSchedule, but additionally do not allow pods submitted to - // Kubelet without going through the scheduler to start. - // Enforced by Kubelet and the scheduler. - // TaintEffectNoScheduleNoAdmit TaintEffect = "NoScheduleNoAdmit" - - // Evict any already-running pods that do not tolerate the taint. - // Currently enforced by NodeController. - TaintEffectNoExecute TaintEffect = "NoExecute" -) - -// The pcm_pod this Toleration is attached to tolerates any taint that matches -// the triple using the matching operator . -type Toleration struct { - // Key is the taint key that the toleration applies to. Empty means match all taint keys. - // If the key is empty, operator must be Exists; this combination means to match all values and all keys. - // +optional - Key string `json:"key,omitempty" protobuf:"bytes,1,opt,name=key"` - // Operator represents a key's relationship to the value. - // Valid operators are Exists and Equal. Defaults to Equal. - // Exists is equivalent to wildcard for value, so that a pcm_pod can - // tolerate all taints of a particular category. - // +optional - Operator TolerationOperator `json:"operator,omitempty" protobuf:"bytes,2,opt,name=operator,casttype=TolerationOperator"` - // Value is the taint value the toleration matches to. - // If the operator is Exists, the value should be empty, otherwise just a regular string. - // +optional - Value string `json:"value,omitempty" protobuf:"bytes,3,opt,name=value"` - // Effect indicates the taint effect to match. Empty means match all taint effects. - // When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - // +optional - Effect TaintEffect `json:"effect,omitempty" protobuf:"bytes,4,opt,name=effect,casttype=TaintEffect"` - // TolerationSeconds represents the period of time the toleration (which must be - // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - // it is not set, which means tolerate the taint forever (do not evict). Zero and - // negative values will be treated as 0 (evict immediately) by the system. - // +optional - TolerationSeconds *int64 `json:"tolerationSeconds,omitempty" protobuf:"varint,5,opt,name=tolerationSeconds"` -} - -// A toleration operator is the set of operators that can be used in a toleration. -type TolerationOperator string - -const ( - TolerationOpExists TolerationOperator = "Exists" - TolerationOpEqual TolerationOperator = "Equal" -) - -// PodReadinessGate contains the reference to a pcm_pod condition -type PodReadinessGate struct { - // ConditionType refers to a condition in the pcm_pod's condition list with matching type. - ConditionType PodConditionType `json:"conditionType" protobuf:"bytes,1,opt,name=conditionType,casttype=PodConditionType"` -} - -// PodSpec is a description of a pcm_pod. -type PodSpec struct { - //PCM params - ProviderId int32 `json:"ProviderId,omitempty" protobuf:"bytes,9,opt,name=ProviderId"` - RegionId string `json:"RegionId,omitempty" protobuf:"bytes,9,opt,name=RegionId"` - AccountName string `json:"AccountName,omitempty" protobuf:"bytes,9,opt,name=AccountName"` - - // List of volumes that can be mounted by containers belonging to the pcm_pod. - // More info: https://kubernetes.io/docs/concepts/storage/volumes - // +optional - // +patchMergeKey=name - // +patchStrategy=merge,retainKeys - Volumes []Volume `json:"volumes,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,1,rep,name=volumes"` - // List of initialization containers belonging to the pcm_pod. - // Init containers are executed in order prior to containers being started. If any - // init container fails, the pcm_pod is considered to have failed and is handled according - // to its restartPolicy. The name for an init container or normal container must be - // unique among all containers. - // Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. - // The resourceRequirements of an init container are taken into account during scheduling - // by finding the highest request/limit for each resource type, and then using the max of - // of that value or the sum of the normal containers. Limits are applied to init containers - // in a similar fashion. - // Init containers cannot currently be added or removed. - // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - // +patchMergeKey=name - // +patchStrategy=merge - InitContainers []Container `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,20,rep,name=initContainers"` - // List of containers belonging to the pcm_pod. - // Containers cannot currently be added or removed. - // There must be at least one container in a Pod. - // Cannot be updated. - // +patchMergeKey=name - // +patchStrategy=merge - Containers []Container `json:"containers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=containers"` - // List of ephemeral containers run in this pcm_pod. Ephemeral containers may be run in an existing - // pcm_pod to perform user-initiated actions such as debugging. This list cannot be specified when - // creating a pcm_pod, and it cannot be modified by updating the pcm_pod spec. In order to add an - // ephemeral container to an existing pcm_pod, use the pcm_pod's ephemeralcontainers subresource. - // This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature. - // +optional - // +patchMergeKey=name - // +patchStrategy=merge - EphemeralContainers []EphemeralContainer `json:"ephemeralContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,34,rep,name=ephemeralContainers"` - // Restart policy for all containers within the pcm_pod. - // One of Always, OnFailure, Never. - // Default to Always. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy - // +optional - RestartPolicy RestartPolicy `json:"restartPolicy,omitempty" protobuf:"bytes,3,opt,name=restartPolicy,casttype=RestartPolicy"` - // Optional duration in seconds the pcm_pod needs to terminate gracefully. May be decreased in delete request. - // Value must be non-negative integer. The value zero indicates stop immediately via - // the kill signal (no opportunity to shut down). - // If this value is nil, the default grace period will be used instead. - // The grace period is the duration in seconds after the processes running in the pcm_pod are sent - // a termination signal and the time when the processes are forcibly halted with a kill signal. - // Set this value longer than the expected cleanup time for your process. - // Defaults to 30 seconds. - // +optional - TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" protobuf:"varint,4,opt,name=terminationGracePeriodSeconds"` - // Optional duration in seconds the pcm_pod may be active on the node relative to - // StartTime before the system will actively try to mark it failed and kill associated containers. - // Value must be a positive integer. - // +optional - ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,5,opt,name=activeDeadlineSeconds"` - // Set DNS policy for the pcm_pod. - // Defaults to "ClusterFirst". - // Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. - // DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. - // To have DNS options set along with hostNetwork, you have to specify DNS policy - // explicitly to 'ClusterFirstWithHostNet'. - // +optional - DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty" protobuf:"bytes,6,opt,name=dnsPolicy,casttype=DNSPolicy"` - // NodeSelector is a selector which must be true for the pcm_pod to fit on a node. - // Selector which must match a node's labels for the pcm_pod to be scheduled on that node. - // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - // +optional - NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,7,rep,name=nodeSelector"` - - // ServiceAccountName is the name of the ServiceAccount to use to run this pcm_pod. - // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ - // +optional - ServiceAccountName string `json:"serviceAccountName,omitempty" protobuf:"bytes,8,opt,name=serviceAccountName"` - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. - // Deprecated: Use serviceAccountName instead. - // +k8s:conversion-gen=false - // +optional - DeprecatedServiceAccount string `json:"serviceAccount,omitempty" protobuf:"bytes,9,opt,name=serviceAccount"` - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - // +optional - AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty" protobuf:"varint,21,opt,name=automountServiceAccountToken"` - - // NodeName is a request to schedule this pcm_pod onto a specific node. If it is non-empty, - // the scheduler simply schedules this pcm_pod onto that node, assuming that it fits resource - // requirements. - // +optional - NodeName string `json:"nodeName,omitempty" protobuf:"bytes,10,opt,name=nodeName"` - // Host networking requested for this pcm_pod. Use the host's network namespace. - // If this option is set, the ports that will be used must be specified. - // Default to false. - // +k8s:conversion-gen=false - // +optional - HostNetwork bool `json:"hostNetwork,omitempty" protobuf:"varint,11,opt,name=hostNetwork"` - // Use the host's pid namespace. - // Optional: Default to false. - // +k8s:conversion-gen=false - // +optional - HostPID bool `json:"hostPID,omitempty" protobuf:"varint,12,opt,name=hostPID"` - // Use the host's ipc namespace. - // Optional: Default to false. - // +k8s:conversion-gen=false - // +optional - HostIPC bool `json:"hostIPC,omitempty" protobuf:"varint,13,opt,name=hostIPC"` - // Share a single process namespace between all of the containers in a pcm_pod. - // When this is set containers will be able to view and signal processes from other containers - // in the same pcm_pod, and the first process in each container will not be assigned PID 1. - // HostPID and ShareProcessNamespace cannot both be set. - // Optional: Default to false. - // +k8s:conversion-gen=false - // +optional - ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" protobuf:"varint,27,opt,name=shareProcessNamespace"` - // SecurityContext holds pcm_pod-level security attributes and common container settings. - // Optional: Defaults to empty. See type description for default values of each field. - // +optional - SecurityContext *PodSecurityContext `json:"securityContext,omitempty" protobuf:"bytes,14,opt,name=securityContext"` - // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. - // If specified, these secrets will be passed to individual puller implementations for them to use. For example, - // in the case of docker, only DockerConfig type secrets are honored. - // More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod - // +optional - // +patchMergeKey=name - // +patchStrategy=merge - ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"` - // Specifies the hostname of the Pod - // If not specified, the pcm_pod's hostname will be set to a system-defined value. - // +optional - Hostname string `json:"hostname,omitempty" protobuf:"bytes,16,opt,name=hostname"` - // If specified, the fully qualified Pod hostname will be "...svc.". - // If not specified, the pcm_pod will not have a domainname at all. - // +optional - Subdomain string `json:"subdomain,omitempty" protobuf:"bytes,17,opt,name=subdomain"` - // If specified, the pcm_pod's scheduling constraints - // +optional - Affinity *Affinity `json:"affinity,omitempty" protobuf:"bytes,18,opt,name=affinity"` - // If specified, the pcm_pod will be dispatched by specified scheduler. - // If not specified, the pcm_pod will be dispatched by default scheduler. - // +optional - SchedulerName string `json:"schedulerName,omitempty" protobuf:"bytes,19,opt,name=schedulerName"` - // If specified, the pcm_pod's tolerations. - // +optional - Tolerations []Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"` - // HostAliases is an optional list of hosts and IPs that will be injected into the pcm_pod's hosts - // file if specified. This is only valid for non-hostNetwork pods. - // +optional - // +patchMergeKey=ip - // +patchStrategy=merge - HostAliases []HostAlias `json:"hostAliases,omitempty" patchStrategy:"merge" patchMergeKey:"ip" protobuf:"bytes,23,rep,name=hostAliases"` - // If specified, indicates the pcm_pod's priority. "system-node-critical" and - // "system-cluster-critical" are two special keywords which indicate the - // highest priorities with the former being the highest priority. Any other - // name must be defined by creating a PriorityClass object with that name. - // If not specified, the pcm_pod priority will be default or zero if there is no - // default. - // +optional - PriorityClassName string `json:"priorityClassName,omitempty" protobuf:"bytes,24,opt,name=priorityClassName"` - // The priority value. Various system components use this field to find the - // priority of the pcm_pod. When Priority Admission Controller is enabled, it - // prevents users from setting this field. The admission controller populates - // this field from PriorityClassName. - // The higher the value, the higher the priority. - // +optional - Priority *int32 `json:"priority,omitempty" protobuf:"bytes,25,opt,name=priority"` - // Specifies the DNS parameters of a pcm_pod. - // Parameters specified here will be merged to the generated DNS - // configuration based on DNSPolicy. - // +optional - DNSConfig *PodDNSConfig `json:"dnsConfig,omitempty" protobuf:"bytes,26,opt,name=dnsConfig"` - // If specified, all readiness gates will be evaluated for pcm_pod readiness. - // A pcm_pod is ready when all its containers are ready AND - // all conditions specified in the readiness gates have status equal to "True" - // More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md - // +optional - ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" protobuf:"bytes,28,opt,name=readinessGates"` - // RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used - // to run this pcm_pod. If no RuntimeClass resource matches the named class, the pcm_pod will not be run. - // If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an - // empty definition that uses the default runtime handler. - // More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md - // This is a beta feature as of Kubernetes v1.14. - // +optional - RuntimeClassName *string `json:"runtimeClassName,omitempty" protobuf:"bytes,29,opt,name=runtimeClassName"` - // EnableServiceLinks indicates whether information about services should be injected into pcm_pod's - // environment variables, matching the syntax of Docker links. - // Optional: Defaults to true. - // +optional - EnableServiceLinks *bool `json:"enableServiceLinks,omitempty" protobuf:"varint,30,opt,name=enableServiceLinks"` - // PreemptionPolicy is the Policy for preempting pods with lower priority. - // One of Never, PreemptLowerPriority. - // Defaults to PreemptLowerPriority if unset. - // This field is beta-level, gated by the NonPreemptingPriority feature-gate. - // +optional - PreemptionPolicy *PreemptionPolicy `json:"preemptionPolicy,omitempty" protobuf:"bytes,31,opt,name=preemptionPolicy"` - // Overhead represents the resource overhead associated with running a pcm_pod for a given RuntimeClass. - // This field will be autopopulated at admission time by the RuntimeClass admission controller. If - // the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. - // The RuntimeClass admission controller will reject Pod create requests which have the overhead already - // set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value - // defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. - // More info: https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md - // This field is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable the PodOverhead feature. - // +optional - Overhead ResourceList `json:"overhead,omitempty" protobuf:"bytes,32,opt,name=overhead"` - // TopologySpreadConstraints describes how a group of pods ought to spread across topology - // domains. Scheduler will schedule pods in a way which abides by the constraints. - // All topologySpreadConstraints are ANDed. - // +optional - // +patchMergeKey=topologyKey - // +patchStrategy=merge - // +listType=map - // +listMapKey=topologyKey - // +listMapKey=whenUnsatisfiable - TopologySpreadConstraints []TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty" patchStrategy:"merge" patchMergeKey:"topologyKey" protobuf:"bytes,33,opt,name=topologySpreadConstraints"` - // If true the pcm_pod's hostname will be configured as the pcm_pod's FQDN, rather than the leaf name (the default). - // In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). - // In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. - // If a pcm_pod does not have FQDN, this has no effect. - // Default to false. - // +optional - SetHostnameAsFQDN *bool `json:"setHostnameAsFQDN,omitempty" protobuf:"varint,35,opt,name=setHostnameAsFQDN"` -} - -type UnsatisfiableConstraintAction string - -const ( - // DoNotSchedule instructs the scheduler not to schedule the pcm_pod - // when constraints are not satisfied. - DoNotSchedule UnsatisfiableConstraintAction = "DoNotSchedule" - // ScheduleAnyway instructs the scheduler to schedule the pcm_pod - // even if constraints are not satisfied. - ScheduleAnyway UnsatisfiableConstraintAction = "ScheduleAnyway" -) - -// TopologySpreadConstraint specifies how to spread matching pods among the given topology. -type TopologySpreadConstraint struct { - // MaxSkew describes the degree to which pods may be unevenly distributed. - // When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference - // between the number of matching pods in the target topology and the global minimum. - // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same - // labelSelector spread as 1/1/0: - // +-------+-------+-------+ - // | zone1 | zone2 | zone3 | - // +-------+-------+-------+ - // | P | P | | - // +-------+-------+-------+ - // - if MaxSkew is 1, incoming pcm_pod can only be scheduled to zone3 to become 1/1/1; - // scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) - // violate MaxSkew(1). - // - if MaxSkew is 2, incoming pcm_pod can be scheduled onto any zone. - // When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence - // to topologies that satisfy it. - // It's a required field. Default value is 1 and 0 is not allowed. - MaxSkew int32 `json:"maxSkew" protobuf:"varint,1,opt,name=maxSkew"` - // TopologyKey is the key of node labels. Nodes that have a label with this key - // and identical values are considered to be in the same topology. - // We consider each as a "bucket", and try to put balanced number - // of pods into each bucket. - // It's a required field. - TopologyKey string `json:"topologyKey" protobuf:"bytes,2,opt,name=topologyKey"` - // WhenUnsatisfiable indicates how to deal with a pcm_pod if it doesn't satisfy - // the spread constraint. - // - DoNotSchedule (default) tells the scheduler not to schedule it. - // - ScheduleAnyway tells the scheduler to schedule the pcm_pod in any location, - // but giving higher precedence to topologies that would help reduce the - // skew. - // A constraint is considered "Unsatisfiable" for an incoming pcm_pod - // if and only if every possible node assigment for that pcm_pod would violate - // "MaxSkew" on some topology. - // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same - // labelSelector spread as 3/1/1: - // +-------+-------+-------+ - // | zone1 | zone2 | zone3 | - // +-------+-------+-------+ - // | P P P | P | P | - // +-------+-------+-------+ - // If WhenUnsatisfiable is set to DoNotSchedule, incoming pcm_pod can only be scheduled - // to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies - // MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler - // won't make it *more* imbalanced. - // It's a required field. - WhenUnsatisfiable UnsatisfiableConstraintAction `json:"whenUnsatisfiable" protobuf:"bytes,3,opt,name=whenUnsatisfiable,casttype=UnsatisfiableConstraintAction"` - // LabelSelector is used to find matching pods. - // Pods that match this label selector are counted to determine the number of pods - // in their corresponding topology domain. - // +optional - LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty" protobuf:"bytes,4,opt,name=labelSelector"` -} - -const ( - // The default value for enableServiceLinks attribute. - DefaultEnableServiceLinks = true -) - -// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the -// pcm_pod's hosts file. -type HostAlias struct { - // IP address of the host file entry. - IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"` - // Hostnames for the above IP address. - Hostnames []string `json:"hostnames,omitempty" protobuf:"bytes,2,rep,name=hostnames"` -} - -// PodFSGroupChangePolicy holds policies that will be used for applying fsGroup to a volume -// when volume is mounted. -type PodFSGroupChangePolicy string - -const ( - // FSGroupChangeOnRootMismatch indicates that volume's ownership and permissions will be changed - // only when permission and ownership of root directory does not match with expected - // permissions on the volume. This can help shorten the time it takes to change - // ownership and permissions of a volume. - FSGroupChangeOnRootMismatch PodFSGroupChangePolicy = "OnRootMismatch" - // FSGroupChangeAlways indicates that volume's ownership and permissions - // should always be changed whenever volume is mounted inside a Pod. This the default - // behavior. - FSGroupChangeAlways PodFSGroupChangePolicy = "Always" -) - -// PodSecurityContext holds pcm_pod-level security attributes and common container settings. -// Some fields are also present in container.securityContext. Field values of -// container.securityContext take precedence over field values of PodSecurityContext. -type PodSecurityContext struct { - // The SELinux context to be applied to all containers. - // If unspecified, the container runtime will allocate a random SELinux context for each - // container. May also be set in SecurityContext. If set in - // both SecurityContext and PodSecurityContext, the value specified in SecurityContext - // takes precedence for that container. - // +optional - SELinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,1,opt,name=seLinuxOptions"` - // The Windows specific settings applied to all containers. - // If unspecified, the options within a container's SecurityContext will be used. - // If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - // +optional - WindowsOptions *WindowsSecurityContextOptions `json:"windowsOptions,omitempty" protobuf:"bytes,8,opt,name=windowsOptions"` - // The UID to run the entrypoint of the container process. - // Defaults to user specified in image metadata if unspecified. - // May also be set in SecurityContext. If set in both SecurityContext and - // PodSecurityContext, the value specified in SecurityContext takes precedence - // for that container. - // +optional - RunAsUser *int64 `json:"runAsUser,omitempty" protobuf:"varint,2,opt,name=runAsUser"` - // The GID to run the entrypoint of the container process. - // Uses runtime default if unset. - // May also be set in SecurityContext. If set in both SecurityContext and - // PodSecurityContext, the value specified in SecurityContext takes precedence - // for that container. - // +optional - RunAsGroup *int64 `json:"runAsGroup,omitempty" protobuf:"varint,6,opt,name=runAsGroup"` - // Indicates that the container must run as a non-root user. - // If true, the Kubelet will validate the image at runtime to ensure that it - // does not run as UID 0 (root) and fail to start the container if it does. - // If unset or false, no such validation will be performed. - // May also be set in SecurityContext. If set in both SecurityContext and - // PodSecurityContext, the value specified in SecurityContext takes precedence. - // +optional - RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" protobuf:"varint,3,opt,name=runAsNonRoot"` - // A list of groups applied to the first process run in each container, in addition - // to the container's primary GID. If unspecified, no groups will be added to - // any container. - // +optional - SupplementalGroups []int64 `json:"supplementalGroups,omitempty" protobuf:"varint,4,rep,name=supplementalGroups"` - // A special supplemental group that applies to all containers in a pcm_pod. - // Some volume types allow the Kubelet to change the ownership of that volume - // to be owned by the pcm_pod: - // - // 1. The owning GID will be the FSGroup - // 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) - // 3. The permission bits are OR'd with rw-rw---- - // - // If unset, the Kubelet will not modify the ownership and permissions of any volume. - // +optional - FSGroup *int64 `json:"fsGroup,omitempty" protobuf:"varint,5,opt,name=fsGroup"` - // Sysctls hold a list of namespaced sysctls used for the pcm_pod. Pods with unsupported - // sysctls (by the container runtime) might fail to launch. - // +optional - Sysctls []Sysctl `json:"sysctls,omitempty" protobuf:"bytes,7,rep,name=sysctls"` - // fsGroupChangePolicy defines behavior of changing ownership and permission of the volume - // before being exposed inside Pod. This field will only apply to - // volume types which support fsGroup based ownership(and permissions). - // It will have no effect on ephemeral volume types such as: secret, configmaps - // and emptydir. - // Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. - // +optional - FSGroupChangePolicy *PodFSGroupChangePolicy `json:"fsGroupChangePolicy,omitempty" protobuf:"bytes,9,opt,name=fsGroupChangePolicy"` - // The seccomp options to use by the containers in this pcm_pod. - // +optional - SeccompProfile *SeccompProfile `json:"seccompProfile,omitempty" protobuf:"bytes,10,opt,name=seccompProfile"` -} - -// SeccompProfile defines a pcm_pod/container's seccomp profile settings. -// Only one profile source may be set. -// +union -type SeccompProfile struct { - // type indicates which kind of seccomp profile will be applied. - // Valid options are: - // - // Localhost - a profile defined in a file on the node should be used. - // RuntimeDefault - the container runtime default profile should be used. - // Unconfined - no profile should be applied. - // +unionDiscriminator - Type SeccompProfileType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=SeccompProfileType"` - // localhostProfile indicates a profile defined in a file on the node should be used. - // The profile must be preconfigured on the node to work. - // Must be a descending path, relative to the kubelet's configured seccomp profile location. - // Must only be set if type is "Localhost". - // +optional - LocalhostProfile *string `json:"localhostProfile,omitempty" protobuf:"bytes,2,opt,name=localhostProfile"` -} - -// SeccompProfileType defines the supported seccomp profile types. -type SeccompProfileType string - -const ( - // SeccompProfileTypeUnconfined indicates no seccomp profile is applied (A.K.A. unconfined). - SeccompProfileTypeUnconfined SeccompProfileType = "Unconfined" - // SeccompProfileTypeRuntimeDefault represents the default container runtime seccomp profile. - SeccompProfileTypeRuntimeDefault SeccompProfileType = "RuntimeDefault" - // SeccompProfileTypeLocalhost indicates a profile defined in a file on the node should be used. - // The file's location is based off the kubelet's deprecated flag --seccomp-profile-root. - // Once the flag support is removed the location will be /seccomp. - SeccompProfileTypeLocalhost SeccompProfileType = "Localhost" -) - -// PodQOSClass defines the supported qos classes of Pods. -type PodQOSClass string - -const ( - // PodQOSGuaranteed is the Guaranteed qos class. - PodQOSGuaranteed PodQOSClass = "Guaranteed" - // PodQOSBurstable is the Burstable qos class. - PodQOSBurstable PodQOSClass = "Burstable" - // PodQOSBestEffort is the BestEffort qos class. - PodQOSBestEffort PodQOSClass = "BestEffort" -) - -// PodDNSConfig defines the DNS parameters of a pcm_pod in addition to -// those generated from DNSPolicy. -type PodDNSConfig struct { - // A list of DNS name server IP addresses. - // This will be appended to the base nameservers generated from DNSPolicy. - // Duplicated nameservers will be removed. - // +optional - Nameservers []string `json:"nameservers,omitempty" protobuf:"bytes,1,rep,name=nameservers"` - // A list of DNS search domains for host-name lookup. - // This will be appended to the base search paths generated from DNSPolicy. - // Duplicated search paths will be removed. - // +optional - Searches []string `json:"searches,omitempty" protobuf:"bytes,2,rep,name=searches"` - // A list of DNS resolver options. - // This will be merged with the base options generated from DNSPolicy. - // Duplicated entries will be removed. Resolution options given in Options - // will override those that appear in the base DNSPolicy. - // +optional - Options []PodDNSConfigOption `json:"options,omitempty" protobuf:"bytes,3,rep,name=options"` -} - -// PodDNSConfigOption defines DNS resolver options of a pcm_pod. -type PodDNSConfigOption struct { - // Required. - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - // +optional - Value *string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"` -} - -// IP address information for entries in the (plural) PodIPs field. -// Each entry includes: -// -// IP: An IP address allocated to the pcm_pod. Routable at least within the cluster. -type PodIP struct { - // ip is an IP address (IPv4 or IPv6) assigned to the pcm_pod - IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"` -} - -// EphemeralContainerCommon is a copy of all fields in Container to be inlined in -// EphemeralContainer. This separate type allows easy conversion from EphemeralContainer -// to Container and allows separate documentation for the fields of EphemeralContainer. -// When a new field is added to Container it must be added here as well. -type EphemeralContainerCommon struct { - // Name of the ephemeral container specified as a DNS_LABEL. - // This name must be unique among all containers, init containers and ephemeral containers. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // Docker image name. - // More info: https://kubernetes.io/docs/concepts/containers/images - Image string `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"` - // Entrypoint array. Not executed within a shell. - // The docker image's ENTRYPOINT is used if this is not provided. - // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable - // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax - // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, - // regardless of whether the variable exists or not. - // Cannot be updated. - // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - // +optional - Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"` - // Arguments to the entrypoint. - // The docker image's CMD is used if this is not provided. - // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable - // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax - // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, - // regardless of whether the variable exists or not. - // Cannot be updated. - // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - // +optional - Args []string `json:"args,omitempty" protobuf:"bytes,4,rep,name=args"` - // Container's working directory. - // If not specified, the container runtime's default will be used, which - // might be configured in the container image. - // Cannot be updated. - // +optional - WorkingDir string `json:"workingDir,omitempty" protobuf:"bytes,5,opt,name=workingDir"` - // Ports are not allowed for ephemeral containers. - Ports []ContainerPort `json:"ports,omitempty" protobuf:"bytes,6,rep,name=ports"` - // List of sources to populate environment variables in the container. - // The keys defined within a source must be a C_IDENTIFIER. All invalid keys - // will be reported as an event when the container is starting. When a key exists in multiple - // sources, the value associated with the last source will take precedence. - // Values defined by an Env with a duplicate key will take precedence. - // Cannot be updated. - // +optional - EnvFrom []EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,19,rep,name=envFrom"` - // List of environment variables to set in the container. - // Cannot be updated. - // +optional - // +patchMergeKey=name - // +patchStrategy=merge - Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"` - // Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources - // already allocated to the pcm_pod. - // +optional - Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,8,opt,name=resources"` - // Pod volumes to mount into the container's filesystem. - // Cannot be updated. - // +optional - // +patchMergeKey=mountPath - // +patchStrategy=merge - VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` - // volumeDevices is the list of block devices to be used by the container. - // +patchMergeKey=devicePath - // +patchStrategy=merge - // +optional - VolumeDevices []VolumeDevice `json:"volumeDevices,omitempty" patchStrategy:"merge" patchMergeKey:"devicePath" protobuf:"bytes,21,rep,name=volumeDevices"` - // Probes are not allowed for ephemeral containers. - // +optional - LivenessProbe *Probe `json:"livenessProbe,omitempty" protobuf:"bytes,10,opt,name=livenessProbe"` - // Probes are not allowed for ephemeral containers. - // +optional - ReadinessProbe *Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"` - // Probes are not allowed for ephemeral containers. - // +optional - StartupProbe *Probe `json:"startupProbe,omitempty" protobuf:"bytes,22,opt,name=startupProbe"` - // Lifecycle is not allowed for ephemeral containers. - // +optional - Lifecycle *Lifecycle `json:"lifecycle,omitempty" protobuf:"bytes,12,opt,name=lifecycle"` - // Optional: Path at which the file to which the container's termination message - // will be written is mounted into the container's filesystem. - // Message written is intended to be brief final status, such as an assertion failure message. - // Will be truncated by the node if greater than 4096 bytes. The total message length across - // all containers will be limited to 12kb. - // Defaults to /dev/termination-log. - // Cannot be updated. - // +optional - TerminationMessagePath string `json:"terminationMessagePath,omitempty" protobuf:"bytes,13,opt,name=terminationMessagePath"` - // Indicate how the termination message should be populated. File will use the contents of - // terminationMessagePath to populate the container status message on both success and failure. - // FallbackToLogsOnError will use the last chunk of container log output if the termination - // message file is empty and the container exited with an error. - // The log output is limited to 2048 bytes or 80 lines, whichever is smaller. - // Defaults to File. - // Cannot be updated. - // +optional - TerminationMessagePolicy TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty" protobuf:"bytes,20,opt,name=terminationMessagePolicy,casttype=TerminationMessagePolicy"` - // Image pull policy. - // One of Always, Never, IfNotPresent. - // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. - // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images - // +optional - ImagePullPolicy PullPolicy `json:"imagePullPolicy,omitempty" protobuf:"bytes,14,opt,name=imagePullPolicy,casttype=PullPolicy"` - // SecurityContext is not allowed for ephemeral containers. - // +optional - SecurityContext *SecurityContext `json:"securityContext,omitempty" protobuf:"bytes,15,opt,name=securityContext"` - - // Variables for interactive containers, these have very specialized use-cases (e.g. debugging) - // and shouldn't be used for general purpose containers. - - // Whether this container should allocate a buffer for stdin in the container runtime. If this - // is not set, reads from stdin in the container will always result in EOF. - // Default is false. - // +optional - Stdin bool `json:"stdin,omitempty" protobuf:"varint,16,opt,name=stdin"` - // Whether the container runtime should close the stdin channel after it has been opened by - // a single attach. When stdin is true the stdin stream will remain open across multiple attach - // sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the - // first client attaches to stdin, and then remains open and accepts data until the client disconnects, - // at which time stdin is closed and remains closed until the container is restarted. If this - // flag is false, a container processes that reads from stdin will never receive an EOF. - // Default is false - // +optional - StdinOnce bool `json:"stdinOnce,omitempty" protobuf:"varint,17,opt,name=stdinOnce"` - // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. - // Default is false. - // +optional - TTY bool `json:"tty,omitempty" protobuf:"varint,18,opt,name=tty"` -} - -// EphemeralContainerCommon converts to Container. All fields must be kept in sync between -// these two types. -var _ = Container(EphemeralContainerCommon{}) - -// An EphemeralContainer is a container that may be added temporarily to an existing pcm_pod for -// user-initiated activities such as debugging. Ephemeral containers have no resource or -// scheduling guarantees, and they will not be restarted when they exit or when a pcm_pod is -// removed or restarted. If an ephemeral container causes a pcm_pod to exceed its resource -// allocation, the pcm_pod may be evicted. -// Ephemeral containers may not be added by directly updating the pcm_pod spec. They must be added -// via the pcm_pod's ephemeralcontainers subresource, and they will appear in the pcm_pod spec -// once added. -// This is an alpha feature enabled by the EphemeralContainers feature flag. -type EphemeralContainer struct { - // Ephemeral containers have all of the fields of Container, plus additional fields - // specific to ephemeral containers. Fields in common with Container are in the - // following inlined struct so than an EphemeralContainer may easily be converted - // to a Container. - EphemeralContainerCommon `json:",inline" protobuf:"bytes,1,req"` - - // If set, the name of the container from PodSpec that this ephemeral container targets. - // The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. - // If not set then the ephemeral container is run in whatever namespaces are shared - // for the pcm_pod. Note that the container runtime must support this feature. - // +optional - TargetContainerName string `json:"targetContainerName,omitempty" protobuf:"bytes,2,opt,name=targetContainerName"` -} - -// PodStatus represents information about the status of a pcm_pod. Status may trail the actual -// state of a system, especially if the node that hosts the pcm_pod cannot contact the control -// plane. -type PodStatus struct { - // The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. - // The conditions array, the reason and message fields, and the individual container status - // arrays contain more detail about the pcm_pod's status. - // There are five possible phase values: - // - // Pending: The pcm_pod has been accepted by the Kubernetes system, but one or more of the - // container images has not been created. This includes time before being scheduled as - // well as time spent downloading images over the network, which could take a while. - // Running: The pcm_pod has been bound to a node, and all of the containers have been created. - // At least one container is still running, or is in the process of starting or restarting. - // Succeeded: All containers in the pcm_pod have terminated in success, and will not be restarted. - // Failed: All containers in the pcm_pod have terminated, and at least one container has - // terminated in failure. The container either exited with non-zero status or was terminated - // by the system. - // Unknown: For some reason the state of the pcm_pod could not be obtained, typically due to an - // error in communicating with the host of the pcm_pod. - // - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase - // +optional - Phase PodPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PodPhase"` - // Current service state of pcm_pod. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - Conditions []PodCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` - // A human readable message indicating details about why the pcm_pod is in this condition. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` - // A brief CamelCase message indicating details about why the pcm_pod is in this state. - // e.g. 'Evicted' - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` - // nominatedNodeName is set only when this pcm_pod preempts other pods on the node, but it cannot be - // scheduled right away as preemption victims receive their graceful termination periods. - // This field does not guarantee that the pcm_pod will be scheduled on this node. Scheduler may decide - // to place the pcm_pod elsewhere if other nodes become available sooner. Scheduler may also decide to - // give the resources on this node to a higher priority pcm_pod that is created after preemption. - // As a result, this field may be different than PodSpec.nodeName when the pcm_pod is - // scheduled. - // +optional - NominatedNodeName string `json:"nominatedNodeName,omitempty" protobuf:"bytes,11,opt,name=nominatedNodeName"` - - // IP address of the host to which the pcm_pod is assigned. Empty if not yet scheduled. - // +optional - HostIP string `json:"hostIP,omitempty" protobuf:"bytes,5,opt,name=hostIP"` - // IP address allocated to the pcm_pod. Routable at least within the cluster. - // Empty if not yet allocated. - // +optional - PodIP string `json:"podIP,omitempty" protobuf:"bytes,6,opt,name=podIP"` - - // podIPs holds the IP addresses allocated to the pcm_pod. If this field is specified, the 0th entry must - // match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list - // is empty if no IPs have been allocated yet. - // +optional - // +patchStrategy=merge - // +patchMergeKey=ip - PodIPs []PodIP `json:"podIPs,omitempty" protobuf:"bytes,12,rep,name=podIPs" patchStrategy:"merge" patchMergeKey:"ip"` - - // RFC 3339 date and time at which the object was acknowledged by the Kubelet. - // This is before the Kubelet pulled the container image(s) for the pcm_pod. - // +optional - StartTime *metav1.Time `json:"startTime,omitempty" protobuf:"bytes,7,opt,name=startTime"` - - // The list has one entry per init container in the manifest. The most recent successful - // init container will have ready = true, the most recently started container will have - // startTime set. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - InitContainerStatuses []ContainerStatus `json:"initContainerStatuses,omitempty" protobuf:"bytes,10,rep,name=initContainerStatuses"` - - // The list has one entry per container in the manifest. Each entry is currently the output - // of `docker inspect`. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - // +optional - ContainerStatuses []ContainerStatus `json:"containerStatuses,omitempty" protobuf:"bytes,8,rep,name=containerStatuses"` - // The Quality of Service (QOS) classification assigned to the pcm_pod based on resource requirements - // See PodQOSClass type for available QOS classes - // More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md - // +optional - QOSClass PodQOSClass `json:"qosClass,omitempty" protobuf:"bytes,9,rep,name=qosClass"` - // Status for any ephemeral containers that have run in this pcm_pod. - // This field is alpha-level and is only populated by servers that enable the EphemeralContainers feature. - // +optional - EphemeralContainerStatuses []ContainerStatus `json:"ephemeralContainerStatuses,omitempty" protobuf:"bytes,13,rep,name=ephemeralContainerStatuses"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded -type PodStatusResult struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Most recently observed status of the pcm_pod. - // This data may not be up to date. - // Populated by the system. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Status PodStatus `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` -} - -// +genclient -// +genclient:method=GetEphemeralContainers,verb=get,subresource=ephemeralcontainers,result=EphemeralContainers -// +genclient:method=UpdateEphemeralContainers,verb=update,subresource=ephemeralcontainers,input=EphemeralContainers,result=EphemeralContainers -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// Pod is a collection of containers that can run on a host. This resource is created -// by clients and scheduled onto hosts. -type Pod struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Specification of the desired behavior of the pcm_pod. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Spec PodSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Most recently observed status of the pcm_pod. - // This data may not be up to date. - // Populated by the system. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Status PodStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// PodList is a list of Pods. -type PodList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of pods. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md - Items []Pod `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// PodTemplateSpec describes the data a pcm_pod should have when created from a template -type PodTemplateSpec struct { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Specification of the desired behavior of the pcm_pod. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Spec PodSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// PodTemplate describes a template for creating copies of a predefined pcm_pod. -type PodTemplate struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Template defines the pods that will be created from this pcm_pod template. - // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Template PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// PodTemplateList is a list of PodTemplates. -type PodTemplateList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of pcm_pod templates - Items []PodTemplate `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// ReplicationControllerSpec is the specification of a replication controller. -type ReplicationControllerSpec struct { - // Replicas is the number of desired replicas. - // This is a pointer to distinguish between explicit zero and unspecified. - // Defaults to 1. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller - // +optional - Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` - - // Minimum number of seconds for which a newly created pcm_pod should be ready - // without any of its container crashing, for it to be considered available. - // Defaults to 0 (pcm_pod will be considered available as soon as it is ready) - // +optional - MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"` - - // Selector is a label query over pods that should match the Replicas count. - // If Selector is empty, it is defaulted to the labels present on the Pod template. - // Label keys and values that must match in order to be controlled by this replication - // controller, if empty defaulted to labels on Pod template. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - // +optional - Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"` - - // TemplateRef is a reference to an object that describes the pcm_pod that will be created if - // insufficient replicas are detected. - // Reference to an object that describes the pcm_pod that will be created if insufficient replicas are detected. - // +optional - // TemplateRef *ObjectReference `json:"templateRef,omitempty"` - - // Template is the object that describes the pcm_pod that will be created if - // insufficient replicas are detected. This takes precedence over a TemplateRef. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template - // +optional - Template *PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"` -} - -// ReplicationControllerStatus represents the current status of a replication -// controller. -type ReplicationControllerStatus struct { - // Replicas is the most recently oberved number of replicas. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller - Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"` - - // The number of pods that have labels matching the labels of the pcm_pod template of the replication controller. - // +optional - FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"` - - // The number of ready replicas for this replication controller. - // +optional - ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"` - - // The number of available replicas (ready for at least minReadySeconds) for this replication controller. - // +optional - AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"` - - // ObservedGeneration reflects the generation of the most recently observed replication controller. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"` - - // Represents the latest available observations of a replication controller's current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - Conditions []ReplicationControllerCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` -} - -type ReplicationControllerConditionType string - -// These are valid conditions of a replication controller. -const ( - // ReplicationControllerReplicaFailure is added in a replication controller when one of its pods - // fails to be created due to insufficient quota, limit ranges, pcm_pod security policy, node selectors, - // etc. or deleted due to kubelet being down or finalizers are failing. - ReplicationControllerReplicaFailure ReplicationControllerConditionType = "ReplicaFailure" -) - -// ReplicationControllerCondition describes the state of a replication controller at a certain point. -type ReplicationControllerCondition struct { - // Type of replication controller condition. - Type ReplicationControllerConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ReplicationControllerConditionType"` - // Status of the condition, one of True, False, Unknown. - Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` - // The last time the condition transitioned from one status to another. - // +optional - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` - // The reason for the condition's last transition. - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` - // A human readable message indicating details about the transition. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` -} - -// +genclient -// +genclient:method=GetScale,verb=get,subresource=scale,result=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/api/autoscaling/v1.Scale -// +genclient:method=UpdateScale,verb=update,subresource=scale,input=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/api/autoscaling/v1.Scale,result=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/api/autoscaling/v1.Scale -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// ReplicationController represents the configuration of a replication controller. -type ReplicationController struct { - metav1.TypeMeta `json:",inline"` - - // If the Labels of a ReplicationController are empty, they are defaulted to - // be the same as the Pod(s) that the replication controller manages. - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the specification of the desired behavior of the replication controller. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Spec ReplicationControllerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Status is the most recently observed status of the replication controller. - // This data may be out of date by some window of time. - // Populated by the system. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Status ReplicationControllerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// ReplicationControllerList is a collection of replication controllers. -type ReplicationControllerList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of replication controllers. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - Items []ReplicationController `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// Session Affinity Type string -type ServiceAffinity string - -const ( - // ServiceAffinityClientIP is the Client IP based. - ServiceAffinityClientIP ServiceAffinity = "ClientIP" - - // ServiceAffinityNone - no session affinity. - ServiceAffinityNone ServiceAffinity = "None" -) - -const DefaultClientIPServiceAffinitySeconds int32 = 10800 - -// SessionAffinityConfig represents the configurations of session affinity. -type SessionAffinityConfig struct { - // clientIP contains the configurations of Client IP based session affinity. - // +optional - ClientIP *ClientIPConfig `json:"clientIP,omitempty" protobuf:"bytes,1,opt,name=clientIP"` -} - -// ClientIPConfig represents the configurations of Client IP based session affinity. -type ClientIPConfig struct { - // timeoutSeconds specifies the seconds of ClientIP type session sticky time. - // The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP". - // Default value is 10800(for 3 hours). - // +optional - TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty" protobuf:"varint,1,opt,name=timeoutSeconds"` -} - -// Service Type string describes ingress methods for a service -type ServiceType string - -const ( - // ServiceTypeClusterIP means a service will only be accessible inside the - // cluster, via the cluster IP. - ServiceTypeClusterIP ServiceType = "ClusterIP" - - // ServiceTypeNodePort means a service will be exposed on one port of - // every node, in addition to 'ClusterIP' type. - ServiceTypeNodePort ServiceType = "NodePort" - - // ServiceTypeLoadBalancer means a service will be exposed via an - // external load balancer (if the cloud provider supports it), in addition - // to 'NodePort' type. - ServiceTypeLoadBalancer ServiceType = "LoadBalancer" - - // ServiceTypeExternalName means a service consists of only a reference to - // an external name that kubedns or equivalent will return as a CNAME - // record, with no exposing or proxying of any pods involved. - ServiceTypeExternalName ServiceType = "ExternalName" -) - -// ServiceInternalTrafficPolicyType describes the type of traffic routing for -// internal traffic -type ServiceInternalTrafficPolicyType string - -const ( - // ServiceInternalTrafficPolicyCluster routes traffic to all endpoints - ServiceInternalTrafficPolicyCluster ServiceInternalTrafficPolicyType = "Cluster" - - // ServiceInternalTrafficPolicyLocal only routes to node-local - // endpoints, otherwise drops the traffic - ServiceInternalTrafficPolicyLocal ServiceInternalTrafficPolicyType = "Local" -) - -// Service External Traffic Policy Type string -type ServiceExternalTrafficPolicyType string - -const ( - // ServiceExternalTrafficPolicyTypeLocal specifies node-local endpoints behavior. - ServiceExternalTrafficPolicyTypeLocal ServiceExternalTrafficPolicyType = "Local" - // ServiceExternalTrafficPolicyTypeCluster specifies node-global (legacy) behavior. - ServiceExternalTrafficPolicyTypeCluster ServiceExternalTrafficPolicyType = "Cluster" -) - -// These are the valid conditions of a service. -const ( - // LoadBalancerPortsError represents the condition of the requested ports - // on the cloud load balancer instance. - LoadBalancerPortsError = "LoadBalancerPortsError" -) - -// ServiceStatus represents the current status of a service. -type ServiceStatus struct { - // LoadBalancer contains the current status of the load-balancer, - // if one is present. - // +optional - LoadBalancer LoadBalancerStatus `json:"loadBalancer,omitempty" protobuf:"bytes,1,opt,name=loadBalancer"` - // Current service state - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` -} - -// LoadBalancerStatus represents the status of a load-balancer. -type LoadBalancerStatus struct { - // Ingress is a list containing ingress points for the load-balancer. - // Traffic intended for the service should be sent to these ingress points. - // +optional - Ingress []LoadBalancerIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"` -} - -// LoadBalancerIngress represents the status of a load-balancer ingress point: -// traffic intended for the service should be sent to an ingress point. -type LoadBalancerIngress struct { - // IP is set for load-balancer ingress points that are IP based - // (typically GCE or OpenStack load-balancers) - // +optional - IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"` - - // Hostname is set for load-balancer ingress points that are DNS based - // (typically AWS load-balancers) - // +optional - Hostname string `json:"hostname,omitempty" protobuf:"bytes,2,opt,name=hostname"` - - // Ports is a list of records of service ports - // If used, every port defined in the service should have an entry in it - // +listType=atomic - // +optional - Ports []PortStatus `json:"ports,omitempty" protobuf:"bytes,4,rep,name=ports"` -} - -const ( - // MaxServiceTopologyKeys is the largest number of topology keys allowed on a service - MaxServiceTopologyKeys = 16 -) - -// IPFamily represents the IP Family (IPv4 or IPv6). This type is used -// to express the family of an IP expressed by a type (e.g. service.spec.ipFamilies). -type IPFamily string - -const ( - // IPv4Protocol indicates that this IP is IPv4 protocol - IPv4Protocol IPFamily = "IPv4" - // IPv6Protocol indicates that this IP is IPv6 protocol - IPv6Protocol IPFamily = "IPv6" -) - -// IPFamilyPolicyType represents the dual-stack-ness requested or required by a Service -type IPFamilyPolicyType string - -const ( - // IPFamilyPolicySingleStack indicates that this service is required to have a single IPFamily. - // The IPFamily assigned is based on the default IPFamily used by the cluster - // or as identified by service.spec.ipFamilies field - IPFamilyPolicySingleStack IPFamilyPolicyType = "SingleStack" - // IPFamilyPolicyPreferDualStack indicates that this service prefers dual-stack when - // the cluster is configured for dual-stack. If the cluster is not configured - // for dual-stack the service will be assigned a single IPFamily. If the IPFamily is not - // set in service.spec.ipFamilies then the service will be assigned the default IPFamily - // configured on the cluster - IPFamilyPolicyPreferDualStack IPFamilyPolicyType = "PreferDualStack" - // IPFamilyPolicyRequireDualStack indicates that this service requires dual-stack. Using - // IPFamilyPolicyRequireDualStack on a single stack cluster will result in validation errors. The - // IPFamilies (and their order) assigned to this service is based on service.spec.ipFamilies. If - // service.spec.ipFamilies was not provided then it will be assigned according to how they are - // configured on the cluster. If service.spec.ipFamilies has only one entry then the alternative - // IPFamily will be added by apiserver - IPFamilyPolicyRequireDualStack IPFamilyPolicyType = "RequireDualStack" -) - -// ServiceSpec describes the attributes that a user creates on a service. -type ServiceSpec struct { - // The list of ports that are exposed by this service. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - // +patchMergeKey=port - // +patchStrategy=merge - // +listType=map - // +listMapKey=port - // +listMapKey=protocol - Ports []ServicePort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"port" protobuf:"bytes,1,rep,name=ports"` - - // Route service traffic to pods with label keys and values matching this - // selector. If empty or not present, the service is assumed to have an - // external process managing its endpoints, which Kubernetes will not - // modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. - // Ignored if type is ExternalName. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/ - // +optional - Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"` - - // clusterIP is the IP address of the service and is usually assigned - // randomly. If an address is specified manually, is in-range (as per - // system configuration), and is not in use, it will be allocated to the - // service; otherwise creation of the service will fail. This field may not - // be changed through updates unless the type field is also being changed - // to ExternalName (which requires this field to be blank) or the type - // field is being changed from ExternalName (in which case this field may - // optionally be specified, as describe above). Valid values are "None", - // empty string (""), or a valid IP address. Setting this to "None" makes a - // "headless service" (no virtual IP), which is useful when direct endpoint - // connections are preferred and proxying is not required. Only applies to - // types ClusterIP, NodePort, and LoadBalancer. If this field is specified - // when creating a Service of type ExternalName, creation will fail. This - // field will be wiped when updating a Service to type ExternalName. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - // +optional - ClusterIP string `json:"clusterIP,omitempty" protobuf:"bytes,3,opt,name=clusterIP"` - - // ClusterIPs is a list of IP addresses assigned to this service, and are - // usually assigned randomly. If an address is specified manually, is - // in-range (as per system configuration), and is not in use, it will be - // allocated to the service; otherwise creation of the service will fail. - // This field may not be changed through updates unless the type field is - // also being changed to ExternalName (which requires this field to be - // empty) or the type field is being changed from ExternalName (in which - // case this field may optionally be specified, as describe above). Valid - // values are "None", empty string (""), or a valid IP address. Setting - // this to "None" makes a "headless service" (no virtual IP), which is - // useful when direct endpoint connections are preferred and proxying is - // not required. Only applies to types ClusterIP, NodePort, and - // LoadBalancer. If this field is specified when creating a Service of type - // ExternalName, creation will fail. This field will be wiped when updating - // a Service to type ExternalName. If this field is not specified, it will - // be initialized from the clusterIP field. If this field is specified, - // clients must ensure that clusterIPs[0] and clusterIP have the same - // value. - // - // Unless the "IPv6DualStack" feature gate is enabled, this field is - // limited to one value, which must be the same as the clusterIP field. If - // the feature gate is enabled, this field may hold a maximum of two - // entries (dual-stack IPs, in either order). These IPs must correspond to - // the values of the ipFamilies field. Both clusterIPs and ipFamilies are - // governed by the ipFamilyPolicy field. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - // +listType=atomic - // +optional - ClusterIPs []string `json:"clusterIPs,omitempty" protobuf:"bytes,18,opt,name=clusterIPs"` - - // type determines how the Service is exposed. Defaults to ClusterIP. Valid - // options are ExternalName, ClusterIP, NodePort, and LoadBalancer. - // "ClusterIP" allocates a cluster-internal IP address for load-balancing - // to endpoints. Endpoints are determined by the selector or if that is not - // specified, by manual construction of an Endpoints object or - // EndpointSlice objects. If clusterIP is "None", no virtual IP is - // allocated and the endpoints are published as a set of endpoints rather - // than a virtual IP. - // "NodePort" builds on ClusterIP and allocates a port on every node which - // routes to the same endpoints as the clusterIP. - // "LoadBalancer" builds on NodePort and creates an external load-balancer - // (if supported in the current cloud) which routes to the same endpoints - // as the clusterIP. - // "ExternalName" aliases this service to the specified externalName. - // Several other fields do not apply to ExternalName services. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types - // +optional - Type ServiceType `json:"type,omitempty" protobuf:"bytes,4,opt,name=type,casttype=ServiceType"` - - // externalIPs is a list of IP addresses for which nodes in the cluster - // will also accept traffic for this service. These IPs are not managed by - // Kubernetes. The user is responsible for ensuring that traffic arrives - // at a node with this IP. A common example is external load-balancers - // that are not part of the Kubernetes system. - // +optional - ExternalIPs []string `json:"externalIPs,omitempty" protobuf:"bytes,5,rep,name=externalIPs"` - - // Supports "ClientIP" and "None". Used to maintain session affinity. - // Enable client IP based session affinity. - // Must be ClientIP or None. - // Defaults to None. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - // +optional - SessionAffinity ServiceAffinity `json:"sessionAffinity,omitempty" protobuf:"bytes,7,opt,name=sessionAffinity,casttype=ServiceAffinity"` - - // Only applies to Service Type: LoadBalancer - // LoadBalancer will get created with the IP specified in this field. - // This feature depends on whether the underlying cloud-provider supports specifying - // the loadBalancerIP when a load balancer is created. - // This field will be ignored if the cloud-provider does not support the feature. - // +optional - LoadBalancerIP string `json:"loadBalancerIP,omitempty" protobuf:"bytes,8,opt,name=loadBalancerIP"` - - // If specified and supported by the platform, this will restrict traffic through the cloud-provider - // load-balancer will be restricted to the specified client IPs. This field will be ignored if the - // cloud-provider does not support the feature." - // More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ - // +optional - LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty" protobuf:"bytes,9,opt,name=loadBalancerSourceRanges"` - - // externalName is the external reference that discovery mechanisms will - // return as an alias for this service (e.g. a DNS CNAME record). No - // proxying will be involved. Must be a lowercase RFC-1123 hostname - // (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". - // +optional - ExternalName string `json:"externalName,omitempty" protobuf:"bytes,10,opt,name=externalName"` - - // externalTrafficPolicy denotes if this Service desires to route external - // traffic to node-local or cluster-wide endpoints. "Local" preserves the - // client source IP and avoids a second hop for LoadBalancer and Nodeport - // type services, but risks potentially imbalanced traffic spreading. - // "Cluster" obscures the client source IP and may cause a second hop to - // another node, but should have good overall load-spreading. - // +optional - ExternalTrafficPolicy ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty" protobuf:"bytes,11,opt,name=externalTrafficPolicy"` - - // healthCheckNodePort specifies the healthcheck nodePort for the service. - // This only applies when type is set to LoadBalancer and - // externalTrafficPolicy is set to Local. If a value is specified, is - // in-range, and is not in use, it will be used. If not specified, a value - // will be automatically allocated. External systems (e.g. load-balancers) - // can use this port to determine if a given node holds endpoints for this - // service or not. If this field is specified when creating a Service - // which does not need it, creation will fail. This field will be wiped - // when updating a Service to no longer need it (e.g. changing type). - // +optional - HealthCheckNodePort int32 `json:"healthCheckNodePort,omitempty" protobuf:"bytes,12,opt,name=healthCheckNodePort"` - - // publishNotReadyAddresses indicates that any agent which deals with endpoints for this - // Service should disregard any indications of ready/not-ready. - // The primary use case for setting this field is for a StatefulSet's Headless Service to - // propagate SRV DNS records for its Pods for the purpose of peer discovery. - // The Kubernetes controllers that generate Endpoints and EndpointSlice resources for - // Services interpret this to mean that all endpoints are considered "ready" even if the - // Pods themselves are not. Agents which consume only Kubernetes generated endpoints - // through the Endpoints or EndpointSlice resources can safely assume this behavior. - // +optional - PublishNotReadyAddresses bool `json:"publishNotReadyAddresses,omitempty" protobuf:"varint,13,opt,name=publishNotReadyAddresses"` - - // sessionAffinityConfig contains the configurations of session affinity. - // +optional - SessionAffinityConfig *SessionAffinityConfig `json:"sessionAffinityConfig,omitempty" protobuf:"bytes,14,opt,name=sessionAffinityConfig"` - - // topologyKeys is a preference-order list of topology keys which - // implementations of services should use to preferentially sort endpoints - // when accessing this Service, it can not be used at the same time as - // externalTrafficPolicy=Local. - // Topology keys must be valid label keys and at most 16 keys may be specified. - // Endpoints are chosen based on the first topology key with available backends. - // If this field is specified and all entries have no backends that match - // the topology of the client, the service has no backends for that client - // and connections should fail. - // The special value "*" may be used to mean "any topology". This catch-all - // value, if used, only makes sense as the last value in the list. - // If this is not specified or empty, no topology constraints will be applied. - // This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. - // This field is deprecated and will be removed in a future version. - // +optional - TopologyKeys []string `json:"topologyKeys,omitempty" protobuf:"bytes,16,opt,name=topologyKeys"` - - // IPFamily is tombstoned to show why 15 is a reserved protobuf tag. - // IPFamily *IPFamily `json:"ipFamily,omitempty" protobuf:"bytes,15,opt,name=ipFamily,Configcasttype=IPFamily"` - - // IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this - // service, and is gated by the "IPv6DualStack" feature gate. This field - // is usually assigned automatically based on cluster configuration and the - // ipFamilyPolicy field. If this field is specified manually, the requested - // family is available in the cluster, and ipFamilyPolicy allows it, it - // will be used; otherwise creation of the service will fail. This field - // is conditionally mutable: it allows for adding or removing a secondary - // IP family, but it does not allow changing the primary IP family of the - // Service. Valid values are "IPv4" and "IPv6". This field only applies - // to Services of types ClusterIP, NodePort, and LoadBalancer, and does - // apply to "headless" services. This field will be wiped when updating a - // Service to type ExternalName. - // - // This field may hold a maximum of two entries (dual-stack families, in - // either order). These families must correspond to the values of the - // clusterIPs field, if specified. Both clusterIPs and ipFamilies are - // governed by the ipFamilyPolicy field. - // +listType=atomic - // +optional - IPFamilies []IPFamily `json:"ipFamilies,omitempty" protobuf:"bytes,19,opt,name=ipFamilies,casttype=IPFamily"` - - // IPFamilyPolicy represents the dual-stack-ness requested or required by - // this Service, and is gated by the "IPv6DualStack" feature gate. If - // there is no value provided, then this field will be set to SingleStack. - // Services can be "SingleStack" (a single IP family), "PreferDualStack" - // (two IP families on dual-stack configured clusters or a single IP family - // on single-stack clusters), or "RequireDualStack" (two IP families on - // dual-stack configured clusters, otherwise fail). The ipFamilies and - // clusterIPs fields depend on the value of this field. This field will be - // wiped when updating a service to type ExternalName. - // +optional - IPFamilyPolicy *IPFamilyPolicyType `json:"ipFamilyPolicy,omitempty" protobuf:"bytes,17,opt,name=ipFamilyPolicy,casttype=IPFamilyPolicyType"` - - // allocateLoadBalancerNodePorts defines if NodePorts will be automatically - // allocated for services with type LoadBalancer. Default is "true". It may be - // set to "false" if the cluster load-balancer does not rely on NodePorts. - // allocateLoadBalancerNodePorts may only be set for services with type LoadBalancer - // and will be cleared if the type is changed to any other type. - // This field is alpha-level and is only honored by servers that enable the ServiceLBNodePortControl feature. - // +optional - AllocateLoadBalancerNodePorts *bool `json:"allocateLoadBalancerNodePorts,omitempty" protobuf:"bytes,20,opt,name=allocateLoadBalancerNodePorts"` - - // loadBalancerClass is the class of the load balancer implementation this Service belongs to. - // If specified, the value of this field must be a label-style identifier, with an optional prefix, - // e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. - // This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load - // balancer implementation is used, today this is typically done through the cloud provider integration, - // but should apply for any default implementation. If set, it is assumed that a load balancer - // implementation is watching for Services with a matching class. Any default load balancer - // implementation (e.g. cloud providers) should ignore Services that set this field. - // This field can only be set when creating or updating a Service to type 'LoadBalancer'. - // Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. - // +featureGate=LoadBalancerClass - // +optional - LoadBalancerClass *string `json:"loadBalancerClass,omitempty" protobuf:"bytes,21,opt,name=loadBalancerClass"` - - // InternalTrafficPolicy specifies if the cluster internal traffic - // should be routed to all endpoints or node-local endpoints only. - // "Cluster" routes internal traffic to a Service to all endpoints. - // "Local" routes traffic to node-local endpoints only, traffic is - // dropped if no node-local endpoints are ready. - // The default value is "Cluster". - // +featureGate=ServiceInternalTrafficPolicy - // +optional - InternalTrafficPolicy *ServiceInternalTrafficPolicyType `json:"internalTrafficPolicy,omitempty" protobuf:"bytes,22,opt,name=internalTrafficPolicy"` -} - -// ServicePort contains information on service's port. -type ServicePort struct { - // The name of this port within the service. This must be a DNS_LABEL. - // All ports within a ServiceSpec must have unique names. When considering - // the endpoints for a Service, this must match the 'name' field in the - // EndpointPort. - // Optional if only one ServicePort is defined on this service. - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - - // The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". - // Default is TCP. - // +default="TCP" - // +optional - Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,2,opt,name=protocol,casttype=Protocol"` - - // The application protocol for this port. - // This field follows standard Kubernetes label syntax. - // Un-prefixed names are reserved for IANA standard service names (as per - // RFC-6335 and http://www.iana.org/assignments/service-names). - // Non-standard protocols should use prefixed names such as - // mycompany.com/my-custom-protocol. - // This is a beta field that is guarded by the ServiceAppProtocol feature - // gate and enabled by default. - // +optional - AppProtocol *string `json:"appProtocol,omitempty" protobuf:"bytes,6,opt,name=appProtocol"` - - // The port that will be exposed by this service. - Port int32 `json:"port" protobuf:"varint,3,opt,name=port"` - - // Number or name of the port to access on the pods targeted by the service. - // Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - // If this is a string, it will be looked up as a named port in the - // target Pod's container ports. If this is not specified, the value - // of the 'port' field is used (an identity map). - // This field is ignored for services with clusterIP=None, and should be - // omitted or set equal to the 'port' field. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service - // +optional - TargetPort intstr.IntOrString `json:"targetPort,omitempty" protobuf:"bytes,4,opt,name=targetPort"` - - // The port on each node on which this service is exposed when type is - // NodePort or LoadBalancer. Usually assigned by the system. If a value is - // specified, in-range, and not in use it will be used, otherwise the - // operation will fail. If not specified, a port will be allocated if this - // Service requires one. If this field is specified when creating a - // Service which does not need it, creation will fail. This field will be - // wiped when updating a Service to no longer need it (e.g. changing type - // from NodePort to ClusterIP). - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - // +optional - NodePort int32 `json:"nodePort,omitempty" protobuf:"varint,5,opt,name=nodePort"` -} - -// +genclient -// +genclient:skipVerbs=deleteCollection -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// Service is a named abstraction of software service (for example, mysql) consisting of local port -// (for example 3306) that the proxy listens on, and the selector that determines which pods -// will answer requests sent through the proxy. -type Service struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the behavior of a service. - // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Spec ServiceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Most recently observed status of the service. - // Populated by the system. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Status ServiceStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -const ( - // ClusterIPNone - do not assign a cluster IP - // no proxying required and no environment variables should be created for pods - ClusterIPNone = "None" -) - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// ServiceList holds a list of services. -type ServiceList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of services - Items []Service `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +genclient:method=CreateToken,verb=create,subresource=token,input=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/api/authentication/v1.TokenRequest,result=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/api/authentication/v1.TokenRequest -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// ServiceAccount binds together: -// * a name, understood by users, and perhaps by peripheral systems, for an identity -// * a principal that can be authenticated and authorized -// * a set of secrets -type ServiceAccount struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. - // More info: https://kubernetes.io/docs/concepts/configuration/secret - // +optional - // +patchMergeKey=name - // +patchStrategy=merge - Secrets []ObjectReference `json:"secrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=secrets"` - - // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images - // in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets - // can be mounted in the pcm_pod, but ImagePullSecrets are only accessed by the kubelet. - // More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod - // +optional - ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" protobuf:"bytes,3,rep,name=imagePullSecrets"` - - // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. - // Can be overridden at the pcm_pod level. - // +optional - AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty" protobuf:"varint,4,opt,name=automountServiceAccountToken"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// ServiceAccountList is a list of ServiceAccount objects -type ServiceAccountList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of ServiceAccounts. - // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ - Items []ServiceAccount `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// Endpoints is a collection of endpoints that implement the actual service. Example: -// -// Name: "mysvc", -// Subsets: [ -// { -// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], -// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] -// }, -// { -// Addresses: [{"ip": "10.10.3.3"}], -// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] -// }, -// ] -type Endpoints struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // The set of all endpoints is the union of all subsets. Addresses are placed into - // subsets according to the IPs they share. A single address with multiple ports, - // some of which are ready and some of which are not (because they come from - // different containers) will result in the address being displayed in different - // subsets for the different ports. No address will appear in both Addresses and - // NotReadyAddresses in the same subset. - // Sets of addresses and ports that comprise a service. - // +optional - Subsets []EndpointSubset `json:"subsets,omitempty" protobuf:"bytes,2,rep,name=subsets"` -} - -// EndpointSubset is a group of addresses with a common set of ports. The -// expanded set of endpoints is the Cartesian product of Addresses x Ports. -// For example, given: -// -// { -// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], -// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] -// } -// -// The resulting set of endpoints can be viewed as: -// -// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], -// b: [ 10.10.1.1:309, 10.10.2.2:309 ] -type EndpointSubset struct { - // IP addresses which offer the related ports that are marked as ready. These endpoints - // should be considered safe for load balancers and clients to utilize. - // +optional - Addresses []EndpointAddress `json:"addresses,omitempty" protobuf:"bytes,1,rep,name=addresses"` - // IP addresses which offer the related ports but are not currently marked as ready - // because they have not yet finished starting, have recently failed a readiness check, - // or have recently failed a liveness check. - // +optional - NotReadyAddresses []EndpointAddress `json:"notReadyAddresses,omitempty" protobuf:"bytes,2,rep,name=notReadyAddresses"` - // Port numbers available on the related IP addresses. - // +optional - Ports []EndpointPort `json:"ports,omitempty" protobuf:"bytes,3,rep,name=ports"` -} - -// EndpointAddress is a tuple that describes single IP address. -type EndpointAddress struct { - // The IP of this endpoint. - // May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), - // or link-local multicast ((224.0.0.0/24). - // IPv6 is also accepted but not fully supported on all platforms. Also, certain - // kubernetes components, like kube-proxy, are not IPv6 ready. - // TODO: This should allow hostname or IP, See #4447. - IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"` - // The Hostname of this endpoint - // +optional - Hostname string `json:"hostname,omitempty" protobuf:"bytes,3,opt,name=hostname"` - // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. - // +optional - NodeName *string `json:"nodeName,omitempty" protobuf:"bytes,4,opt,name=nodeName"` - // Reference to object providing the endpoint. - // +optional - TargetRef *ObjectReference `json:"targetRef,omitempty" protobuf:"bytes,2,opt,name=targetRef"` -} - -// EndpointPort is a tuple that describes a single port. -type EndpointPort struct { - // The name of this port. This must match the 'name' field in the - // corresponding ServicePort. - // Must be a DNS_LABEL. - // Optional only if one port is defined. - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - - // The port number of the endpoint. - Port int32 `json:"port" protobuf:"varint,2,opt,name=port"` - - // The IP protocol for this port. - // Must be UDP, TCP, or SCTP. - // Default is TCP. - // +optional - Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,3,opt,name=protocol,casttype=Protocol"` - - // The application protocol for this port. - // This field follows standard Kubernetes label syntax. - // Un-prefixed names are reserved for IANA standard service names (as per - // RFC-6335 and http://www.iana.org/assignments/service-names). - // Non-standard protocols should use prefixed names such as - // mycompany.com/my-custom-protocol. - // This is a beta field that is guarded by the ServiceAppProtocol feature - // gate and enabled by default. - // +optional - AppProtocol *string `json:"appProtocol,omitempty" protobuf:"bytes,4,opt,name=appProtocol"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// EndpointsList is a list of endpoints. -type EndpointsList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of endpoints. - Items []Endpoints `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// NodeSpec describes the attributes that a node is created with. -type NodeSpec struct { - // PodCIDR represents the pcm_pod IP range assigned to the node. - // +optional - PodCIDR string `json:"podCIDR,omitempty" protobuf:"bytes,1,opt,name=podCIDR"` - - // podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this - // field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for - // each of IPv4 and IPv6. - // +optional - // +patchStrategy=merge - PodCIDRs []string `json:"podCIDRs,omitempty" protobuf:"bytes,7,opt,name=podCIDRs" patchStrategy:"merge"` - - // ID of the node assigned by the cloud provider in the format: :// - // +optional - ProviderID string `json:"providerID,omitempty" protobuf:"bytes,3,opt,name=providerID"` - // Unschedulable controls node schedulability of new pods. By default, node is schedulable. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration - // +optional - Unschedulable bool `json:"unschedulable,omitempty" protobuf:"varint,4,opt,name=unschedulable"` - // If specified, the node's taints. - // +optional - Taints []Taint `json:"taints,omitempty" protobuf:"bytes,5,opt,name=taints"` - // If specified, the source to get node configuration from - // The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field - // +optional - ConfigSource *NodeConfigSource `json:"configSource,omitempty" protobuf:"bytes,6,opt,name=configSource"` - - // Deprecated. Not all kubelets will set this field. Remove field after 1.13. - // see: https://issues.k8s.io/61966 - // +optional - DoNotUseExternalID string `json:"externalID,omitempty" protobuf:"bytes,2,opt,name=externalID"` -} - -// NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. -type NodeConfigSource struct { - // For historical context, regarding the below kind, apiVersion, and configMapRef deprecation tags: - // 1. kind/apiVersion were used by the kubelet to persist this struct to disk (they had no protobuf tags) - // 2. configMapRef and proto tag 1 were used by the API to refer to a configmap, - // but used a generic ObjectReference type that didn't really have the fields we needed - // All uses/persistence of the NodeConfigSource struct prior to 1.11 were gated by alpha feature flags, - // so there was no persisted data for these fields that needed to be migrated/handled. - - // +k8s:deprecated=kind - // +k8s:deprecated=apiVersion - // +k8s:deprecated=configMapRef,protobuf=1 - - // ConfigMap is a reference to a Node's ConfigMap - ConfigMap *ConfigMapNodeConfigSource `json:"configMap,omitempty" protobuf:"bytes,2,opt,name=configMap"` -} - -// ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. -type ConfigMapNodeConfigSource struct { - // Namespace is the metadata.namespace of the referenced ConfigMap. - // This field is required in all cases. - Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"` - - // Name is the metadata.name of the referenced ConfigMap. - // This field is required in all cases. - Name string `json:"name" protobuf:"bytes,2,opt,name=name"` - - // UID is the metadata.UID of the referenced ConfigMap. - // This field is forbidden in Node.Spec, and required in Node.Status. - // +optional - UID types.UID `json:"uid,omitempty" protobuf:"bytes,3,opt,name=uid"` - - // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. - // This field is forbidden in Node.Spec, and required in Node.Status. - // +optional - ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"` - - // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure - // This field is required in all cases. - KubeletConfigKey string `json:"kubeletConfigKey" protobuf:"bytes,5,opt,name=kubeletConfigKey"` -} - -// DaemonEndpoint contains information about a single Daemon endpoint. -type DaemonEndpoint struct { - /* - The port tag was not properly in quotes in earlier releases, so it must be - uppercased for backwards compat (since it was falling back to var name of - 'Port'). - */ - - // Port number of the given endpoint. - Port int32 `json:"Port" protobuf:"varint,1,opt,name=Port"` -} - -// NodeDaemonEndpoints lists ports opened by daemons running on the Node. -type NodeDaemonEndpoints struct { - // Endpoint on which Kubelet is listening. - // +optional - KubeletEndpoint DaemonEndpoint `json:"kubeletEndpoint,omitempty" protobuf:"bytes,1,opt,name=kubeletEndpoint"` -} - -// NodeSystemInfo is a set of ids/uuids to uniquely identify the node. -type NodeSystemInfo struct { - // MachineID reported by the node. For unique machine identification - // in the cluster this field is preferred. Learn more from man(5) - // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html - MachineID string `json:"machineID" protobuf:"bytes,1,opt,name=machineID"` - // SystemUUID reported by the node. For unique machine identification - // MachineID is preferred. This field is specific to Red Hat hosts - // https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid - SystemUUID string `json:"systemUUID" protobuf:"bytes,2,opt,name=systemUUID"` - // Boot ID reported by the node. - BootID string `json:"bootID" protobuf:"bytes,3,opt,name=bootID"` - // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). - KernelVersion string `json:"kernelVersion" protobuf:"bytes,4,opt,name=kernelVersion"` - // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). - OSImage string `json:"osImage" protobuf:"bytes,5,opt,name=osImage"` - // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). - ContainerRuntimeVersion string `json:"containerRuntimeVersion" protobuf:"bytes,6,opt,name=containerRuntimeVersion"` - // Kubelet Version reported by the node. - KubeletVersion string `json:"kubeletVersion" protobuf:"bytes,7,opt,name=kubeletVersion"` - // KubeProxy Version reported by the node. - KubeProxyVersion string `json:"kubeProxyVersion" protobuf:"bytes,8,opt,name=kubeProxyVersion"` - // The Operating System reported by the node - OperatingSystem string `json:"operatingSystem" protobuf:"bytes,9,opt,name=operatingSystem"` - // The Architecture reported by the node - Architecture string `json:"architecture" protobuf:"bytes,10,opt,name=architecture"` -} - -// NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource. -type NodeConfigStatus struct { - // Assigned reports the checkpointed config the node will try to use. - // When Node.Spec.ConfigSource is updated, the node checkpoints the associated - // config payload to local disk, along with a record indicating intended - // config. The node refers to this record to choose its config checkpoint, and - // reports this record in Assigned. Assigned only updates in the status after - // the record has been checkpointed to disk. When the Kubelet is restarted, - // it tries to make the Assigned config the Active config by loading and - // validating the checkpointed payload identified by Assigned. - // +optional - Assigned *NodeConfigSource `json:"assigned,omitempty" protobuf:"bytes,1,opt,name=assigned"` - // Active reports the checkpointed config the node is actively using. - // Active will represent either the current version of the Assigned config, - // or the current LastKnownGood config, depending on whether attempting to use the - // Assigned config results in an error. - // +optional - Active *NodeConfigSource `json:"active,omitempty" protobuf:"bytes,2,opt,name=active"` - // LastKnownGood reports the checkpointed config the node will fall back to - // when it encounters an error attempting to use the Assigned config. - // The Assigned config becomes the LastKnownGood config when the node determines - // that the Assigned config is stable and correct. - // This is currently implemented as a 10-minute soak period starting when the local - // record of Assigned config is updated. If the Assigned config is Active at the end - // of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is - // reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, - // because the local default config is always assumed good. - // You should not make assumptions about the node's method of determining config stability - // and correctness, as this may change or become configurable in the future. - // +optional - LastKnownGood *NodeConfigSource `json:"lastKnownGood,omitempty" protobuf:"bytes,3,opt,name=lastKnownGood"` - // Error describes any problems reconciling the Spec.ConfigSource to the Active config. - // Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned - // record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting - // to load or validate the Assigned config, etc. - // Errors may occur at different points while syncing config. Earlier errors (e.g. download or - // checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across - // Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in - // a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error - // by fixing the config assigned in Spec.ConfigSource. - // You can find additional information for debugging by searching the error message in the Kubelet log. - // Error is a human-readable description of the error state; machines can check whether or not Error - // is empty, but should not rely on the stability of the Error text across Kubelet versions. - // +optional - Error string `json:"error,omitempty" protobuf:"bytes,4,opt,name=error"` -} - -// NodeStatus is information about the current status of a node. -type NodeStatus struct { - // Capacity represents the total resources of a node. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - // +optional - Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"` - // Allocatable represents the resources of a node that are available for scheduling. - // Defaults to Capacity. - // +optional - Allocatable ResourceList `json:"allocatable,omitempty" protobuf:"bytes,2,rep,name=allocatable,casttype=ResourceList,castkey=ResourceName"` - // NodePhase is the recently observed lifecycle phase of the node. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#phase - // The field is never populated, and now is deprecated. - // +optional - Phase NodePhase `json:"phase,omitempty" protobuf:"bytes,3,opt,name=phase,casttype=NodePhase"` - // Conditions is an array of current observed node conditions. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#condition - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - Conditions []NodeCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"` - // List of addresses reachable to the node. - // Queried from cloud provider, if available. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses - // Note: This field is declared as mergeable, but the merge key is not sufficiently - // unique, which can cause data corruption when it is merged. Callers should instead - // use a full-replacement patch. See http://pr.k8s.io/79391 for an example. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - Addresses []NodeAddress `json:"addresses,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,5,rep,name=addresses"` - // Endpoints of daemons running on the Node. - // +optional - DaemonEndpoints NodeDaemonEndpoints `json:"daemonEndpoints,omitempty" protobuf:"bytes,6,opt,name=daemonEndpoints"` - // Set of ids/uuids to uniquely identify the node. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#info - // +optional - NodeInfo NodeSystemInfo `json:"nodeInfo,omitempty" protobuf:"bytes,7,opt,name=nodeInfo"` - // List of container images on this node - // +optional - Images []ContainerImage `json:"images,omitempty" protobuf:"bytes,8,rep,name=images"` - // List of attachable volumes in use (mounted) by the node. - // +optional - VolumesInUse []UniqueVolumeName `json:"volumesInUse,omitempty" protobuf:"bytes,9,rep,name=volumesInUse"` - // List of volumes that are attached to the node. - // +optional - VolumesAttached []AttachedVolume `json:"volumesAttached,omitempty" protobuf:"bytes,10,rep,name=volumesAttached"` - // Status of the config assigned to the node via the dynamic Kubelet config feature. - // +optional - Config *NodeConfigStatus `json:"config,omitempty" protobuf:"bytes,11,opt,name=config"` -} - -type UniqueVolumeName string - -// AttachedVolume describes a volume attached to a node -type AttachedVolume struct { - // Name of the attached volume - Name UniqueVolumeName `json:"name" protobuf:"bytes,1,rep,name=name"` - - // DevicePath represents the device path where the volume should be available - DevicePath string `json:"devicePath" protobuf:"bytes,2,rep,name=devicePath"` -} - -// AvoidPods describes pods that should avoid this node. This is the value for a -// Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and -// will eventually become a field of NodeStatus. -type AvoidPods struct { - // Bounded-sized list of signatures of pods that should avoid this node, sorted - // in timestamp order from oldest to newest. Size of the slice is unspecified. - // +optional - PreferAvoidPods []PreferAvoidPodsEntry `json:"preferAvoidPods,omitempty" protobuf:"bytes,1,rep,name=preferAvoidPods"` -} - -// Describes a class of pods that should avoid this node. -type PreferAvoidPodsEntry struct { - // The class of pods. - PodSignature PodSignature `json:"podSignature" protobuf:"bytes,1,opt,name=podSignature"` - // Time at which this entry was added to the list. - // +optional - EvictionTime metav1.Time `json:"evictionTime,omitempty" protobuf:"bytes,2,opt,name=evictionTime"` - // (brief) reason why this entry was added to the list. - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` - // Human readable message indicating why this entry was added to the list. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"` -} - -// Describes the class of pods that should avoid this node. -// Exactly one field should be set. -type PodSignature struct { - // Reference to controller whose pods should avoid this node. - // +optional - PodController *metav1.OwnerReference `json:"podController,omitempty" protobuf:"bytes,1,opt,name=podController"` -} - -// Describe a container image -type ContainerImage struct { - // Names by which this image is known. - // e.g. ["k8s.gcr.io/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"] - Names []string `json:"names" protobuf:"bytes,1,rep,name=names"` - // The size of the image in bytes. - // +optional - SizeBytes int64 `json:"sizeBytes,omitempty" protobuf:"varint,2,opt,name=sizeBytes"` -} - -type NodePhase string - -// These are the valid phases of node. -const ( - // NodePending means the node has been created/added by the system, but not configured. - NodePending NodePhase = "Pending" - // NodeRunning means the node has been configured and has Kubernetes components running. - NodeRunning NodePhase = "Running" - // NodeTerminated means the node has been removed from the cluster. - NodeTerminated NodePhase = "Terminated" -) - -type NodeConditionType string - -// These are valid conditions of node. Currently, we don't have enough information to decide -// node condition. In the future, we will add more. The proposed set of conditions are: -// NodeReachable, NodeLive, NodeReady, NodeSchedulable, NodeRunnable. -const ( - // NodeReady means kubelet is healthy and ready to accept pods. - NodeReady NodeConditionType = "Ready" - // NodeMemoryPressure means the kubelet is under pressure due to insufficient available memory. - NodeMemoryPressure NodeConditionType = "MemoryPressure" - // NodeDiskPressure means the kubelet is under pressure due to insufficient available disk. - NodeDiskPressure NodeConditionType = "DiskPressure" - // NodePIDPressure means the kubelet is under pressure due to insufficient available PID. - NodePIDPressure NodeConditionType = "PIDPressure" - // NodeNetworkUnavailable means that network for the node is not correctly configured. - NodeNetworkUnavailable NodeConditionType = "NetworkUnavailable" -) - -// NodeCondition contains condition information for a node. -type NodeCondition struct { - // Type of node condition. - Type NodeConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=NodeConditionType"` - // Status of the condition, one of True, False, Unknown. - Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` - // Last time we got an update on a given condition. - // +optional - LastHeartbeatTime metav1.Time `json:"lastHeartbeatTime,omitempty" protobuf:"bytes,3,opt,name=lastHeartbeatTime"` - // Last time the condition transit from one status to another. - // +optional - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` - // (brief) reason for the condition's last transition. - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` - // Human readable message indicating details about last transition. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` -} - -type NodeAddressType string - -// These are valid address type of node. -const ( - NodeHostName NodeAddressType = "Hostname" - NodeExternalIP NodeAddressType = "ExternalIP" - NodeInternalIP NodeAddressType = "InternalIP" - NodeExternalDNS NodeAddressType = "ExternalDNS" - NodeInternalDNS NodeAddressType = "InternalDNS" -) - -// NodeAddress contains information for the node's address. -type NodeAddress struct { - // Node address type, one of Hostname, ExternalIP or InternalIP. - Type NodeAddressType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=NodeAddressType"` - // The node address. - Address string `json:"address" protobuf:"bytes,2,opt,name=address"` -} - -// ResourceName is the name identifying various resources in a ResourceList. -type ResourceName string - -// Resource names must be not more than 63 characters, consisting of upper- or lower-case alphanumeric characters, -// with the -, _, and . characters allowed anywhere, except the first or last character. -// The default convention, matching that for annotations, is to use lower-case names, with dashes, rather than -// camel case, separating compound words. -// Fully-qualified resource typenames are constructed from a DNS-style subdomain, followed by a slash `/` and a name. -const ( - // CPU, in cores. (500m = .5 cores) - ResourceCPU ResourceName = "cpu" - // Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024) - ResourceMemory ResourceName = "memory" - // Volume size, in bytes (e,g. 5Gi = 5GiB = 5 * 1024 * 1024 * 1024) - ResourceStorage ResourceName = "storage" - // Local ephemeral storage, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024) - // The resource name for ResourceEphemeralStorage is alpha and it can change across releases. - ResourceEphemeralStorage ResourceName = "ephemeral-storage" -) - -const ( - // Default namespace prefix. - ResourceDefaultNamespacePrefix = "kubernetes.io/" - // Name prefix for huge page resources (alpha). - ResourceHugePagesPrefix = "hugepages-" - // Name prefix for storage resource limits - ResourceAttachableVolumesPrefix = "attachable-volumes-" -) - -// ResourceList is a set of (resource name, quantity) pairs. -type ResourceList map[ResourceName]resource.Quantity - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// Node is a worker node in Kubernetes. -// Each node will have a unique identifier in the cache (i.e. in etcd). -type Node struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the behavior of a node. - // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Spec NodeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Most recently observed status of the node. - // Populated by the system. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Status NodeStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// NodeList is the whole list of all Nodes which have been registered with master. -type NodeList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of nodes - Items []Node `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// FinalizerName is the name identifying a finalizer during namespace lifecycle. -type FinalizerName string - -// These are internal finalizer values to Kubernetes, must be qualified name unless defined here or -// in metav1. -const ( - FinalizerKubernetes FinalizerName = "kubernetes" -) - -// NamespaceSpec describes the attributes on a Namespace. -type NamespaceSpec struct { - // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. - // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ - // +optional - Finalizers []FinalizerName `json:"finalizers,omitempty" protobuf:"bytes,1,rep,name=finalizers,casttype=FinalizerName"` -} - -// NamespaceStatus is information about the current status of a Namespace. -type NamespaceStatus struct { - // Phase is the current lifecycle phase of the namespace. - // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ - // +optional - Phase NamespacePhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=NamespacePhase"` - - // Represents the latest available observations of a namespace's current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - Conditions []NamespaceCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` -} - -type NamespacePhase string - -// These are the valid phases of a namespace. -const ( - // NamespaceActive means the namespace is available for use in the system - NamespaceActive NamespacePhase = "Active" - // NamespaceTerminating means the namespace is undergoing graceful termination - NamespaceTerminating NamespacePhase = "Terminating" -) - -const ( - // NamespaceTerminatingCause is returned as a defaults.cause item when a change is - // forbidden due to the namespace being terminated. - NamespaceTerminatingCause metav1.CauseType = "NamespaceTerminating" -) - -type NamespaceConditionType string - -// These are valid conditions of a namespace. -const ( - // NamespaceDeletionDiscoveryFailure contains information about namespace deleter errors during resource discovery. - NamespaceDeletionDiscoveryFailure NamespaceConditionType = "NamespaceDeletionDiscoveryFailure" - // NamespaceDeletionContentFailure contains information about namespace deleter errors during deletion of resources. - NamespaceDeletionContentFailure NamespaceConditionType = "NamespaceDeletionContentFailure" - // NamespaceDeletionGVParsingFailure contains information about namespace deleter errors parsing GV for legacy types. - NamespaceDeletionGVParsingFailure NamespaceConditionType = "NamespaceDeletionGroupVersionParsingFailure" - // NamespaceContentRemaining contains information about resources remaining in a namespace. - NamespaceContentRemaining NamespaceConditionType = "NamespaceContentRemaining" - // NamespaceFinalizersRemaining contains information about which finalizers are on resources remaining in a namespace. - NamespaceFinalizersRemaining NamespaceConditionType = "NamespaceFinalizersRemaining" -) - -// NamespaceCondition contains details about state of namespace. -type NamespaceCondition struct { - // Type of namespace controller condition. - Type NamespaceConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=NamespaceConditionType"` - // Status of the condition, one of True, False, Unknown. - Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` - // +optional - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` -} - -// +genclient -// +genclient:nonNamespaced -// +genclient:skipVerbs=deleteCollection -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// Namespace provides a scope for Names. -// Use of multiple namespaces is optional. -type Namespace struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the behavior of the Namespace. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Spec NamespaceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Status describes the current status of a Namespace. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Status NamespaceStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// NamespaceList is a list of Namespaces. -type NamespaceList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is the list of Namespace objects in the list. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - Items []Namespace `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// Binding ties one object to another; for example, a pcm_pod is bound to a node by a scheduler. -// Deprecated in 1.7, please use the bindings subresource of pods instead. -type Binding struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // The target object that you want to bind to the standard object. - Target ObjectReference `json:"target" protobuf:"bytes,2,opt,name=target"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// A list of ephemeral containers used with the Pod ephemeralcontainers subresource. -type EphemeralContainers struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // A list of ephemeral containers associated with this pcm_pod. New ephemeral containers - // may be appended to this list, but existing ephemeral containers may not be removed - // or modified. - // +patchMergeKey=name - // +patchStrategy=merge - EphemeralContainers []EphemeralContainer `json:"ephemeralContainers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=ephemeralContainers"` -} - -// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. -// +k8s:openapi-gen=false -type Preconditions struct { - // Specifies the target UID. - // +optional - UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/types.UID"` -} - -// +k8s:conversion-gen:explicit-from=net/url.Values -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// PodLogOptions is the query options for a Pod's logs REST call. -type PodLogOptions struct { - metav1.TypeMeta `json:",inline"` - - // The container for which to stream logs. Defaults to only container if there is one container in the pcm_pod. - // +optional - Container string `json:"container,omitempty" protobuf:"bytes,1,opt,name=container"` - // Follow the log stream of the pcm_pod. Defaults to false. - // +optional - Follow bool `json:"follow,omitempty" protobuf:"varint,2,opt,name=follow"` - // Return previous terminated container logs. Defaults to false. - // +optional - Previous bool `json:"previous,omitempty" protobuf:"varint,3,opt,name=previous"` - // A relative time in seconds before the current time from which to show logs. If this value - // precedes the time a pcm_pod was started, only logs since the pcm_pod start will be returned. - // If this value is in the future, no logs will be returned. - // Only one of sinceSeconds or sinceTime may be specified. - // +optional - SinceSeconds *int64 `json:"sinceSeconds,omitempty" protobuf:"varint,4,opt,name=sinceSeconds"` - // An RFC3339 timestamp from which to show logs. If this value - // precedes the time a pcm_pod was started, only logs since the pcm_pod start will be returned. - // If this value is in the future, no logs will be returned. - // Only one of sinceSeconds or sinceTime may be specified. - // +optional - SinceTime *metav1.Time `json:"sinceTime,omitempty" protobuf:"bytes,5,opt,name=sinceTime"` - // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line - // of log output. Defaults to false. - // +optional - Timestamps bool `json:"timestamps,omitempty" protobuf:"varint,6,opt,name=timestamps"` - // If set, the number of lines from the end of the logs to show. If not specified, - // logs are shown from the creation of the container or sinceSeconds or sinceTime - // +optional - TailLines *int64 `json:"tailLines,omitempty" protobuf:"varint,7,opt,name=tailLines"` - // If set, the number of bytes to read from the server before terminating the - // log output. This may not display a complete final line of logging, and may return - // slightly more or slightly less than the specified limit. - // +optional - LimitBytes *int64 `json:"limitBytes,omitempty" protobuf:"varint,8,opt,name=limitBytes"` - - // insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the - // serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver - // and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real - // kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the - // connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept - // the actual log data coming from the real kubelet). - // +optional - InsecureSkipTLSVerifyBackend bool `json:"insecureSkipTLSVerifyBackend,omitempty" protobuf:"varint,9,opt,name=insecureSkipTLSVerifyBackend"` -} - -// +k8s:conversion-gen:explicit-from=net/url.Values -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// PodAttachOptions is the query options to a Pod's remote attach call. -// --- -// TODO: merge w/ PodExecOptions below for stdin, stdout, etc -// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY -type PodAttachOptions struct { - metav1.TypeMeta `json:",inline"` - - // Stdin if true, redirects the standard input stream of the pcm_pod for this call. - // Defaults to false. - // +optional - Stdin bool `json:"stdin,omitempty" protobuf:"varint,1,opt,name=stdin"` - - // Stdout if true indicates that stdout is to be redirected for the attach call. - // Defaults to true. - // +optional - Stdout bool `json:"stdout,omitempty" protobuf:"varint,2,opt,name=stdout"` - - // Stderr if true indicates that stderr is to be redirected for the attach call. - // Defaults to true. - // +optional - Stderr bool `json:"stderr,omitempty" protobuf:"varint,3,opt,name=stderr"` - - // TTY if true indicates that a tty will be allocated for the attach call. - // This is passed through the container runtime so the tty - // is allocated on the worker node by the container runtime. - // Defaults to false. - // +optional - TTY bool `json:"tty,omitempty" protobuf:"varint,4,opt,name=tty"` - - // The container in which to execute the command. - // Defaults to only container if there is only one container in the pcm_pod. - // +optional - Container string `json:"container,omitempty" protobuf:"bytes,5,opt,name=container"` -} - -// +k8s:conversion-gen:explicit-from=net/url.Values -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// PodExecOptions is the query options to a Pod's remote exec call. -// --- -// TODO: This is largely identical to PodAttachOptions above, make sure they stay in sync and see about merging -// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY -type PodExecOptions struct { - metav1.TypeMeta `json:",inline"` - - // Redirect the standard input stream of the pcm_pod for this call. - // Defaults to false. - // +optional - Stdin bool `json:"stdin,omitempty" protobuf:"varint,1,opt,name=stdin"` - - // Redirect the standard output stream of the pcm_pod for this call. - // Defaults to true. - // +optional - Stdout bool `json:"stdout,omitempty" protobuf:"varint,2,opt,name=stdout"` - - // Redirect the standard error stream of the pcm_pod for this call. - // Defaults to true. - // +optional - Stderr bool `json:"stderr,omitempty" protobuf:"varint,3,opt,name=stderr"` - - // TTY if true indicates that a tty will be allocated for the exec call. - // Defaults to false. - // +optional - TTY bool `json:"tty,omitempty" protobuf:"varint,4,opt,name=tty"` - - // Container in which to execute the command. - // Defaults to only container if there is only one container in the pcm_pod. - // +optional - Container string `json:"container,omitempty" protobuf:"bytes,5,opt,name=container"` - - // Command is the remote command to execute. argv array. Not executed within a shell. - Command []string `json:"command" protobuf:"bytes,6,rep,name=command"` -} - -// +k8s:conversion-gen:explicit-from=net/url.Values -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// PodPortForwardOptions is the query options to a Pod's port forward call -// when using WebSockets. -// The `port` query parameter must specify the port or -// ports (comma separated) to forward over. -// Port forwarding over SPDY does not use these options. It requires the port -// to be passed in the `port` header as part of request. -type PodPortForwardOptions struct { - metav1.TypeMeta `json:",inline"` - - // List of ports to forward - // Required when using WebSockets - // +optional - Ports []int32 `json:"ports,omitempty" protobuf:"varint,1,rep,name=ports"` -} - -// +k8s:conversion-gen:explicit-from=net/url.Values -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// PodProxyOptions is the query options to a Pod's proxy call. -type PodProxyOptions struct { - metav1.TypeMeta `json:",inline"` - - // Path is the URL path to use for the current proxy request to pcm_pod. - // +optional - Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` -} - -// +k8s:conversion-gen:explicit-from=net/url.Values -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// NodeProxyOptions is the query options to a Node's proxy call. -type NodeProxyOptions struct { - metav1.TypeMeta `json:",inline"` - - // Path is the URL path to use for the current proxy request to node. - // +optional - Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` -} - -// +k8s:conversion-gen:explicit-from=net/url.Values -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// ServiceProxyOptions is the query options to a Service's proxy call. -type ServiceProxyOptions struct { - metav1.TypeMeta `json:",inline"` - - // Path is the part of URLs that include service endpoints, suffixes, - // and parameters to use for the current proxy request to service. - // For example, the whole request URL is - // http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. - // Path is _search?q=user:kimchy. - // +optional - Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` -} - -// ObjectReference contains enough information to let you inspect or modify the referred object. -// --- -// New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. -// 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. -// 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular -// restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". -// Those cannot be well described when embedded. -// 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. -// 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity -// during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple -// and the version of the actual struct is irrelevant. -// 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type -// will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. -// -// Instead of using this type, create a locally provided and used type that is well-focused on your reference. -// For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object -type ObjectReference struct { - // Kind of the referent. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` - // Namespace of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - // +optional - Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"` - // Name of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,3,opt,name=name"` - // UID of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - // +optional - UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/types.UID"` - // API version of the referent. - // +optional - APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,5,opt,name=apiVersion"` - // Specific resourceVersion to which this reference is made, if any. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - // +optional - ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"` - - // If referring to a piece of an object instead of an entire object, this string - // should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - // For example, if the object reference is to a container within a pcm_pod, this would take on a value like: - // "spec.containers{name}" (where "name" refers to the name of the container that triggered - // the event) or if no container name is specified "spec.containers[2]" (container with - // index 2 in this pcm_pod). This syntax is chosen only to have some well-defined way of - // referencing a part of an object. - // TODO: this design is not final and this field is subject to change in the future. - // +optional - FieldPath string `json:"fieldPath,omitempty" protobuf:"bytes,7,opt,name=fieldPath"` -} - -// LocalObjectReference contains enough information to let you locate the -// referenced object inside the same namespace. -type LocalObjectReference struct { - // Name of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - // TODO: Add other useful fields. apiVersion, kind, uid? - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` -} - -// TypedLocalObjectReference contains enough information to let you locate the -// typed referenced object inside the same namespace. -type TypedLocalObjectReference struct { - // APIGroup is the group for the resource being referenced. - // If APIGroup is not specified, the specified Kind must be in the core API group. - // For any other third-party types, APIGroup is required. - // +optional - APIGroup *string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"` - // Kind is the type of resource being referenced - Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"` - // Name is the name of resource being referenced - Name string `json:"name" protobuf:"bytes,3,opt,name=name"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// SerializedReference is a reference to serialized object. -type SerializedReference struct { - metav1.TypeMeta `json:",inline"` - // The reference to an object in the system. - // +optional - Reference ObjectReference `json:"reference,omitempty" protobuf:"bytes,1,opt,name=reference"` -} - -// EventSource contains information for an event. -type EventSource struct { - // Component from which the event is generated. - // +optional - Component string `json:"component,omitempty" protobuf:"bytes,1,opt,name=component"` - // Node name on which the event is generated. - // +optional - Host string `json:"host,omitempty" protobuf:"bytes,2,opt,name=host"` -} - -// Valid values for event types (new types could be added in future) -const ( - // Information only and will not cause any problems - EventTypeNormal string = "Normal" - // These events are to warn that something might go wrong - EventTypeWarning string = "Warning" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// Event is a report of an event somewhere in the cluster. Events -// have a limited retention time and triggers and messages may evolve -// with time. Event consumers should not rely on the timing of an event -// with a given Reason reflecting a consistent underlying trigger, or the -// continued existence of events with that Reason. Events should be -// treated as informative, best-effort, supplemental data. -type Event struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` - - // The object that this event is about. - InvolvedObject ObjectReference `json:"involvedObject" protobuf:"bytes,2,opt,name=involvedObject"` - - // This should be a short, machine understandable string that gives the reason - // for the transition into the object's current status. - // TODO: provide exact specification for format. - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` - - // A human-readable description of the status of this operation. - // TODO: decide on maximum length. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"` - - // The component reporting this event. Should be a short machine understandable string. - // +optional - Source EventSource `json:"source,omitempty" protobuf:"bytes,5,opt,name=source"` - - // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) - // +optional - FirstTimestamp metav1.Time `json:"firstTimestamp,omitempty" protobuf:"bytes,6,opt,name=firstTimestamp"` - - // The time at which the most recent occurrence of this event was recorded. - // +optional - LastTimestamp metav1.Time `json:"lastTimestamp,omitempty" protobuf:"bytes,7,opt,name=lastTimestamp"` - - // The number of times this event has occurred. - // +optional - Count int32 `json:"count,omitempty" protobuf:"varint,8,opt,name=count"` - - // Type of this event (Normal, Warning), new types could be added in the future - // +optional - Type string `json:"type,omitempty" protobuf:"bytes,9,opt,name=type"` - - // Time when this Event was first observed. - // +optional - EventTime metav1.MicroTime `json:"eventTime,omitempty" protobuf:"bytes,10,opt,name=eventTime"` - - // Data about the Event series this event represents or nil if it's a singleton Event. - // +optional - Series *EventSeries `json:"series,omitempty" protobuf:"bytes,11,opt,name=series"` - - // What action was taken/failed regarding to the Regarding object. - // +optional - Action string `json:"action,omitempty" protobuf:"bytes,12,opt,name=action"` - - // Optional secondary object for more complex actions. - // +optional - Related *ObjectReference `json:"related,omitempty" protobuf:"bytes,13,opt,name=related"` - - // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. - // +optional - ReportingController string `json:"reportingComponent" protobuf:"bytes,14,opt,name=reportingComponent"` - - // ID of the controller instance, e.g. `kubelet-xyzf`. - // +optional - ReportingInstance string `json:"reportingInstance" protobuf:"bytes,15,opt,name=reportingInstance"` -} - -// EventSeries contain information on series of events, i.e. thing that was/is happening -// continuously for some time. -type EventSeries struct { - // Number of occurrences in this series up to the last heartbeat time - Count int32 `json:"count,omitempty" protobuf:"varint,1,name=count"` - // Time of the last occurrence observed - LastObservedTime metav1.MicroTime `json:"lastObservedTime,omitempty" protobuf:"bytes,2,name=lastObservedTime"` - - // +k8s:deprecated=state,protobuf=3 -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// EventList is a list of events. -type EventList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of events - Items []Event `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// List holds a list of objects, which may not be known by the server. -type List metav1.List - -// LimitType is a type of object that is limited -type LimitType string - -const ( - // Limit that applies to all pods in a namespace - LimitTypePod LimitType = "Pod" - // Limit that applies to all containers in a namespace - LimitTypeContainer LimitType = "Container" - // Limit that applies to all persistent volume claims in a namespace - LimitTypePersistentVolumeClaim LimitType = "PersistentVolumeClaim" -) - -// LimitRangeItem defines a min/max usage limit for any resource that matches on kind. -type LimitRangeItem struct { - // Type of resource that this limit applies to. - Type LimitType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=LimitType"` - // Max usage constraints on this kind by resource name. - // +optional - Max ResourceList `json:"max,omitempty" protobuf:"bytes,2,rep,name=max,casttype=ResourceList,castkey=ResourceName"` - // Min usage constraints on this kind by resource name. - // +optional - Min ResourceList `json:"min,omitempty" protobuf:"bytes,3,rep,name=min,casttype=ResourceList,castkey=ResourceName"` - // Default resource requirement limit value by resource name if resource limit is omitted. - // +optional - Default ResourceList `json:"default,omitempty" protobuf:"bytes,4,rep,name=default,casttype=ResourceList,castkey=ResourceName"` - // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. - // +optional - DefaultRequest ResourceList `json:"defaultRequest,omitempty" protobuf:"bytes,5,rep,name=defaultRequest,casttype=ResourceList,castkey=ResourceName"` - // MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource. - // +optional - MaxLimitRequestRatio ResourceList `json:"maxLimitRequestRatio,omitempty" protobuf:"bytes,6,rep,name=maxLimitRequestRatio,casttype=ResourceList,castkey=ResourceName"` -} - -// LimitRangeSpec defines a min/max usage limit for resources that match on kind. -type LimitRangeSpec struct { - // Limits is the list of LimitRangeItem objects that are enforced. - Limits []LimitRangeItem `json:"limits" protobuf:"bytes,1,rep,name=limits"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// LimitRange sets resource usage limits for each kind of resource in a Namespace. -type LimitRange struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the limits enforced. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Spec LimitRangeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// LimitRangeList is a list of LimitRange items. -type LimitRangeList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is a list of LimitRange objects. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - Items []LimitRange `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// The following identify resource constants for Kubernetes object types -const ( - // Pods, number - ResourcePods ResourceName = "pods" - // Services, number - ResourceServices ResourceName = "services" - // ReplicationControllers, number - ResourceReplicationControllers ResourceName = "replicationcontrollers" - // ResourceQuotas, number - ResourceQuotas ResourceName = "resourcequotas" - // ResourceSecrets, number - ResourceSecrets ResourceName = "secrets" - // ResourceConfigMaps, number - ResourceConfigMaps ResourceName = "configmaps" - // ResourcePersistentVolumeClaims, number - ResourcePersistentVolumeClaims ResourceName = "persistentvolumeclaims" - // ResourceServicesNodePorts, number - ResourceServicesNodePorts ResourceName = "services.nodeports" - // ResourceServicesLoadBalancers, number - ResourceServicesLoadBalancers ResourceName = "services.loadbalancers" - // CPU request, in cores. (500m = .5 cores) - ResourceRequestsCPU ResourceName = "requests.cpu" - // Memory request, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024) - ResourceRequestsMemory ResourceName = "requests.memory" - // Storage request, in bytes - ResourceRequestsStorage ResourceName = "requests.storage" - // Local ephemeral storage request, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024) - ResourceRequestsEphemeralStorage ResourceName = "requests.ephemeral-storage" - // CPU limit, in cores. (500m = .5 cores) - ResourceLimitsCPU ResourceName = "limits.cpu" - // Memory limit, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024) - ResourceLimitsMemory ResourceName = "limits.memory" - // Local ephemeral storage limit, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024) - ResourceLimitsEphemeralStorage ResourceName = "limits.ephemeral-storage" -) - -// The following identify resource prefix for Kubernetes object types -const ( - // HugePages request, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024) - // As burst is not supported for HugePages, we would only quota its request, and ignore the limit. - ResourceRequestsHugePagesPrefix = "requests.hugepages-" - // Default resource requests prefix - DefaultResourceRequestsPrefix = "requests." -) - -// A ResourceQuotaScope defines a filter that must match each object tracked by a quota -type ResourceQuotaScope string - -const ( - // Match all pcm_pod objects where spec.activeDeadlineSeconds >=0 - ResourceQuotaScopeTerminating ResourceQuotaScope = "Terminating" - // Match all pcm_pod objects where spec.activeDeadlineSeconds is nil - ResourceQuotaScopeNotTerminating ResourceQuotaScope = "NotTerminating" - // Match all pcm_pod objects that have best effort quality of service - ResourceQuotaScopeBestEffort ResourceQuotaScope = "BestEffort" - // Match all pcm_pod objects that do not have best effort quality of service - ResourceQuotaScopeNotBestEffort ResourceQuotaScope = "NotBestEffort" - // Match all pcm_pod objects that have priority class mentioned - ResourceQuotaScopePriorityClass ResourceQuotaScope = "PriorityClass" - // Match all pcm_pod objects that have cross-namespace pcm_pod (anti)affinity mentioned. - // This is an alpha feature enabled by the PodAffinityNamespaceSelector feature flag. - ResourceQuotaScopeCrossNamespacePodAffinity ResourceQuotaScope = "CrossNamespacePodAffinity" -) - -// ResourceQuotaSpec defines the desired hard limits to enforce for Quota. -type ResourceQuotaSpec struct { - // hard is the set of desired hard limits for each named resource. - // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ - // +optional - Hard ResourceList `json:"hard,omitempty" protobuf:"bytes,1,rep,name=hard,casttype=ResourceList,castkey=ResourceName"` - // A collection of filters that must match each object tracked by a quota. - // If not specified, the quota matches all objects. - // +optional - Scopes []ResourceQuotaScope `json:"scopes,omitempty" protobuf:"bytes,2,rep,name=scopes,casttype=ResourceQuotaScope"` - // scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota - // but expressed using ScopeSelectorOperator in combination with possible values. - // For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched. - // +optional - ScopeSelector *ScopeSelector `json:"scopeSelector,omitempty" protobuf:"bytes,3,opt,name=scopeSelector"` -} - -// A scope selector represents the AND of the selectors represented -// by the scoped-resource selector requirements. -type ScopeSelector struct { - // A list of scope selector requirements by scope of the resources. - // +optional - MatchExpressions []ScopedResourceSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,1,rep,name=matchExpressions"` -} - -// A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator -// that relates the scope name and values. -type ScopedResourceSelectorRequirement struct { - // The name of the scope that the selector applies to. - ScopeName ResourceQuotaScope `json:"scopeName" protobuf:"bytes,1,opt,name=scopeName"` - // Represents a scope's relationship to a set of values. - // Valid operators are In, NotIn, Exists, DoesNotExist. - Operator ScopeSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=ScopedResourceSelectorOperator"` - // An array of string values. If the operator is In or NotIn, - // the values array must be non-empty. If the operator is Exists or DoesNotExist, - // the values array must be empty. - // This array is replaced during a strategic merge patch. - // +optional - Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` -} - -// A scope selector operator is the set of operators that can be used in -// a scope selector requirement. -type ScopeSelectorOperator string - -const ( - ScopeSelectorOpIn ScopeSelectorOperator = "In" - ScopeSelectorOpNotIn ScopeSelectorOperator = "NotIn" - ScopeSelectorOpExists ScopeSelectorOperator = "Exists" - ScopeSelectorOpDoesNotExist ScopeSelectorOperator = "DoesNotExist" -) - -// ResourceQuotaStatus defines the enforced hard limits and observed use. -type ResourceQuotaStatus struct { - // Hard is the set of enforced hard limits for each named resource. - // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ - // +optional - Hard ResourceList `json:"hard,omitempty" protobuf:"bytes,1,rep,name=hard,casttype=ResourceList,castkey=ResourceName"` - // Used is the current observed total usage of the resource in the namespace. - // +optional - Used ResourceList `json:"used,omitempty" protobuf:"bytes,2,rep,name=used,casttype=ResourceList,castkey=ResourceName"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// ResourceQuota sets aggregate quota restrictions enforced per namespace -type ResourceQuota struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the desired quota. - // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Spec ResourceQuotaSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Status defines the actual enforced quota and its current usage. - // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Status ResourceQuotaStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// ResourceQuotaList is a list of ResourceQuota items. -type ResourceQuotaList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is a list of ResourceQuota objects. - // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ - Items []ResourceQuota `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// Secret holds secret data of a certain type. The total bytes of the values in -// the Data field must be less than MaxSecretSize bytes. -type Secret struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Immutable, if set to true, ensures that data stored in the Secret cannot - // be updated (only object metadata can be modified). - // If not set to true, the field can be modified at any time. - // Defaulted to nil. - // +optional - Immutable *bool `json:"immutable,omitempty" protobuf:"varint,5,opt,name=immutable"` - - // Data contains the secret data. Each key must consist of alphanumeric - // characters, '-', '_' or '.'. The serialized form of the secret data is a - // base64 encoded string, representing the arbitrary (possibly non-string) - // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 - // +optional - Data map[string][]byte `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"` - - // stringData allows specifying non-binary secret data in string form. - // It is provided as a write-only input field for convenience. - // All keys and values are merged into the data field on write, overwriting any existing values. - // The stringData field is never output when reading from the API. - // +k8s:conversion-gen=false - // +optional - StringData map[string]string `json:"stringData,omitempty" protobuf:"bytes,4,rep,name=stringData"` - - // Used to facilitate programmatic handling of secret data. - // +optional - Type SecretType `json:"type,omitempty" protobuf:"bytes,3,opt,name=type,casttype=SecretType"` -} - -const MaxSecretSize = 1 * 1024 * 1024 - -type SecretType string - -const ( - // SecretTypeOpaque is the default. Arbitrary user-defined data - SecretTypeOpaque SecretType = "Opaque" - - // SecretTypeServiceAccountToken contains a token that identifies a service account to the API - // - // Required fields: - // - Secret.Annotations["kubernetes.io/service-account.name"] - the name of the ServiceAccount the token identifies - // - Secret.Annotations["kubernetes.io/service-account.uid"] - the UID of the ServiceAccount the token identifies - // - Secret.Data["token"] - a token that identifies the service account to the API - SecretTypeServiceAccountToken SecretType = "kubernetes.io/service-account-token" - - // ServiceAccountNameKey is the key of the required annotation for SecretTypeServiceAccountToken secrets - ServiceAccountNameKey = "kubernetes.io/service-account.name" - // ServiceAccountUIDKey is the key of the required annotation for SecretTypeServiceAccountToken secrets - ServiceAccountUIDKey = "kubernetes.io/service-account.uid" - // ServiceAccountTokenKey is the key of the required data for SecretTypeServiceAccountToken secrets - ServiceAccountTokenKey = "token" - // ServiceAccountKubeconfigKey is the key of the optional kubeconfig data for SecretTypeServiceAccountToken secrets - ServiceAccountKubeconfigKey = "kubernetes.kubeconfig" - // ServiceAccountRootCAKey is the key of the optional root certificate authority for SecretTypeServiceAccountToken secrets - ServiceAccountRootCAKey = "ca.crt" - // ServiceAccountNamespaceKey is the key of the optional namespace to use as the default for namespaced API calls - ServiceAccountNamespaceKey = "namespace" - - // SecretTypeDockercfg contains a dockercfg file that follows the same format rules as ~/.dockercfg - // - // Required fields: - // - Secret.Data[".dockercfg"] - a serialized ~/.dockercfg file - SecretTypeDockercfg SecretType = "kubernetes.io/dockercfg" - - // DockerConfigKey is the key of the required data for SecretTypeDockercfg secrets - DockerConfigKey = ".dockercfg" - - // SecretTypeDockerConfigJson contains a dockercfg file that follows the same format rules as ~/.docker/config.json - // - // Required fields: - // - Secret.Data[".dockerconfigjson"] - a serialized ~/.docker/config.json file - SecretTypeDockerConfigJson SecretType = "kubernetes.io/dockerconfigjson" - - // DockerConfigJsonKey is the key of the required data for SecretTypeDockerConfigJson secrets - DockerConfigJsonKey = ".dockerconfigjson" - - // SecretTypeBasicAuth contains data needed for basic authentication. - // - // Required at least one of fields: - // - Secret.Data["username"] - username used for authentication - // - Secret.Data["password"] - password or token needed for authentication - SecretTypeBasicAuth SecretType = "kubernetes.io/basic-auth" - - // BasicAuthUsernameKey is the key of the username for SecretTypeBasicAuth secrets - BasicAuthUsernameKey = "username" - // BasicAuthPasswordKey is the key of the password or token for SecretTypeBasicAuth secrets - BasicAuthPasswordKey = "password" - - // SecretTypeSSHAuth contains data needed for SSH authetication. - // - // Required field: - // - Secret.Data["ssh-privatekey"] - private SSH key needed for authentication - SecretTypeSSHAuth SecretType = "kubernetes.io/ssh-auth" - - // SSHAuthPrivateKey is the key of the required SSH private key for SecretTypeSSHAuth secrets - SSHAuthPrivateKey = "ssh-privatekey" - // SecretTypeTLS contains information about a TLS client or server secret. It - // is primarily used with TLS termination of the Ingress resource, but may be - // used in other types. - // - // Required fields: - // - Secret.Data["tls.key"] - TLS private key. - // Secret.Data["tls.crt"] - TLS certificate. - // TODO: Consider supporting different formats, specifying CA/destinationCA. - SecretTypeTLS SecretType = "kubernetes.io/tls" - - // TLSCertKey is the key for tls certificates in a TLS secert. - TLSCertKey = "tls.crt" - // TLSPrivateKeyKey is the key for the private key field in a TLS secret. - TLSPrivateKeyKey = "tls.key" - // SecretTypeBootstrapToken is used during the automated bootstrap process (first - // implemented by kubeadm). It stores tokens that are used to sign well known - // ConfigMaps. They are used for authn. - SecretTypeBootstrapToken SecretType = "bootstrap.kubernetes.io/token" -) - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// SecretList is a list of Secret. -type SecretList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is a list of secret objects. - // More info: https://kubernetes.io/docs/concepts/configuration/secret - Items []Secret `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// ConfigMap holds configuration data for pods to consume. -type ConfigMap struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Immutable, if set to true, ensures that data stored in the ConfigMap cannot - // be updated (only object metadata can be modified). - // If not set to true, the field can be modified at any time. - // Defaulted to nil. - // +optional - Immutable *bool `json:"immutable,omitempty" protobuf:"varint,4,opt,name=immutable"` - - // Data contains the configuration data. - // Each key must consist of alphanumeric characters, '-', '_' or '.'. - // Values with non-UTF-8 byte sequences must use the BinaryData field. - // The keys stored in Data must not overlap with the keys in - // the BinaryData field, this is enforced during validation process. - // +optional - Data map[string]string `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"` - - // BinaryData contains the binary data. - // Each key must consist of alphanumeric characters, '-', '_' or '.'. - // BinaryData can contain byte sequences that are not in the UTF-8 range. - // The keys stored in BinaryData must not overlap with the ones in - // the Data field, this is enforced during validation process. - // Using this field will require 1.10+ apiserver and - // kubelet. - // +optional - BinaryData map[string][]byte `json:"binaryData,omitempty" protobuf:"bytes,3,rep,name=binaryData"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// ConfigMapList is a resource containing a list of ConfigMap objects. -type ConfigMapList struct { - metav1.TypeMeta `json:",inline"` - - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is the list of ConfigMaps. - Items []ConfigMap `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// Type and constants for component health validation. -type ComponentConditionType string - -// These are the valid conditions for the component. -const ( - ComponentHealthy ComponentConditionType = "Healthy" -) - -// Information about the condition of a component. -type ComponentCondition struct { - // Type of condition for a component. - // Valid value: "Healthy" - Type ComponentConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ComponentConditionType"` - // Status of the condition for a component. - // Valid values for "Healthy": "True", "False", or "Unknown". - Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` - // Message about the condition for a component. - // For example, information about a health check. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` - // Condition error code for a component. - // For example, a health check error code. - // +optional - Error string `json:"error,omitempty" protobuf:"bytes,4,opt,name=error"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// ComponentStatus (and ComponentStatusList) holds the cluster validation info. -// Deprecated: This API is deprecated in v1.19+ -type ComponentStatus struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of component conditions observed - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - Conditions []ComponentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// Status of all the conditions for the component as a list of ComponentStatus objects. -// Deprecated: This API is deprecated in v1.19+ -type ComponentStatusList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of ComponentStatus objects. - Items []ComponentStatus `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// DownwardAPIVolumeSource represents a volume containing downward API info. -// Downward API volumes support ownership management and SELinux relabeling. -type DownwardAPIVolumeSource struct { - // Items is a list of downward API volume file - // +optional - Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"` - // Optional: mode bits to use on created files by default. Must be a - // Optional: mode bits used to set permissions on created files by default. - // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. - // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - // Defaults to 0644. - // Directories within the path are not affected by this setting. - // This might be in conflict with other options that affect the file - // mode, like fsGroup, and the result can be other mode bits set. - // +optional - DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,2,opt,name=defaultMode"` -} - -const ( - DownwardAPIVolumeSourceDefaultMode int32 = 0644 -) - -// DownwardAPIVolumeFile represents information to create the file containing the pcm_pod field -type DownwardAPIVolumeFile struct { - // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' - Path string `json:"path" protobuf:"bytes,1,opt,name=path"` - // Required: Selects a field of the pcm_pod: only annotations, labels, name and namespace are supported. - // +optional - FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,2,opt,name=fieldRef"` - // Selects a resource of the container: only resources limits and requests - // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - // +optional - ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,3,opt,name=resourceFieldRef"` - // Optional: mode bits used to set permissions on this file, must be an octal value - // between 0000 and 0777 or a decimal value between 0 and 511. - // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. - // If not specified, the volume defaultMode will be used. - // This might be in conflict with other options that affect the file - // mode, like fsGroup, and the result can be other mode bits set. - // +optional - Mode *int32 `json:"mode,omitempty" protobuf:"varint,4,opt,name=mode"` -} - -// Represents downward API info for projecting into a projected volume. -// Note that this is identical to a downwardAPI volume source without the default -// mode. -type DownwardAPIProjection struct { - // Items is a list of DownwardAPIVolume file - // +optional - Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"` -} - -// SecurityContext holds security configuration that will be applied to a container. -// Some fields are present in both SecurityContext and PodSecurityContext. When both -// are set, the values in SecurityContext take precedence. -type SecurityContext struct { - // The capabilities to add/drop when running containers. - // Defaults to the default set of capabilities granted by the container runtime. - // +optional - Capabilities *Capabilities `json:"capabilities,omitempty" protobuf:"bytes,1,opt,name=capabilities"` - // Run container in privileged mode. - // Processes in privileged containers are essentially equivalent to root on the host. - // Defaults to false. - // +optional - Privileged *bool `json:"privileged,omitempty" protobuf:"varint,2,opt,name=privileged"` - // The SELinux context to be applied to the container. - // If unspecified, the container runtime will allocate a random SELinux context for each - // container. May also be set in PodSecurityContext. If set in both SecurityContext and - // PodSecurityContext, the value specified in SecurityContext takes precedence. - // +optional - SELinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,3,opt,name=seLinuxOptions"` - // The Windows specific settings applied to all containers. - // If unspecified, the options from the PodSecurityContext will be used. - // If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - // +optional - WindowsOptions *WindowsSecurityContextOptions `json:"windowsOptions,omitempty" protobuf:"bytes,10,opt,name=windowsOptions"` - // The UID to run the entrypoint of the container process. - // Defaults to user specified in image metadata if unspecified. - // May also be set in PodSecurityContext. If set in both SecurityContext and - // PodSecurityContext, the value specified in SecurityContext takes precedence. - // +optional - RunAsUser *int64 `json:"runAsUser,omitempty" protobuf:"varint,4,opt,name=runAsUser"` - // The GID to run the entrypoint of the container process. - // Uses runtime default if unset. - // May also be set in PodSecurityContext. If set in both SecurityContext and - // PodSecurityContext, the value specified in SecurityContext takes precedence. - // +optional - RunAsGroup *int64 `json:"runAsGroup,omitempty" protobuf:"varint,8,opt,name=runAsGroup"` - // Indicates that the container must run as a non-root user. - // If true, the Kubelet will validate the image at runtime to ensure that it - // does not run as UID 0 (root) and fail to start the container if it does. - // If unset or false, no such validation will be performed. - // May also be set in PodSecurityContext. If set in both SecurityContext and - // PodSecurityContext, the value specified in SecurityContext takes precedence. - // +optional - RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" protobuf:"varint,5,opt,name=runAsNonRoot"` - // Whether this container has a read-only root filesystem. - // Default is false. - // +optional - ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty" protobuf:"varint,6,opt,name=readOnlyRootFilesystem"` - // AllowPrivilegeEscalation controls whether a process can gain more - // privileges than its parent process. This bool directly controls if - // the no_new_privs flag will be set on the container process. - // AllowPrivilegeEscalation is true always when the container is: - // 1) run as Privileged - // 2) has CAP_SYS_ADMIN - // +optional - AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty" protobuf:"varint,7,opt,name=allowPrivilegeEscalation"` - // procMount denotes the type of proc mount to use for the containers. - // The default is DefaultProcMount which uses the container runtime defaults for - // readonly paths and masked paths. - // This requires the ProcMountType feature flag to be enabled. - // +optional - ProcMount *ProcMountType `json:"procMount,omitempty" protobuf:"bytes,9,opt,name=procMount"` - // The seccomp options to use by this container. If seccomp options are - // provided at both the pcm_pod & container level, the container options - // override the pcm_pod options. - // +optional - SeccompProfile *SeccompProfile `json:"seccompProfile,omitempty" protobuf:"bytes,11,opt,name=seccompProfile"` -} - -type ProcMountType string - -const ( - // DefaultProcMount uses the container runtime defaults for readonly and masked - // paths for /proc. Most container runtimes mask certain paths in /proc to avoid - // accidental security exposure of special devices or information. - DefaultProcMount ProcMountType = "Default" - - // UnmaskedProcMount bypasses the default masking behavior of the container - // runtime and ensures the newly created /proc the container stays in tact with - // no modifications. - UnmaskedProcMount ProcMountType = "Unmasked" -) - -// SELinuxOptions are the labels to be applied to the container -type SELinuxOptions struct { - // User is a SELinux user label that applies to the container. - // +optional - User string `json:"user,omitempty" protobuf:"bytes,1,opt,name=user"` - // Role is a SELinux role label that applies to the container. - // +optional - Role string `json:"role,omitempty" protobuf:"bytes,2,opt,name=role"` - // Type is a SELinux type label that applies to the container. - // +optional - Type string `json:"type,omitempty" protobuf:"bytes,3,opt,name=type"` - // Level is SELinux level label that applies to the container. - // +optional - Level string `json:"level,omitempty" protobuf:"bytes,4,opt,name=level"` -} - -// WindowsSecurityContextOptions contain Windows-specific options and credentials. -type WindowsSecurityContextOptions struct { - // GMSACredentialSpecName is the name of the GMSA credential spec to use. - // +optional - GMSACredentialSpecName *string `json:"gmsaCredentialSpecName,omitempty" protobuf:"bytes,1,opt,name=gmsaCredentialSpecName"` - - // GMSACredentialSpec is where the GMSA admission webhook - // (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the - // GMSA credential spec named by the GMSACredentialSpecName field. - // +optional - GMSACredentialSpec *string `json:"gmsaCredentialSpec,omitempty" protobuf:"bytes,2,opt,name=gmsaCredentialSpec"` - - // The UserName in Windows to run the entrypoint of the container process. - // Defaults to the user specified in image metadata if unspecified. - // May also be set in PodSecurityContext. If set in both SecurityContext and - // PodSecurityContext, the value specified in SecurityContext takes precedence. - // +optional - RunAsUserName *string `json:"runAsUserName,omitempty" protobuf:"bytes,3,opt,name=runAsUserName"` -} - -// +k8s:deepcopy-gen:interfaces=code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/runtime.Object - -// RangeAllocation is not a public type. -type RangeAllocation struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Range is string that identifies the range represented by 'data'. - Range string `json:"range" protobuf:"bytes,2,opt,name=range"` - // Data is a bit array containing all allocated addresses in the previous segment. - Data []byte `json:"data" protobuf:"bytes,3,opt,name=data"` -} - -const ( - // DefaultSchedulerName defines the name of default scheduler. - DefaultSchedulerName = "default-scheduler" - - // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule - // corresponding to every RequiredDuringScheduling affinity rule. - // When the --hard-pcm_pod-affinity-weight scheduler flag is not specified, - // DefaultHardPodAffinityWeight defines the weight of the implicit PreferredDuringScheduling affinity rule. - DefaultHardPodAffinitySymmetricWeight int32 = 1 -) - -// Sysctl defines a kernel parameter to be set -type Sysctl struct { - // Name of a property to set - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // Value of a property to set - Value string `json:"value" protobuf:"bytes,2,opt,name=value"` -} - -// NodeResources is an object for conveying resource information about a node. -// see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details. -type NodeResources struct { - // Capacity represents the available resources of a node - Capacity ResourceList `protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"` -} - -const ( - // Enable stdin for remote command execution - ExecStdinParam = "input" - // Enable stdout for remote command execution - ExecStdoutParam = "output" - // Enable stderr for remote command execution - ExecStderrParam = "error" - // Enable TTY for remote command execution - ExecTTYParam = "tty" - // Command to run for remote command execution - ExecCommandParam = "command" - - // Name of header that specifies stream type - StreamType = "streamType" - // Value for streamType header for stdin stream - StreamTypeStdin = "stdin" - // Value for streamType header for stdout stream - StreamTypeStdout = "stdout" - // Value for streamType header for stderr stream - StreamTypeStderr = "stderr" - // Value for streamType header for data stream - StreamTypeData = "data" - // Value for streamType header for error stream - StreamTypeError = "error" - // Value for streamType header for terminal resize stream - StreamTypeResize = "resize" - - // Name of header that specifies the port being forwarded - PortHeader = "port" - // Name of header that specifies a request ID used to associate the error - // and data streams for a single forwarded connection - PortForwardRequestIDHeader = "requestID" -) - -// PortStatus represents the error condition of a service port - -type PortStatus struct { - // Port is the port number of the service port of which status is recorded here - Port int32 `json:"port" protobuf:"varint,1,opt,name=port"` - // Protocol is the protocol of the service port of which status is recorded here - // The supported values are: "TCP", "UDP", "SCTP" - Protocol Protocol `json:"protocol" protobuf:"bytes,2,opt,name=protocol,casttype=Protocol"` - // Error is to record the problem with the service port - // The format of the error shall comply with the following rules: - // - built-in error values shall be specified in this file and those shall use - // CamelCase names - // - cloud provider specific error values must have names that comply with the - // format foo.example.com/CamelCase. - // --- - // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - // +optional - // +kubebuilder:validation:Required - // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` - // +kubebuilder:validation:MaxLength=316 - Error *string `json:"error,omitempty" protobuf:"bytes,3,opt,name=error"` -} diff --git a/adaptor/pcm_pod/server/kubernetes/api/core/v1/zz_generated.deepcopy.go b/adaptor/pcm_pod/server/kubernetes/api/core/v1/zz_generated.deepcopy.go deleted file mode 100644 index c31c4fc45..000000000 --- a/adaptor/pcm_pod/server/kubernetes/api/core/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,5958 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - types "k8s.io/apimachinery/pkg/types" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSElasticBlockStoreVolumeSource) DeepCopyInto(out *AWSElasticBlockStoreVolumeSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSElasticBlockStoreVolumeSource. -func (in *AWSElasticBlockStoreVolumeSource) DeepCopy() *AWSElasticBlockStoreVolumeSource { - if in == nil { - return nil - } - out := new(AWSElasticBlockStoreVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Affinity) DeepCopyInto(out *Affinity) { - *out = *in - if in.NodeAffinity != nil { - in, out := &in.NodeAffinity, &out.NodeAffinity - *out = new(NodeAffinity) - (*in).DeepCopyInto(*out) - } - if in.PodAffinity != nil { - in, out := &in.PodAffinity, &out.PodAffinity - *out = new(PodAffinity) - (*in).DeepCopyInto(*out) - } - if in.PodAntiAffinity != nil { - in, out := &in.PodAntiAffinity, &out.PodAntiAffinity - *out = new(PodAntiAffinity) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Affinity. -func (in *Affinity) DeepCopy() *Affinity { - if in == nil { - return nil - } - out := new(Affinity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AttachedVolume) DeepCopyInto(out *AttachedVolume) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AttachedVolume. -func (in *AttachedVolume) DeepCopy() *AttachedVolume { - if in == nil { - return nil - } - out := new(AttachedVolume) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AvoidPods) DeepCopyInto(out *AvoidPods) { - *out = *in - if in.PreferAvoidPods != nil { - in, out := &in.PreferAvoidPods, &out.PreferAvoidPods - *out = make([]PreferAvoidPodsEntry, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AvoidPods. -func (in *AvoidPods) DeepCopy() *AvoidPods { - if in == nil { - return nil - } - out := new(AvoidPods) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureDiskVolumeSource) DeepCopyInto(out *AzureDiskVolumeSource) { - *out = *in - if in.CachingMode != nil { - in, out := &in.CachingMode, &out.CachingMode - *out = new(AzureDataDiskCachingMode) - **out = **in - } - if in.FSType != nil { - in, out := &in.FSType, &out.FSType - *out = new(string) - **out = **in - } - if in.ReadOnly != nil { - in, out := &in.ReadOnly, &out.ReadOnly - *out = new(bool) - **out = **in - } - if in.Kind != nil { - in, out := &in.Kind, &out.Kind - *out = new(AzureDataDiskKind) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureDiskVolumeSource. -func (in *AzureDiskVolumeSource) DeepCopy() *AzureDiskVolumeSource { - if in == nil { - return nil - } - out := new(AzureDiskVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureFilePersistentVolumeSource) DeepCopyInto(out *AzureFilePersistentVolumeSource) { - *out = *in - if in.SecretNamespace != nil { - in, out := &in.SecretNamespace, &out.SecretNamespace - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureFilePersistentVolumeSource. -func (in *AzureFilePersistentVolumeSource) DeepCopy() *AzureFilePersistentVolumeSource { - if in == nil { - return nil - } - out := new(AzureFilePersistentVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureFileVolumeSource) DeepCopyInto(out *AzureFileVolumeSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureFileVolumeSource. -func (in *AzureFileVolumeSource) DeepCopy() *AzureFileVolumeSource { - if in == nil { - return nil - } - out := new(AzureFileVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Binding) DeepCopyInto(out *Binding) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Target = in.Target - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Binding. -func (in *Binding) DeepCopy() *Binding { - if in == nil { - return nil - } - out := new(Binding) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Binding) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CSIPersistentVolumeSource) DeepCopyInto(out *CSIPersistentVolumeSource) { - *out = *in - if in.VolumeAttributes != nil { - in, out := &in.VolumeAttributes, &out.VolumeAttributes - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ControllerPublishSecretRef != nil { - in, out := &in.ControllerPublishSecretRef, &out.ControllerPublishSecretRef - *out = new(SecretReference) - **out = **in - } - if in.NodeStageSecretRef != nil { - in, out := &in.NodeStageSecretRef, &out.NodeStageSecretRef - *out = new(SecretReference) - **out = **in - } - if in.NodePublishSecretRef != nil { - in, out := &in.NodePublishSecretRef, &out.NodePublishSecretRef - *out = new(SecretReference) - **out = **in - } - if in.ControllerExpandSecretRef != nil { - in, out := &in.ControllerExpandSecretRef, &out.ControllerExpandSecretRef - *out = new(SecretReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIPersistentVolumeSource. -func (in *CSIPersistentVolumeSource) DeepCopy() *CSIPersistentVolumeSource { - if in == nil { - return nil - } - out := new(CSIPersistentVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CSIVolumeSource) DeepCopyInto(out *CSIVolumeSource) { - *out = *in - if in.ReadOnly != nil { - in, out := &in.ReadOnly, &out.ReadOnly - *out = new(bool) - **out = **in - } - if in.FSType != nil { - in, out := &in.FSType, &out.FSType - *out = new(string) - **out = **in - } - if in.VolumeAttributes != nil { - in, out := &in.VolumeAttributes, &out.VolumeAttributes - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.NodePublishSecretRef != nil { - in, out := &in.NodePublishSecretRef, &out.NodePublishSecretRef - *out = new(LocalObjectReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIVolumeSource. -func (in *CSIVolumeSource) DeepCopy() *CSIVolumeSource { - if in == nil { - return nil - } - out := new(CSIVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Capabilities) DeepCopyInto(out *Capabilities) { - *out = *in - if in.Add != nil { - in, out := &in.Add, &out.Add - *out = make([]Capability, len(*in)) - copy(*out, *in) - } - if in.Drop != nil { - in, out := &in.Drop, &out.Drop - *out = make([]Capability, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Capabilities. -func (in *Capabilities) DeepCopy() *Capabilities { - if in == nil { - return nil - } - out := new(Capabilities) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CephFSPersistentVolumeSource) DeepCopyInto(out *CephFSPersistentVolumeSource) { - *out = *in - if in.Monitors != nil { - in, out := &in.Monitors, &out.Monitors - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(SecretReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CephFSPersistentVolumeSource. -func (in *CephFSPersistentVolumeSource) DeepCopy() *CephFSPersistentVolumeSource { - if in == nil { - return nil - } - out := new(CephFSPersistentVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CephFSVolumeSource) DeepCopyInto(out *CephFSVolumeSource) { - *out = *in - if in.Monitors != nil { - in, out := &in.Monitors, &out.Monitors - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(LocalObjectReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CephFSVolumeSource. -func (in *CephFSVolumeSource) DeepCopy() *CephFSVolumeSource { - if in == nil { - return nil - } - out := new(CephFSVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CinderPersistentVolumeSource) DeepCopyInto(out *CinderPersistentVolumeSource) { - *out = *in - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(SecretReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CinderPersistentVolumeSource. -func (in *CinderPersistentVolumeSource) DeepCopy() *CinderPersistentVolumeSource { - if in == nil { - return nil - } - out := new(CinderPersistentVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CinderVolumeSource) DeepCopyInto(out *CinderVolumeSource) { - *out = *in - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(LocalObjectReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CinderVolumeSource. -func (in *CinderVolumeSource) DeepCopy() *CinderVolumeSource { - if in == nil { - return nil - } - out := new(CinderVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClientIPConfig) DeepCopyInto(out *ClientIPConfig) { - *out = *in - if in.TimeoutSeconds != nil { - in, out := &in.TimeoutSeconds, &out.TimeoutSeconds - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientIPConfig. -func (in *ClientIPConfig) DeepCopy() *ClientIPConfig { - if in == nil { - return nil - } - out := new(ClientIPConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ComponentCondition) DeepCopyInto(out *ComponentCondition) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentCondition. -func (in *ComponentCondition) DeepCopy() *ComponentCondition { - if in == nil { - return nil - } - out := new(ComponentCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ComponentStatus) DeepCopyInto(out *ComponentStatus) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]ComponentCondition, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentStatus. -func (in *ComponentStatus) DeepCopy() *ComponentStatus { - if in == nil { - return nil - } - out := new(ComponentStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ComponentStatus) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ComponentStatusList) DeepCopyInto(out *ComponentStatusList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ComponentStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentStatusList. -func (in *ComponentStatusList) DeepCopy() *ComponentStatusList { - if in == nil { - return nil - } - out := new(ComponentStatusList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ComponentStatusList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigMap) DeepCopyInto(out *ConfigMap) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Immutable != nil { - in, out := &in.Immutable, &out.Immutable - *out = new(bool) - **out = **in - } - if in.Data != nil { - in, out := &in.Data, &out.Data - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.BinaryData != nil { - in, out := &in.BinaryData, &out.BinaryData - *out = make(map[string][]byte, len(*in)) - for key, val := range *in { - var outVal []byte - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]byte, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMap. -func (in *ConfigMap) DeepCopy() *ConfigMap { - if in == nil { - return nil - } - out := new(ConfigMap) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConfigMap) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigMapEnvSource) DeepCopyInto(out *ConfigMapEnvSource) { - *out = *in - out.LocalObjectReference = in.LocalObjectReference - if in.Optional != nil { - in, out := &in.Optional, &out.Optional - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapEnvSource. -func (in *ConfigMapEnvSource) DeepCopy() *ConfigMapEnvSource { - if in == nil { - return nil - } - out := new(ConfigMapEnvSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigMapKeySelector) DeepCopyInto(out *ConfigMapKeySelector) { - *out = *in - out.LocalObjectReference = in.LocalObjectReference - if in.Optional != nil { - in, out := &in.Optional, &out.Optional - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapKeySelector. -func (in *ConfigMapKeySelector) DeepCopy() *ConfigMapKeySelector { - if in == nil { - return nil - } - out := new(ConfigMapKeySelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigMapList) DeepCopyInto(out *ConfigMapList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ConfigMap, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapList. -func (in *ConfigMapList) DeepCopy() *ConfigMapList { - if in == nil { - return nil - } - out := new(ConfigMapList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConfigMapList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigMapNodeConfigSource) DeepCopyInto(out *ConfigMapNodeConfigSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapNodeConfigSource. -func (in *ConfigMapNodeConfigSource) DeepCopy() *ConfigMapNodeConfigSource { - if in == nil { - return nil - } - out := new(ConfigMapNodeConfigSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigMapProjection) DeepCopyInto(out *ConfigMapProjection) { - *out = *in - out.LocalObjectReference = in.LocalObjectReference - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]KeyToPath, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Optional != nil { - in, out := &in.Optional, &out.Optional - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapProjection. -func (in *ConfigMapProjection) DeepCopy() *ConfigMapProjection { - if in == nil { - return nil - } - out := new(ConfigMapProjection) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigMapVolumeSource) DeepCopyInto(out *ConfigMapVolumeSource) { - *out = *in - out.LocalObjectReference = in.LocalObjectReference - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]KeyToPath, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DefaultMode != nil { - in, out := &in.DefaultMode, &out.DefaultMode - *out = new(int32) - **out = **in - } - if in.Optional != nil { - in, out := &in.Optional, &out.Optional - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapVolumeSource. -func (in *ConfigMapVolumeSource) DeepCopy() *ConfigMapVolumeSource { - if in == nil { - return nil - } - out := new(ConfigMapVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Container) DeepCopyInto(out *Container) { - *out = *in - if in.Command != nil { - in, out := &in.Command, &out.Command - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Args != nil { - in, out := &in.Args, &out.Args - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]ContainerPort, len(*in)) - copy(*out, *in) - } - if in.EnvFrom != nil { - in, out := &in.EnvFrom, &out.EnvFrom - *out = make([]EnvFromSource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.Resources.DeepCopyInto(&out.Resources) - if in.VolumeMounts != nil { - in, out := &in.VolumeMounts, &out.VolumeMounts - *out = make([]VolumeMount, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.VolumeDevices != nil { - in, out := &in.VolumeDevices, &out.VolumeDevices - *out = make([]VolumeDevice, len(*in)) - copy(*out, *in) - } - if in.LivenessProbe != nil { - in, out := &in.LivenessProbe, &out.LivenessProbe - *out = new(Probe) - (*in).DeepCopyInto(*out) - } - if in.ReadinessProbe != nil { - in, out := &in.ReadinessProbe, &out.ReadinessProbe - *out = new(Probe) - (*in).DeepCopyInto(*out) - } - if in.StartupProbe != nil { - in, out := &in.StartupProbe, &out.StartupProbe - *out = new(Probe) - (*in).DeepCopyInto(*out) - } - if in.Lifecycle != nil { - in, out := &in.Lifecycle, &out.Lifecycle - *out = new(Lifecycle) - (*in).DeepCopyInto(*out) - } - if in.SecurityContext != nil { - in, out := &in.SecurityContext, &out.SecurityContext - *out = new(SecurityContext) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Container. -func (in *Container) DeepCopy() *Container { - if in == nil { - return nil - } - out := new(Container) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContainerImage) DeepCopyInto(out *ContainerImage) { - *out = *in - if in.Names != nil { - in, out := &in.Names, &out.Names - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerImage. -func (in *ContainerImage) DeepCopy() *ContainerImage { - if in == nil { - return nil - } - out := new(ContainerImage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContainerPort) DeepCopyInto(out *ContainerPort) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerPort. -func (in *ContainerPort) DeepCopy() *ContainerPort { - if in == nil { - return nil - } - out := new(ContainerPort) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContainerState) DeepCopyInto(out *ContainerState) { - *out = *in - if in.Waiting != nil { - in, out := &in.Waiting, &out.Waiting - *out = new(ContainerStateWaiting) - **out = **in - } - if in.Running != nil { - in, out := &in.Running, &out.Running - *out = new(ContainerStateRunning) - (*in).DeepCopyInto(*out) - } - if in.Terminated != nil { - in, out := &in.Terminated, &out.Terminated - *out = new(ContainerStateTerminated) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerState. -func (in *ContainerState) DeepCopy() *ContainerState { - if in == nil { - return nil - } - out := new(ContainerState) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContainerStateRunning) DeepCopyInto(out *ContainerStateRunning) { - *out = *in - in.StartedAt.DeepCopyInto(&out.StartedAt) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerStateRunning. -func (in *ContainerStateRunning) DeepCopy() *ContainerStateRunning { - if in == nil { - return nil - } - out := new(ContainerStateRunning) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContainerStateTerminated) DeepCopyInto(out *ContainerStateTerminated) { - *out = *in - in.StartedAt.DeepCopyInto(&out.StartedAt) - in.FinishedAt.DeepCopyInto(&out.FinishedAt) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerStateTerminated. -func (in *ContainerStateTerminated) DeepCopy() *ContainerStateTerminated { - if in == nil { - return nil - } - out := new(ContainerStateTerminated) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContainerStateWaiting) DeepCopyInto(out *ContainerStateWaiting) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerStateWaiting. -func (in *ContainerStateWaiting) DeepCopy() *ContainerStateWaiting { - if in == nil { - return nil - } - out := new(ContainerStateWaiting) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContainerStatus) DeepCopyInto(out *ContainerStatus) { - *out = *in - in.State.DeepCopyInto(&out.State) - in.LastTerminationState.DeepCopyInto(&out.LastTerminationState) - if in.Started != nil { - in, out := &in.Started, &out.Started - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerStatus. -func (in *ContainerStatus) DeepCopy() *ContainerStatus { - if in == nil { - return nil - } - out := new(ContainerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DaemonEndpoint) DeepCopyInto(out *DaemonEndpoint) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonEndpoint. -func (in *DaemonEndpoint) DeepCopy() *DaemonEndpoint { - if in == nil { - return nil - } - out := new(DaemonEndpoint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DownwardAPIProjection) DeepCopyInto(out *DownwardAPIProjection) { - *out = *in - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DownwardAPIVolumeFile, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownwardAPIProjection. -func (in *DownwardAPIProjection) DeepCopy() *DownwardAPIProjection { - if in == nil { - return nil - } - out := new(DownwardAPIProjection) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DownwardAPIVolumeFile) DeepCopyInto(out *DownwardAPIVolumeFile) { - *out = *in - if in.FieldRef != nil { - in, out := &in.FieldRef, &out.FieldRef - *out = new(ObjectFieldSelector) - **out = **in - } - if in.ResourceFieldRef != nil { - in, out := &in.ResourceFieldRef, &out.ResourceFieldRef - *out = new(ResourceFieldSelector) - (*in).DeepCopyInto(*out) - } - if in.Mode != nil { - in, out := &in.Mode, &out.Mode - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownwardAPIVolumeFile. -func (in *DownwardAPIVolumeFile) DeepCopy() *DownwardAPIVolumeFile { - if in == nil { - return nil - } - out := new(DownwardAPIVolumeFile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DownwardAPIVolumeSource) DeepCopyInto(out *DownwardAPIVolumeSource) { - *out = *in - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DownwardAPIVolumeFile, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DefaultMode != nil { - in, out := &in.DefaultMode, &out.DefaultMode - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownwardAPIVolumeSource. -func (in *DownwardAPIVolumeSource) DeepCopy() *DownwardAPIVolumeSource { - if in == nil { - return nil - } - out := new(DownwardAPIVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EmptyDirVolumeSource) DeepCopyInto(out *EmptyDirVolumeSource) { - *out = *in - if in.SizeLimit != nil { - in, out := &in.SizeLimit, &out.SizeLimit - x := (*in).DeepCopy() - *out = &x - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmptyDirVolumeSource. -func (in *EmptyDirVolumeSource) DeepCopy() *EmptyDirVolumeSource { - if in == nil { - return nil - } - out := new(EmptyDirVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointAddress) DeepCopyInto(out *EndpointAddress) { - *out = *in - if in.NodeName != nil { - in, out := &in.NodeName, &out.NodeName - *out = new(string) - **out = **in - } - if in.TargetRef != nil { - in, out := &in.TargetRef, &out.TargetRef - *out = new(ObjectReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointAddress. -func (in *EndpointAddress) DeepCopy() *EndpointAddress { - if in == nil { - return nil - } - out := new(EndpointAddress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointPort) DeepCopyInto(out *EndpointPort) { - *out = *in - if in.AppProtocol != nil { - in, out := &in.AppProtocol, &out.AppProtocol - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointPort. -func (in *EndpointPort) DeepCopy() *EndpointPort { - if in == nil { - return nil - } - out := new(EndpointPort) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointSubset) DeepCopyInto(out *EndpointSubset) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]EndpointAddress, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.NotReadyAddresses != nil { - in, out := &in.NotReadyAddresses, &out.NotReadyAddresses - *out = make([]EndpointAddress, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]EndpointPort, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSubset. -func (in *EndpointSubset) DeepCopy() *EndpointSubset { - if in == nil { - return nil - } - out := new(EndpointSubset) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Endpoints) DeepCopyInto(out *Endpoints) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Subsets != nil { - in, out := &in.Subsets, &out.Subsets - *out = make([]EndpointSubset, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoints. -func (in *Endpoints) DeepCopy() *Endpoints { - if in == nil { - return nil - } - out := new(Endpoints) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Endpoints) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointsList) DeepCopyInto(out *EndpointsList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Endpoints, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointsList. -func (in *EndpointsList) DeepCopy() *EndpointsList { - if in == nil { - return nil - } - out := new(EndpointsList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EndpointsList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvFromSource) DeepCopyInto(out *EnvFromSource) { - *out = *in - if in.ConfigMapRef != nil { - in, out := &in.ConfigMapRef, &out.ConfigMapRef - *out = new(ConfigMapEnvSource) - (*in).DeepCopyInto(*out) - } - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(SecretEnvSource) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvFromSource. -func (in *EnvFromSource) DeepCopy() *EnvFromSource { - if in == nil { - return nil - } - out := new(EnvFromSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvVar) DeepCopyInto(out *EnvVar) { - *out = *in - if in.ValueFrom != nil { - in, out := &in.ValueFrom, &out.ValueFrom - *out = new(EnvVarSource) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVar. -func (in *EnvVar) DeepCopy() *EnvVar { - if in == nil { - return nil - } - out := new(EnvVar) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvVarSource) DeepCopyInto(out *EnvVarSource) { - *out = *in - if in.FieldRef != nil { - in, out := &in.FieldRef, &out.FieldRef - *out = new(ObjectFieldSelector) - **out = **in - } - if in.ResourceFieldRef != nil { - in, out := &in.ResourceFieldRef, &out.ResourceFieldRef - *out = new(ResourceFieldSelector) - (*in).DeepCopyInto(*out) - } - if in.ConfigMapKeyRef != nil { - in, out := &in.ConfigMapKeyRef, &out.ConfigMapKeyRef - *out = new(ConfigMapKeySelector) - (*in).DeepCopyInto(*out) - } - if in.SecretKeyRef != nil { - in, out := &in.SecretKeyRef, &out.SecretKeyRef - *out = new(SecretKeySelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarSource. -func (in *EnvVarSource) DeepCopy() *EnvVarSource { - if in == nil { - return nil - } - out := new(EnvVarSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EphemeralContainer) DeepCopyInto(out *EphemeralContainer) { - *out = *in - in.EphemeralContainerCommon.DeepCopyInto(&out.EphemeralContainerCommon) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EphemeralContainer. -func (in *EphemeralContainer) DeepCopy() *EphemeralContainer { - if in == nil { - return nil - } - out := new(EphemeralContainer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EphemeralContainerCommon) DeepCopyInto(out *EphemeralContainerCommon) { - *out = *in - if in.Command != nil { - in, out := &in.Command, &out.Command - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Args != nil { - in, out := &in.Args, &out.Args - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]ContainerPort, len(*in)) - copy(*out, *in) - } - if in.EnvFrom != nil { - in, out := &in.EnvFrom, &out.EnvFrom - *out = make([]EnvFromSource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.Resources.DeepCopyInto(&out.Resources) - if in.VolumeMounts != nil { - in, out := &in.VolumeMounts, &out.VolumeMounts - *out = make([]VolumeMount, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.VolumeDevices != nil { - in, out := &in.VolumeDevices, &out.VolumeDevices - *out = make([]VolumeDevice, len(*in)) - copy(*out, *in) - } - if in.LivenessProbe != nil { - in, out := &in.LivenessProbe, &out.LivenessProbe - *out = new(Probe) - (*in).DeepCopyInto(*out) - } - if in.ReadinessProbe != nil { - in, out := &in.ReadinessProbe, &out.ReadinessProbe - *out = new(Probe) - (*in).DeepCopyInto(*out) - } - if in.StartupProbe != nil { - in, out := &in.StartupProbe, &out.StartupProbe - *out = new(Probe) - (*in).DeepCopyInto(*out) - } - if in.Lifecycle != nil { - in, out := &in.Lifecycle, &out.Lifecycle - *out = new(Lifecycle) - (*in).DeepCopyInto(*out) - } - if in.SecurityContext != nil { - in, out := &in.SecurityContext, &out.SecurityContext - *out = new(SecurityContext) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EphemeralContainerCommon. -func (in *EphemeralContainerCommon) DeepCopy() *EphemeralContainerCommon { - if in == nil { - return nil - } - out := new(EphemeralContainerCommon) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EphemeralContainers) DeepCopyInto(out *EphemeralContainers) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.EphemeralContainers != nil { - in, out := &in.EphemeralContainers, &out.EphemeralContainers - *out = make([]EphemeralContainer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EphemeralContainers. -func (in *EphemeralContainers) DeepCopy() *EphemeralContainers { - if in == nil { - return nil - } - out := new(EphemeralContainers) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EphemeralContainers) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EphemeralVolumeSource) DeepCopyInto(out *EphemeralVolumeSource) { - *out = *in - if in.VolumeClaimTemplate != nil { - in, out := &in.VolumeClaimTemplate, &out.VolumeClaimTemplate - *out = new(PersistentVolumeClaimTemplate) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EphemeralVolumeSource. -func (in *EphemeralVolumeSource) DeepCopy() *EphemeralVolumeSource { - if in == nil { - return nil - } - out := new(EphemeralVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Event) DeepCopyInto(out *Event) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.InvolvedObject = in.InvolvedObject - out.Source = in.Source - in.FirstTimestamp.DeepCopyInto(&out.FirstTimestamp) - in.LastTimestamp.DeepCopyInto(&out.LastTimestamp) - in.EventTime.DeepCopyInto(&out.EventTime) - if in.Series != nil { - in, out := &in.Series, &out.Series - *out = new(EventSeries) - (*in).DeepCopyInto(*out) - } - if in.Related != nil { - in, out := &in.Related, &out.Related - *out = new(ObjectReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event. -func (in *Event) DeepCopy() *Event { - if in == nil { - return nil - } - out := new(Event) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Event) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EventList) DeepCopyInto(out *EventList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Event, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList. -func (in *EventList) DeepCopy() *EventList { - if in == nil { - return nil - } - out := new(EventList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EventList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EventSeries) DeepCopyInto(out *EventSeries) { - *out = *in - in.LastObservedTime.DeepCopyInto(&out.LastObservedTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSeries. -func (in *EventSeries) DeepCopy() *EventSeries { - if in == nil { - return nil - } - out := new(EventSeries) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EventSource) DeepCopyInto(out *EventSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSource. -func (in *EventSource) DeepCopy() *EventSource { - if in == nil { - return nil - } - out := new(EventSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExecAction) DeepCopyInto(out *ExecAction) { - *out = *in - if in.Command != nil { - in, out := &in.Command, &out.Command - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecAction. -func (in *ExecAction) DeepCopy() *ExecAction { - if in == nil { - return nil - } - out := new(ExecAction) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FCVolumeSource) DeepCopyInto(out *FCVolumeSource) { - *out = *in - if in.TargetWWNs != nil { - in, out := &in.TargetWWNs, &out.TargetWWNs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Lun != nil { - in, out := &in.Lun, &out.Lun - *out = new(int32) - **out = **in - } - if in.WWIDs != nil { - in, out := &in.WWIDs, &out.WWIDs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FCVolumeSource. -func (in *FCVolumeSource) DeepCopy() *FCVolumeSource { - if in == nil { - return nil - } - out := new(FCVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FlexPersistentVolumeSource) DeepCopyInto(out *FlexPersistentVolumeSource) { - *out = *in - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(SecretReference) - **out = **in - } - if in.Options != nil { - in, out := &in.Options, &out.Options - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlexPersistentVolumeSource. -func (in *FlexPersistentVolumeSource) DeepCopy() *FlexPersistentVolumeSource { - if in == nil { - return nil - } - out := new(FlexPersistentVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FlexVolumeSource) DeepCopyInto(out *FlexVolumeSource) { - *out = *in - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(LocalObjectReference) - **out = **in - } - if in.Options != nil { - in, out := &in.Options, &out.Options - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlexVolumeSource. -func (in *FlexVolumeSource) DeepCopy() *FlexVolumeSource { - if in == nil { - return nil - } - out := new(FlexVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FlockerVolumeSource) DeepCopyInto(out *FlockerVolumeSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlockerVolumeSource. -func (in *FlockerVolumeSource) DeepCopy() *FlockerVolumeSource { - if in == nil { - return nil - } - out := new(FlockerVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCEPersistentDiskVolumeSource) DeepCopyInto(out *GCEPersistentDiskVolumeSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCEPersistentDiskVolumeSource. -func (in *GCEPersistentDiskVolumeSource) DeepCopy() *GCEPersistentDiskVolumeSource { - if in == nil { - return nil - } - out := new(GCEPersistentDiskVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitRepoVolumeSource) DeepCopyInto(out *GitRepoVolumeSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepoVolumeSource. -func (in *GitRepoVolumeSource) DeepCopy() *GitRepoVolumeSource { - if in == nil { - return nil - } - out := new(GitRepoVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlusterfsPersistentVolumeSource) DeepCopyInto(out *GlusterfsPersistentVolumeSource) { - *out = *in - if in.EndpointsNamespace != nil { - in, out := &in.EndpointsNamespace, &out.EndpointsNamespace - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlusterfsPersistentVolumeSource. -func (in *GlusterfsPersistentVolumeSource) DeepCopy() *GlusterfsPersistentVolumeSource { - if in == nil { - return nil - } - out := new(GlusterfsPersistentVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlusterfsVolumeSource) DeepCopyInto(out *GlusterfsVolumeSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlusterfsVolumeSource. -func (in *GlusterfsVolumeSource) DeepCopy() *GlusterfsVolumeSource { - if in == nil { - return nil - } - out := new(GlusterfsVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HTTPGetAction) DeepCopyInto(out *HTTPGetAction) { - *out = *in - out.Port = in.Port - if in.HTTPHeaders != nil { - in, out := &in.HTTPHeaders, &out.HTTPHeaders - *out = make([]HTTPHeader, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPGetAction. -func (in *HTTPGetAction) DeepCopy() *HTTPGetAction { - if in == nil { - return nil - } - out := new(HTTPGetAction) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HTTPHeader) DeepCopyInto(out *HTTPHeader) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPHeader. -func (in *HTTPHeader) DeepCopy() *HTTPHeader { - if in == nil { - return nil - } - out := new(HTTPHeader) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Handler) DeepCopyInto(out *Handler) { - *out = *in - if in.Exec != nil { - in, out := &in.Exec, &out.Exec - *out = new(ExecAction) - (*in).DeepCopyInto(*out) - } - if in.HTTPGet != nil { - in, out := &in.HTTPGet, &out.HTTPGet - *out = new(HTTPGetAction) - (*in).DeepCopyInto(*out) - } - if in.TCPSocket != nil { - in, out := &in.TCPSocket, &out.TCPSocket - *out = new(TCPSocketAction) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Handler. -func (in *Handler) DeepCopy() *Handler { - if in == nil { - return nil - } - out := new(Handler) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HostAlias) DeepCopyInto(out *HostAlias) { - *out = *in - if in.Hostnames != nil { - in, out := &in.Hostnames, &out.Hostnames - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostAlias. -func (in *HostAlias) DeepCopy() *HostAlias { - if in == nil { - return nil - } - out := new(HostAlias) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HostPathVolumeSource) DeepCopyInto(out *HostPathVolumeSource) { - *out = *in - if in.Type != nil { - in, out := &in.Type, &out.Type - *out = new(HostPathType) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostPathVolumeSource. -func (in *HostPathVolumeSource) DeepCopy() *HostPathVolumeSource { - if in == nil { - return nil - } - out := new(HostPathVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ISCSIPersistentVolumeSource) DeepCopyInto(out *ISCSIPersistentVolumeSource) { - *out = *in - if in.Portals != nil { - in, out := &in.Portals, &out.Portals - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(SecretReference) - **out = **in - } - if in.InitiatorName != nil { - in, out := &in.InitiatorName, &out.InitiatorName - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ISCSIPersistentVolumeSource. -func (in *ISCSIPersistentVolumeSource) DeepCopy() *ISCSIPersistentVolumeSource { - if in == nil { - return nil - } - out := new(ISCSIPersistentVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ISCSIVolumeSource) DeepCopyInto(out *ISCSIVolumeSource) { - *out = *in - if in.Portals != nil { - in, out := &in.Portals, &out.Portals - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(LocalObjectReference) - **out = **in - } - if in.InitiatorName != nil { - in, out := &in.InitiatorName, &out.InitiatorName - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ISCSIVolumeSource. -func (in *ISCSIVolumeSource) DeepCopy() *ISCSIVolumeSource { - if in == nil { - return nil - } - out := new(ISCSIVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KeyToPath) DeepCopyInto(out *KeyToPath) { - *out = *in - if in.Mode != nil { - in, out := &in.Mode, &out.Mode - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyToPath. -func (in *KeyToPath) DeepCopy() *KeyToPath { - if in == nil { - return nil - } - out := new(KeyToPath) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Lifecycle) DeepCopyInto(out *Lifecycle) { - *out = *in - if in.PostStart != nil { - in, out := &in.PostStart, &out.PostStart - *out = new(Handler) - (*in).DeepCopyInto(*out) - } - if in.PreStop != nil { - in, out := &in.PreStop, &out.PreStop - *out = new(Handler) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Lifecycle. -func (in *Lifecycle) DeepCopy() *Lifecycle { - if in == nil { - return nil - } - out := new(Lifecycle) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LimitRange) DeepCopyInto(out *LimitRange) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LimitRange. -func (in *LimitRange) DeepCopy() *LimitRange { - if in == nil { - return nil - } - out := new(LimitRange) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LimitRange) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LimitRangeItem) DeepCopyInto(out *LimitRangeItem) { - *out = *in - if in.Max != nil { - in, out := &in.Max, &out.Max - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - if in.Min != nil { - in, out := &in.Min, &out.Min - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - if in.Default != nil { - in, out := &in.Default, &out.Default - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - if in.DefaultRequest != nil { - in, out := &in.DefaultRequest, &out.DefaultRequest - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - if in.MaxLimitRequestRatio != nil { - in, out := &in.MaxLimitRequestRatio, &out.MaxLimitRequestRatio - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LimitRangeItem. -func (in *LimitRangeItem) DeepCopy() *LimitRangeItem { - if in == nil { - return nil - } - out := new(LimitRangeItem) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LimitRangeList) DeepCopyInto(out *LimitRangeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]LimitRange, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LimitRangeList. -func (in *LimitRangeList) DeepCopy() *LimitRangeList { - if in == nil { - return nil - } - out := new(LimitRangeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LimitRangeList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LimitRangeSpec) DeepCopyInto(out *LimitRangeSpec) { - *out = *in - if in.Limits != nil { - in, out := &in.Limits, &out.Limits - *out = make([]LimitRangeItem, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LimitRangeSpec. -func (in *LimitRangeSpec) DeepCopy() *LimitRangeSpec { - if in == nil { - return nil - } - out := new(LimitRangeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *List) DeepCopyInto(out *List) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]runtime.RawExtension, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new List. -func (in *List) DeepCopy() *List { - if in == nil { - return nil - } - out := new(List) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *List) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoadBalancerIngress) DeepCopyInto(out *LoadBalancerIngress) { - *out = *in - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]PortStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerIngress. -func (in *LoadBalancerIngress) DeepCopy() *LoadBalancerIngress { - if in == nil { - return nil - } - out := new(LoadBalancerIngress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoadBalancerStatus) DeepCopyInto(out *LoadBalancerStatus) { - *out = *in - if in.Ingress != nil { - in, out := &in.Ingress, &out.Ingress - *out = make([]LoadBalancerIngress, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerStatus. -func (in *LoadBalancerStatus) DeepCopy() *LoadBalancerStatus { - if in == nil { - return nil - } - out := new(LoadBalancerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference. -func (in *LocalObjectReference) DeepCopy() *LocalObjectReference { - if in == nil { - return nil - } - out := new(LocalObjectReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LocalVolumeSource) DeepCopyInto(out *LocalVolumeSource) { - *out = *in - if in.FSType != nil { - in, out := &in.FSType, &out.FSType - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeSource. -func (in *LocalVolumeSource) DeepCopy() *LocalVolumeSource { - if in == nil { - return nil - } - out := new(LocalVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NFSVolumeSource) DeepCopyInto(out *NFSVolumeSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFSVolumeSource. -func (in *NFSVolumeSource) DeepCopy() *NFSVolumeSource { - if in == nil { - return nil - } - out := new(NFSVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Namespace) DeepCopyInto(out *Namespace) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Namespace. -func (in *Namespace) DeepCopy() *Namespace { - if in == nil { - return nil - } - out := new(Namespace) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Namespace) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespaceCondition) DeepCopyInto(out *NamespaceCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceCondition. -func (in *NamespaceCondition) DeepCopy() *NamespaceCondition { - if in == nil { - return nil - } - out := new(NamespaceCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespaceList) DeepCopyInto(out *NamespaceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Namespace, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceList. -func (in *NamespaceList) DeepCopy() *NamespaceList { - if in == nil { - return nil - } - out := new(NamespaceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NamespaceList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespaceSpec) DeepCopyInto(out *NamespaceSpec) { - *out = *in - if in.Finalizers != nil { - in, out := &in.Finalizers, &out.Finalizers - *out = make([]FinalizerName, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceSpec. -func (in *NamespaceSpec) DeepCopy() *NamespaceSpec { - if in == nil { - return nil - } - out := new(NamespaceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespaceStatus) DeepCopyInto(out *NamespaceStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]NamespaceCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceStatus. -func (in *NamespaceStatus) DeepCopy() *NamespaceStatus { - if in == nil { - return nil - } - out := new(NamespaceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Node) DeepCopyInto(out *Node) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Node. -func (in *Node) DeepCopy() *Node { - if in == nil { - return nil - } - out := new(Node) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Node) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeAddress) DeepCopyInto(out *NodeAddress) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeAddress. -func (in *NodeAddress) DeepCopy() *NodeAddress { - if in == nil { - return nil - } - out := new(NodeAddress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeAffinity) DeepCopyInto(out *NodeAffinity) { - *out = *in - if in.RequiredDuringSchedulingIgnoredDuringExecution != nil { - in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution - *out = new(NodeSelector) - (*in).DeepCopyInto(*out) - } - if in.PreferredDuringSchedulingIgnoredDuringExecution != nil { - in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution - *out = make([]PreferredSchedulingTerm, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeAffinity. -func (in *NodeAffinity) DeepCopy() *NodeAffinity { - if in == nil { - return nil - } - out := new(NodeAffinity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeCondition) DeepCopyInto(out *NodeCondition) { - *out = *in - in.LastHeartbeatTime.DeepCopyInto(&out.LastHeartbeatTime) - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeCondition. -func (in *NodeCondition) DeepCopy() *NodeCondition { - if in == nil { - return nil - } - out := new(NodeCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeConfigSource) DeepCopyInto(out *NodeConfigSource) { - *out = *in - if in.ConfigMap != nil { - in, out := &in.ConfigMap, &out.ConfigMap - *out = new(ConfigMapNodeConfigSource) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfigSource. -func (in *NodeConfigSource) DeepCopy() *NodeConfigSource { - if in == nil { - return nil - } - out := new(NodeConfigSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeConfigStatus) DeepCopyInto(out *NodeConfigStatus) { - *out = *in - if in.Assigned != nil { - in, out := &in.Assigned, &out.Assigned - *out = new(NodeConfigSource) - (*in).DeepCopyInto(*out) - } - if in.Active != nil { - in, out := &in.Active, &out.Active - *out = new(NodeConfigSource) - (*in).DeepCopyInto(*out) - } - if in.LastKnownGood != nil { - in, out := &in.LastKnownGood, &out.LastKnownGood - *out = new(NodeConfigSource) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfigStatus. -func (in *NodeConfigStatus) DeepCopy() *NodeConfigStatus { - if in == nil { - return nil - } - out := new(NodeConfigStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDaemonEndpoints) DeepCopyInto(out *NodeDaemonEndpoints) { - *out = *in - out.KubeletEndpoint = in.KubeletEndpoint - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDaemonEndpoints. -func (in *NodeDaemonEndpoints) DeepCopy() *NodeDaemonEndpoints { - if in == nil { - return nil - } - out := new(NodeDaemonEndpoints) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeList) DeepCopyInto(out *NodeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Node, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList. -func (in *NodeList) DeepCopy() *NodeList { - if in == nil { - return nil - } - out := new(NodeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NodeList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeProxyOptions) DeepCopyInto(out *NodeProxyOptions) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeProxyOptions. -func (in *NodeProxyOptions) DeepCopy() *NodeProxyOptions { - if in == nil { - return nil - } - out := new(NodeProxyOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NodeProxyOptions) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeResources) DeepCopyInto(out *NodeResources) { - *out = *in - if in.Capacity != nil { - in, out := &in.Capacity, &out.Capacity - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResources. -func (in *NodeResources) DeepCopy() *NodeResources { - if in == nil { - return nil - } - out := new(NodeResources) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeSelector) DeepCopyInto(out *NodeSelector) { - *out = *in - if in.NodeSelectorTerms != nil { - in, out := &in.NodeSelectorTerms, &out.NodeSelectorTerms - *out = make([]NodeSelectorTerm, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSelector. -func (in *NodeSelector) DeepCopy() *NodeSelector { - if in == nil { - return nil - } - out := new(NodeSelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeSelectorRequirement) DeepCopyInto(out *NodeSelectorRequirement) { - *out = *in - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSelectorRequirement. -func (in *NodeSelectorRequirement) DeepCopy() *NodeSelectorRequirement { - if in == nil { - return nil - } - out := new(NodeSelectorRequirement) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeSelectorTerm) DeepCopyInto(out *NodeSelectorTerm) { - *out = *in - if in.MatchExpressions != nil { - in, out := &in.MatchExpressions, &out.MatchExpressions - *out = make([]NodeSelectorRequirement, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.MatchFields != nil { - in, out := &in.MatchFields, &out.MatchFields - *out = make([]NodeSelectorRequirement, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSelectorTerm. -func (in *NodeSelectorTerm) DeepCopy() *NodeSelectorTerm { - if in == nil { - return nil - } - out := new(NodeSelectorTerm) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeSpec) DeepCopyInto(out *NodeSpec) { - *out = *in - if in.PodCIDRs != nil { - in, out := &in.PodCIDRs, &out.PodCIDRs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Taints != nil { - in, out := &in.Taints, &out.Taints - *out = make([]Taint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ConfigSource != nil { - in, out := &in.ConfigSource, &out.ConfigSource - *out = new(NodeConfigSource) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec. -func (in *NodeSpec) DeepCopy() *NodeSpec { - if in == nil { - return nil - } - out := new(NodeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { - *out = *in - if in.Capacity != nil { - in, out := &in.Capacity, &out.Capacity - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - if in.Allocatable != nil { - in, out := &in.Allocatable, &out.Allocatable - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]NodeCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]NodeAddress, len(*in)) - copy(*out, *in) - } - out.DaemonEndpoints = in.DaemonEndpoints - out.NodeInfo = in.NodeInfo - if in.Images != nil { - in, out := &in.Images, &out.Images - *out = make([]ContainerImage, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.VolumesInUse != nil { - in, out := &in.VolumesInUse, &out.VolumesInUse - *out = make([]UniqueVolumeName, len(*in)) - copy(*out, *in) - } - if in.VolumesAttached != nil { - in, out := &in.VolumesAttached, &out.VolumesAttached - *out = make([]AttachedVolume, len(*in)) - copy(*out, *in) - } - if in.Config != nil { - in, out := &in.Config, &out.Config - *out = new(NodeConfigStatus) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus. -func (in *NodeStatus) DeepCopy() *NodeStatus { - if in == nil { - return nil - } - out := new(NodeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeSystemInfo) DeepCopyInto(out *NodeSystemInfo) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSystemInfo. -func (in *NodeSystemInfo) DeepCopy() *NodeSystemInfo { - if in == nil { - return nil - } - out := new(NodeSystemInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ObjectFieldSelector) DeepCopyInto(out *ObjectFieldSelector) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectFieldSelector. -func (in *ObjectFieldSelector) DeepCopy() *ObjectFieldSelector { - if in == nil { - return nil - } - out := new(ObjectFieldSelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ObjectReference) DeepCopyInto(out *ObjectReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference. -func (in *ObjectReference) DeepCopy() *ObjectReference { - if in == nil { - return nil - } - out := new(ObjectReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ObjectReference) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolume) DeepCopyInto(out *PersistentVolume) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolume. -func (in *PersistentVolume) DeepCopy() *PersistentVolume { - if in == nil { - return nil - } - out := new(PersistentVolume) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PersistentVolume) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeClaim) DeepCopyInto(out *PersistentVolumeClaim) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaim. -func (in *PersistentVolumeClaim) DeepCopy() *PersistentVolumeClaim { - if in == nil { - return nil - } - out := new(PersistentVolumeClaim) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PersistentVolumeClaim) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeClaimCondition) DeepCopyInto(out *PersistentVolumeClaimCondition) { - *out = *in - in.LastProbeTime.DeepCopyInto(&out.LastProbeTime) - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimCondition. -func (in *PersistentVolumeClaimCondition) DeepCopy() *PersistentVolumeClaimCondition { - if in == nil { - return nil - } - out := new(PersistentVolumeClaimCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeClaimList) DeepCopyInto(out *PersistentVolumeClaimList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PersistentVolumeClaim, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimList. -func (in *PersistentVolumeClaimList) DeepCopy() *PersistentVolumeClaimList { - if in == nil { - return nil - } - out := new(PersistentVolumeClaimList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PersistentVolumeClaimList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeClaimSpec) DeepCopyInto(out *PersistentVolumeClaimSpec) { - *out = *in - if in.AccessModes != nil { - in, out := &in.AccessModes, &out.AccessModes - *out = make([]PersistentVolumeAccessMode, len(*in)) - copy(*out, *in) - } - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - in.Resources.DeepCopyInto(&out.Resources) - if in.StorageClassName != nil { - in, out := &in.StorageClassName, &out.StorageClassName - *out = new(string) - **out = **in - } - if in.VolumeMode != nil { - in, out := &in.VolumeMode, &out.VolumeMode - *out = new(PersistentVolumeMode) - **out = **in - } - if in.DataSource != nil { - in, out := &in.DataSource, &out.DataSource - *out = new(TypedLocalObjectReference) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimSpec. -func (in *PersistentVolumeClaimSpec) DeepCopy() *PersistentVolumeClaimSpec { - if in == nil { - return nil - } - out := new(PersistentVolumeClaimSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeClaimStatus) DeepCopyInto(out *PersistentVolumeClaimStatus) { - *out = *in - if in.AccessModes != nil { - in, out := &in.AccessModes, &out.AccessModes - *out = make([]PersistentVolumeAccessMode, len(*in)) - copy(*out, *in) - } - if in.Capacity != nil { - in, out := &in.Capacity, &out.Capacity - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]PersistentVolumeClaimCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimStatus. -func (in *PersistentVolumeClaimStatus) DeepCopy() *PersistentVolumeClaimStatus { - if in == nil { - return nil - } - out := new(PersistentVolumeClaimStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeClaimTemplate) DeepCopyInto(out *PersistentVolumeClaimTemplate) { - *out = *in - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimTemplate. -func (in *PersistentVolumeClaimTemplate) DeepCopy() *PersistentVolumeClaimTemplate { - if in == nil { - return nil - } - out := new(PersistentVolumeClaimTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeClaimVolumeSource) DeepCopyInto(out *PersistentVolumeClaimVolumeSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimVolumeSource. -func (in *PersistentVolumeClaimVolumeSource) DeepCopy() *PersistentVolumeClaimVolumeSource { - if in == nil { - return nil - } - out := new(PersistentVolumeClaimVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeList) DeepCopyInto(out *PersistentVolumeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PersistentVolume, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeList. -func (in *PersistentVolumeList) DeepCopy() *PersistentVolumeList { - if in == nil { - return nil - } - out := new(PersistentVolumeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PersistentVolumeList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeSource) DeepCopyInto(out *PersistentVolumeSource) { - *out = *in - if in.GCEPersistentDisk != nil { - in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk - *out = new(GCEPersistentDiskVolumeSource) - **out = **in - } - if in.AWSElasticBlockStore != nil { - in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore - *out = new(AWSElasticBlockStoreVolumeSource) - **out = **in - } - if in.HostPath != nil { - in, out := &in.HostPath, &out.HostPath - *out = new(HostPathVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.Glusterfs != nil { - in, out := &in.Glusterfs, &out.Glusterfs - *out = new(GlusterfsPersistentVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.NFS != nil { - in, out := &in.NFS, &out.NFS - *out = new(NFSVolumeSource) - **out = **in - } - if in.RBD != nil { - in, out := &in.RBD, &out.RBD - *out = new(RBDPersistentVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.ISCSI != nil { - in, out := &in.ISCSI, &out.ISCSI - *out = new(ISCSIPersistentVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.Cinder != nil { - in, out := &in.Cinder, &out.Cinder - *out = new(CinderPersistentVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.CephFS != nil { - in, out := &in.CephFS, &out.CephFS - *out = new(CephFSPersistentVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.FC != nil { - in, out := &in.FC, &out.FC - *out = new(FCVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.Flocker != nil { - in, out := &in.Flocker, &out.Flocker - *out = new(FlockerVolumeSource) - **out = **in - } - if in.FlexVolume != nil { - in, out := &in.FlexVolume, &out.FlexVolume - *out = new(FlexPersistentVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.AzureFile != nil { - in, out := &in.AzureFile, &out.AzureFile - *out = new(AzureFilePersistentVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.VsphereVolume != nil { - in, out := &in.VsphereVolume, &out.VsphereVolume - *out = new(VsphereVirtualDiskVolumeSource) - **out = **in - } - if in.Quobyte != nil { - in, out := &in.Quobyte, &out.Quobyte - *out = new(QuobyteVolumeSource) - **out = **in - } - if in.AzureDisk != nil { - in, out := &in.AzureDisk, &out.AzureDisk - *out = new(AzureDiskVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.PhotonPersistentDisk != nil { - in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk - *out = new(PhotonPersistentDiskVolumeSource) - **out = **in - } - if in.PortworxVolume != nil { - in, out := &in.PortworxVolume, &out.PortworxVolume - *out = new(PortworxVolumeSource) - **out = **in - } - if in.ScaleIO != nil { - in, out := &in.ScaleIO, &out.ScaleIO - *out = new(ScaleIOPersistentVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.Local != nil { - in, out := &in.Local, &out.Local - *out = new(LocalVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.StorageOS != nil { - in, out := &in.StorageOS, &out.StorageOS - *out = new(StorageOSPersistentVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.CSI != nil { - in, out := &in.CSI, &out.CSI - *out = new(CSIPersistentVolumeSource) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeSource. -func (in *PersistentVolumeSource) DeepCopy() *PersistentVolumeSource { - if in == nil { - return nil - } - out := new(PersistentVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeSpec) DeepCopyInto(out *PersistentVolumeSpec) { - *out = *in - if in.Capacity != nil { - in, out := &in.Capacity, &out.Capacity - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - in.PersistentVolumeSource.DeepCopyInto(&out.PersistentVolumeSource) - if in.AccessModes != nil { - in, out := &in.AccessModes, &out.AccessModes - *out = make([]PersistentVolumeAccessMode, len(*in)) - copy(*out, *in) - } - if in.ClaimRef != nil { - in, out := &in.ClaimRef, &out.ClaimRef - *out = new(ObjectReference) - **out = **in - } - if in.MountOptions != nil { - in, out := &in.MountOptions, &out.MountOptions - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.VolumeMode != nil { - in, out := &in.VolumeMode, &out.VolumeMode - *out = new(PersistentVolumeMode) - **out = **in - } - if in.NodeAffinity != nil { - in, out := &in.NodeAffinity, &out.NodeAffinity - *out = new(VolumeNodeAffinity) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeSpec. -func (in *PersistentVolumeSpec) DeepCopy() *PersistentVolumeSpec { - if in == nil { - return nil - } - out := new(PersistentVolumeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeStatus) DeepCopyInto(out *PersistentVolumeStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeStatus. -func (in *PersistentVolumeStatus) DeepCopy() *PersistentVolumeStatus { - if in == nil { - return nil - } - out := new(PersistentVolumeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PhotonPersistentDiskVolumeSource) DeepCopyInto(out *PhotonPersistentDiskVolumeSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhotonPersistentDiskVolumeSource. -func (in *PhotonPersistentDiskVolumeSource) DeepCopy() *PhotonPersistentDiskVolumeSource { - if in == nil { - return nil - } - out := new(PhotonPersistentDiskVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Pod) DeepCopyInto(out *Pod) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pod. -func (in *Pod) DeepCopy() *Pod { - if in == nil { - return nil - } - out := new(Pod) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Pod) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodAffinity) DeepCopyInto(out *PodAffinity) { - *out = *in - if in.RequiredDuringSchedulingIgnoredDuringExecution != nil { - in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution - *out = make([]PodAffinityTerm, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.PreferredDuringSchedulingIgnoredDuringExecution != nil { - in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution - *out = make([]WeightedPodAffinityTerm, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodAffinity. -func (in *PodAffinity) DeepCopy() *PodAffinity { - if in == nil { - return nil - } - out := new(PodAffinity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodAffinityTerm) DeepCopyInto(out *PodAffinityTerm) { - *out = *in - if in.LabelSelector != nil { - in, out := &in.LabelSelector, &out.LabelSelector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.Namespaces != nil { - in, out := &in.Namespaces, &out.Namespaces - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.NamespaceSelector != nil { - in, out := &in.NamespaceSelector, &out.NamespaceSelector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodAffinityTerm. -func (in *PodAffinityTerm) DeepCopy() *PodAffinityTerm { - if in == nil { - return nil - } - out := new(PodAffinityTerm) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodAntiAffinity) DeepCopyInto(out *PodAntiAffinity) { - *out = *in - if in.RequiredDuringSchedulingIgnoredDuringExecution != nil { - in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution - *out = make([]PodAffinityTerm, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.PreferredDuringSchedulingIgnoredDuringExecution != nil { - in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution - *out = make([]WeightedPodAffinityTerm, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodAntiAffinity. -func (in *PodAntiAffinity) DeepCopy() *PodAntiAffinity { - if in == nil { - return nil - } - out := new(PodAntiAffinity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodAttachOptions) DeepCopyInto(out *PodAttachOptions) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodAttachOptions. -func (in *PodAttachOptions) DeepCopy() *PodAttachOptions { - if in == nil { - return nil - } - out := new(PodAttachOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodAttachOptions) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodCondition) DeepCopyInto(out *PodCondition) { - *out = *in - in.LastProbeTime.DeepCopyInto(&out.LastProbeTime) - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodCondition. -func (in *PodCondition) DeepCopy() *PodCondition { - if in == nil { - return nil - } - out := new(PodCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodDNSConfig) DeepCopyInto(out *PodDNSConfig) { - *out = *in - if in.Nameservers != nil { - in, out := &in.Nameservers, &out.Nameservers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Searches != nil { - in, out := &in.Searches, &out.Searches - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Options != nil { - in, out := &in.Options, &out.Options - *out = make([]PodDNSConfigOption, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDNSConfig. -func (in *PodDNSConfig) DeepCopy() *PodDNSConfig { - if in == nil { - return nil - } - out := new(PodDNSConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodDNSConfigOption) DeepCopyInto(out *PodDNSConfigOption) { - *out = *in - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDNSConfigOption. -func (in *PodDNSConfigOption) DeepCopy() *PodDNSConfigOption { - if in == nil { - return nil - } - out := new(PodDNSConfigOption) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodExecOptions) DeepCopyInto(out *PodExecOptions) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Command != nil { - in, out := &in.Command, &out.Command - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodExecOptions. -func (in *PodExecOptions) DeepCopy() *PodExecOptions { - if in == nil { - return nil - } - out := new(PodExecOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodExecOptions) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodIP) DeepCopyInto(out *PodIP) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIP. -func (in *PodIP) DeepCopy() *PodIP { - if in == nil { - return nil - } - out := new(PodIP) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodList) DeepCopyInto(out *PodList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Pod, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodList. -func (in *PodList) DeepCopy() *PodList { - if in == nil { - return nil - } - out := new(PodList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodLogOptions) DeepCopyInto(out *PodLogOptions) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.SinceSeconds != nil { - in, out := &in.SinceSeconds, &out.SinceSeconds - *out = new(int64) - **out = **in - } - if in.SinceTime != nil { - in, out := &in.SinceTime, &out.SinceTime - *out = (*in).DeepCopy() - } - if in.TailLines != nil { - in, out := &in.TailLines, &out.TailLines - *out = new(int64) - **out = **in - } - if in.LimitBytes != nil { - in, out := &in.LimitBytes, &out.LimitBytes - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodLogOptions. -func (in *PodLogOptions) DeepCopy() *PodLogOptions { - if in == nil { - return nil - } - out := new(PodLogOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodLogOptions) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodPortForwardOptions) DeepCopyInto(out *PodPortForwardOptions) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]int32, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodPortForwardOptions. -func (in *PodPortForwardOptions) DeepCopy() *PodPortForwardOptions { - if in == nil { - return nil - } - out := new(PodPortForwardOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodPortForwardOptions) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodProxyOptions) DeepCopyInto(out *PodProxyOptions) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodProxyOptions. -func (in *PodProxyOptions) DeepCopy() *PodProxyOptions { - if in == nil { - return nil - } - out := new(PodProxyOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodProxyOptions) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodReadinessGate) DeepCopyInto(out *PodReadinessGate) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodReadinessGate. -func (in *PodReadinessGate) DeepCopy() *PodReadinessGate { - if in == nil { - return nil - } - out := new(PodReadinessGate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSecurityContext) DeepCopyInto(out *PodSecurityContext) { - *out = *in - if in.SELinuxOptions != nil { - in, out := &in.SELinuxOptions, &out.SELinuxOptions - *out = new(SELinuxOptions) - **out = **in - } - if in.WindowsOptions != nil { - in, out := &in.WindowsOptions, &out.WindowsOptions - *out = new(WindowsSecurityContextOptions) - (*in).DeepCopyInto(*out) - } - if in.RunAsUser != nil { - in, out := &in.RunAsUser, &out.RunAsUser - *out = new(int64) - **out = **in - } - if in.RunAsGroup != nil { - in, out := &in.RunAsGroup, &out.RunAsGroup - *out = new(int64) - **out = **in - } - if in.RunAsNonRoot != nil { - in, out := &in.RunAsNonRoot, &out.RunAsNonRoot - *out = new(bool) - **out = **in - } - if in.SupplementalGroups != nil { - in, out := &in.SupplementalGroups, &out.SupplementalGroups - *out = make([]int64, len(*in)) - copy(*out, *in) - } - if in.FSGroup != nil { - in, out := &in.FSGroup, &out.FSGroup - *out = new(int64) - **out = **in - } - if in.Sysctls != nil { - in, out := &in.Sysctls, &out.Sysctls - *out = make([]Sysctl, len(*in)) - copy(*out, *in) - } - if in.FSGroupChangePolicy != nil { - in, out := &in.FSGroupChangePolicy, &out.FSGroupChangePolicy - *out = new(PodFSGroupChangePolicy) - **out = **in - } - if in.SeccompProfile != nil { - in, out := &in.SeccompProfile, &out.SeccompProfile - *out = new(SeccompProfile) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityContext. -func (in *PodSecurityContext) DeepCopy() *PodSecurityContext { - if in == nil { - return nil - } - out := new(PodSecurityContext) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSignature) DeepCopyInto(out *PodSignature) { - *out = *in - if in.PodController != nil { - in, out := &in.PodController, &out.PodController - *out = new(metav1.OwnerReference) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSignature. -func (in *PodSignature) DeepCopy() *PodSignature { - if in == nil { - return nil - } - out := new(PodSignature) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSpec) DeepCopyInto(out *PodSpec) { - *out = *in - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]Volume, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.InitContainers != nil { - in, out := &in.InitContainers, &out.InitContainers - *out = make([]Container, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Containers != nil { - in, out := &in.Containers, &out.Containers - *out = make([]Container, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.EphemeralContainers != nil { - in, out := &in.EphemeralContainers, &out.EphemeralContainers - *out = make([]EphemeralContainer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.TerminationGracePeriodSeconds != nil { - in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds - *out = new(int64) - **out = **in - } - if in.ActiveDeadlineSeconds != nil { - in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds - *out = new(int64) - **out = **in - } - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.AutomountServiceAccountToken != nil { - in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken - *out = new(bool) - **out = **in - } - if in.ShareProcessNamespace != nil { - in, out := &in.ShareProcessNamespace, &out.ShareProcessNamespace - *out = new(bool) - **out = **in - } - if in.SecurityContext != nil { - in, out := &in.SecurityContext, &out.SecurityContext - *out = new(PodSecurityContext) - (*in).DeepCopyInto(*out) - } - if in.ImagePullSecrets != nil { - in, out := &in.ImagePullSecrets, &out.ImagePullSecrets - *out = make([]LocalObjectReference, len(*in)) - copy(*out, *in) - } - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(Affinity) - (*in).DeepCopyInto(*out) - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.HostAliases != nil { - in, out := &in.HostAliases, &out.HostAliases - *out = make([]HostAlias, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Priority != nil { - in, out := &in.Priority, &out.Priority - *out = new(int32) - **out = **in - } - if in.DNSConfig != nil { - in, out := &in.DNSConfig, &out.DNSConfig - *out = new(PodDNSConfig) - (*in).DeepCopyInto(*out) - } - if in.ReadinessGates != nil { - in, out := &in.ReadinessGates, &out.ReadinessGates - *out = make([]PodReadinessGate, len(*in)) - copy(*out, *in) - } - if in.RuntimeClassName != nil { - in, out := &in.RuntimeClassName, &out.RuntimeClassName - *out = new(string) - **out = **in - } - if in.EnableServiceLinks != nil { - in, out := &in.EnableServiceLinks, &out.EnableServiceLinks - *out = new(bool) - **out = **in - } - if in.PreemptionPolicy != nil { - in, out := &in.PreemptionPolicy, &out.PreemptionPolicy - *out = new(PreemptionPolicy) - **out = **in - } - if in.Overhead != nil { - in, out := &in.Overhead, &out.Overhead - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.SetHostnameAsFQDN != nil { - in, out := &in.SetHostnameAsFQDN, &out.SetHostnameAsFQDN - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpec. -func (in *PodSpec) DeepCopy() *PodSpec { - if in == nil { - return nil - } - out := new(PodSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodStatus) DeepCopyInto(out *PodStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]PodCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.PodIPs != nil { - in, out := &in.PodIPs, &out.PodIPs - *out = make([]PodIP, len(*in)) - copy(*out, *in) - } - if in.StartTime != nil { - in, out := &in.StartTime, &out.StartTime - *out = (*in).DeepCopy() - } - if in.InitContainerStatuses != nil { - in, out := &in.InitContainerStatuses, &out.InitContainerStatuses - *out = make([]ContainerStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ContainerStatuses != nil { - in, out := &in.ContainerStatuses, &out.ContainerStatuses - *out = make([]ContainerStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.EphemeralContainerStatuses != nil { - in, out := &in.EphemeralContainerStatuses, &out.EphemeralContainerStatuses - *out = make([]ContainerStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodStatus. -func (in *PodStatus) DeepCopy() *PodStatus { - if in == nil { - return nil - } - out := new(PodStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodStatusResult) DeepCopyInto(out *PodStatusResult) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodStatusResult. -func (in *PodStatusResult) DeepCopy() *PodStatusResult { - if in == nil { - return nil - } - out := new(PodStatusResult) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodStatusResult) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodTemplate) DeepCopyInto(out *PodTemplate) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Template.DeepCopyInto(&out.Template) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTemplate. -func (in *PodTemplate) DeepCopy() *PodTemplate { - if in == nil { - return nil - } - out := new(PodTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodTemplate) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodTemplateList) DeepCopyInto(out *PodTemplateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PodTemplate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTemplateList. -func (in *PodTemplateList) DeepCopy() *PodTemplateList { - if in == nil { - return nil - } - out := new(PodTemplateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodTemplateList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodTemplateSpec) DeepCopyInto(out *PodTemplateSpec) { - *out = *in - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTemplateSpec. -func (in *PodTemplateSpec) DeepCopy() *PodTemplateSpec { - if in == nil { - return nil - } - out := new(PodTemplateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PortStatus) DeepCopyInto(out *PortStatus) { - *out = *in - if in.Error != nil { - in, out := &in.Error, &out.Error - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortStatus. -func (in *PortStatus) DeepCopy() *PortStatus { - if in == nil { - return nil - } - out := new(PortStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PortworxVolumeSource) DeepCopyInto(out *PortworxVolumeSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortworxVolumeSource. -func (in *PortworxVolumeSource) DeepCopy() *PortworxVolumeSource { - if in == nil { - return nil - } - out := new(PortworxVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Preconditions) DeepCopyInto(out *Preconditions) { - *out = *in - if in.UID != nil { - in, out := &in.UID, &out.UID - *out = new(types.UID) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Preconditions. -func (in *Preconditions) DeepCopy() *Preconditions { - if in == nil { - return nil - } - out := new(Preconditions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PreferAvoidPodsEntry) DeepCopyInto(out *PreferAvoidPodsEntry) { - *out = *in - in.PodSignature.DeepCopyInto(&out.PodSignature) - in.EvictionTime.DeepCopyInto(&out.EvictionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PreferAvoidPodsEntry. -func (in *PreferAvoidPodsEntry) DeepCopy() *PreferAvoidPodsEntry { - if in == nil { - return nil - } - out := new(PreferAvoidPodsEntry) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PreferredSchedulingTerm) DeepCopyInto(out *PreferredSchedulingTerm) { - *out = *in - in.Preference.DeepCopyInto(&out.Preference) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PreferredSchedulingTerm. -func (in *PreferredSchedulingTerm) DeepCopy() *PreferredSchedulingTerm { - if in == nil { - return nil - } - out := new(PreferredSchedulingTerm) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Probe) DeepCopyInto(out *Probe) { - *out = *in - in.Handler.DeepCopyInto(&out.Handler) - if in.TerminationGracePeriodSeconds != nil { - in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Probe. -func (in *Probe) DeepCopy() *Probe { - if in == nil { - return nil - } - out := new(Probe) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectedVolumeSource) DeepCopyInto(out *ProjectedVolumeSource) { - *out = *in - if in.Sources != nil { - in, out := &in.Sources, &out.Sources - *out = make([]VolumeProjection, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DefaultMode != nil { - in, out := &in.DefaultMode, &out.DefaultMode - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectedVolumeSource. -func (in *ProjectedVolumeSource) DeepCopy() *ProjectedVolumeSource { - if in == nil { - return nil - } - out := new(ProjectedVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *QuobyteVolumeSource) DeepCopyInto(out *QuobyteVolumeSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuobyteVolumeSource. -func (in *QuobyteVolumeSource) DeepCopy() *QuobyteVolumeSource { - if in == nil { - return nil - } - out := new(QuobyteVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RBDPersistentVolumeSource) DeepCopyInto(out *RBDPersistentVolumeSource) { - *out = *in - if in.CephMonitors != nil { - in, out := &in.CephMonitors, &out.CephMonitors - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(SecretReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RBDPersistentVolumeSource. -func (in *RBDPersistentVolumeSource) DeepCopy() *RBDPersistentVolumeSource { - if in == nil { - return nil - } - out := new(RBDPersistentVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RBDVolumeSource) DeepCopyInto(out *RBDVolumeSource) { - *out = *in - if in.CephMonitors != nil { - in, out := &in.CephMonitors, &out.CephMonitors - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(LocalObjectReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RBDVolumeSource. -func (in *RBDVolumeSource) DeepCopy() *RBDVolumeSource { - if in == nil { - return nil - } - out := new(RBDVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RangeAllocation) DeepCopyInto(out *RangeAllocation) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Data != nil { - in, out := &in.Data, &out.Data - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RangeAllocation. -func (in *RangeAllocation) DeepCopy() *RangeAllocation { - if in == nil { - return nil - } - out := new(RangeAllocation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RangeAllocation) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ReplicationController) DeepCopyInto(out *ReplicationController) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationController. -func (in *ReplicationController) DeepCopy() *ReplicationController { - if in == nil { - return nil - } - out := new(ReplicationController) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ReplicationController) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ReplicationControllerCondition) DeepCopyInto(out *ReplicationControllerCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationControllerCondition. -func (in *ReplicationControllerCondition) DeepCopy() *ReplicationControllerCondition { - if in == nil { - return nil - } - out := new(ReplicationControllerCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ReplicationControllerList) DeepCopyInto(out *ReplicationControllerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ReplicationController, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationControllerList. -func (in *ReplicationControllerList) DeepCopy() *ReplicationControllerList { - if in == nil { - return nil - } - out := new(ReplicationControllerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ReplicationControllerList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ReplicationControllerSpec) DeepCopyInto(out *ReplicationControllerSpec) { - *out = *in - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Template != nil { - in, out := &in.Template, &out.Template - *out = new(PodTemplateSpec) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationControllerSpec. -func (in *ReplicationControllerSpec) DeepCopy() *ReplicationControllerSpec { - if in == nil { - return nil - } - out := new(ReplicationControllerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ReplicationControllerStatus) DeepCopyInto(out *ReplicationControllerStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]ReplicationControllerCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationControllerStatus. -func (in *ReplicationControllerStatus) DeepCopy() *ReplicationControllerStatus { - if in == nil { - return nil - } - out := new(ReplicationControllerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceFieldSelector) DeepCopyInto(out *ResourceFieldSelector) { - *out = *in - out.Divisor = in.Divisor.DeepCopy() - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFieldSelector. -func (in *ResourceFieldSelector) DeepCopy() *ResourceFieldSelector { - if in == nil { - return nil - } - out := new(ResourceFieldSelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in ResourceList) DeepCopyInto(out *ResourceList) { - { - in := &in - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceList. -func (in ResourceList) DeepCopy() ResourceList { - if in == nil { - return nil - } - out := new(ResourceList) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceQuota) DeepCopyInto(out *ResourceQuota) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuota. -func (in *ResourceQuota) DeepCopy() *ResourceQuota { - if in == nil { - return nil - } - out := new(ResourceQuota) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceQuota) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceQuotaList) DeepCopyInto(out *ResourceQuotaList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ResourceQuota, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaList. -func (in *ResourceQuotaList) DeepCopy() *ResourceQuotaList { - if in == nil { - return nil - } - out := new(ResourceQuotaList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceQuotaList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceQuotaSpec) DeepCopyInto(out *ResourceQuotaSpec) { - *out = *in - if in.Hard != nil { - in, out := &in.Hard, &out.Hard - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - if in.Scopes != nil { - in, out := &in.Scopes, &out.Scopes - *out = make([]ResourceQuotaScope, len(*in)) - copy(*out, *in) - } - if in.ScopeSelector != nil { - in, out := &in.ScopeSelector, &out.ScopeSelector - *out = new(ScopeSelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaSpec. -func (in *ResourceQuotaSpec) DeepCopy() *ResourceQuotaSpec { - if in == nil { - return nil - } - out := new(ResourceQuotaSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceQuotaStatus) DeepCopyInto(out *ResourceQuotaStatus) { - *out = *in - if in.Hard != nil { - in, out := &in.Hard, &out.Hard - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - if in.Used != nil { - in, out := &in.Used, &out.Used - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaStatus. -func (in *ResourceQuotaStatus) DeepCopy() *ResourceQuotaStatus { - if in == nil { - return nil - } - out := new(ResourceQuotaStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceRequirements) DeepCopyInto(out *ResourceRequirements) { - *out = *in - if in.Limits != nil { - in, out := &in.Limits, &out.Limits - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - if in.Requests != nil { - in, out := &in.Requests, &out.Requests - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequirements. -func (in *ResourceRequirements) DeepCopy() *ResourceRequirements { - if in == nil { - return nil - } - out := new(ResourceRequirements) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SELinuxOptions) DeepCopyInto(out *SELinuxOptions) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SELinuxOptions. -func (in *SELinuxOptions) DeepCopy() *SELinuxOptions { - if in == nil { - return nil - } - out := new(SELinuxOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ScaleIOPersistentVolumeSource) DeepCopyInto(out *ScaleIOPersistentVolumeSource) { - *out = *in - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(SecretReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleIOPersistentVolumeSource. -func (in *ScaleIOPersistentVolumeSource) DeepCopy() *ScaleIOPersistentVolumeSource { - if in == nil { - return nil - } - out := new(ScaleIOPersistentVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ScaleIOVolumeSource) DeepCopyInto(out *ScaleIOVolumeSource) { - *out = *in - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(LocalObjectReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleIOVolumeSource. -func (in *ScaleIOVolumeSource) DeepCopy() *ScaleIOVolumeSource { - if in == nil { - return nil - } - out := new(ScaleIOVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ScopeSelector) DeepCopyInto(out *ScopeSelector) { - *out = *in - if in.MatchExpressions != nil { - in, out := &in.MatchExpressions, &out.MatchExpressions - *out = make([]ScopedResourceSelectorRequirement, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopeSelector. -func (in *ScopeSelector) DeepCopy() *ScopeSelector { - if in == nil { - return nil - } - out := new(ScopeSelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ScopedResourceSelectorRequirement) DeepCopyInto(out *ScopedResourceSelectorRequirement) { - *out = *in - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopedResourceSelectorRequirement. -func (in *ScopedResourceSelectorRequirement) DeepCopy() *ScopedResourceSelectorRequirement { - if in == nil { - return nil - } - out := new(ScopedResourceSelectorRequirement) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SeccompProfile) DeepCopyInto(out *SeccompProfile) { - *out = *in - if in.LocalhostProfile != nil { - in, out := &in.LocalhostProfile, &out.LocalhostProfile - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeccompProfile. -func (in *SeccompProfile) DeepCopy() *SeccompProfile { - if in == nil { - return nil - } - out := new(SeccompProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Secret) DeepCopyInto(out *Secret) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Immutable != nil { - in, out := &in.Immutable, &out.Immutable - *out = new(bool) - **out = **in - } - if in.Data != nil { - in, out := &in.Data, &out.Data - *out = make(map[string][]byte, len(*in)) - for key, val := range *in { - var outVal []byte - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]byte, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - if in.StringData != nil { - in, out := &in.StringData, &out.StringData - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Secret. -func (in *Secret) DeepCopy() *Secret { - if in == nil { - return nil - } - out := new(Secret) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Secret) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretEnvSource) DeepCopyInto(out *SecretEnvSource) { - *out = *in - out.LocalObjectReference = in.LocalObjectReference - if in.Optional != nil { - in, out := &in.Optional, &out.Optional - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretEnvSource. -func (in *SecretEnvSource) DeepCopy() *SecretEnvSource { - if in == nil { - return nil - } - out := new(SecretEnvSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector) { - *out = *in - out.LocalObjectReference = in.LocalObjectReference - if in.Optional != nil { - in, out := &in.Optional, &out.Optional - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector. -func (in *SecretKeySelector) DeepCopy() *SecretKeySelector { - if in == nil { - return nil - } - out := new(SecretKeySelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretList) DeepCopyInto(out *SecretList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Secret, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretList. -func (in *SecretList) DeepCopy() *SecretList { - if in == nil { - return nil - } - out := new(SecretList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SecretList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretProjection) DeepCopyInto(out *SecretProjection) { - *out = *in - out.LocalObjectReference = in.LocalObjectReference - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]KeyToPath, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Optional != nil { - in, out := &in.Optional, &out.Optional - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretProjection. -func (in *SecretProjection) DeepCopy() *SecretProjection { - if in == nil { - return nil - } - out := new(SecretProjection) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretReference) DeepCopyInto(out *SecretReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretReference. -func (in *SecretReference) DeepCopy() *SecretReference { - if in == nil { - return nil - } - out := new(SecretReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretVolumeSource) DeepCopyInto(out *SecretVolumeSource) { - *out = *in - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]KeyToPath, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DefaultMode != nil { - in, out := &in.DefaultMode, &out.DefaultMode - *out = new(int32) - **out = **in - } - if in.Optional != nil { - in, out := &in.Optional, &out.Optional - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretVolumeSource. -func (in *SecretVolumeSource) DeepCopy() *SecretVolumeSource { - if in == nil { - return nil - } - out := new(SecretVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityContext) DeepCopyInto(out *SecurityContext) { - *out = *in - if in.Capabilities != nil { - in, out := &in.Capabilities, &out.Capabilities - *out = new(Capabilities) - (*in).DeepCopyInto(*out) - } - if in.Privileged != nil { - in, out := &in.Privileged, &out.Privileged - *out = new(bool) - **out = **in - } - if in.SELinuxOptions != nil { - in, out := &in.SELinuxOptions, &out.SELinuxOptions - *out = new(SELinuxOptions) - **out = **in - } - if in.WindowsOptions != nil { - in, out := &in.WindowsOptions, &out.WindowsOptions - *out = new(WindowsSecurityContextOptions) - (*in).DeepCopyInto(*out) - } - if in.RunAsUser != nil { - in, out := &in.RunAsUser, &out.RunAsUser - *out = new(int64) - **out = **in - } - if in.RunAsGroup != nil { - in, out := &in.RunAsGroup, &out.RunAsGroup - *out = new(int64) - **out = **in - } - if in.RunAsNonRoot != nil { - in, out := &in.RunAsNonRoot, &out.RunAsNonRoot - *out = new(bool) - **out = **in - } - if in.ReadOnlyRootFilesystem != nil { - in, out := &in.ReadOnlyRootFilesystem, &out.ReadOnlyRootFilesystem - *out = new(bool) - **out = **in - } - if in.AllowPrivilegeEscalation != nil { - in, out := &in.AllowPrivilegeEscalation, &out.AllowPrivilegeEscalation - *out = new(bool) - **out = **in - } - if in.ProcMount != nil { - in, out := &in.ProcMount, &out.ProcMount - *out = new(ProcMountType) - **out = **in - } - if in.SeccompProfile != nil { - in, out := &in.SeccompProfile, &out.SeccompProfile - *out = new(SeccompProfile) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityContext. -func (in *SecurityContext) DeepCopy() *SecurityContext { - if in == nil { - return nil - } - out := new(SecurityContext) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SerializedReference) DeepCopyInto(out *SerializedReference) { - *out = *in - out.TypeMeta = in.TypeMeta - out.Reference = in.Reference - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SerializedReference. -func (in *SerializedReference) DeepCopy() *SerializedReference { - if in == nil { - return nil - } - out := new(SerializedReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SerializedReference) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Service) DeepCopyInto(out *Service) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service. -func (in *Service) DeepCopy() *Service { - if in == nil { - return nil - } - out := new(Service) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Service) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccount) DeepCopyInto(out *ServiceAccount) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Secrets != nil { - in, out := &in.Secrets, &out.Secrets - *out = make([]ObjectReference, len(*in)) - copy(*out, *in) - } - if in.ImagePullSecrets != nil { - in, out := &in.ImagePullSecrets, &out.ImagePullSecrets - *out = make([]LocalObjectReference, len(*in)) - copy(*out, *in) - } - if in.AutomountServiceAccountToken != nil { - in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccount. -func (in *ServiceAccount) DeepCopy() *ServiceAccount { - if in == nil { - return nil - } - out := new(ServiceAccount) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceAccount) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountList) DeepCopyInto(out *ServiceAccountList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ServiceAccount, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountList. -func (in *ServiceAccountList) DeepCopy() *ServiceAccountList { - if in == nil { - return nil - } - out := new(ServiceAccountList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceAccountList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountTokenProjection) DeepCopyInto(out *ServiceAccountTokenProjection) { - *out = *in - if in.ExpirationSeconds != nil { - in, out := &in.ExpirationSeconds, &out.ExpirationSeconds - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountTokenProjection. -func (in *ServiceAccountTokenProjection) DeepCopy() *ServiceAccountTokenProjection { - if in == nil { - return nil - } - out := new(ServiceAccountTokenProjection) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceList) DeepCopyInto(out *ServiceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Service, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceList. -func (in *ServiceList) DeepCopy() *ServiceList { - if in == nil { - return nil - } - out := new(ServiceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServicePort) DeepCopyInto(out *ServicePort) { - *out = *in - if in.AppProtocol != nil { - in, out := &in.AppProtocol, &out.AppProtocol - *out = new(string) - **out = **in - } - out.TargetPort = in.TargetPort - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServicePort. -func (in *ServicePort) DeepCopy() *ServicePort { - if in == nil { - return nil - } - out := new(ServicePort) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceProxyOptions) DeepCopyInto(out *ServiceProxyOptions) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceProxyOptions. -func (in *ServiceProxyOptions) DeepCopy() *ServiceProxyOptions { - if in == nil { - return nil - } - out := new(ServiceProxyOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceProxyOptions) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec) { - *out = *in - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]ServicePort, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ClusterIPs != nil { - in, out := &in.ClusterIPs, &out.ClusterIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ExternalIPs != nil { - in, out := &in.ExternalIPs, &out.ExternalIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.LoadBalancerSourceRanges != nil { - in, out := &in.LoadBalancerSourceRanges, &out.LoadBalancerSourceRanges - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SessionAffinityConfig != nil { - in, out := &in.SessionAffinityConfig, &out.SessionAffinityConfig - *out = new(SessionAffinityConfig) - (*in).DeepCopyInto(*out) - } - if in.TopologyKeys != nil { - in, out := &in.TopologyKeys, &out.TopologyKeys - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IPFamilies != nil { - in, out := &in.IPFamilies, &out.IPFamilies - *out = make([]IPFamily, len(*in)) - copy(*out, *in) - } - if in.IPFamilyPolicy != nil { - in, out := &in.IPFamilyPolicy, &out.IPFamilyPolicy - *out = new(IPFamilyPolicyType) - **out = **in - } - if in.AllocateLoadBalancerNodePorts != nil { - in, out := &in.AllocateLoadBalancerNodePorts, &out.AllocateLoadBalancerNodePorts - *out = new(bool) - **out = **in - } - if in.LoadBalancerClass != nil { - in, out := &in.LoadBalancerClass, &out.LoadBalancerClass - *out = new(string) - **out = **in - } - if in.InternalTrafficPolicy != nil { - in, out := &in.InternalTrafficPolicy, &out.InternalTrafficPolicy - *out = new(ServiceInternalTrafficPolicyType) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSpec. -func (in *ServiceSpec) DeepCopy() *ServiceSpec { - if in == nil { - return nil - } - out := new(ServiceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceStatus) DeepCopyInto(out *ServiceStatus) { - *out = *in - in.LoadBalancer.DeepCopyInto(&out.LoadBalancer) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceStatus. -func (in *ServiceStatus) DeepCopy() *ServiceStatus { - if in == nil { - return nil - } - out := new(ServiceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SessionAffinityConfig) DeepCopyInto(out *SessionAffinityConfig) { - *out = *in - if in.ClientIP != nil { - in, out := &in.ClientIP, &out.ClientIP - *out = new(ClientIPConfig) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SessionAffinityConfig. -func (in *SessionAffinityConfig) DeepCopy() *SessionAffinityConfig { - if in == nil { - return nil - } - out := new(SessionAffinityConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StorageOSPersistentVolumeSource) DeepCopyInto(out *StorageOSPersistentVolumeSource) { - *out = *in - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(ObjectReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageOSPersistentVolumeSource. -func (in *StorageOSPersistentVolumeSource) DeepCopy() *StorageOSPersistentVolumeSource { - if in == nil { - return nil - } - out := new(StorageOSPersistentVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StorageOSVolumeSource) DeepCopyInto(out *StorageOSVolumeSource) { - *out = *in - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(LocalObjectReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageOSVolumeSource. -func (in *StorageOSVolumeSource) DeepCopy() *StorageOSVolumeSource { - if in == nil { - return nil - } - out := new(StorageOSVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Sysctl) DeepCopyInto(out *Sysctl) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sysctl. -func (in *Sysctl) DeepCopy() *Sysctl { - if in == nil { - return nil - } - out := new(Sysctl) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TCPSocketAction) DeepCopyInto(out *TCPSocketAction) { - *out = *in - out.Port = in.Port - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPSocketAction. -func (in *TCPSocketAction) DeepCopy() *TCPSocketAction { - if in == nil { - return nil - } - out := new(TCPSocketAction) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Taint) DeepCopyInto(out *Taint) { - *out = *in - if in.TimeAdded != nil { - in, out := &in.TimeAdded, &out.TimeAdded - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Taint. -func (in *Taint) DeepCopy() *Taint { - if in == nil { - return nil - } - out := new(Taint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Toleration) DeepCopyInto(out *Toleration) { - *out = *in - if in.TolerationSeconds != nil { - in, out := &in.TolerationSeconds, &out.TolerationSeconds - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Toleration. -func (in *Toleration) DeepCopy() *Toleration { - if in == nil { - return nil - } - out := new(Toleration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TopologySelectorLabelRequirement) DeepCopyInto(out *TopologySelectorLabelRequirement) { - *out = *in - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologySelectorLabelRequirement. -func (in *TopologySelectorLabelRequirement) DeepCopy() *TopologySelectorLabelRequirement { - if in == nil { - return nil - } - out := new(TopologySelectorLabelRequirement) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TopologySelectorTerm) DeepCopyInto(out *TopologySelectorTerm) { - *out = *in - if in.MatchLabelExpressions != nil { - in, out := &in.MatchLabelExpressions, &out.MatchLabelExpressions - *out = make([]TopologySelectorLabelRequirement, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologySelectorTerm. -func (in *TopologySelectorTerm) DeepCopy() *TopologySelectorTerm { - if in == nil { - return nil - } - out := new(TopologySelectorTerm) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TopologySpreadConstraint) DeepCopyInto(out *TopologySpreadConstraint) { - *out = *in - if in.LabelSelector != nil { - in, out := &in.LabelSelector, &out.LabelSelector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologySpreadConstraint. -func (in *TopologySpreadConstraint) DeepCopy() *TopologySpreadConstraint { - if in == nil { - return nil - } - out := new(TopologySpreadConstraint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TypedLocalObjectReference) DeepCopyInto(out *TypedLocalObjectReference) { - *out = *in - if in.APIGroup != nil { - in, out := &in.APIGroup, &out.APIGroup - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypedLocalObjectReference. -func (in *TypedLocalObjectReference) DeepCopy() *TypedLocalObjectReference { - if in == nil { - return nil - } - out := new(TypedLocalObjectReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Volume) DeepCopyInto(out *Volume) { - *out = *in - in.VolumeSource.DeepCopyInto(&out.VolumeSource) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Volume. -func (in *Volume) DeepCopy() *Volume { - if in == nil { - return nil - } - out := new(Volume) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VolumeDevice) DeepCopyInto(out *VolumeDevice) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeDevice. -func (in *VolumeDevice) DeepCopy() *VolumeDevice { - if in == nil { - return nil - } - out := new(VolumeDevice) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VolumeMount) DeepCopyInto(out *VolumeMount) { - *out = *in - if in.MountPropagation != nil { - in, out := &in.MountPropagation, &out.MountPropagation - *out = new(MountPropagationMode) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeMount. -func (in *VolumeMount) DeepCopy() *VolumeMount { - if in == nil { - return nil - } - out := new(VolumeMount) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VolumeNodeAffinity) DeepCopyInto(out *VolumeNodeAffinity) { - *out = *in - if in.Required != nil { - in, out := &in.Required, &out.Required - *out = new(NodeSelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeNodeAffinity. -func (in *VolumeNodeAffinity) DeepCopy() *VolumeNodeAffinity { - if in == nil { - return nil - } - out := new(VolumeNodeAffinity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VolumeProjection) DeepCopyInto(out *VolumeProjection) { - *out = *in - if in.Secret != nil { - in, out := &in.Secret, &out.Secret - *out = new(SecretProjection) - (*in).DeepCopyInto(*out) - } - if in.DownwardAPI != nil { - in, out := &in.DownwardAPI, &out.DownwardAPI - *out = new(DownwardAPIProjection) - (*in).DeepCopyInto(*out) - } - if in.ConfigMap != nil { - in, out := &in.ConfigMap, &out.ConfigMap - *out = new(ConfigMapProjection) - (*in).DeepCopyInto(*out) - } - if in.ServiceAccountToken != nil { - in, out := &in.ServiceAccountToken, &out.ServiceAccountToken - *out = new(ServiceAccountTokenProjection) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeProjection. -func (in *VolumeProjection) DeepCopy() *VolumeProjection { - if in == nil { - return nil - } - out := new(VolumeProjection) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VolumeSource) DeepCopyInto(out *VolumeSource) { - *out = *in - if in.HostPath != nil { - in, out := &in.HostPath, &out.HostPath - *out = new(HostPathVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.EmptyDir != nil { - in, out := &in.EmptyDir, &out.EmptyDir - *out = new(EmptyDirVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.GCEPersistentDisk != nil { - in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk - *out = new(GCEPersistentDiskVolumeSource) - **out = **in - } - if in.AWSElasticBlockStore != nil { - in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore - *out = new(AWSElasticBlockStoreVolumeSource) - **out = **in - } - if in.GitRepo != nil { - in, out := &in.GitRepo, &out.GitRepo - *out = new(GitRepoVolumeSource) - **out = **in - } - if in.Secret != nil { - in, out := &in.Secret, &out.Secret - *out = new(SecretVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.NFS != nil { - in, out := &in.NFS, &out.NFS - *out = new(NFSVolumeSource) - **out = **in - } - if in.ISCSI != nil { - in, out := &in.ISCSI, &out.ISCSI - *out = new(ISCSIVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.Glusterfs != nil { - in, out := &in.Glusterfs, &out.Glusterfs - *out = new(GlusterfsVolumeSource) - **out = **in - } - if in.PersistentVolumeClaim != nil { - in, out := &in.PersistentVolumeClaim, &out.PersistentVolumeClaim - *out = new(PersistentVolumeClaimVolumeSource) - **out = **in - } - if in.RBD != nil { - in, out := &in.RBD, &out.RBD - *out = new(RBDVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.FlexVolume != nil { - in, out := &in.FlexVolume, &out.FlexVolume - *out = new(FlexVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.Cinder != nil { - in, out := &in.Cinder, &out.Cinder - *out = new(CinderVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.CephFS != nil { - in, out := &in.CephFS, &out.CephFS - *out = new(CephFSVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.Flocker != nil { - in, out := &in.Flocker, &out.Flocker - *out = new(FlockerVolumeSource) - **out = **in - } - if in.DownwardAPI != nil { - in, out := &in.DownwardAPI, &out.DownwardAPI - *out = new(DownwardAPIVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.FC != nil { - in, out := &in.FC, &out.FC - *out = new(FCVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.AzureFile != nil { - in, out := &in.AzureFile, &out.AzureFile - *out = new(AzureFileVolumeSource) - **out = **in - } - if in.ConfigMap != nil { - in, out := &in.ConfigMap, &out.ConfigMap - *out = new(ConfigMapVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.VsphereVolume != nil { - in, out := &in.VsphereVolume, &out.VsphereVolume - *out = new(VsphereVirtualDiskVolumeSource) - **out = **in - } - if in.Quobyte != nil { - in, out := &in.Quobyte, &out.Quobyte - *out = new(QuobyteVolumeSource) - **out = **in - } - if in.AzureDisk != nil { - in, out := &in.AzureDisk, &out.AzureDisk - *out = new(AzureDiskVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.PhotonPersistentDisk != nil { - in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk - *out = new(PhotonPersistentDiskVolumeSource) - **out = **in - } - if in.Projected != nil { - in, out := &in.Projected, &out.Projected - *out = new(ProjectedVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.PortworxVolume != nil { - in, out := &in.PortworxVolume, &out.PortworxVolume - *out = new(PortworxVolumeSource) - **out = **in - } - if in.ScaleIO != nil { - in, out := &in.ScaleIO, &out.ScaleIO - *out = new(ScaleIOVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.StorageOS != nil { - in, out := &in.StorageOS, &out.StorageOS - *out = new(StorageOSVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.CSI != nil { - in, out := &in.CSI, &out.CSI - *out = new(CSIVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.Ephemeral != nil { - in, out := &in.Ephemeral, &out.Ephemeral - *out = new(EphemeralVolumeSource) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSource. -func (in *VolumeSource) DeepCopy() *VolumeSource { - if in == nil { - return nil - } - out := new(VolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VsphereVirtualDiskVolumeSource) DeepCopyInto(out *VsphereVirtualDiskVolumeSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VsphereVirtualDiskVolumeSource. -func (in *VsphereVirtualDiskVolumeSource) DeepCopy() *VsphereVirtualDiskVolumeSource { - if in == nil { - return nil - } - out := new(VsphereVirtualDiskVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WeightedPodAffinityTerm) DeepCopyInto(out *WeightedPodAffinityTerm) { - *out = *in - in.PodAffinityTerm.DeepCopyInto(&out.PodAffinityTerm) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WeightedPodAffinityTerm. -func (in *WeightedPodAffinityTerm) DeepCopy() *WeightedPodAffinityTerm { - if in == nil { - return nil - } - out := new(WeightedPodAffinityTerm) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WindowsSecurityContextOptions) DeepCopyInto(out *WindowsSecurityContextOptions) { - *out = *in - if in.GMSACredentialSpecName != nil { - in, out := &in.GMSACredentialSpecName, &out.GMSACredentialSpecName - *out = new(string) - **out = **in - } - if in.GMSACredentialSpec != nil { - in, out := &in.GMSACredentialSpec, &out.GMSACredentialSpec - *out = new(string) - **out = **in - } - if in.RunAsUserName != nil { - in, out := &in.RunAsUserName, &out.RunAsUserName - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WindowsSecurityContextOptions. -func (in *WindowsSecurityContextOptions) DeepCopy() *WindowsSecurityContextOptions { - if in == nil { - return nil - } - out := new(WindowsSecurityContextOptions) - in.DeepCopyInto(out) - return out -} diff --git a/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/apis/meta/v1/micro_time.go b/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/apis/meta/v1/micro_time.go deleted file mode 100644 index 8eb37f436..000000000 --- a/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/apis/meta/v1/micro_time.go +++ /dev/null @@ -1,181 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "encoding/json" - "time" -) - -const RFC3339Micro = "2006-01-02T15:04:05.000000Z07:00" - -// MicroTime is version of Time with microsecond level precision. -// -// +protobuf.options.marshal=false -// +protobuf.as=Timestamp -// +protobuf.options.(gogoproto.goproto_stringer)=false -type MicroTime struct { - time.Time `protobuf:"-"` -} - -// DeepCopy returns a deep-copy of the MicroTime value. The underlying time.Time -// type is effectively immutable in the time API, so it is safe to -// copy-by-assign, despite the presence of (unexported) Pointer fields. -func (t *MicroTime) DeepCopyInto(out *MicroTime) { - *out = *t -} - -// NewMicroTime returns a wrapped instance of the provided time -func NewMicroTime(time time.Time) MicroTime { - return MicroTime{time} -} - -// DateMicro returns the MicroTime corresponding to the supplied parameters -// by wrapping time.Date. -func DateMicro(year int, month time.Month, day, hour, min, sec, nsec int, loc *time.Location) MicroTime { - return MicroTime{time.Date(year, month, day, hour, min, sec, nsec, loc)} -} - -// NowMicro returns the current local time. -func NowMicro() MicroTime { - return MicroTime{time.Now()} -} - -// IsZero returns true if the value is nil or time is zero. -func (t *MicroTime) IsZero() bool { - if t == nil { - return true - } - return t.Time.IsZero() -} - -// Before reports whether the time instant t is before u. -func (t *MicroTime) Before(u *MicroTime) bool { - if t != nil && u != nil { - return t.Time.Before(u.Time) - } - return false -} - -// Equal reports whether the time instant t is equal to u. -func (t *MicroTime) Equal(u *MicroTime) bool { - if t == nil && u == nil { - return true - } - if t != nil && u != nil { - return t.Time.Equal(u.Time) - } - return false -} - -// BeforeTime reports whether the time instant t is before second-lever precision u. -func (t *MicroTime) BeforeTime(u *Time) bool { - if t != nil && u != nil { - return t.Time.Before(u.Time) - } - return false -} - -// EqualTime reports whether the time instant t is equal to second-lever precision u. -func (t *MicroTime) EqualTime(u *Time) bool { - if t == nil && u == nil { - return true - } - if t != nil && u != nil { - return t.Time.Equal(u.Time) - } - return false -} - -// UnixMicro returns the local time corresponding to the given Unix time -// by wrapping time.Unix. -func UnixMicro(sec int64, nsec int64) MicroTime { - return MicroTime{time.Unix(sec, nsec)} -} - -// UnmarshalJSON implements the json.Unmarshaller interface. -func (t *MicroTime) UnmarshalJSON(b []byte) error { - if len(b) == 4 && string(b) == "null" { - t.Time = time.Time{} - return nil - } - - var str string - err := json.Unmarshal(b, &str) - if err != nil { - return err - } - - pt, err := time.Parse(RFC3339Micro, str) - if err != nil { - return err - } - - t.Time = pt.Local() - return nil -} - -// UnmarshalQueryParameter converts from a URL query parameter value to an object -func (t *MicroTime) UnmarshalQueryParameter(str string) error { - if len(str) == 0 { - t.Time = time.Time{} - return nil - } - // Tolerate requests from older clients that used JSON serialization to build query params - if len(str) == 4 && str == "null" { - t.Time = time.Time{} - return nil - } - - pt, err := time.Parse(RFC3339Micro, str) - if err != nil { - return err - } - - t.Time = pt.Local() - return nil -} - -// MarshalJSON implements the json.Marshaler interface. -func (t MicroTime) MarshalJSON() ([]byte, error) { - if t.IsZero() { - // Encode unset/nil objects as JSON's "null". - return []byte("null"), nil - } - - return json.Marshal(t.UTC().Format(RFC3339Micro)) -} - -// OpenAPISchemaType is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -// -// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators -func (_ MicroTime) OpenAPISchemaType() []string { return []string{"string"} } - -// OpenAPISchemaFormat is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -func (_ MicroTime) OpenAPISchemaFormat() string { return "date-time" } - -// MarshalQueryParameter converts to a URL query parameter value -func (t MicroTime) MarshalQueryParameter() (string, error) { - if t.IsZero() { - // Encode unset/nil objects as an empty string - return "", nil - } - - return t.UTC().Format(RFC3339Micro), nil -} diff --git a/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/apis/meta/v1/time.go b/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/apis/meta/v1/time.go deleted file mode 100644 index 421770d43..000000000 --- a/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/apis/meta/v1/time.go +++ /dev/null @@ -1,182 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "encoding/json" - "time" -) - -// Time is a wrapper around time.Time which supports correct -// marshaling to YAML and JSON. Wrappers are provided for many -// of the factory methods that the time package offers. -// -// +protobuf.options.marshal=false -// +protobuf.as=Timestamp -// +protobuf.options.(gogoproto.goproto_stringer)=false -type Time struct { - time.Time `protobuf:"-"` -} - -// DeepCopyInto creates a deep-copy of the Time value. The underlying time.Time -// type is effectively immutable in the time API, so it is safe to -// copy-by-assign, despite the presence of (unexported) Pointer fields. -func (t *Time) DeepCopyInto(out *Time) { - *out = *t -} - -// NewTime returns a wrapped instance of the provided time -func NewTime(time time.Time) Time { - return Time{time} -} - -// Date returns the Time corresponding to the supplied parameters -// by wrapping time.Date. -func Date(year int, month time.Month, day, hour, min, sec, nsec int, loc *time.Location) Time { - return Time{time.Date(year, month, day, hour, min, sec, nsec, loc)} -} - -// Now returns the current local time. -func Now() Time { - return Time{time.Now()} -} - -// IsZero returns true if the value is nil or time is zero. -func (t *Time) IsZero() bool { - if t == nil { - return true - } - return t.Time.IsZero() -} - -// Before reports whether the time instant t is before u. -func (t *Time) Before(u *Time) bool { - if t != nil && u != nil { - return t.Time.Before(u.Time) - } - return false -} - -// Equal reports whether the time instant t is equal to u. -func (t *Time) Equal(u *Time) bool { - if t == nil && u == nil { - return true - } - if t != nil && u != nil { - return t.Time.Equal(u.Time) - } - return false -} - -// Unix returns the local time corresponding to the given Unix time -// by wrapping time.Unix. -func Unix(sec int64, nsec int64) Time { - return Time{time.Unix(sec, nsec)} -} - -// Rfc3339Copy returns a copy of the Time at second-level precision. -func (t Time) Rfc3339Copy() Time { - copied, _ := time.Parse(time.RFC3339, t.Format(time.RFC3339)) - return Time{copied} -} - -// UnmarshalJSON implements the json.Unmarshaller interface. -func (t *Time) UnmarshalJSON(b []byte) error { - if len(b) == 4 && string(b) == "null" { - t.Time = time.Time{} - return nil - } - - var str string - err := json.Unmarshal(b, &str) - if err != nil { - return err - } - - pt, err := time.Parse(time.RFC3339, str) - if err != nil { - return err - } - - t.Time = pt.Local() - return nil -} - -// UnmarshalQueryParameter converts from a URL query parameter value to an object -func (t *Time) UnmarshalQueryParameter(str string) error { - if len(str) == 0 { - t.Time = time.Time{} - return nil - } - // Tolerate requests from older clients that used JSON serialization to build query params - if len(str) == 4 && str == "null" { - t.Time = time.Time{} - return nil - } - - pt, err := time.Parse(time.RFC3339, str) - if err != nil { - return err - } - - t.Time = pt.Local() - return nil -} - -// MarshalJSON implements the json.Marshaler interface. -func (t Time) MarshalJSON() ([]byte, error) { - if t.IsZero() { - // Encode unset/nil objects as JSON's "null". - return []byte("null"), nil - } - buf := make([]byte, 0, len(time.RFC3339)+2) - buf = append(buf, '"') - // time cannot contain non escapable JSON characters - buf = t.UTC().AppendFormat(buf, time.RFC3339) - buf = append(buf, '"') - return buf, nil -} - -// ToUnstructured implements the value.UnstructuredConverter interface. -func (t Time) ToUnstructured() interface{} { - if t.IsZero() { - return nil - } - buf := make([]byte, 0, len(time.RFC3339)) - buf = t.UTC().AppendFormat(buf, time.RFC3339) - return string(buf) -} - -// OpenAPISchemaType is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -// -// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators -func (_ Time) OpenAPISchemaType() []string { return []string{"string"} } - -// OpenAPISchemaFormat is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -func (_ Time) OpenAPISchemaFormat() string { return "date-time" } - -// MarshalQueryParameter converts to a URL query parameter value -func (t Time) MarshalQueryParameter() (string, error) { - if t.IsZero() { - // Encode unset/nil objects as an empty string - return "", nil - } - - return t.UTC().Format(time.RFC3339), nil -} diff --git a/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/apis/meta/v1/types.go b/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/apis/meta/v1/types.go deleted file mode 100644 index 222c2460a..000000000 --- a/adaptor/pcm_pod/server/kubernetes/apimachinery/pkg/apis/meta/v1/types.go +++ /dev/null @@ -1,1438 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package v1 contains API types that are common to all versions. -// -// The package contains two categories of types: -// - external (serialized) types that lack their own version (e.g TypeMeta) -// - internal (never-serialized) types that are needed by several different -// api groups, and so live here, to avoid duplication and/or import loops -// (e.g. LabelSelector). -// -// In the future, we will probably move these categories of objects into -// separate packages. -package v1 - -import ( - "fmt" - "strings" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" -) - -// TypeMeta describes an individual object in an API response or request -// with strings representing the type of the object and its API schema version. -// Structures that are versioned or persisted should inline TypeMeta. -// -// +k8s:deepcopy-gen=false -type TypeMeta struct { - // Kind is a string value representing the REST resource this object represents. - // Servers may infer this from the endpoint the client submits requests to. - // Cannot be updated. - // In CamelCase. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` - - // APIVersion defines the versioned schema of this representation of an object. - // Servers should convert recognized schemas to the latest internal value, and - // may reject unrecognized values. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - // +optional - APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=apiVersion"` -} - -// ListMeta describes metadata that synthetic resources must have, including lists and -// various status objects. A resource may have only one of {ObjectMeta, ListMeta}. -type ListMeta struct { - // selfLink is a URL representing this object. - // Populated by the system. - // Read-only. - // - // DEPRECATED - // Kubernetes will stop propagating this field in 1.20 release and the field is planned - // to be removed in 1.21 release. - // +optional - SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,1,opt,name=selfLink"` - - // String that identifies the server's internal version of this object that - // can be used by clients to determine when objects have changed. - // Value must be treated as opaque by clients and passed unmodified back to the server. - // Populated by the system. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - // +optional - ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"` - - // continue may be set if the user set a limit on the number of items returned, and indicates that - // the server has more data available. The value is opaque and may be used to issue another request - // to the endpoint that served this list to retrieve the next set of available objects. Continuing a - // consistent list may not be possible if the server configuration has changed or more than a few - // minutes have passed. The resourceVersion field returned when using this continue value will be - // identical to the value in the first response, unless you have received this token from an error - // message. - Continue string `json:"continue,omitempty" protobuf:"bytes,3,opt,name=continue"` - - // remainingItemCount is the number of subsequent items in the list which are not included in this - // list response. If the list request contained label or field selectors, then the number of - // remaining items is unknown and the field will be left unset and omitted during serialization. - // If the list is complete (either because it is not chunking or because this is the last chunk), - // then there are no more remaining items and this field will be left unset and omitted during - // serialization. - // Servers older than v1.15 do not set this field. - // The intended use of the remainingItemCount is *estimating* the size of a collection. Clients - // should not rely on the remainingItemCount to be set or to be exact. - // +optional - RemainingItemCount *int64 `json:"remainingItemCount,omitempty" protobuf:"bytes,4,opt,name=remainingItemCount"` -} - -// Field path constants that are specific to the internal API -// representation. -const ( - ObjectNameField = "metadata.name" -) - -// These are internal finalizer values for Kubernetes-like APIs, must be qualified name unless defined here -const ( - FinalizerOrphanDependents = "orphan" - FinalizerDeleteDependents = "foregroundDeletion" -) - -// ObjectMeta is metadata that all persisted resources must have, which includes all objects -// users must create. -type ObjectMeta struct { - // Name must be unique within a namespace. Is required when creating resources, although - // some resources may allow a client to request the generation of an appropriate name - // automatically. Name is primarily intended for creation idempotence and configuration - // definition. - // Cannot be updated. - // More info: http://kubernetes.io/docs/user-guide/identifiers#names - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - - // GenerateName is an optional prefix, used by the server, to generate a unique - // name ONLY IF the Name field has not been provided. - // If this field is used, the name returned to the client will be different - // than the name passed. This value will also be combined with a unique suffix. - // The provided value has the same validation rules as the Name field, - // and may be truncated by the length of the suffix required to make the value - // unique on the server. - // - // If this field is specified and the generated name exists, the server will - // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason - // ServerTimeout indicating a unique name could not be found in the time allotted, and the client - // should retry (optionally after the time indicated in the Retry-After header). - // - // Applied only if Name is not specified. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency - // +optional - GenerateName string `json:"generateName,omitempty" protobuf:"bytes,2,opt,name=generateName"` - - // Namespace defines the space within which each name must be unique. An empty namespace is - // equivalent to the "default" namespace, but "default" is the canonical representation. - // Not all objects are required to be scoped to a namespace - the value of this field for - // those objects will be empty. - // - // Must be a DNS_LABEL. - // Cannot be updated. - // More info: http://kubernetes.io/docs/user-guide/namespaces - // +optional - Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` - - // SelfLink is a URL representing this object. - // Populated by the system. - // Read-only. - // - // DEPRECATED - // Kubernetes will stop propagating this field in 1.20 release and the field is planned - // to be removed in 1.21 release. - // +optional - SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,4,opt,name=selfLink"` - - // UID is the unique in time and space value for this object. It is typically generated by - // the server on successful creation of a resource and is not allowed to change on PUT - // operations. - // - // Populated by the system. - // Read-only. - // More info: http://kubernetes.io/docs/user-guide/identifiers#uids - // +optional - UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"` - - // An opaque value that represents the internal version of this object that can - // be used by clients to determine when objects have changed. May be used for optimistic - // concurrency, change detection, and the watch operation on a resource or set of resources. - // Clients must treat these values as opaque and passed unmodified back to the server. - // They may only be valid for a particular resource or set of resources. - // - // Populated by the system. - // Read-only. - // Value must be treated as opaque by clients and . - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - // +optional - ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"` - - // A sequence number representing a specific generation of the desired state. - // Populated by the system. Read-only. - // +optional - Generation int64 `json:"generation,omitempty" protobuf:"varint,7,opt,name=generation"` - - // CreationTimestamp is a timestamp representing the server time when this object was - // created. It is not guaranteed to be set in happens-before order across separate operations. - // Clients may not set this value. It is represented in RFC3339 form and is in UTC. - // - // Populated by the system. - // Read-only. - // Null for lists. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - CreationTimestamp Time `json:"creationTimestamp,omitempty" protobuf:"bytes,8,opt,name=creationTimestamp"` - - // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This - // field is set by the server when a graceful deletion is requested by the user, and is not - // directly settable by a client. The resource is expected to be deleted (no longer visible - // from resource lists, and not reachable by name) after the time in this field, once the - // finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. - // Once the deletionTimestamp is set, this value may not be unset or be set further into the - // future, although it may be shortened or the resource may be deleted prior to this time. - // For example, a user may request that a pcm_pod is deleted in 30 seconds. The Kubelet will react - // by sending a graceful termination signal to the containers in the pcm_pod. After that 30 seconds, - // the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, - // remove the pcm_pod from the API. In the presence of network partitions, this object may still - // exist after this timestamp, until an administrator or automated process can determine the - // resource is fully terminated. - // If not set, graceful deletion of the object has not been requested. - // - // Populated by the system when a graceful deletion is requested. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - DeletionTimestamp *Time `json:"deletionTimestamp,omitempty" protobuf:"bytes,9,opt,name=deletionTimestamp"` - - // Number of seconds allowed for this object to gracefully terminate before - // it will be removed from the system. Only set when deletionTimestamp is also set. - // May only be shortened. - // Read-only. - // +optional - DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty" protobuf:"varint,10,opt,name=deletionGracePeriodSeconds"` - - // Map of string keys and values that can be used to organize and categorize - // (scope and select) objects. May match selectors of replication controllers - // and services. - // More info: http://kubernetes.io/docs/user-guide/labels - // +optional - Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"` - - // Annotations is an unstructured key value map stored with a resource that may be - // set by external tools to store and retrieve arbitrary metadata. They are not - // queryable and should be preserved when modifying objects. - // More info: http://kubernetes.io/docs/user-guide/annotations - // +optional - Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"` - - // List of objects depended by this object. If ALL objects in the list have - // been deleted, this object will be garbage collected. If this object is managed by a controller, - // then an entry in this list will point to this controller, with the controller field set to true. - // There cannot be more than one managing controller. - // +optional - // +patchMergeKey=uid - // +patchStrategy=merge - OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"` - - // Must be empty before the object is deleted from the registry. Each entry - // is an identifier for the responsible component that will remove the entry - // from the list. If the deletionTimestamp of the object is non-nil, entries - // in this list can only be removed. - // Finalizers may be processed and removed in any order. Order is NOT enforced - // because it introduces significant risk of stuck finalizers. - // finalizers is a shared field, any actor with permission can reorder it. - // If the finalizer list is processed in order, then this can lead to a situation - // in which the component responsible for the first finalizer in the list is - // waiting for a signal (field value, external system, or other) produced by a - // component responsible for a finalizer later in the list, resulting in a deadlock. - // Without enforced ordering finalizers are free to order amongst themselves and - // are not vulnerable to ordering changes in the list. - // +optional - // +patchStrategy=merge - Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"` - - // The name of the cluster which the object belongs to. - // This is used to distinguish resources with same name and namespace in different clusters. - // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. - // +optional - ClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"` - - // ManagedFields maps workflow-id and version to the set of fields - // that are managed by that workflow. This is mostly for internal - // housekeeping, and users typically shouldn't need to set or - // understand this field. A workflow can be the user's name, a - // controller's name, or the name of a specific apply path like - // "ci-cd". The set of fields is always in the version that the - // workflow used when modifying the object. - // - // +optional - ManagedFields []ManagedFieldsEntry `json:"managedFields,omitempty" protobuf:"bytes,17,rep,name=managedFields"` -} - -const ( - // NamespaceDefault means the object is in the default namespace which is applied when not specified by clients - NamespaceDefault = "default" - // NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces - NamespaceAll = "" - // NamespaceNone is the argument for a context when there is no namespace. - NamespaceNone = "" - // NamespaceSystem is the system namespace where we place system components. - NamespaceSystem = "kube-system" - // NamespacePublic is the namespace where we place public info (ConfigMaps) - NamespacePublic = "kube-public" -) - -// OwnerReference contains enough information to let you identify an owning -// object. An owning object must be in the same namespace as the dependent, or -// be cluster-scoped, so there is no namespace field. -type OwnerReference struct { - // API version of the referent. - APIVersion string `json:"apiVersion" protobuf:"bytes,5,opt,name=apiVersion"` - // Kind of the referent. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` - // Name of the referent. - // More info: http://kubernetes.io/docs/user-guide/identifiers#names - Name string `json:"name" protobuf:"bytes,3,opt,name=name"` - // UID of the referent. - // More info: http://kubernetes.io/docs/user-guide/identifiers#uids - UID types.UID `json:"uid" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` - // If true, this reference points to the managing controller. - // +optional - Controller *bool `json:"controller,omitempty" protobuf:"varint,6,opt,name=controller"` - // If true, AND if the owner has the "foregroundDeletion" finalizer, then - // the owner cannot be deleted from the key-value store until this - // reference is removed. - // Defaults to false. - // To set this field, a user needs "delete" permission of the owner, - // otherwise 422 (Unprocessable Entity) will be returned. - // +optional - BlockOwnerDeletion *bool `json:"blockOwnerDeletion,omitempty" protobuf:"varint,7,opt,name=blockOwnerDeletion"` -} - -// +k8s:conversion-gen:explicit-from=net/url.Values -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ListOptions is the query options to a standard REST list call. -type ListOptions struct { - TypeMeta `json:",inline"` - - // A selector to restrict the list of returned objects by their labels. - // Defaults to everything. - // +optional - LabelSelector string `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"` - // A selector to restrict the list of returned objects by their fields. - // Defaults to everything. - // +optional - FieldSelector string `json:"fieldSelector,omitempty" protobuf:"bytes,2,opt,name=fieldSelector"` - - // +k8s:deprecated=includeUninitialized,protobuf=6 - - // Watch for changes to the described resources and return them as a stream of - // add, update, and remove notifications. Specify resourceVersion. - // +optional - Watch bool `json:"watch,omitempty" protobuf:"varint,3,opt,name=watch"` - // allowWatchBookmarks requests watch events with type "BOOKMARK". - // Servers that do not implement bookmarks may ignore this flag and - // bookmarks are sent at the server's discretion. Clients should not - // assume bookmarks are returned at any specific interval, nor may they - // assume the server will send any BOOKMARK event during a session. - // If this is not a watch, this field is ignored. - // If the feature gate WatchBookmarks is not enabled in apiserver, - // this field is ignored. - // +optional - AllowWatchBookmarks bool `json:"allowWatchBookmarks,omitempty" protobuf:"varint,9,opt,name=allowWatchBookmarks"` - - // resourceVersion sets a constraint on what resource versions a request may be served from. - // See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for - // details. - // - // Defaults to unset - // +optional - ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"` - - // resourceVersionMatch determines how resourceVersion is applied to list calls. - // It is highly recommended that resourceVersionMatch be set for list calls where - // resourceVersion is set - // See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for - // details. - // - // Defaults to unset - // +optional - ResourceVersionMatch ResourceVersionMatch `json:"resourceVersionMatch,omitempty" protobuf:"bytes,10,opt,name=resourceVersionMatch,casttype=ResourceVersionMatch"` - // Timeout for the list/watch call. - // This limits the duration of the call, regardless of any activity or inactivity. - // +optional - TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,5,opt,name=timeoutSeconds"` - - // limit is a maximum number of responses to return for a list call. If more items exist, the - // server will set the `continue` field on the list metadata to a value that can be used with the - // same initial query to retrieve the next set of results. Setting a limit may return fewer than - // the requested amount of items (up to zero items) in the event all requested objects are - // filtered out and clients should only use the presence of the continue field to determine whether - // more results are available. Servers may choose not to support the limit argument and will return - // all of the available results. If limit is specified and the continue field is empty, clients may - // assume that no more results are available. This field is not supported if watch is true. - // - // The server guarantees that the objects returned when using continue will be identical to issuing - // a single list call without a limit - that is, no objects created, modified, or deleted after the - // first request is issued will be included in any subsequent continued requests. This is sometimes - // referred to as a consistent snapshot, and ensures that a client that is using limit to receive - // smaller chunks of a very large result can ensure they see all possible objects. If objects are - // updated during a chunked list the version of the object that was present at the time the first list - // result was calculated is returned. - Limit int64 `json:"limit,omitempty" protobuf:"varint,7,opt,name=limit"` - // The continue option should be set when retrieving more results from the server. Since this value is - // server defined, clients may only use the continue value from a previous query result with identical - // query parameters (except for the value of continue) and the server may reject a continue value it - // does not recognize. If the specified continue value is no longer valid whether due to expiration - // (generally five to fifteen minutes) or a configuration change on the server, the server will - // respond with a 410 ResourceExpired error together with a continue token. If the client needs a - // consistent list, it must restart their list without the continue field. Otherwise, the client may - // send another list request with the token received with the 410 error, the server will respond with - // a list starting from the next key, but from the latest snapshot, which is inconsistent from the - // previous list results - objects that are created, modified, or deleted after the first list request - // will be included in the response, as long as their keys are after the "next key". - // - // This field is not supported when watch is true. Clients may start a watch from the last - // resourceVersion value returned by the server and not miss any modifications. - Continue string `json:"continue,omitempty" protobuf:"bytes,8,opt,name=continue"` -} - -// resourceVersionMatch specifies how the resourceVersion parameter is applied. resourceVersionMatch -// may only be set if resourceVersion is also set. -// -// "NotOlderThan" matches data at least as new as the provided resourceVersion. -// "Exact" matches data at the exact resourceVersion provided. -// -// See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for -// details. -type ResourceVersionMatch string - -const ( - // ResourceVersionMatchNotOlderThan matches data at least as new as the provided - // resourceVersion. - ResourceVersionMatchNotOlderThan ResourceVersionMatch = "NotOlderThan" - // ResourceVersionMatchExact matches data at the exact resourceVersion - // provided. - ResourceVersionMatchExact ResourceVersionMatch = "Exact" -) - -// +k8s:conversion-gen:explicit-from=net/url.Values -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// GetOptions is the standard query options to the standard REST get call. -type GetOptions struct { - TypeMeta `json:",inline"` - // resourceVersion sets a constraint on what resource versions a request may be served from. - // See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for - // details. - // - // Defaults to unset - // +optional - ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,1,opt,name=resourceVersion"` - // +k8s:deprecated=includeUninitialized,protobuf=2 -} - -// DeletionPropagation decides if a deletion will propagate to the dependents of -// the object, and how the garbage collector will handle the propagation. -type DeletionPropagation string - -const ( - // Orphans the dependents. - DeletePropagationOrphan DeletionPropagation = "Orphan" - // Deletes the object from the key-value store, the garbage collector will - // delete the dependents in the background. - DeletePropagationBackground DeletionPropagation = "Background" - // The object exists in the key-value store until the garbage collector - // deletes all the dependents whose ownerReference.blockOwnerDeletion=true - // from the key-value store. API sever will put the "foregroundDeletion" - // finalizer on the object, and sets its deletionTimestamp. This policy is - // cascading, i.e., the dependents will be deleted with Foreground. - DeletePropagationForeground DeletionPropagation = "Foreground" -) - -const ( - // DryRunAll means to complete all processing stages, but don't - // persist changes to storage. - DryRunAll = "All" -) - -// +k8s:conversion-gen:explicit-from=net/url.Values -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// DeleteOptions may be provided when deleting an API object. -type DeleteOptions struct { - TypeMeta `json:",inline"` - - // The duration in seconds before the object should be deleted. Value must be non-negative integer. - // The value zero indicates delete immediately. If this value is nil, the default grace period for the - // specified type will be used. - // Defaults to a per object value if not specified. zero means delete immediately. - // +optional - GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty" protobuf:"varint,1,opt,name=gracePeriodSeconds"` - - // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be - // returned. - // +k8s:conversion-gen=false - // +optional - Preconditions *Preconditions `json:"preconditions,omitempty" protobuf:"bytes,2,opt,name=preconditions"` - - // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. - // Should the dependent objects be orphaned. If true/false, the "orphan" - // finalizer will be added to/removed from the object's finalizers list. - // Either this field or PropagationPolicy may be set, but not both. - // +optional - OrphanDependents *bool `json:"orphanDependents,omitempty" protobuf:"varint,3,opt,name=orphanDependents"` - - // Whether and how garbage collection will be performed. - // Either this field or OrphanDependents may be set, but not both. - // The default policy is decided by the existing finalizer set in the - // metadata.finalizers and the resource-specific default policy. - // Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - - // allow the garbage collector to delete the dependents in the background; - // 'Foreground' - a cascading policy that deletes all dependents in the - // foreground. - // +optional - PropagationPolicy *DeletionPropagation `json:"propagationPolicy,omitempty" protobuf:"varint,4,opt,name=propagationPolicy"` - - // When present, indicates that modifications should not be - // persisted. An invalid or unrecognized dryRun directive will - // result in an error response and no further processing of the - // request. Valid values are: - // - All: all dry run stages will be processed - // +optional - DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,5,rep,name=dryRun"` -} - -// +k8s:conversion-gen:explicit-from=net/url.Values -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CreateOptions may be provided when creating an API object. -type CreateOptions struct { - TypeMeta `json:",inline"` - - // When present, indicates that modifications should not be - // persisted. An invalid or unrecognized dryRun directive will - // result in an error response and no further processing of the - // request. Valid values are: - // - All: all dry run stages will be processed - // +optional - DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` - // +k8s:deprecated=includeUninitialized,protobuf=2 - - // fieldManager is a name associated with the actor or entity - // that is making these changes. The value must be less than or - // 128 characters long, and only contain printable characters, - // as defined by https://golang.org/pkg/unicode/#IsPrint. - // +optional - FieldManager string `json:"fieldManager,omitempty" protobuf:"bytes,3,name=fieldManager"` -} - -// +k8s:conversion-gen:explicit-from=net/url.Values -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// PatchOptions may be provided when patching an API object. -// PatchOptions is meant to be a superset of UpdateOptions. -type PatchOptions struct { - TypeMeta `json:",inline"` - - // When present, indicates that modifications should not be - // persisted. An invalid or unrecognized dryRun directive will - // result in an error response and no further processing of the - // request. Valid values are: - // - All: all dry run stages will be processed - // +optional - DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` - - // Force is going to "force" Apply requests. It means user will - // re-acquire conflicting fields owned by other people. Force - // flag must be unset for non-apply patch requests. - // +optional - Force *bool `json:"force,omitempty" protobuf:"varint,2,opt,name=force"` - - // fieldManager is a name associated with the actor or entity - // that is making these changes. The value must be less than or - // 128 characters long, and only contain printable characters, - // as defined by https://golang.org/pkg/unicode/#IsPrint. This - // field is required for apply requests - // (application/apply-patch) but optional for non-apply patch - // types (JsonPatch, MergePatch, StrategicMergePatch). - // +optional - FieldManager string `json:"fieldManager,omitempty" protobuf:"bytes,3,name=fieldManager"` -} - -// ApplyOptions may be provided when applying an API object. -// FieldManager is required for apply requests. -// ApplyOptions is equivalent to PatchOptions. It is provided as a convenience with documentation -// that speaks specifically to how the options fields relate to apply. -type ApplyOptions struct { - TypeMeta `json:",inline"` - - // When present, indicates that modifications should not be - // persisted. An invalid or unrecognized dryRun directive will - // result in an error response and no further processing of the - // request. Valid values are: - // - All: all dry run stages will be processed - // +optional - DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` - - // Force is going to "force" Apply requests. It means user will - // re-acquire conflicting fields owned by other people. - Force bool `json:"force" protobuf:"varint,2,opt,name=force"` - - // fieldManager is a name associated with the actor or entity - // that is making these changes. The value must be less than or - // 128 characters long, and only contain printable characters, - // as defined by https://golang.org/pkg/unicode/#IsPrint. This - // field is required. - FieldManager string `json:"fieldManager" protobuf:"bytes,3,name=fieldManager"` -} - -func (o ApplyOptions) ToPatchOptions() PatchOptions { - return PatchOptions{DryRun: o.DryRun, Force: &o.Force, FieldManager: o.FieldManager} -} - -// +k8s:conversion-gen:explicit-from=net/url.Values -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// UpdateOptions may be provided when updating an API object. -// All fields in UpdateOptions should also be present in PatchOptions. -type UpdateOptions struct { - TypeMeta `json:",inline"` - - // When present, indicates that modifications should not be - // persisted. An invalid or unrecognized dryRun directive will - // result in an error response and no further processing of the - // request. Valid values are: - // - All: all dry run stages will be processed - // +optional - DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` - - // fieldManager is a name associated with the actor or entity - // that is making these changes. The value must be less than or - // 128 characters long, and only contain printable characters, - // as defined by https://golang.org/pkg/unicode/#IsPrint. - // +optional - FieldManager string `json:"fieldManager,omitempty" protobuf:"bytes,2,name=fieldManager"` -} - -// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. -type Preconditions struct { - // Specifies the target UID. - // +optional - UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` - // Specifies the target ResourceVersion - // +optional - ResourceVersion *string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Status is a return value for calls that don't return other objects. -type Status struct { - TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Status of the operation. - // One of: "Success" or "Failure". - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Status string `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` - // A human-readable description of the status of this operation. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` - // A machine-readable description of why this operation is in the - // "Failure" status. If this value is empty there - // is no information available. A Reason clarifies an HTTP status - // code but does not override it. - // +optional - Reason StatusReason `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason,casttype=StatusReason"` - // Extended data associated with the reason. Each reason may define its - // own extended details. This field is optional and the data returned - // is not guaranteed to conform to any schema except that defined by - // the reason type. - // +optional - Details *StatusDetails `json:"details,omitempty" protobuf:"bytes,5,opt,name=details"` - // Suggested HTTP return code for this status, 0 if not set. - // +optional - Code int32 `json:"code,omitempty" protobuf:"varint,6,opt,name=code"` -} - -// StatusDetails is a set of additional properties that MAY be set by the -// server to provide additional information about a response. The Reason -// field of a Status object defines what attributes will be set. Clients -// must ignore fields that do not match the defined type of each attribute, -// and should assume that any attribute may be empty, invalid, or under -// defined. -type StatusDetails struct { - // The name attribute of the resource associated with the status StatusReason - // (when there is a single name which can be described). - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - // The group attribute of the resource associated with the status StatusReason. - // +optional - Group string `json:"group,omitempty" protobuf:"bytes,2,opt,name=group"` - // The kind attribute of the resource associated with the status StatusReason. - // On some operations may differ from the requested resource Kind. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - Kind string `json:"kind,omitempty" protobuf:"bytes,3,opt,name=kind"` - // UID of the resource. - // (when there is a single resource which can be described). - // More info: http://kubernetes.io/docs/user-guide/identifiers#uids - // +optional - UID types.UID `json:"uid,omitempty" protobuf:"bytes,6,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` - // The Causes array includes more details associated with the StatusReason - // failure. Not all StatusReasons may provide detailed causes. - // +optional - Causes []StatusCause `json:"causes,omitempty" protobuf:"bytes,4,rep,name=causes"` - // If specified, the time in seconds before the operation should be retried. Some errors may indicate - // the client must take an alternate action - for those errors this field may indicate how long to wait - // before taking the alternate action. - // +optional - RetryAfterSeconds int32 `json:"retryAfterSeconds,omitempty" protobuf:"varint,5,opt,name=retryAfterSeconds"` -} - -// Values of Status.Status -const ( - StatusSuccess = "Success" - StatusFailure = "Failure" -) - -// StatusReason is an enumeration of possible failure causes. Each StatusReason -// must map to a single HTTP status code, but multiple reasons may map -// to the same HTTP status code. -// TODO: move to apiserver -type StatusReason string - -const ( - // StatusReasonUnknown means the server has declined to indicate a specific reason. - // The details field may contain other information about this error. - // Status code 500. - StatusReasonUnknown StatusReason = "" - - // StatusReasonUnauthorized means the server can be reached and understood the request, but requires - // the user to present appropriate authorization credentials (identified by the WWW-Authenticate header) - // in order for the action to be completed. If the user has specified credentials on the request, the - // server considers them insufficient. - // Status code 401 - StatusReasonUnauthorized StatusReason = "Unauthorized" - - // StatusReasonForbidden means the server can be reached and understood the request, but refuses - // to take any further action. It is the result of the server being configured to deny access for some reason - // to the requested resource by the client. - // Details (optional): - // "kind" string - the kind attribute of the forbidden resource - // on some operations may differ from the requested - // resource. - // "id" string - the identifier of the forbidden resource - // Status code 403 - StatusReasonForbidden StatusReason = "Forbidden" - - // StatusReasonNotFound means one or more resources required for this operation - // could not be found. - // Details (optional): - // "kind" string - the kind attribute of the missing resource - // on some operations may differ from the requested - // resource. - // "id" string - the identifier of the missing resource - // Status code 404 - StatusReasonNotFound StatusReason = "NotFound" - - // StatusReasonAlreadyExists means the resource you are creating already exists. - // Details (optional): - // "kind" string - the kind attribute of the conflicting resource - // "id" string - the identifier of the conflicting resource - // Status code 409 - StatusReasonAlreadyExists StatusReason = "AlreadyExists" - - // StatusReasonConflict means the requested operation cannot be completed - // due to a conflict in the operation. The client may need to alter the - // request. Each resource may define custom details that indicate the - // nature of the conflict. - // Status code 409 - StatusReasonConflict StatusReason = "Conflict" - - // StatusReasonGone means the item is no longer available at the server and no - // forwarding address is known. - // Status code 410 - StatusReasonGone StatusReason = "Gone" - - // StatusReasonInvalid means the requested create or update operation cannot be - // completed due to invalid data provided as part of the request. The client may - // need to alter the request. When set, the client may use the StatusDetails - // message field as a summary of the issues encountered. - // Details (optional): - // "kind" string - the kind attribute of the invalid resource - // "id" string - the identifier of the invalid resource - // "causes" - one or more StatusCause entries indicating the data in the - // provided resource that was invalid. The code, message, and - // field attributes will be set. - // Status code 422 - StatusReasonInvalid StatusReason = "Invalid" - - // StatusReasonServerTimeout means the server can be reached and understood the request, - // but cannot complete the action in a reasonable time. The client should retry the request. - // This is may be due to temporary server load or a transient communication issue with - // another server. Status code 500 is used because the HTTP spec provides no suitable - // server-requested client retry and the 5xx class represents actionable errors. - // Details (optional): - // "kind" string - the kind attribute of the resource being acted on. - // "id" string - the operation that is being attempted. - // "retryAfterSeconds" int32 - the number of seconds before the operation should be retried - // Status code 500 - StatusReasonServerTimeout StatusReason = "ServerTimeout" - - // StatusReasonTimeout means that the request could not be completed within the given time. - // Clients can get this response only when they specified a timeout param in the request, - // or if the server cannot complete the operation within a reasonable amount of time. - // The request might succeed with an increased value of timeout param. The client *should* - // wait at least the number of seconds specified by the retryAfterSeconds field. - // Details (optional): - // "retryAfterSeconds" int32 - the number of seconds before the operation should be retried - // Status code 504 - StatusReasonTimeout StatusReason = "Timeout" - - // StatusReasonTooManyRequests means the server experienced too many requests within a - // given window and that the client must wait to perform the action again. A client may - // always retry the request that led to this error, although the client should wait at least - // the number of seconds specified by the retryAfterSeconds field. - // Details (optional): - // "retryAfterSeconds" int32 - the number of seconds before the operation should be retried - // Status code 429 - StatusReasonTooManyRequests StatusReason = "TooManyRequests" - - // StatusReasonBadRequest means that the request itself was invalid, because the request - // doesn't make any sense, for example deleting a read-only object. This is different than - // StatusReasonInvalid above which indicates that the API call could possibly succeed, but the - // data was invalid. API calls that return BadRequest can never succeed. - // Status code 400 - StatusReasonBadRequest StatusReason = "BadRequest" - - // StatusReasonMethodNotAllowed means that the action the client attempted to perform on the - // resource was not supported by the code - for instance, attempting to delete a resource that - // can only be created. API calls that return MethodNotAllowed can never succeed. - // Status code 405 - StatusReasonMethodNotAllowed StatusReason = "MethodNotAllowed" - - // StatusReasonNotAcceptable means that the accept types indicated by the client were not acceptable - // to the server - for instance, attempting to receive protobuf for a resource that supports only json and yaml. - // API calls that return NotAcceptable can never succeed. - // Status code 406 - StatusReasonNotAcceptable StatusReason = "NotAcceptable" - - // StatusReasonRequestEntityTooLarge means that the request entity is too large. - // Status code 413 - StatusReasonRequestEntityTooLarge StatusReason = "RequestEntityTooLarge" - - // StatusReasonUnsupportedMediaType means that the content type sent by the client is not acceptable - // to the server - for instance, attempting to send protobuf for a resource that supports only json and yaml. - // API calls that return UnsupportedMediaType can never succeed. - // Status code 415 - StatusReasonUnsupportedMediaType StatusReason = "UnsupportedMediaType" - - // StatusReasonInternalError indicates that an internal error occurred, it is unexpected - // and the outcome of the call is unknown. - // Details (optional): - // "causes" - The original error - // Status code 500 - StatusReasonInternalError StatusReason = "InternalError" - - // StatusReasonExpired indicates that the request is invalid because the content you are requesting - // has expired and is no longer available. It is typically associated with watches that can't be - // serviced. - // Status code 410 (gone) - StatusReasonExpired StatusReason = "Expired" - - // StatusReasonServiceUnavailable means that the request itself was valid, - // but the requested service is unavailable at this time. - // Retrying the request after some time might succeed. - // Status code 503 - StatusReasonServiceUnavailable StatusReason = "ServiceUnavailable" -) - -// StatusCause provides more information about an api.Status failure, including -// cases when multiple errors are encountered. -type StatusCause struct { - // A machine-readable description of the cause of the error. If this value is - // empty there is no information available. - // +optional - Type CauseType `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason,casttype=CauseType"` - // A human-readable description of the cause of the error. This field may be - // presented as-is to a reader. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` - // The field of the resource that has caused this error, as named by its JSON - // serialization. May include dot and postfix notation for nested attributes. - // Arrays are zero-indexed. Fields may appear more than once in an array of - // causes due to fields having multiple errors. - // Optional. - // - // Examples: - // "name" - the field "name" on the current resource - // "items[0].name" - the field "name" on the first array entry in "items" - // +optional - Field string `json:"field,omitempty" protobuf:"bytes,3,opt,name=field"` -} - -// CauseType is a machine readable value providing more detail about what -// occurred in a status response. An operation may have multiple causes for a -// status (whether Failure or Success). -type CauseType string - -const ( - // CauseTypeFieldValueNotFound is used to report failure to find a requested value - // (e.g. looking up an ID). - CauseTypeFieldValueNotFound CauseType = "FieldValueNotFound" - // CauseTypeFieldValueRequired is used to report required values that are not - // provided (e.g. empty strings, null values, or empty arrays). - CauseTypeFieldValueRequired CauseType = "FieldValueRequired" - // CauseTypeFieldValueDuplicate is used to report collisions of values that must be - // unique (e.g. unique IDs). - CauseTypeFieldValueDuplicate CauseType = "FieldValueDuplicate" - // CauseTypeFieldValueInvalid is used to report malformed values (e.g. failed regex - // match). - CauseTypeFieldValueInvalid CauseType = "FieldValueInvalid" - // CauseTypeFieldValueNotSupported is used to report valid (as per formatting rules) - // values that can not be handled (e.g. an enumerated string). - CauseTypeFieldValueNotSupported CauseType = "FieldValueNotSupported" - // CauseTypeUnexpectedServerResponse is used to report when the server responded to the client - // without the expected return type. The presence of this cause indicates the error may be - // due to an intervening proxy or the server software malfunctioning. - CauseTypeUnexpectedServerResponse CauseType = "UnexpectedServerResponse" - // FieldManagerConflict is used to report when another client claims to manage this field, - // It should only be returned for a request using server-side apply. - CauseTypeFieldManagerConflict CauseType = "FieldManagerConflict" - // CauseTypeResourceVersionTooLarge is used to report that the requested resource version - // is newer than the data observed by the API server, so the request cannot be served. - CauseTypeResourceVersionTooLarge CauseType = "ResourceVersionTooLarge" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// List holds a list of objects, which may not be known by the server. -type List struct { - TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of objects - Items []runtime.RawExtension `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// APIVersions lists the versions that are available, to allow clients to -// discover the API at /api, which is the root path of the legacy v1 API. -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type APIVersions struct { - TypeMeta `json:",inline"` - // versions are the api versions that are available. - Versions []string `json:"versions" protobuf:"bytes,1,rep,name=versions"` - // a map of client CIDR to server address that is serving this group. - // This is to help clients reach servers in the most network-efficient way possible. - // Clients can use the appropriate server address as per the CIDR that they match. - // In case of multiple matches, clients should use the longest matching CIDR. - // The server returns only those CIDRs that it thinks that the client can match. - // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. - // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" protobuf:"bytes,2,rep,name=serverAddressByClientCIDRs"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// APIGroupList is a list of APIGroup, to allow clients to discover the API at -// /apis. -type APIGroupList struct { - TypeMeta `json:",inline"` - // groups is a list of APIGroup. - Groups []APIGroup `json:"groups" protobuf:"bytes,1,rep,name=groups"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// APIGroup contains the name, the supported versions, and the preferred version -// of a group. -type APIGroup struct { - TypeMeta `json:",inline"` - // name is the name of the group. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // versions are the versions supported in this group. - Versions []GroupVersionForDiscovery `json:"versions" protobuf:"bytes,2,rep,name=versions"` - // preferredVersion is the version preferred by the API server, which - // probably is the storage version. - // +optional - PreferredVersion GroupVersionForDiscovery `json:"preferredVersion,omitempty" protobuf:"bytes,3,opt,name=preferredVersion"` - // a map of client CIDR to server address that is serving this group. - // This is to help clients reach servers in the most network-efficient way possible. - // Clients can use the appropriate server address as per the CIDR that they match. - // In case of multiple matches, clients should use the longest matching CIDR. - // The server returns only those CIDRs that it thinks that the client can match. - // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. - // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - // +optional - ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs,omitempty" protobuf:"bytes,4,rep,name=serverAddressByClientCIDRs"` -} - -// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. -type ServerAddressByClientCIDR struct { - // The CIDR with which clients can match their IP to figure out the server address that they should use. - ClientCIDR string `json:"clientCIDR" protobuf:"bytes,1,opt,name=clientCIDR"` - // Address of this server, suitable for a client that matches the above CIDR. - // This can be a hostname, hostname:port, IP or IP:port. - ServerAddress string `json:"serverAddress" protobuf:"bytes,2,opt,name=serverAddress"` -} - -// GroupVersion contains the "group/version" and "version" string of a version. -// It is made a struct to keep extensibility. -type GroupVersionForDiscovery struct { - // groupVersion specifies the API group and version in the form "group/version" - GroupVersion string `json:"groupVersion" protobuf:"bytes,1,opt,name=groupVersion"` - // version specifies the version in the form of "version". This is to save - // the clients the trouble of splitting the GroupVersion. - Version string `json:"version" protobuf:"bytes,2,opt,name=version"` -} - -// APIResource specifies the name of a resource and whether it is namespaced. -type APIResource struct { - // name is the plural name of the resource. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. - // The singularName is more correct for reporting status on a single item and both singular and plural are allowed - // from the kubectl CLI interface. - SingularName string `json:"singularName" protobuf:"bytes,6,opt,name=singularName"` - // namespaced indicates if a resource is namespaced or not. - Namespaced bool `json:"namespaced" protobuf:"varint,2,opt,name=namespaced"` - // group is the preferred group of the resource. Empty implies the group of the containing resource list. - // For subresources, this may have a different value, for example: Scale". - Group string `json:"group,omitempty" protobuf:"bytes,8,opt,name=group"` - // version is the preferred version of the resource. Empty implies the version of the containing resource list - // For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)". - Version string `json:"version,omitempty" protobuf:"bytes,9,opt,name=version"` - // kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo') - Kind string `json:"kind" protobuf:"bytes,3,opt,name=kind"` - // verbs is a list of supported kube verbs (this includes get, list, watch, create, - // update, patch, delete, deletecollection, and proxy) - Verbs Verbs `json:"verbs" protobuf:"bytes,4,opt,name=verbs"` - // shortNames is a list of suggested short names of the resource. - ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,5,rep,name=shortNames"` - // categories is a list of the grouped resources this resource belongs to (e.g. 'all') - Categories []string `json:"categories,omitempty" protobuf:"bytes,7,rep,name=categories"` - // The hash value of the storage version, the version this resource is - // converted to when written to the data store. Value must be treated - // as opaque by clients. Only equality comparison on the value is valid. - // This is an alpha feature and may change or be removed in the future. - // The field is populated by the apiserver only if the - // StorageVersionHash feature gate is enabled. - // This field will remain optional even if it graduates. - // +optional - StorageVersionHash string `json:"storageVersionHash,omitempty" protobuf:"bytes,10,opt,name=storageVersionHash"` -} - -// Verbs masks the value so protobuf can generate -// -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -type Verbs []string - -func (vs Verbs) String() string { - return fmt.Sprintf("%v", []string(vs)) -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// APIResourceList is a list of APIResource, it is used to expose the name of the -// resources supported in a specific group and version, and if the resource -// is namespaced. -type APIResourceList struct { - TypeMeta `json:",inline"` - // groupVersion is the group and version this APIResourceList is for. - GroupVersion string `json:"groupVersion" protobuf:"bytes,1,opt,name=groupVersion"` - // resources contains the name of the resources and if they are namespaced. - APIResources []APIResource `json:"resources" protobuf:"bytes,2,rep,name=resources"` -} - -// RootPaths lists the paths available at root. -// For example: "/healthz", "/apis". -type RootPaths struct { - // paths are the paths available at root. - Paths []string `json:"paths" protobuf:"bytes,1,rep,name=paths"` -} - -// TODO: remove me when watch is refactored -func LabelSelectorQueryParam(version string) string { - return "labelSelector" -} - -// TODO: remove me when watch is refactored -func FieldSelectorQueryParam(version string) string { - return "fieldSelector" -} - -// String returns available api versions as a human-friendly version string. -func (apiVersions APIVersions) String() string { - return strings.Join(apiVersions.Versions, ",") -} - -func (apiVersions APIVersions) GoString() string { - return apiVersions.String() -} - -// Patch is provided to give a concrete name and type to the Kubernetes PATCH request body. -type Patch struct{} - -// Note: -// There are two different styles of label selectors used in versioned types: -// an older style which is represented as just a string in versioned types, and a -// newer style that is structured. LabelSelector is an internal representation for the -// latter style. - -// A label selector is a label query over a set of resources. The result of matchLabels and -// matchExpressions are ANDed. An empty label selector matches all objects. A null -// label selector matches no objects. -// +structType=atomic -type LabelSelector struct { - // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - // map is equivalent to an element of matchExpressions, whose key field is "key", the - // operator is "In", and the values array contains only "value". The requirements are ANDed. - // +optional - MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"` - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - // +optional - MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"` -} - -// A label selector requirement is a selector that contains values, a key, and an operator that -// relates the key and values. -type LabelSelectorRequirement struct { - // key is the label key that the selector applies to. - // +patchMergeKey=key - // +patchStrategy=merge - Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"` - // operator represents a key's relationship to a set of values. - // Valid operators are In, NotIn, Exists and DoesNotExist. - Operator LabelSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=LabelSelectorOperator"` - // values is an array of string values. If the operator is In or NotIn, - // the values array must be non-empty. If the operator is Exists or DoesNotExist, - // the values array must be empty. This array is replaced during a strategic - // merge patch. - // +optional - Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` -} - -// A label selector operator is the set of operators that can be used in a selector requirement. -type LabelSelectorOperator string - -const ( - LabelSelectorOpIn LabelSelectorOperator = "In" - LabelSelectorOpNotIn LabelSelectorOperator = "NotIn" - LabelSelectorOpExists LabelSelectorOperator = "Exists" - LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist" -) - -// ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource -// that the fieldset applies to. -type ManagedFieldsEntry struct { - // Manager is an identifier of the workflow managing these fields. - Manager string `json:"manager,omitempty" protobuf:"bytes,1,opt,name=manager"` - // Operation is the type of operation which lead to this ManagedFieldsEntry being created. - // The only valid values for this field are 'Apply' and 'Update'. - Operation ManagedFieldsOperationType `json:"operation,omitempty" protobuf:"bytes,2,opt,name=operation,casttype=ManagedFieldsOperationType"` - // APIVersion defines the version of this resource that this field set - // applies to. The format is "group/version" just like the top-level - // APIVersion field. It is necessary to track the version of a field - // set because it cannot be automatically converted. - APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"` - // Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply' - // +optional - Time *Time `json:"time,omitempty" protobuf:"bytes,4,opt,name=time"` - - // Fields is tombstoned to show why 5 is a reserved protobuf tag. - //Fields *Fields `json:"fields,omitempty" protobuf:"bytes,5,opt,name=fields,casttype=Fields"` - - // FieldsType is the discriminator for the different fields format and version. - // There is currently only one possible value: "FieldsV1" - FieldsType string `json:"fieldsType,omitempty" protobuf:"bytes,6,opt,name=fieldsType"` - // FieldsV1 holds the first JSON version format as described in the "FieldsV1" type. - // +optional - FieldsV1 *FieldsV1 `json:"fieldsV1,omitempty" protobuf:"bytes,7,opt,name=fieldsV1"` -} - -// ManagedFieldsOperationType is the type of operation which lead to a ManagedFieldsEntry being created. -type ManagedFieldsOperationType string - -const ( - ManagedFieldsOperationApply ManagedFieldsOperationType = "Apply" - ManagedFieldsOperationUpdate ManagedFieldsOperationType = "Update" -) - -// FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format. -// -// Each key is either a '.' representing the field itself, and will always map to an empty set, -// or a string representing a sub-field or item. The string will follow one of these four formats: -// 'f:', where is the name of a field in a struct, or key in a map -// 'v:', where is the exact json formatted value of a list item -// 'i:', where is position of a item in a list -// 'k:', where is a map of a list item's key fields to their unique values -// If a key maps to an empty Fields value, the field that key represents is part of the set. -// -// The exact format is defined in sigs.k8s.io/structured-merge-diff -// +protobuf.options.(gogoproto.goproto_stringer)=false -type FieldsV1 struct { - // Raw is the underlying serialization of this object. - Raw []byte `json:"-" protobuf:"bytes,1,opt,name=Raw"` -} - -func (f FieldsV1) String() string { - return string(f.Raw) -} - -// TODO: Table does not generate to protobuf because of the interface{} - fix protobuf -// generation to support a meta type that can accept any valid JSON. This can be introduced -// in a v1 because clients a) receive an error if they try to access proto today, and b) -// once introduced they would be able to gracefully switch over to using it. - -// Table is a tabular representation of a set of API resources. The server transforms the -// object into a set of preferred columns for quickly reviewing the objects. -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +protobuf=false -type Table struct { - TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - ListMeta `json:"metadata,omitempty"` - - // columnDefinitions describes each column in the returned items array. The number of cells per row - // will always match the number of column definitions. - ColumnDefinitions []TableColumnDefinition `json:"columnDefinitions"` - // rows is the list of items in the table. - Rows []TableRow `json:"rows"` -} - -// TableColumnDefinition contains information about a column returned in the Table. -// +protobuf=false -type TableColumnDefinition struct { - // name is a human readable name for the column. - Name string `json:"name"` - // type is an OpenAPI type definition for this column, such as number, integer, string, or - // array. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more. - Type string `json:"type"` - // format is an optional OpenAPI type modifier for this column. A format modifies the type and - // imposes additional rules, like date or time formatting for a string. The 'name' format is applied - // to the primary identifier column which has type 'string' to assist in clients identifying column - // is the resource name. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more. - Format string `json:"format"` - // description is a human readable description of this column. - Description string `json:"description"` - // priority is an integer defining the relative importance of this column compared to others. Lower - // numbers are considered higher priority. Columns that may be omitted in limited space scenarios - // should be given a higher priority. - Priority int32 `json:"priority"` -} - -// TableRow is an individual row in a table. -// +protobuf=false -type TableRow struct { - // cells will be as wide as the column definitions array and may contain strings, numbers (float64 or - // int64), booleans, simple maps, lists, or null. See the type field of the column definition for a - // more detailed description. - Cells []interface{} `json:"cells"` - // conditions describe additional status of a row that are relevant for a human user. These conditions - // apply to the row, not to the object, and will be specific to table output. The only defined - // condition type is 'Completed', for a row that indicates a resource that has run to completion and - // can be given less visual priority. - // +optional - Conditions []TableRowCondition `json:"conditions,omitempty"` - // This field contains the requested additional information about each object based on the includeObject - // policy when requesting the Table. If "None", this field is empty, if "Object" this will be the - // default serialization of the object for the current API version, and if "Metadata" (the default) will - // contain the object metadata. Check the returned kind and apiVersion of the object before parsing. - // The media type of the object will always match the enclosing list - if this as a JSON table, these - // will be JSON encoded objects. - // +optional - Object runtime.RawExtension `json:"object,omitempty"` -} - -// TableRowCondition allows a row to be marked with additional information. -// +protobuf=false -type TableRowCondition struct { - // Type of row condition. The only defined value is 'Completed' indicating that the - // object this row represents has reached a completed state and may be given less visual - // priority than other rows. Clients are not required to honor any conditions but should - // be consistent where possible about handling the conditions. - Type RowConditionType `json:"type"` - // Status of the condition, one of True, False, Unknown. - Status ConditionStatus `json:"status"` - // (brief) machine readable reason for the condition's last transition. - // +optional - Reason string `json:"reason,omitempty"` - // Human readable message indicating details about last transition. - // +optional - Message string `json:"message,omitempty"` -} - -type RowConditionType string - -// These are valid conditions of a row. This list is not exhaustive and new conditions may be -// included by other resources. -const ( - // RowCompleted means the underlying resource has reached completion and may be given less - // visual priority than other resources. - RowCompleted RowConditionType = "Completed" -) - -type ConditionStatus string - -// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. -// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes -// can't decide if a resource is in the condition or not. In the future, we could add other -// intermediate conditions, e.g. ConditionDegraded. -const ( - ConditionTrue ConditionStatus = "True" - ConditionFalse ConditionStatus = "False" - ConditionUnknown ConditionStatus = "Unknown" -) - -// IncludeObjectPolicy controls which portion of the object is returned with a Table. -type IncludeObjectPolicy string - -const ( - // IncludeNone returns no object. - IncludeNone IncludeObjectPolicy = "None" - // IncludeMetadata serializes the object containing only its metadata field. - IncludeMetadata IncludeObjectPolicy = "Metadata" - // IncludeObject contains the full object. - IncludeObject IncludeObjectPolicy = "Object" -) - -// TableOptions are used when a Table is requested by the caller. -// +k8s:conversion-gen:explicit-from=net/url.Values -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type TableOptions struct { - TypeMeta `json:",inline"` - - // NoHeaders is only exposed for internal callers. It is not included in our OpenAPI definitions - // and may be removed as a field in a future release. - NoHeaders bool `json:"-"` - - // includeObject decides whether to include each object along with its columnar information. - // Specifying "None" will return no object, specifying "Object" will return the full object contents, and - // specifying "Metadata" (the default) will return the object's metadata in the PartialObjectMetadata kind - // in version v1beta1 of the meta.k8s.io API group. - IncludeObject IncludeObjectPolicy `json:"includeObject,omitempty" protobuf:"bytes,1,opt,name=includeObject,casttype=IncludeObjectPolicy"` -} - -// PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients -// to get access to a particular ObjectMeta schema without knowing the details of the version. -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type PartialObjectMetadata struct { - TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` -} - -// PartialObjectMetadataList contains a list of objects containing only their metadata -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type PartialObjectMetadataList struct { - TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items contains each of the included items. - Items []PartialObjectMetadata `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// Condition contains details for one aspect of the current state of this API Resource. -// --- -// This struct is intended for direct use as an array at the field path .status.conditions. For example, -// -// type FooStatus struct{ -// // Represents the observations of a foo's current state. -// // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" -// // +patchMergeKey=type -// // +patchStrategy=merge -// // +listType=map -// // +listMapKey=type -// Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -// -// // other fields -// } -type Condition struct { - // type of condition in CamelCase or in foo.example.com/CamelCase. - // --- - // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be - // useful (see .node.status.conditions), the ability to deconflict is important. - // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - // +required - // +kubebuilder:validation:Required - // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` - // +kubebuilder:validation:MaxLength=316 - Type string `json:"type" protobuf:"bytes,1,opt,name=type"` - // status of the condition, one of True, False, Unknown. - // +required - // +kubebuilder:validation:Required - // +kubebuilder:validation:Enum=True;False;Unknown - Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status"` - // observedGeneration represents the .metadata.generation that the condition was set based upon. - // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - // with respect to the current state of the instance. - // +optional - // +kubebuilder:validation:Minimum=0 - ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"` - // lastTransitionTime is the last time the condition transitioned from one status to another. - // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - // +required - // +kubebuilder:validation:Required - // +kubebuilder:validation:Type=string - // +kubebuilder:validation:Format=date-time - LastTransitionTime Time `json:"lastTransitionTime" protobuf:"bytes,4,opt,name=lastTransitionTime"` - // reason contains a programmatic identifier indicating the reason for the condition's last transition. - // Producers of specific condition types may define expected values and meanings for this field, - // and whether the values are considered a guaranteed API. - // The value should be a CamelCase string. - // This field may not be empty. - // +required - // +kubebuilder:validation:Required - // +kubebuilder:validation:MaxLength=1024 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$` - Reason string `json:"reason" protobuf:"bytes,5,opt,name=reason"` - // message is a human readable message indicating details about the transition. - // This may be an empty string. - // +required - // +kubebuilder:validation:Required - // +kubebuilder:validation:MaxLength=32768 - Message string `json:"message" protobuf:"bytes,6,opt,name=message"` -} diff --git a/adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/clientset.go b/adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/clientset.go deleted file mode 100644 index b6a7bec91..000000000 --- a/adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/clientset.go +++ /dev/null @@ -1,685 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package kubernetes - -import ( - corev1 "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/typed/core/v1" - "fmt" - - discovery "k8s.io/client-go/discovery" - admissionregistrationv1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" - admissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" - internalv1alpha1 "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1" - appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1" - appsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" - appsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" - authenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1" - authenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" - authorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1" - authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" - autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" - autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1" - autoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2" - batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1" - batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" - certificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1" - certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" - coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" - coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" - discoveryv1 "k8s.io/client-go/kubernetes/typed/discovery/v1" - discoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1" - eventsv1 "k8s.io/client-go/kubernetes/typed/events/v1" - eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" - extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" - flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" - networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1" - networkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" - nodev1 "k8s.io/client-go/kubernetes/typed/node/v1" - nodev1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1" - nodev1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1" - policyv1 "k8s.io/client-go/kubernetes/typed/policy/v1" - policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" - rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1" - rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" - rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" - schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" - schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" - schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" - storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" - storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" - storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - AdmissionregistrationV1() admissionregistrationv1.AdmissionregistrationV1Interface - AdmissionregistrationV1beta1() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface - InternalV1alpha1() internalv1alpha1.InternalV1alpha1Interface - AppsV1() appsv1.AppsV1Interface - AppsV1beta1() appsv1beta1.AppsV1beta1Interface - AppsV1beta2() appsv1beta2.AppsV1beta2Interface - AuthenticationV1() authenticationv1.AuthenticationV1Interface - AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface - AuthorizationV1() authorizationv1.AuthorizationV1Interface - AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface - AutoscalingV1() autoscalingv1.AutoscalingV1Interface - AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface - AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface - BatchV1() batchv1.BatchV1Interface - BatchV1beta1() batchv1beta1.BatchV1beta1Interface - CertificatesV1() certificatesv1.CertificatesV1Interface - CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface - CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface - CoordinationV1() coordinationv1.CoordinationV1Interface - CoreV1() corev1.CoreV1Interface - DiscoveryV1() discoveryv1.DiscoveryV1Interface - DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface - EventsV1() eventsv1.EventsV1Interface - EventsV1beta1() eventsv1beta1.EventsV1beta1Interface - ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface - FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface - FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface - NetworkingV1() networkingv1.NetworkingV1Interface - NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface - NodeV1() nodev1.NodeV1Interface - NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface - NodeV1beta1() nodev1beta1.NodeV1beta1Interface - PolicyV1() policyv1.PolicyV1Interface - PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface - RbacV1() rbacv1.RbacV1Interface - RbacV1beta1() rbacv1beta1.RbacV1beta1Interface - RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface - SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface - SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface - SchedulingV1() schedulingv1.SchedulingV1Interface - StorageV1beta1() storagev1beta1.StorageV1beta1Interface - StorageV1() storagev1.StorageV1Interface - StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - admissionregistrationV1 *admissionregistrationv1.AdmissionregistrationV1Client - admissionregistrationV1beta1 *admissionregistrationv1beta1.AdmissionregistrationV1beta1Client - internalV1alpha1 *internalv1alpha1.InternalV1alpha1Client - appsV1 *appsv1.AppsV1Client - appsV1beta1 *appsv1beta1.AppsV1beta1Client - appsV1beta2 *appsv1beta2.AppsV1beta2Client - authenticationV1 *authenticationv1.AuthenticationV1Client - authenticationV1beta1 *authenticationv1beta1.AuthenticationV1beta1Client - authorizationV1 *authorizationv1.AuthorizationV1Client - authorizationV1beta1 *authorizationv1beta1.AuthorizationV1beta1Client - autoscalingV1 *autoscalingv1.AutoscalingV1Client - autoscalingV2beta1 *autoscalingv2beta1.AutoscalingV2beta1Client - autoscalingV2beta2 *autoscalingv2beta2.AutoscalingV2beta2Client - batchV1 *batchv1.BatchV1Client - batchV1beta1 *batchv1beta1.BatchV1beta1Client - certificatesV1 *certificatesv1.CertificatesV1Client - certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client - coordinationV1beta1 *coordinationv1beta1.CoordinationV1beta1Client - coordinationV1 *coordinationv1.CoordinationV1Client - coreV1 *corev1.CoreV1Client - discoveryV1 *discoveryv1.DiscoveryV1Client - discoveryV1beta1 *discoveryv1beta1.DiscoveryV1beta1Client - eventsV1 *eventsv1.EventsV1Client - eventsV1beta1 *eventsv1beta1.EventsV1beta1Client - extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client - flowcontrolV1alpha1 *flowcontrolv1alpha1.FlowcontrolV1alpha1Client - flowcontrolV1beta1 *flowcontrolv1beta1.FlowcontrolV1beta1Client - networkingV1 *networkingv1.NetworkingV1Client - networkingV1beta1 *networkingv1beta1.NetworkingV1beta1Client - nodeV1 *nodev1.NodeV1Client - nodeV1alpha1 *nodev1alpha1.NodeV1alpha1Client - nodeV1beta1 *nodev1beta1.NodeV1beta1Client - policyV1 *policyv1.PolicyV1Client - policyV1beta1 *policyv1beta1.PolicyV1beta1Client - rbacV1 *rbacv1.RbacV1Client - rbacV1beta1 *rbacv1beta1.RbacV1beta1Client - rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client - schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client - schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1Client - schedulingV1 *schedulingv1.SchedulingV1Client - storageV1beta1 *storagev1beta1.StorageV1beta1Client - storageV1 *storagev1.StorageV1Client - storageV1alpha1 *storagev1alpha1.StorageV1alpha1Client -} - -// AdmissionregistrationV1 retrieves the AdmissionregistrationV1Client -func (c *Clientset) AdmissionregistrationV1() admissionregistrationv1.AdmissionregistrationV1Interface { - return c.admissionregistrationV1 -} - -// AdmissionregistrationV1beta1 retrieves the AdmissionregistrationV1beta1Client -func (c *Clientset) AdmissionregistrationV1beta1() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface { - return c.admissionregistrationV1beta1 -} - -// InternalV1alpha1 retrieves the InternalV1alpha1Client -func (c *Clientset) InternalV1alpha1() internalv1alpha1.InternalV1alpha1Interface { - return c.internalV1alpha1 -} - -// AppsV1 retrieves the AppsV1Client -func (c *Clientset) AppsV1() appsv1.AppsV1Interface { - return c.appsV1 -} - -// AppsV1beta1 retrieves the AppsV1beta1Client -func (c *Clientset) AppsV1beta1() appsv1beta1.AppsV1beta1Interface { - return c.appsV1beta1 -} - -// AppsV1beta2 retrieves the AppsV1beta2Client -func (c *Clientset) AppsV1beta2() appsv1beta2.AppsV1beta2Interface { - return c.appsV1beta2 -} - -// AuthenticationV1 retrieves the AuthenticationV1Client -func (c *Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface { - return c.authenticationV1 -} - -// AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client -func (c *Clientset) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface { - return c.authenticationV1beta1 -} - -// AuthorizationV1 retrieves the AuthorizationV1Client -func (c *Clientset) AuthorizationV1() authorizationv1.AuthorizationV1Interface { - return c.authorizationV1 -} - -// AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client -func (c *Clientset) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface { - return c.authorizationV1beta1 -} - -// AutoscalingV1 retrieves the AutoscalingV1Client -func (c *Clientset) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { - return c.autoscalingV1 -} - -// AutoscalingV2beta1 retrieves the AutoscalingV2beta1Client -func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface { - return c.autoscalingV2beta1 -} - -// AutoscalingV2beta2 retrieves the AutoscalingV2beta2Client -func (c *Clientset) AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface { - return c.autoscalingV2beta2 -} - -// BatchV1 retrieves the BatchV1Client -func (c *Clientset) BatchV1() batchv1.BatchV1Interface { - return c.batchV1 -} - -// BatchV1beta1 retrieves the BatchV1beta1Client -func (c *Clientset) BatchV1beta1() batchv1beta1.BatchV1beta1Interface { - return c.batchV1beta1 -} - -// CertificatesV1 retrieves the CertificatesV1Client -func (c *Clientset) CertificatesV1() certificatesv1.CertificatesV1Interface { - return c.certificatesV1 -} - -// CertificatesV1beta1 retrieves the CertificatesV1beta1Client -func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { - return c.certificatesV1beta1 -} - -// CoordinationV1beta1 retrieves the CoordinationV1beta1Client -func (c *Clientset) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { - return c.coordinationV1beta1 -} - -// CoordinationV1 retrieves the CoordinationV1Client -func (c *Clientset) CoordinationV1() coordinationv1.CoordinationV1Interface { - return c.coordinationV1 -} - -// CoreV1 retrieves the CoreV1Client -func (c *Clientset) CoreV1() corev1.CoreV1Interface { - return c.coreV1 -} - -// DiscoveryV1 retrieves the DiscoveryV1Client -func (c *Clientset) DiscoveryV1() discoveryv1.DiscoveryV1Interface { - return c.discoveryV1 -} - -// DiscoveryV1beta1 retrieves the DiscoveryV1beta1Client -func (c *Clientset) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { - return c.discoveryV1beta1 -} - -// EventsV1 retrieves the EventsV1Client -func (c *Clientset) EventsV1() eventsv1.EventsV1Interface { - return c.eventsV1 -} - -// EventsV1beta1 retrieves the EventsV1beta1Client -func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { - return c.eventsV1beta1 -} - -// ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client -func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { - return c.extensionsV1beta1 -} - -// FlowcontrolV1alpha1 retrieves the FlowcontrolV1alpha1Client -func (c *Clientset) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { - return c.flowcontrolV1alpha1 -} - -// FlowcontrolV1beta1 retrieves the FlowcontrolV1beta1Client -func (c *Clientset) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface { - return c.flowcontrolV1beta1 -} - -// NetworkingV1 retrieves the NetworkingV1Client -func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface { - return c.networkingV1 -} - -// NetworkingV1beta1 retrieves the NetworkingV1beta1Client -func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { - return c.networkingV1beta1 -} - -// NodeV1 retrieves the NodeV1Client -func (c *Clientset) NodeV1() nodev1.NodeV1Interface { - return c.nodeV1 -} - -// NodeV1alpha1 retrieves the NodeV1alpha1Client -func (c *Clientset) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface { - return c.nodeV1alpha1 -} - -// NodeV1beta1 retrieves the NodeV1beta1Client -func (c *Clientset) NodeV1beta1() nodev1beta1.NodeV1beta1Interface { - return c.nodeV1beta1 -} - -// PolicyV1 retrieves the PolicyV1Client -func (c *Clientset) PolicyV1() policyv1.PolicyV1Interface { - return c.policyV1 -} - -// PolicyV1beta1 retrieves the PolicyV1beta1Client -func (c *Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { - return c.policyV1beta1 -} - -// RbacV1 retrieves the RbacV1Client -func (c *Clientset) RbacV1() rbacv1.RbacV1Interface { - return c.rbacV1 -} - -// RbacV1beta1 retrieves the RbacV1beta1Client -func (c *Clientset) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { - return c.rbacV1beta1 -} - -// RbacV1alpha1 retrieves the RbacV1alpha1Client -func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { - return c.rbacV1alpha1 -} - -// SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client -func (c *Clientset) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { - return c.schedulingV1alpha1 -} - -// SchedulingV1beta1 retrieves the SchedulingV1beta1Client -func (c *Clientset) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { - return c.schedulingV1beta1 -} - -// SchedulingV1 retrieves the SchedulingV1Client -func (c *Clientset) SchedulingV1() schedulingv1.SchedulingV1Interface { - return c.schedulingV1 -} - -// StorageV1beta1 retrieves the StorageV1beta1Client -func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { - return c.storageV1beta1 -} - -// StorageV1 retrieves the StorageV1Client -func (c *Clientset) StorageV1() storagev1.StorageV1Interface { - return c.storageV1 -} - -// StorageV1alpha1 retrieves the StorageV1alpha1Client -func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { - return c.storageV1alpha1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.admissionregistrationV1, err = admissionregistrationv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.admissionregistrationV1beta1, err = admissionregistrationv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.internalV1alpha1, err = internalv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.appsV1, err = appsv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.appsV1beta1, err = appsv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.appsV1beta2, err = appsv1beta2.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.authenticationV1, err = authenticationv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.authenticationV1beta1, err = authenticationv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.authorizationV1, err = authorizationv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.authorizationV1beta1, err = authorizationv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.autoscalingV1, err = autoscalingv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.autoscalingV2beta1, err = autoscalingv2beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.autoscalingV2beta2, err = autoscalingv2beta2.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.batchV1, err = batchv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.batchV1beta1, err = batchv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.certificatesV1, err = certificatesv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.certificatesV1beta1, err = certificatesv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.coordinationV1beta1, err = coordinationv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.coordinationV1, err = coordinationv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.coreV1, err = corev1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.discoveryV1, err = discoveryv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.discoveryV1beta1, err = discoveryv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.eventsV1, err = eventsv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.eventsV1beta1, err = eventsv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.extensionsV1beta1, err = extensionsv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.flowcontrolV1alpha1, err = flowcontrolv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.flowcontrolV1beta1, err = flowcontrolv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.networkingV1, err = networkingv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.networkingV1beta1, err = networkingv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.nodeV1, err = nodev1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.nodeV1alpha1, err = nodev1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.nodeV1beta1, err = nodev1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.policyV1, err = policyv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.policyV1beta1, err = policyv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.rbacV1, err = rbacv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.rbacV1beta1, err = rbacv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.rbacV1alpha1, err = rbacv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.schedulingV1alpha1, err = schedulingv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.schedulingV1beta1, err = schedulingv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.schedulingV1, err = schedulingv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.storageV1beta1, err = storagev1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.storageV1, err = storagev1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.storageV1alpha1, err = storagev1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - var cs Clientset - cs.admissionregistrationV1 = admissionregistrationv1.NewForConfigOrDie(c) - cs.admissionregistrationV1beta1 = admissionregistrationv1beta1.NewForConfigOrDie(c) - cs.internalV1alpha1 = internalv1alpha1.NewForConfigOrDie(c) - cs.appsV1 = appsv1.NewForConfigOrDie(c) - cs.appsV1beta1 = appsv1beta1.NewForConfigOrDie(c) - cs.appsV1beta2 = appsv1beta2.NewForConfigOrDie(c) - cs.authenticationV1 = authenticationv1.NewForConfigOrDie(c) - cs.authenticationV1beta1 = authenticationv1beta1.NewForConfigOrDie(c) - cs.authorizationV1 = authorizationv1.NewForConfigOrDie(c) - cs.authorizationV1beta1 = authorizationv1beta1.NewForConfigOrDie(c) - cs.autoscalingV1 = autoscalingv1.NewForConfigOrDie(c) - cs.autoscalingV2beta1 = autoscalingv2beta1.NewForConfigOrDie(c) - cs.autoscalingV2beta2 = autoscalingv2beta2.NewForConfigOrDie(c) - cs.batchV1 = batchv1.NewForConfigOrDie(c) - cs.batchV1beta1 = batchv1beta1.NewForConfigOrDie(c) - cs.certificatesV1 = certificatesv1.NewForConfigOrDie(c) - cs.certificatesV1beta1 = certificatesv1beta1.NewForConfigOrDie(c) - cs.coordinationV1beta1 = coordinationv1beta1.NewForConfigOrDie(c) - cs.coordinationV1 = coordinationv1.NewForConfigOrDie(c) - cs.coreV1 = corev1.NewForConfigOrDie(c) - cs.discoveryV1 = discoveryv1.NewForConfigOrDie(c) - cs.discoveryV1beta1 = discoveryv1beta1.NewForConfigOrDie(c) - cs.eventsV1 = eventsv1.NewForConfigOrDie(c) - cs.eventsV1beta1 = eventsv1beta1.NewForConfigOrDie(c) - cs.extensionsV1beta1 = extensionsv1beta1.NewForConfigOrDie(c) - cs.flowcontrolV1alpha1 = flowcontrolv1alpha1.NewForConfigOrDie(c) - cs.flowcontrolV1beta1 = flowcontrolv1beta1.NewForConfigOrDie(c) - cs.networkingV1 = networkingv1.NewForConfigOrDie(c) - cs.networkingV1beta1 = networkingv1beta1.NewForConfigOrDie(c) - cs.nodeV1 = nodev1.NewForConfigOrDie(c) - cs.nodeV1alpha1 = nodev1alpha1.NewForConfigOrDie(c) - cs.nodeV1beta1 = nodev1beta1.NewForConfigOrDie(c) - cs.policyV1 = policyv1.NewForConfigOrDie(c) - cs.policyV1beta1 = policyv1beta1.NewForConfigOrDie(c) - cs.rbacV1 = rbacv1.NewForConfigOrDie(c) - cs.rbacV1beta1 = rbacv1beta1.NewForConfigOrDie(c) - cs.rbacV1alpha1 = rbacv1alpha1.NewForConfigOrDie(c) - cs.schedulingV1alpha1 = schedulingv1alpha1.NewForConfigOrDie(c) - cs.schedulingV1beta1 = schedulingv1beta1.NewForConfigOrDie(c) - cs.schedulingV1 = schedulingv1.NewForConfigOrDie(c) - cs.storageV1beta1 = storagev1beta1.NewForConfigOrDie(c) - cs.storageV1 = storagev1.NewForConfigOrDie(c) - cs.storageV1alpha1 = storagev1alpha1.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.admissionregistrationV1 = admissionregistrationv1.New(c) - cs.admissionregistrationV1beta1 = admissionregistrationv1beta1.New(c) - cs.internalV1alpha1 = internalv1alpha1.New(c) - cs.appsV1 = appsv1.New(c) - cs.appsV1beta1 = appsv1beta1.New(c) - cs.appsV1beta2 = appsv1beta2.New(c) - cs.authenticationV1 = authenticationv1.New(c) - cs.authenticationV1beta1 = authenticationv1beta1.New(c) - cs.authorizationV1 = authorizationv1.New(c) - cs.authorizationV1beta1 = authorizationv1beta1.New(c) - cs.autoscalingV1 = autoscalingv1.New(c) - cs.autoscalingV2beta1 = autoscalingv2beta1.New(c) - cs.autoscalingV2beta2 = autoscalingv2beta2.New(c) - cs.batchV1 = batchv1.New(c) - cs.batchV1beta1 = batchv1beta1.New(c) - cs.certificatesV1 = certificatesv1.New(c) - cs.certificatesV1beta1 = certificatesv1beta1.New(c) - cs.coordinationV1beta1 = coordinationv1beta1.New(c) - cs.coordinationV1 = coordinationv1.New(c) - cs.coreV1 = corev1.New(c) - cs.discoveryV1 = discoveryv1.New(c) - cs.discoveryV1beta1 = discoveryv1beta1.New(c) - cs.eventsV1 = eventsv1.New(c) - cs.eventsV1beta1 = eventsv1beta1.New(c) - cs.extensionsV1beta1 = extensionsv1beta1.New(c) - cs.flowcontrolV1alpha1 = flowcontrolv1alpha1.New(c) - cs.flowcontrolV1beta1 = flowcontrolv1beta1.New(c) - cs.networkingV1 = networkingv1.New(c) - cs.networkingV1beta1 = networkingv1beta1.New(c) - cs.nodeV1 = nodev1.New(c) - cs.nodeV1alpha1 = nodev1alpha1.New(c) - cs.nodeV1beta1 = nodev1beta1.New(c) - cs.policyV1 = policyv1.New(c) - cs.policyV1beta1 = policyv1beta1.New(c) - cs.rbacV1 = rbacv1.New(c) - cs.rbacV1beta1 = rbacv1beta1.New(c) - cs.rbacV1alpha1 = rbacv1alpha1.New(c) - cs.schedulingV1alpha1 = schedulingv1alpha1.New(c) - cs.schedulingV1beta1 = schedulingv1beta1.New(c) - cs.schedulingV1 = schedulingv1.New(c) - cs.storageV1beta1 = storagev1beta1.New(c) - cs.storageV1 = storagev1.New(c) - cs.storageV1alpha1 = storagev1alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/typed/core/v1/core_client.go b/adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/typed/core/v1/core_client.go deleted file mode 100644 index 913a81172..000000000 --- a/adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/typed/core/v1/core_client.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/client-go/kubernetes/scheme" - rest "k8s.io/client-go/rest" -) - -type CoreV1Interface interface { - RESTClient() rest.Interface - PodsGetter -} - -// CoreV1Client is used to interact with features provided by the group. -type CoreV1Client struct { - restClient rest.Interface -} - -func (c *CoreV1Client) Pods(namespace string) PodInterface { - //TODO implement me - return newPods(c, namespace) -} - -// NewForConfig creates a new CoreV1Client for the given config. -func NewForConfig(c *rest.Config) (*CoreV1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &CoreV1Client{client}, nil -} - -// NewForConfigOrDie creates a new CoreV1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *CoreV1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new CoreV1Client for the given RESTClient. -func New(c rest.Interface) *CoreV1Client { - return &CoreV1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/api" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *CoreV1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/typed/core/v1/pod.go b/adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/typed/core/v1/pod.go deleted file mode 100644 index f992e0562..000000000 --- a/adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/typed/core/v1/pod.go +++ /dev/null @@ -1,537 +0,0 @@ -package v1 - -import ( - pbpod "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/api/core/v1" - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl" - "context" - "encoding/json" - "errors" - "flag" - "fmt" - "github.com/golang/glog" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "strconv" - "time" - - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - corev1 "k8s.io/client-go/applyconfigurations/core/v1" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" -) - -// PodsGetter has a method to return a PodInterface. -// A group's client should implement this interface. -type PodsGetter interface { - Pods(namespace string) PodInterface -} - -// PodInterface has methods to work with Pod resources. -type PodInterface interface { - Create(ctx context.Context, pod *v1.Pod, opts metav1.CreateOptions) (*v1.Pod, error) - Update(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, error) - UpdateStatus(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, error) - Delete(ctx context.Context, namespace string, providerId int32, regionName string, accountName string, pcmId string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Pod, error) - List(ctx context.Context, pod *v1.Pod, opts metav1.ListOptions) (*v1.PodList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Pod, err error) - Apply(ctx context.Context, pod *corev1.PodApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Pod, err error) - ApplyStatus(ctx context.Context, pod *corev1.PodApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Pod, err error) - GetEphemeralContainers(ctx context.Context, podName string, options metav1.GetOptions) (*v1.EphemeralContainers, error) - UpdateEphemeralContainers(ctx context.Context, podName string, ephemeralContainers *v1.EphemeralContainers, opts metav1.UpdateOptions) (*v1.EphemeralContainers, error) - - PodExpansion -} - -// pods implements PodInterface -type pods struct { - client rest.Interface - ns string -} - -// newPods returns a Pods -func newPods(c *CoreV1Client, namespace string) *pods { - return &pods{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the pcm_pod, and returns the corresponding pcm_pod object, and an error if there is any. -func (c *pods) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Pod, err error) { - result = &v1.Pod{} - err = c.client.Get(). - Namespace(c.ns). - Resource("pods"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Pods that match those selectors. -func (c *pods) List(ctx context.Context, pod *v1.Pod, opts metav1.ListOptions) (result *v1.PodList, err error) { - - providerId := pod.Spec.ProviderId - regionId := pod.Spec.RegionId - accountName := pod.Spec.AccountName - provider := pbtenant.CloudProvider(providerId) - - requestPCM := &pbpod.ListPodReq{ - RequestSource: "huawei", - Provider: pbpod.CloudProvider(provider), - Namespace: "pcm", - } - - resp, err := server.ListPod(nil, requestPCM) - //trans PCM response pcm_pod set to Ali ContainerGroup set - var pods = make([]v1.Pod, len(resp.Pods)) - for k := range resp.Pods { - podId := resp.Pods[k].PodId - containerName := resp.Pods[k].ContainerName - containerImage := resp.Pods[k].ContainerImage - podName := resp.Pods[k].PodName - container := v1.Container{ - Name: containerName, - Image: containerImage, - } - var containers []v1.Container - containers = append(containers, container) - - podSpec := v1.PodSpec{ - ProviderId: providerId, - RegionId: regionId, - AccountName: accountName, - Containers: containers, - } - pod := v1.Pod{ - TypeMeta: metav1.TypeMeta{APIVersion: "core/V1", Kind: "Pod"}, - ObjectMeta: metav1.ObjectMeta{Name: podName, Namespace: "pcm", UID: types.UID(podId)}, - Spec: podSpec, - Status: v1.PodStatus{}, - } - pods[k] = pod - } - - result = &v1.PodList{ - TypeMeta: metav1.TypeMeta{}, - ListMeta: metav1.ListMeta{}, - Items: pods, - } - return -} - -// Watch returns a watch.Interface that watches the requested pods. -func (c *pods) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("pods"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a pcm_pod and creates it. Returns the server's representation of the pcm_pod, and an error, if there is any. -func (c *pods) Create(ctx context.Context, pod *v1.Pod, opts metav1.CreateOptions) (result *v1.Pod, err error) { - result = &v1.Pod{} - - provider := pbtenant.CloudProvider(pod.Spec.ProviderId) - var configFile string - flag.StringVar(&configFile, "conf", "configs/tenanter.yaml", "tenanter.yaml") - flag.Parse() - defer glog.Flush() - - if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { - if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { - glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) - } - glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) - } - - glog.Infof("load tenant from file finished") - tenanters, err := tenanter.GetTenanters(provider) - var regionId int32 - var cpuPod string - var memoryPod string - - //华为(K8S)与其他厂商的CPU单位和格式有区别,region根据字符串取各厂商的对应id - switch pod.Spec.ProviderId { - case 0: - regionId, _ = tenanter.GetAliRegionId(pod.Spec.RegionId) - cpuPod = strconv.FormatInt(pod.Spec.Containers[0].Resources.Limits.Cpu().MilliValue()/1000, 10) - memoryPod = strconv.FormatInt(pod.Spec.Containers[0].Resources.Limits.Memory().MilliValue()/1024/1024/1024/1000, 10) - case 1: - regionId, _ = tenanter.GetTencentRegionId(pod.Spec.RegionId) - cpuPod = strconv.FormatInt(pod.Spec.Containers[0].Resources.Limits.Cpu().MilliValue()/1000, 10) - memoryPod = strconv.FormatInt(pod.Spec.Containers[0].Resources.Limits.Memory().MilliValue()/1024/1024/1024/1000, 10) - case 2: - regionId, _ = tenanter.GetHuaweiRegionId(pod.Spec.RegionId) - cpuPod = pod.Spec.Containers[0].Resources.Limits.Cpu().String() - memoryPod = pod.Spec.Containers[0].Resources.Limits.Memory().String() - case 3: - regionId, _ = tenanter.GetK8SRegionId(pod.Spec.RegionId) - cpuPod = strconv.FormatInt(pod.Spec.Containers[0].Resources.Limits.Cpu().MilliValue()/1000, 10) - memoryPod = strconv.FormatInt(pod.Spec.Containers[0].Resources.Limits.Memory().MilliValue()/1024/1024/1024/1000, 10) - } - - requestPCM := &pbpod.CreatePodReq{ - RequestSource: "huawei", - Provider: pbpod.CloudProvider(provider), - AccountName: tenanters[0].AccountName(), - PodName: pod.Name, - RegionId: regionId, - ContainerImage: pod.Spec.Containers[0].Image, - ContainerName: pod.Spec.Containers[0].Name, - CpuPod: cpuPod, - MemoryPod: memoryPod, - //这里腾讯需要独立提供三个参数,目前固定使用以下三个 - SecurityGroupId: "sg-6qlun7hd", - SubnetId: "subnet-mnwfg2fk", - VpcId: "vpc-rkwt40g5", - Namespace: pod.ObjectMeta.Namespace, - } - - server.CreatePod(nil, requestPCM) - - result = &v1.Pod{ - TypeMeta: metav1.TypeMeta{}, - ObjectMeta: metav1.ObjectMeta{}, - Spec: v1.PodSpec{ - ProviderId: pod.Spec.ProviderId, - RegionId: pod.Spec.RegionId, - AccountName: pod.Spec.AccountName, - Volumes: nil, - InitContainers: nil, - Containers: pod.Spec.Containers, - }, - Status: v1.PodStatus{ - Phase: "", - Conditions: nil, - Message: "", - Reason: "", - NominatedNodeName: "", - HostIP: "", - PodIP: "", - PodIPs: nil, - StartTime: nil, - InitContainerStatuses: nil, - ContainerStatuses: nil, - QOSClass: "", - EphemeralContainerStatuses: nil, - }, - } - - return -} - -// Update takes the representation of a pcm_pod and updates it. Returns the server's representation of the pcm_pod, and an error, if there is any. -func (c *pods) Update(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (result *v1.Pod, err error) { - result = &v1.Pod{} - - provider := pbtenant.CloudProvider(pod.Spec.ProviderId) - var configFile string - flag.StringVar(&configFile, "confHuawei", "configs/tenanter.yaml", "tenanter.yaml") - flag.Parse() - defer glog.Flush() - - if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { - if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { - glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) - } - glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) - } - - glog.Infof("load tenant from file finished") - tenanters, err := tenanter.GetTenanters(provider) - var regionId int32 - var cpuPod string - var memoryPod string - - //华为(K8S)与其他厂商的CPU单位和格式有区别 - switch pod.Spec.ProviderId { - case 0: - regionId, _ = tenanter.GetAliRegionId(pod.Spec.RegionId) - cpuPod = strconv.FormatInt(pod.Spec.Containers[0].Resources.Limits.Cpu().MilliValue()/1000, 10) - memoryPod = strconv.FormatInt(pod.Spec.Containers[0].Resources.Limits.Memory().MilliValue()/1024/1024/1024/1000, 10) - case 1: - regionId, _ = tenanter.GetTencentRegionId(pod.Spec.RegionId) - cpuPod = strconv.FormatInt(pod.Spec.Containers[0].Resources.Limits.Cpu().MilliValue()/1000, 10) - memoryPod = strconv.FormatInt(pod.Spec.Containers[0].Resources.Limits.Memory().MilliValue()/1024/1024/1024/1000, 10) - case 2: - regionId, _ = tenanter.GetHuaweiRegionId(pod.Spec.RegionId) - cpuPod = pod.Spec.Containers[0].Resources.Limits.Cpu().String() - memoryPod = pod.Spec.Containers[0].Resources.Limits.Memory().String() - case 3: - regionId, _ = tenanter.GetK8SRegionId(pod.Spec.RegionId) - cpuPod = strconv.FormatInt(pod.Spec.Containers[0].Resources.Limits.Cpu().MilliValue()/1000, 10) - memoryPod = strconv.FormatInt(pod.Spec.Containers[0].Resources.Limits.Memory().MilliValue()/1024/1024/1024/1000, 10) - } - - requestPCM := &pbpod.UpdatePodReq{ - RequestSource: "huawei", - Provider: pbpod.CloudProvider(provider), - PcmId: string(pod.ObjectMeta.UID), - PodId: string(pod.ObjectMeta.UID), - AccountName: tenanters[0].AccountName(), - PodName: pod.Name, - RegionId: regionId, - ContainerImage: pod.Spec.Containers[0].Image, - ContainerName: pod.Spec.Containers[0].Name, - CpuPod: cpuPod, - MemoryPod: memoryPod, - Namespace: pod.ObjectMeta.Namespace, - } - - server.UpdatePod(nil, requestPCM) - - result = &v1.Pod{ - TypeMeta: metav1.TypeMeta{}, - ObjectMeta: metav1.ObjectMeta{}, - Spec: v1.PodSpec{ - ProviderId: pod.Spec.ProviderId, - RegionId: pod.Spec.RegionId, - AccountName: pod.Spec.AccountName, - Volumes: nil, - InitContainers: nil, - Containers: pod.Spec.Containers, - EphemeralContainers: nil, - RestartPolicy: "", - TerminationGracePeriodSeconds: nil, - ActiveDeadlineSeconds: nil, - DNSPolicy: "", - NodeSelector: nil, - ServiceAccountName: "", - DeprecatedServiceAccount: "", - AutomountServiceAccountToken: nil, - NodeName: "", - HostNetwork: false, - HostPID: false, - HostIPC: false, - ShareProcessNamespace: nil, - SecurityContext: nil, - ImagePullSecrets: nil, - Hostname: "", - Subdomain: "", - Affinity: nil, - SchedulerName: "", - Tolerations: nil, - HostAliases: nil, - PriorityClassName: "", - Priority: nil, - DNSConfig: nil, - ReadinessGates: nil, - RuntimeClassName: nil, - EnableServiceLinks: nil, - PreemptionPolicy: nil, - Overhead: nil, - TopologySpreadConstraints: nil, - SetHostnameAsFQDN: nil, - }, - Status: v1.PodStatus{ - Phase: "", - Conditions: nil, - Message: "", - Reason: "", - NominatedNodeName: "", - HostIP: "", - PodIP: "", - PodIPs: nil, - StartTime: nil, - InitContainerStatuses: nil, - ContainerStatuses: nil, - QOSClass: "", - EphemeralContainerStatuses: nil, - }, - } - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *pods) UpdateStatus(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (result *v1.Pod, err error) { - result = &v1.Pod{} - err = c.client.Put(). - Namespace(c.ns). - Resource("pods"). - Name(pod.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(pod). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the pcm_pod and deletes it. Returns an error if one occurs. -func (c *pods) Delete(ctx context.Context, namespace string, providerId int32, regionName string, accountName string, pcmId string, opts metav1.DeleteOptions) error { - - provider := pbtenant.CloudProvider(providerId) - var configFile string - flag.StringVar(&configFile, "confHuawei", "configs/tenanter.yaml", "tenanter.yaml") - flag.Parse() - defer glog.Flush() - - if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { - if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { - glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) - } - glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) - } - - glog.Infof("load tenant from file finished") - var regionId int32 - switch providerId { - case 0: - regionId, _ = tenanter.GetAliRegionId(regionName) - case 1: - regionId, _ = tenanter.GetTencentRegionId(regionName) - case 2: - regionId, _ = tenanter.GetHuaweiRegionId(regionName) - case 3: - regionId, _ = tenanter.GetK8SRegionId(regionName) - } - - requestPCM := &pbpod.DeletePodReq{ - RequestSource: "huawei", - Provider: pbpod.CloudProvider(provider), - AccountName: accountName, - PcmId: pcmId, - Namespace: namespace, - RegionId: regionId, - } - - _, err := server.DeletePod(nil, requestPCM) - if err != nil { - return err - } - - return nil - -} - -// DeleteCollection deletes a collection of objects. -func (c *pods) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("pods"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched pcm_pod. -func (c *pods) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Pod, err error) { - result = &v1.Pod{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("pods"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied pcm_pod. -func (c *pods) Apply(ctx context.Context, pod *corev1.PodApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Pod, err error) { - if pod == nil { - return nil, fmt.Errorf("pcm_pod provided to Apply must not be nil") - } - patchOpts := opts.ToPatchOptions() - data, err := json.Marshal(pod) - if err != nil { - return nil, err - } - name := pod.Name - if name == nil { - return nil, fmt.Errorf("pcm_pod.Name must be provided to Apply") - } - result = &v1.Pod{} - err = c.client.Patch(types.ApplyPatchType). - Namespace(c.ns). - Resource("pods"). - Name(*name). - VersionedParams(&patchOpts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *pods) ApplyStatus(ctx context.Context, pod *corev1.PodApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Pod, err error) { - if pod == nil { - return nil, fmt.Errorf("pcm_pod provided to Apply must not be nil") - } - patchOpts := opts.ToPatchOptions() - data, err := json.Marshal(pod) - if err != nil { - return nil, err - } - - name := pod.Name - if name == nil { - return nil, fmt.Errorf("pcm_pod.Name must be provided to Apply") - } - - result = &v1.Pod{} - err = c.client.Patch(types.ApplyPatchType). - Namespace(c.ns). - Resource("pods"). - Name(*name). - SubResource("status"). - VersionedParams(&patchOpts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} - -// GetEphemeralContainers takes name of the pcm_pod, and returns the corresponding v1.EphemeralContainers object, and an error if there is any. -func (c *pods) GetEphemeralContainers(ctx context.Context, podName string, options metav1.GetOptions) (result *v1.EphemeralContainers, err error) { - result = &v1.EphemeralContainers{} - err = c.client.Get(). - Namespace(c.ns). - Resource("pods"). - Name(podName). - SubResource("ephemeralcontainers"). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// UpdateEphemeralContainers takes the top resource name and the representation of a ephemeralContainers and updates it. Returns the server's representation of the ephemeralContainers, and an error, if there is any. -func (c *pods) UpdateEphemeralContainers(ctx context.Context, podName string, ephemeralContainers *v1.EphemeralContainers, opts metav1.UpdateOptions) (result *v1.EphemeralContainers, err error) { - result = &v1.EphemeralContainers{} - err = c.client.Put(). - Namespace(c.ns). - Resource("pods"). - Name(podName). - SubResource("ephemeralcontainers"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ephemeralContainers). - Do(ctx). - Into(result) - return -} diff --git a/adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/typed/core/v1/pod_expansion.go b/adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/typed/core/v1/pod_expansion.go deleted file mode 100644 index d8e825c48..000000000 --- a/adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/typed/core/v1/pod_expansion.go +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "context" - - v1 "k8s.io/api/core/v1" - policy "k8s.io/api/policy/v1beta1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/net" - "k8s.io/client-go/kubernetes/scheme" - restclient "k8s.io/client-go/rest" -) - -// The PodExpansion interface allows manually adding extra methods to the PodInterface. -type PodExpansion interface { - Bind(ctx context.Context, binding *v1.Binding, opts metav1.CreateOptions) error - Evict(ctx context.Context, eviction *policy.Eviction) error - GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request - ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper -} - -// Bind applies the provided binding to the named pcm_pod in the current namespace (binding.Namespace is ignored). -func (c *pods) Bind(ctx context.Context, binding *v1.Binding, opts metav1.CreateOptions) error { - return c.client.Post().Namespace(c.ns).Resource("pods").Name(binding.Name).VersionedParams(&opts, scheme.ParameterCodec).SubResource("binding").Body(binding).Do(ctx).Error() -} - -func (c *pods) Evict(ctx context.Context, eviction *policy.Eviction) error { - return c.client.Post().Namespace(c.ns).Resource("pods").Name(eviction.Name).SubResource("eviction").Body(eviction).Do(ctx).Error() -} - -// Get constructs a request for getting the logs for a pcm_pod -func (c *pods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request { - return c.client.Get().Namespace(c.ns).Name(name).Resource("pods").SubResource("log").VersionedParams(opts, scheme.ParameterCodec) -} - -// ProxyGet returns a response of the pcm_pod by calling it through the proxy. -func (c *pods) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper { - request := c.client.Get(). - Namespace(c.ns). - Resource("pods"). - SubResource("proxy"). - Name(net.JoinSchemeNamePort(scheme, name, port)). - Suffix(path) - for k, v := range params { - request = request.Param(k, v) - } - return request -} diff --git a/adaptor/pcm_pod/server/pod.go b/adaptor/pcm_pod/server/pod.go deleted file mode 100644 index abd639847..000000000 --- a/adaptor/pcm_pod/server/pod.go +++ /dev/null @@ -1,91 +0,0 @@ -package server - -import ( - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/gen/idl" - "context" - - "github.com/golang/glog" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -type Server struct { - podpb.UnimplementedPodServiceServer -} - -// GetProdRegions get available region for product -func (s *Server) GetProdRegions(ctx context.Context, req *podpb.GetPodRegionReq) (*podpb.GetPodRegionResp, error) { - resp, err := GetPodRegion(ctx, req) - if err != nil { - glog.Errorf("CreatePods error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// CreatePods create multiple pcm_pod on multiple clouds -func (s *Server) CreatePods(ctx context.Context, req *podpb.CreatePodsReq) (*podpb.CreatePodsResp, error) { - resp, err := CreatePods(ctx, req) - if err != nil { - glog.Errorf("CreatePods error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// CreatePod create pcm_pod on one cloud -func (s *Server) CreatePod(ctx context.Context, req *podpb.CreatePodReq) (*podpb.CreatePodResp, error) { - resp, err := CreatePod(ctx, req) - if err != nil { - glog.Errorf("CreatePod error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// DeletePod delete specified pcm_pod -func (s *Server) DeletePod(ctx context.Context, req *podpb.DeletePodReq) (*podpb.DeletePodResp, error) { - resp, err := DeletePod(ctx, req) - if err != nil { - glog.Errorf("DeletePod error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// UpdatePod update specified pcm_pod -func (s *Server) UpdatePod(ctx context.Context, req *podpb.UpdatePodReq) (*podpb.UpdatePodResp, error) { - resp, err := UpdatePod(ctx, req) - if err != nil { - glog.Errorf("UpdatePod error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -func (s *Server) ListPodDetail(ctx context.Context, req *podpb.ListPodDetailReq) (*podpb.ListPodDetailResp, error) { - resp, err := ListPodDetail(ctx, req) - if err != nil { - glog.Errorf("ListPodDetail error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -func (s *Server) ListPod(ctx context.Context, req *podpb.ListPodReq) (*podpb.ListPodResp, error) { - resp, err := ListPod(ctx, req) - if err != nil { - glog.Errorf("ListPod error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -func (s *Server) ListPodAll(ctx context.Context, req *podpb.ListPodAllReq) (*podpb.ListPodResp, error) { - resp, err := ListPodAll(ctx) - if err != nil { - glog.Errorf("ListPodAll error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} diff --git a/adaptor/pcm_pod/server/podImpl.go b/adaptor/pcm_pod/server/podImpl.go deleted file mode 100644 index a2d810fde..000000000 --- a/adaptor/pcm_pod/server/podImpl.go +++ /dev/null @@ -1,350 +0,0 @@ -package server - -import ( - pbpod "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/service" - pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl" - "context" - "flag" - "fmt" - "sync" - - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - "github.com/golang/glog" - "github.com/pkg/errors" -) - -// GetPodRegion get the available region for pcm_pod -func GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (resp *pbpod.GetPodRegionResp, err error) { - var ( - regionInit tenanter.Region - regions []*pbpod.Region - ) - - switch req.GetProvider() { - case pbpod.CloudProvider_ali: - regionInit, _ = tenanter.NewRegion(pbtenant.CloudProvider(req.GetProvider()), 2) - case pbpod.CloudProvider_tencent: - regionInit, _ = tenanter.NewRegion(pbtenant.CloudProvider(req.GetProvider()), 5) - case pbpod.CloudProvider_huawei: - regionInit, _ = tenanter.NewRegion(pbtenant.CloudProvider(req.GetProvider()), 5) - } - tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.GetProvider())) - if err != nil { - return nil, errors.WithMessage(err, "getTenanters error") - } - - for _, tenant := range tenanters { - - pod, err := poder.NewPodClient(req.GetProvider(), regionInit, tenant) - if err != nil { - return nil, errors.WithMessage(err, "NewPodClient error") - } - request := &pbpod.GetPodRegionReq{ - Provider: req.GetProvider(), - } - resp, err := pod.GetPodRegion(ctx, request) - if err != nil { - return nil, errors.Wrap(err, "GetPodRegion error") - } - for _, region := range resp.GetRegions() { - regions = append(regions, region) - } - } - - return &pbpod.GetPodRegionResp{Regions: regions}, nil -} - -func CreatePods(ctx context.Context, req *pbpod.CreatePodsReq) (*pbpod.CreatePodsResp, error) { - var ( - wg sync.WaitGroup - requestIds = make([]string, 0) - ) - wg.Add(len(req.CreatePodReq)) - c := make(chan string) - for k := range req.CreatePodReq { - reqPod := req.CreatePodReq[k] - go func() { - defer wg.Done() - resp, err := CreatePod(ctx, reqPod) - if err != nil || resp == nil { - fmt.Println(errors.Wrap(err, "Batch pcm_pod creation error")) - return - } - c <- resp.RequestId - }() - - } - go func() { - defer close(c) - wg.Wait() - }() - isFinished := false - if len(requestIds) > 0 { - isFinished = true - } - - for v := range c { - requestIds = append(requestIds, v) - } - - return &pbpod.CreatePodsResp{ - Finished: isFinished, - RequestId: requestIds, - }, nil -} - -func CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodResp, error) { - var ( - pod poder.Poder - ) - - tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider)) - if err != nil { - return nil, errors.WithMessage(err, "getTenanters error") - } - - region, err := tenanter.NewRegion(pbtenant.CloudProvider(req.Provider), req.RegionId) - if err != nil { - return nil, errors.WithMessagef(err, "provider %v regionId %v", req.Provider, req.RegionId) - } - - for _, tenant := range tenanters { - if req.AccountName == "" || tenant.AccountName() == req.AccountName { - if pod, err = poder.NewPodClient(req.Provider, region, tenant); err != nil { - return nil, errors.WithMessage(err, "NewPodClient error") - } - break - } - } - - return pod.CreatePod(ctx, req) -} - -func DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) { - var ( - pod poder.Poder - ) - //pcm adk过来的请求需要从用户本地读取配置文件 - if len(req.RequestSource) > 0 { - var configFile string - flag.StringVar(&configFile, "conf", "configs/tenanter.yaml", "tenanter.yaml") - flag.Parse() - defer glog.Flush() - - if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { - if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { - glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) - } - glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) - } - - glog.Infof("load tenant from file finished") - } - tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider)) - if err != nil { - return nil, errors.WithMessage(err, "getTenanters error") - } - - region, err := tenanter.NewRegion(pbtenant.CloudProvider(req.Provider), req.RegionId) - if err != nil { - return nil, errors.WithMessagef(err, "provider %v regionId %v", pbtenant.CloudProvider(req.Provider), req.RegionId) - } - - for _, tenant := range tenanters { - if req.AccountName == "" || tenant.AccountName() == req.AccountName { - if pod, err = poder.NewPodClient(req.Provider, region, tenant); err != nil { - return nil, errors.WithMessage(err, "NewPodClient error") - } - break - } - } - - return pod.DeletePod(ctx, req) -} - -func UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) { - var ( - pod poder.Poder - ) - //pcm adk过来的请求需要从用户本地读取配置文件 - if len(req.RequestSource) > 0 { - var configFile string - flag.StringVar(&configFile, "conf", "configs/tenanter.yaml", "tenanter.yaml") - flag.Parse() - defer glog.Flush() - - if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { - if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { - glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) - } - glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) - } - - glog.Infof("load tenant from file finished") - } - tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider)) - if err != nil { - return nil, errors.WithMessage(err, "getTenanters error") - } - - region, err := tenanter.NewRegion(pbtenant.CloudProvider(req.Provider), req.RegionId) - if err != nil { - return nil, errors.WithMessagef(err, "provider %v regionId %v", req.Provider, req.RegionId) - } - - for _, tenant := range tenanters { - if req.AccountName == "" || tenant.AccountName() == req.AccountName { - if pod, err = poder.NewPodClient(req.Provider, region, tenant); err != nil { - return nil, errors.WithMessage(err, "NewPodClient error") - } - break - } - } - - return pod.UpdatePod(ctx, req) -} - -func ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) { - var ( - pod poder.Poder - ) - - tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider)) - if err != nil { - return nil, errors.WithMessage(err, "getTenanters error") - } - - region, err := tenanter.NewRegion(pbtenant.CloudProvider(req.Provider), req.RegionId) - if err != nil { - return nil, errors.WithMessagef(err, "provider %v regionId %v", req.Provider, req.RegionId) - } - - for _, tenant := range tenanters { - if req.AccountName == "" || tenant.AccountName() == req.AccountName { - if pod, err = poder.NewPodClient(req.Provider, region, tenant); err != nil { - return nil, errors.WithMessage(err, "NewPodClient error") - } - break - } - } - - return pod.ListPodDetail(ctx, req) -} - -func ListPod(ctx context.Context, req *pbpod.ListPodReq) (*pbpod.ListPodResp, error) { - var ( - wg sync.WaitGroup - mutex sync.Mutex - pods []*pbpod.PodInstance - tenanters []tenanter.Tenanter - ) - //pcm adk过来的请求需要从用户本地读取配置文件 - if len(req.RequestSource) > 0 { - var configFile string - flag.StringVar(&configFile, "conf", "configs/tenanter.yaml", "tenanter.yaml") - flag.Parse() - defer glog.Flush() - - if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { - if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { - glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) - } - glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) - } - - glog.Infof("load tenant from file finished") - } - - tenanters, _ = tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider)) - - //get the available region for product - reqPodRegion := &pbpod.GetPodRegionReq{Provider: req.GetProvider()} - respPodRegion, err := GetPodRegion(ctx, reqPodRegion) - if err != nil { - return nil, errors.WithMessage(err, "getPodRegion error") - } - - wg.Add(len(tenanters) * len(respPodRegion.Regions)) - for _, t := range tenanters { - for _, region := range respPodRegion.Regions { - go func(tenant tenanter.Tenanter, region tenanter.Region) { - defer wg.Done() - pod, err := poder.NewPodClient(req.Provider, region, tenant) - if err != nil { - glog.Errorf("New Pod Client error %v", err) - return - } - - request := &pbpod.ListPodDetailReq{ - Provider: req.Provider, - AccountName: tenant.AccountName(), - RegionId: region.GetId(), - Namespace: req.Namespace, - PageNumber: 1, - PageSize: 100, - NextToken: "", - } - for { - resp, err := pod.ListPodDetail(ctx, request) - if err != nil { - glog.Errorf("ListDetail error %v", err) - return - } - mutex.Lock() - pods = append(pods, resp.Pods...) - mutex.Unlock() - if resp.Finished { - break - } - request.PageNumber, request.PageSize, request.NextToken = resp.PageNumber, resp.PageSize, resp.NextToken - } - }(t, region) - - } - } - wg.Wait() - - return &pbpod.ListPodResp{Pods: pods}, nil -} - -func ListPodAll(ctx context.Context) (*pbpod.ListPodResp, error) { - var ( - wg sync.WaitGroup - mutex sync.Mutex - pods []*pbpod.PodInstance - ) - - wg.Add(len(pbpod.CloudProvider_name)) - for k := range pbpod.CloudProvider_name { - go func(provider int32) { - defer wg.Done() - - //针对私有K8S集群,调用listAll时默认只查询ListPodDetailReq namespace下的pod - if provider == 3 { - resp, err := ListPod(ctx, &pbpod.ListPodReq{Provider: pbpod.CloudProvider(provider), Namespace: "pcm"}) - if err != nil { - glog.Errorf("List error %v", err) - return - } - mutex.Lock() - pods = append(pods, resp.Pods...) - mutex.Unlock() - } else { - resp, err := ListPod(ctx, &pbpod.ListPodReq{Provider: pbpod.CloudProvider(provider)}) - if err != nil { - glog.Errorf("List error %v", err) - return - } - mutex.Lock() - pods = append(pods, resp.Pods...) - mutex.Unlock() - } - - }(k) - } - - wg.Wait() - - return &pbpod.ListPodResp{Pods: pods}, nil -} diff --git a/adaptor/pcm_pod/server/tencent/client.go b/adaptor/pcm_pod/server/tencent/client.go deleted file mode 100644 index ded665af8..000000000 --- a/adaptor/pcm_pod/server/tencent/client.go +++ /dev/null @@ -1,7187 +0,0 @@ -// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package v20180525 - -import ( - pbpod "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server" - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl" - "context" - "errors" - "flag" - "github.com/golang/glog" - "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" - tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" - "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" - "strconv" -) - -const APIVersion = "2018-05-25" - -type Client struct { - common.Client -} - -// Deprecated -func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) { - cpf := profile.NewClientProfile() - client = &Client{} - client.Init(region).WithSecretId(secretId, secretKey).WithProfile(cpf) - return -} - -func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error) { - client = &Client{} - client.Init(region). - WithCredential(credential). - WithProfile(clientProfile) - return -} - -func NewAcquireClusterAdminRoleRequest() (request *AcquireClusterAdminRoleRequest) { - request = &AcquireClusterAdminRoleRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "AcquireClusterAdminRole") - - return -} - -func NewAcquireClusterAdminRoleResponse() (response *AcquireClusterAdminRoleResponse) { - response = &AcquireClusterAdminRoleResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// AcquireClusterAdminRole -// 通过此接口,可以获取集群的tke:admin的ClusterRole,即管理员角色,可以用于CAM侧高权限的用户,通过CAM策略给予子账户此接口权限,进而可以通过此接口直接获取到kubernetes集群内的管理员角色。 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" -// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" -// INTERNALERROR_KUBERNETESGETOPERATIONERROR = "InternalError.KubernetesGetOperationError" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" -// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" -func (c *Client) AcquireClusterAdminRole(request *AcquireClusterAdminRoleRequest) (response *AcquireClusterAdminRoleResponse, err error) { - return c.AcquireClusterAdminRoleWithContext(context.Background(), request) -} - -// AcquireClusterAdminRole -// 通过此接口,可以获取集群的tke:admin的ClusterRole,即管理员角色,可以用于CAM侧高权限的用户,通过CAM策略给予子账户此接口权限,进而可以通过此接口直接获取到kubernetes集群内的管理员角色。 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" -// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" -// INTERNALERROR_KUBERNETESGETOPERATIONERROR = "InternalError.KubernetesGetOperationError" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" -// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" -func (c *Client) AcquireClusterAdminRoleWithContext(ctx context.Context, request *AcquireClusterAdminRoleRequest) (response *AcquireClusterAdminRoleResponse, err error) { - if request == nil { - request = NewAcquireClusterAdminRoleRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("AcquireClusterAdminRole require credential") - } - - request.SetContext(ctx) - - response = NewAcquireClusterAdminRoleResponse() - err = c.Send(request, response) - return -} - -func NewAddClusterCIDRRequest() (request *AddClusterCIDRRequest) { - request = &AddClusterCIDRRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "AddClusterCIDR") - - return -} - -func NewAddClusterCIDRResponse() (response *AddClusterCIDRResponse) { - response = &AddClusterCIDRResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// AddClusterCIDR -// 给GR集群增加可用的ClusterCIDR -// -// 可能返回的错误码: -// -// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange" -// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster" -// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" -// INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" -// INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) AddClusterCIDR(request *AddClusterCIDRRequest) (response *AddClusterCIDRResponse, err error) { - return c.AddClusterCIDRWithContext(context.Background(), request) -} - -// AddClusterCIDR -// 给GR集群增加可用的ClusterCIDR -// -// 可能返回的错误码: -// -// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange" -// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster" -// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" -// INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" -// INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) AddClusterCIDRWithContext(ctx context.Context, request *AddClusterCIDRRequest) (response *AddClusterCIDRResponse, err error) { - if request == nil { - request = NewAddClusterCIDRRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("AddClusterCIDR require credential") - } - - request.SetContext(ctx) - - response = NewAddClusterCIDRResponse() - err = c.Send(request, response) - return -} - -func NewAddExistedInstancesRequest() (request *AddExistedInstancesRequest) { - request = &AddExistedInstancesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "AddExistedInstances") - - return -} - -func NewAddExistedInstancesResponse() (response *AddExistedInstancesResponse) { - response = &AddExistedInstancesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// AddExistedInstances -// 添加已经存在的实例到集群 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -func (c *Client) AddExistedInstances(request *AddExistedInstancesRequest) (response *AddExistedInstancesResponse, err error) { - return c.AddExistedInstancesWithContext(context.Background(), request) -} - -// AddExistedInstances -// 添加已经存在的实例到集群 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -func (c *Client) AddExistedInstancesWithContext(ctx context.Context, request *AddExistedInstancesRequest) (response *AddExistedInstancesResponse, err error) { - if request == nil { - request = NewAddExistedInstancesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("AddExistedInstances require credential") - } - - request.SetContext(ctx) - - response = NewAddExistedInstancesResponse() - err = c.Send(request, response) - return -} - -func NewAddNodeToNodePoolRequest() (request *AddNodeToNodePoolRequest) { - request = &AddNodeToNodePoolRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "AddNodeToNodePool") - - return -} - -func NewAddNodeToNodePoolResponse() (response *AddNodeToNodePoolResponse) { - response = &AddNodeToNodePoolResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// AddNodeToNodePool -// 将集群内节点移入节点池 -// -// 可能返回的错误码: -// -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) AddNodeToNodePool(request *AddNodeToNodePoolRequest) (response *AddNodeToNodePoolResponse, err error) { - return c.AddNodeToNodePoolWithContext(context.Background(), request) -} - -// AddNodeToNodePool -// 将集群内节点移入节点池 -// -// 可能返回的错误码: -// -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) AddNodeToNodePoolWithContext(ctx context.Context, request *AddNodeToNodePoolRequest) (response *AddNodeToNodePoolResponse, err error) { - if request == nil { - request = NewAddNodeToNodePoolRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("AddNodeToNodePool require credential") - } - - request.SetContext(ctx) - - response = NewAddNodeToNodePoolResponse() - err = c.Send(request, response) - return -} - -func NewAddVpcCniSubnetsRequest() (request *AddVpcCniSubnetsRequest) { - request = &AddVpcCniSubnetsRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "AddVpcCniSubnets") - - return -} - -func NewAddVpcCniSubnetsResponse() (response *AddVpcCniSubnetsResponse) { - response = &AddVpcCniSubnetsResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// AddVpcCniSubnets -// 针对VPC-CNI模式的集群,增加集群容器网络可使用的子网 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) AddVpcCniSubnets(request *AddVpcCniSubnetsRequest) (response *AddVpcCniSubnetsResponse, err error) { - return c.AddVpcCniSubnetsWithContext(context.Background(), request) -} - -// AddVpcCniSubnets -// 针对VPC-CNI模式的集群,增加集群容器网络可使用的子网 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) AddVpcCniSubnetsWithContext(ctx context.Context, request *AddVpcCniSubnetsRequest) (response *AddVpcCniSubnetsResponse, err error) { - if request == nil { - request = NewAddVpcCniSubnetsRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("AddVpcCniSubnets require credential") - } - - request.SetContext(ctx) - - response = NewAddVpcCniSubnetsResponse() - err = c.Send(request, response) - return -} - -func NewCheckInstancesUpgradeAbleRequest() (request *CheckInstancesUpgradeAbleRequest) { - request = &CheckInstancesUpgradeAbleRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CheckInstancesUpgradeAble") - - return -} - -func NewCheckInstancesUpgradeAbleResponse() (response *CheckInstancesUpgradeAbleResponse) { - response = &CheckInstancesUpgradeAbleResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CheckInstancesUpgradeAble -// 检查给定节点列表中哪些是可升级的 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -func (c *Client) CheckInstancesUpgradeAble(request *CheckInstancesUpgradeAbleRequest) (response *CheckInstancesUpgradeAbleResponse, err error) { - return c.CheckInstancesUpgradeAbleWithContext(context.Background(), request) -} - -// CheckInstancesUpgradeAble -// 检查给定节点列表中哪些是可升级的 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -func (c *Client) CheckInstancesUpgradeAbleWithContext(ctx context.Context, request *CheckInstancesUpgradeAbleRequest) (response *CheckInstancesUpgradeAbleResponse, err error) { - if request == nil { - request = NewCheckInstancesUpgradeAbleRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CheckInstancesUpgradeAble require credential") - } - - request.SetContext(ctx) - - response = NewCheckInstancesUpgradeAbleResponse() - err = c.Send(request, response) - return -} - -func NewCreateClusterRequest() (request *CreateClusterRequest) { - request = &CreateClusterRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CreateCluster") - - return -} - -func NewCreateClusterResponse() (response *CreateClusterResponse) { - response = &CreateClusterResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CreateCluster -// 创建集群 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster" -// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" -// INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr" -// INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute" -// INTERNALERROR_CIDRINVALI = "InternalError.CidrInvali" -// INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" -// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" -// INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNUMBERNOTMATCH = "InternalError.CvmNumberNotMatch" -// INTERNALERROR_CVMSTATUS = "InternalError.CvmStatus" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" -// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" -// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" -// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" -// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" -// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" -// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" -// INTERNALERROR_QUOTAUSGLIMIT = "InternalError.QuotaUSGLimit" -// INTERNALERROR_TASKCREATEFAILED = "InternalError.TaskCreateFailed" -// INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange" -// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster" -// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" -// INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" -// INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" -// INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" -// INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR" -// LIMITEXCEEDED = "LimitExceeded" -func (c *Client) CreateCluster(request *CreateClusterRequest) (response *CreateClusterResponse, err error) { - return c.CreateClusterWithContext(context.Background(), request) -} - -// CreateCluster -// 创建集群 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster" -// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" -// INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr" -// INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute" -// INTERNALERROR_CIDRINVALI = "InternalError.CidrInvali" -// INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" -// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" -// INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNUMBERNOTMATCH = "InternalError.CvmNumberNotMatch" -// INTERNALERROR_CVMSTATUS = "InternalError.CvmStatus" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" -// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" -// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" -// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" -// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" -// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" -// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" -// INTERNALERROR_QUOTAUSGLIMIT = "InternalError.QuotaUSGLimit" -// INTERNALERROR_TASKCREATEFAILED = "InternalError.TaskCreateFailed" -// INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange" -// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster" -// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" -// INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" -// INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" -// INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" -// INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR" -// LIMITEXCEEDED = "LimitExceeded" -func (c *Client) CreateClusterWithContext(ctx context.Context, request *CreateClusterRequest) (response *CreateClusterResponse, err error) { - if request == nil { - request = NewCreateClusterRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CreateCluster require credential") - } - - request.SetContext(ctx) - - response = NewCreateClusterResponse() - err = c.Send(request, response) - return -} - -func NewCreateClusterAsGroupRequest() (request *CreateClusterAsGroupRequest) { - request = &CreateClusterAsGroupRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CreateClusterAsGroup") - - return -} - -func NewCreateClusterAsGroupResponse() (response *CreateClusterAsGroupResponse) { - response = &CreateClusterAsGroupResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CreateClusterAsGroup -// 为已经存在的集群创建伸缩组 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" -// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) CreateClusterAsGroup(request *CreateClusterAsGroupRequest) (response *CreateClusterAsGroupResponse, err error) { - return c.CreateClusterAsGroupWithContext(context.Background(), request) -} - -// CreateClusterAsGroup -// 为已经存在的集群创建伸缩组 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" -// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) CreateClusterAsGroupWithContext(ctx context.Context, request *CreateClusterAsGroupRequest) (response *CreateClusterAsGroupResponse, err error) { - if request == nil { - request = NewCreateClusterAsGroupRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CreateClusterAsGroup require credential") - } - - request.SetContext(ctx) - - response = NewCreateClusterAsGroupResponse() - err = c.Send(request, response) - return -} - -func NewCreateClusterEndpointRequest() (request *CreateClusterEndpointRequest) { - request = &CreateClusterEndpointRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CreateClusterEndpoint") - - return -} - -func NewCreateClusterEndpointResponse() (response *CreateClusterEndpointResponse) { - response = &CreateClusterEndpointResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CreateClusterEndpoint -// 创建集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_EMPTYCLUSTERNOTSUPPORT = "InternalError.EmptyClusterNotSupport" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) CreateClusterEndpoint(request *CreateClusterEndpointRequest) (response *CreateClusterEndpointResponse, err error) { - return c.CreateClusterEndpointWithContext(context.Background(), request) -} - -// CreateClusterEndpoint -// 创建集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_EMPTYCLUSTERNOTSUPPORT = "InternalError.EmptyClusterNotSupport" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) CreateClusterEndpointWithContext(ctx context.Context, request *CreateClusterEndpointRequest) (response *CreateClusterEndpointResponse, err error) { - if request == nil { - request = NewCreateClusterEndpointRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CreateClusterEndpoint require credential") - } - - request.SetContext(ctx) - - response = NewCreateClusterEndpointResponse() - err = c.Send(request, response) - return -} - -func NewCreateClusterEndpointVipRequest() (request *CreateClusterEndpointVipRequest) { - request = &CreateClusterEndpointVipRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CreateClusterEndpointVip") - - return -} - -func NewCreateClusterEndpointVipResponse() (response *CreateClusterEndpointVipResponse) { - response = &CreateClusterEndpointVipResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CreateClusterEndpointVip -// 创建托管集群外网访问端口(老的方式,仅支持托管集群外网端口) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) CreateClusterEndpointVip(request *CreateClusterEndpointVipRequest) (response *CreateClusterEndpointVipResponse, err error) { - return c.CreateClusterEndpointVipWithContext(context.Background(), request) -} - -// CreateClusterEndpointVip -// 创建托管集群外网访问端口(老的方式,仅支持托管集群外网端口) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) CreateClusterEndpointVipWithContext(ctx context.Context, request *CreateClusterEndpointVipRequest) (response *CreateClusterEndpointVipResponse, err error) { - if request == nil { - request = NewCreateClusterEndpointVipRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CreateClusterEndpointVip require credential") - } - - request.SetContext(ctx) - - response = NewCreateClusterEndpointVipResponse() - err = c.Send(request, response) - return -} - -func NewCreateClusterInstancesRequest() (request *CreateClusterInstancesRequest) { - request = &CreateClusterInstancesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CreateClusterInstances") - - return -} - -func NewCreateClusterInstancesResponse() (response *CreateClusterInstancesResponse) { - response = &CreateClusterInstancesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CreateClusterInstances -// 扩展(新建)集群节点 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" -// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" -// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" -// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" -// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" -// INVALIDPARAMETER = "InvalidParameter" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) CreateClusterInstances(request *CreateClusterInstancesRequest) (response *CreateClusterInstancesResponse, err error) { - return c.CreateClusterInstancesWithContext(context.Background(), request) -} - -// CreateClusterInstances -// 扩展(新建)集群节点 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" -// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" -// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" -// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" -// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" -// INVALIDPARAMETER = "InvalidParameter" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) CreateClusterInstancesWithContext(ctx context.Context, request *CreateClusterInstancesRequest) (response *CreateClusterInstancesResponse, err error) { - if request == nil { - request = NewCreateClusterInstancesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CreateClusterInstances require credential") - } - - request.SetContext(ctx) - - response = NewCreateClusterInstancesResponse() - err = c.Send(request, response) - return -} - -func NewCreateClusterNodePoolRequest() (request *CreateClusterNodePoolRequest) { - request = &CreateClusterNodePoolRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CreateClusterNodePool") - - return -} - -func NewCreateClusterNodePoolResponse() (response *CreateClusterNodePoolResponse) { - response = &CreateClusterNodePoolResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CreateClusterNodePool -// 创建节点池 -// -// 可能返回的错误码: -// -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -func (c *Client) CreateClusterNodePool(request *CreateClusterNodePoolRequest) (response *CreateClusterNodePoolResponse, err error) { - return c.CreateClusterNodePoolWithContext(context.Background(), request) -} - -// CreateClusterNodePool -// 创建节点池 -// -// 可能返回的错误码: -// -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -func (c *Client) CreateClusterNodePoolWithContext(ctx context.Context, request *CreateClusterNodePoolRequest) (response *CreateClusterNodePoolResponse, err error) { - if request == nil { - request = NewCreateClusterNodePoolRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CreateClusterNodePool require credential") - } - - request.SetContext(ctx) - - response = NewCreateClusterNodePoolResponse() - err = c.Send(request, response) - return -} - -func NewCreateClusterNodePoolFromExistingAsgRequest() (request *CreateClusterNodePoolFromExistingAsgRequest) { - request = &CreateClusterNodePoolFromExistingAsgRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CreateClusterNodePoolFromExistingAsg") - - return -} - -func NewCreateClusterNodePoolFromExistingAsgResponse() (response *CreateClusterNodePoolFromExistingAsgResponse) { - response = &CreateClusterNodePoolFromExistingAsgResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CreateClusterNodePoolFromExistingAsg -// 从伸缩组创建节点池 -// -// 可能返回的错误码: -// -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -func (c *Client) CreateClusterNodePoolFromExistingAsg(request *CreateClusterNodePoolFromExistingAsgRequest) (response *CreateClusterNodePoolFromExistingAsgResponse, err error) { - return c.CreateClusterNodePoolFromExistingAsgWithContext(context.Background(), request) -} - -// CreateClusterNodePoolFromExistingAsg -// 从伸缩组创建节点池 -// -// 可能返回的错误码: -// -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -func (c *Client) CreateClusterNodePoolFromExistingAsgWithContext(ctx context.Context, request *CreateClusterNodePoolFromExistingAsgRequest) (response *CreateClusterNodePoolFromExistingAsgResponse, err error) { - if request == nil { - request = NewCreateClusterNodePoolFromExistingAsgRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CreateClusterNodePoolFromExistingAsg require credential") - } - - request.SetContext(ctx) - - response = NewCreateClusterNodePoolFromExistingAsgResponse() - err = c.Send(request, response) - return -} - -func NewCreateClusterRouteRequest() (request *CreateClusterRouteRequest) { - request = &CreateClusterRouteRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CreateClusterRoute") - - return -} - -func NewCreateClusterRouteResponse() (response *CreateClusterRouteResponse) { - response = &CreateClusterRouteResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CreateClusterRoute -// 创建集群路由 -// -// 可能返回的错误码: -// -// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" -// INTERNALERROR_CIDROUTOFROUTETABLE = "InternalError.CidrOutOfRouteTable" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_GATEWAYALREADYASSOCIATEDCIDR = "InternalError.GatewayAlreadyAssociatedCidr" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" -// INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable" -// INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_ROUTETABLENOTFOUND = "ResourceNotFound.RouteTableNotFound" -func (c *Client) CreateClusterRoute(request *CreateClusterRouteRequest) (response *CreateClusterRouteResponse, err error) { - return c.CreateClusterRouteWithContext(context.Background(), request) -} - -// CreateClusterRoute -// 创建集群路由 -// -// 可能返回的错误码: -// -// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" -// INTERNALERROR_CIDROUTOFROUTETABLE = "InternalError.CidrOutOfRouteTable" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_GATEWAYALREADYASSOCIATEDCIDR = "InternalError.GatewayAlreadyAssociatedCidr" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" -// INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable" -// INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_ROUTETABLENOTFOUND = "ResourceNotFound.RouteTableNotFound" -func (c *Client) CreateClusterRouteWithContext(ctx context.Context, request *CreateClusterRouteRequest) (response *CreateClusterRouteResponse, err error) { - if request == nil { - request = NewCreateClusterRouteRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CreateClusterRoute require credential") - } - - request.SetContext(ctx) - - response = NewCreateClusterRouteResponse() - err = c.Send(request, response) - return -} - -func NewCreateClusterRouteTableRequest() (request *CreateClusterRouteTableRequest) { - request = &CreateClusterRouteTableRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CreateClusterRouteTable") - - return -} - -func NewCreateClusterRouteTableResponse() (response *CreateClusterRouteTableResponse) { - response = &CreateClusterRouteTableResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CreateClusterRouteTable -// 创建集群路由表 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster" -// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" -// INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr" -// INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" -// INTERNALERROR_RESOURCEEXISTALREADY = "InternalError.ResourceExistAlready" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) CreateClusterRouteTable(request *CreateClusterRouteTableRequest) (response *CreateClusterRouteTableResponse, err error) { - return c.CreateClusterRouteTableWithContext(context.Background(), request) -} - -// CreateClusterRouteTable -// 创建集群路由表 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster" -// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" -// INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr" -// INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" -// INTERNALERROR_RESOURCEEXISTALREADY = "InternalError.ResourceExistAlready" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) CreateClusterRouteTableWithContext(ctx context.Context, request *CreateClusterRouteTableRequest) (response *CreateClusterRouteTableResponse, err error) { - if request == nil { - request = NewCreateClusterRouteTableRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CreateClusterRouteTable require credential") - } - - request.SetContext(ctx) - - response = NewCreateClusterRouteTableResponse() - err = c.Send(request, response) - return -} - -func NewCreateEKSClusterRequest() (request *CreateEKSClusterRequest) { - request = &CreateEKSClusterRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CreateEKSCluster") - - return -} - -func NewCreateEKSClusterResponse() (response *CreateEKSClusterResponse) { - response = &CreateEKSClusterResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CreateEKSCluster -// 创建弹性集群 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) CreateEKSCluster(request *CreateEKSClusterRequest) (response *CreateEKSClusterResponse, err error) { - return c.CreateEKSClusterWithContext(context.Background(), request) -} - -// CreateEKSCluster -// 创建弹性集群 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) CreateEKSClusterWithContext(ctx context.Context, request *CreateEKSClusterRequest) (response *CreateEKSClusterResponse, err error) { - if request == nil { - request = NewCreateEKSClusterRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CreateEKSCluster require credential") - } - - request.SetContext(ctx) - - response = NewCreateEKSClusterResponse() - err = c.Send(request, response) - return -} - -func NewCreateEKSContainerInstancesRequest() (request *CreateEKSContainerInstancesRequest) { - request = &CreateEKSContainerInstancesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CreateEKSContainerInstances") - - return -} - -func NewCreateEKSContainerInstancesResponse() (response *CreateEKSContainerInstancesResponse) { - response = &CreateEKSContainerInstancesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CreateEKSContainerInstances -// 创建容器实例 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CMDTIMEOUT = "InternalError.CmdTimeout" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER = "InvalidParameter" -func CreateEKSContainerInstances(request *CreateEKSContainerInstancesRequest) (response *CreateEKSContainerInstancesResponse, err error) { - provider := pbpod.CloudProvider(request.ProviderId) - - var configFile string - flag.StringVar(&configFile, "conf", "configs/tenanter.yaml", "tenanter.yaml") - flag.Parse() - defer glog.Flush() - - if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { - if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { - glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) - } - glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) - } - - glog.Infof("load tenant from file finished") - tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(provider)) - var regionId int32 - var cpuPod string - var memoryPod string - container := request.Containers - containerImage := container[0].Image - containerName := container[0].Name - cpuPodFloat := container[0].Cpu - memoryPodFloat := container[0].Memory - switch request.ProviderId { - case 0: - regionId, _ = tenanter.GetAliRegionId(request.RegionId) - cpuPod = strconv.FormatFloat(*cpuPodFloat, 'f', 0, 64) - memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64) - case 1: - regionId, _ = tenanter.GetTencentRegionId(request.RegionId) - cpuPod = strconv.FormatFloat(*cpuPodFloat, 'f', 0, 64) - memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64) - case 2: - //华为的CPU和内存数量要进行转换 - regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId) - cpuPod = strconv.FormatFloat(*cpuPodFloat*1000, 'f', 0, 64) + "m" - memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64) + "Gi" - case 3: - regionId, _ = tenanter.GetK8SRegionId(request.RegionId) - cpuPod = strconv.FormatFloat(*cpuPodFloat*1000, 'f', 0, 64) + "m" - memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64) + "Gi" - } - - requestPCM := &pbpod.CreatePodReq{ - RequestSource: "tencent", - Provider: provider, - AccountName: tenanters[0].AccountName(), - PodName: *request.EksCiName, - RegionId: regionId, - ContainerImage: *containerImage, - ContainerName: *containerName, - CpuPod: cpuPod, - MemoryPod: memoryPod, - SecurityGroupId: "sg-6qlun7hd", - SubnetId: "subnet-mnwfg2fk", - VpcId: "vpc-rkwt40g5", - Namespace: "pcm", - } - - resp, err := server.CreatePod(nil, requestPCM) - if err != nil { - glog.Errorf("CreatePod error %+v", err) - return - } - glog.Infof("CreatePod response %+v", resp) - response = &CreateEKSContainerInstancesResponse{ - Response: (*struct { - EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - })(&struct { - EksCiIds []*string - RequestId *string - }{ - EksCiIds: []*string{&resp.PodId}, - RequestId: &resp.RequestId, - }), - BaseResponse: &tchttp.BaseResponse{}, - } - return response, nil -} - -// CreateEKSContainerInstances -// 创建容器实例 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CMDTIMEOUT = "InternalError.CmdTimeout" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) CreateEKSContainerInstancesWithContext(ctx context.Context, request *CreateEKSContainerInstancesRequest) (response *CreateEKSContainerInstancesResponse, err error) { - if request == nil { - request = NewCreateEKSContainerInstancesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CreateEKSContainerInstances require credential") - } - - request.SetContext(ctx) - - response = NewCreateEKSContainerInstancesResponse() - err = c.Send(request, response) - return -} - -func NewCreateImageCacheRequest() (request *CreateImageCacheRequest) { - request = &CreateImageCacheRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CreateImageCache") - - return -} - -func NewCreateImageCacheResponse() (response *CreateImageCacheResponse) { - response = &CreateImageCacheResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CreateImageCache -// 创建镜像缓存的接口。创建过程中,请勿删除EKSCI实例和云盘,否则镜像缓存将创建失败。 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) CreateImageCache(request *CreateImageCacheRequest) (response *CreateImageCacheResponse, err error) { - return c.CreateImageCacheWithContext(context.Background(), request) -} - -// CreateImageCache -// 创建镜像缓存的接口。创建过程中,请勿删除EKSCI实例和云盘,否则镜像缓存将创建失败。 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) CreateImageCacheWithContext(ctx context.Context, request *CreateImageCacheRequest) (response *CreateImageCacheResponse, err error) { - if request == nil { - request = NewCreateImageCacheRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CreateImageCache require credential") - } - - request.SetContext(ctx) - - response = NewCreateImageCacheResponse() - err = c.Send(request, response) - return -} - -func NewCreatePrometheusAlertRuleRequest() (request *CreatePrometheusAlertRuleRequest) { - request = &CreatePrometheusAlertRuleRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusAlertRule") - - return -} - -func NewCreatePrometheusAlertRuleResponse() (response *CreatePrometheusAlertRuleResponse) { - response = &CreatePrometheusAlertRuleResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CreatePrometheusAlertRule -// 创建告警规则 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND = "ResourceNotFound" -func (c *Client) CreatePrometheusAlertRule(request *CreatePrometheusAlertRuleRequest) (response *CreatePrometheusAlertRuleResponse, err error) { - return c.CreatePrometheusAlertRuleWithContext(context.Background(), request) -} - -// CreatePrometheusAlertRule -// 创建告警规则 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND = "ResourceNotFound" -func (c *Client) CreatePrometheusAlertRuleWithContext(ctx context.Context, request *CreatePrometheusAlertRuleRequest) (response *CreatePrometheusAlertRuleResponse, err error) { - if request == nil { - request = NewCreatePrometheusAlertRuleRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CreatePrometheusAlertRule require credential") - } - - request.SetContext(ctx) - - response = NewCreatePrometheusAlertRuleResponse() - err = c.Send(request, response) - return -} - -func NewCreatePrometheusDashboardRequest() (request *CreatePrometheusDashboardRequest) { - request = &CreatePrometheusDashboardRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusDashboard") - - return -} - -func NewCreatePrometheusDashboardResponse() (response *CreatePrometheusDashboardResponse) { - response = &CreatePrometheusDashboardResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CreatePrometheusDashboard -// 创建grafana监控面板 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" -func (c *Client) CreatePrometheusDashboard(request *CreatePrometheusDashboardRequest) (response *CreatePrometheusDashboardResponse, err error) { - return c.CreatePrometheusDashboardWithContext(context.Background(), request) -} - -// CreatePrometheusDashboard -// 创建grafana监控面板 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" -func (c *Client) CreatePrometheusDashboardWithContext(ctx context.Context, request *CreatePrometheusDashboardRequest) (response *CreatePrometheusDashboardResponse, err error) { - if request == nil { - request = NewCreatePrometheusDashboardRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CreatePrometheusDashboard require credential") - } - - request.SetContext(ctx) - - response = NewCreatePrometheusDashboardResponse() - err = c.Send(request, response) - return -} - -func NewCreatePrometheusTemplateRequest() (request *CreatePrometheusTemplateRequest) { - request = &CreatePrometheusTemplateRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusTemplate") - - return -} - -func NewCreatePrometheusTemplateResponse() (response *CreatePrometheusTemplateResponse) { - response = &CreatePrometheusTemplateResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// CreatePrometheusTemplate -// 创建一个云原生Prometheus模板实例 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) CreatePrometheusTemplate(request *CreatePrometheusTemplateRequest) (response *CreatePrometheusTemplateResponse, err error) { - return c.CreatePrometheusTemplateWithContext(context.Background(), request) -} - -// CreatePrometheusTemplate -// 创建一个云原生Prometheus模板实例 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) CreatePrometheusTemplateWithContext(ctx context.Context, request *CreatePrometheusTemplateRequest) (response *CreatePrometheusTemplateResponse, err error) { - if request == nil { - request = NewCreatePrometheusTemplateRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("CreatePrometheusTemplate require credential") - } - - request.SetContext(ctx) - - response = NewCreatePrometheusTemplateResponse() - err = c.Send(request, response) - return -} - -func NewDeleteClusterRequest() (request *DeleteClusterRequest) { - request = &DeleteClusterRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DeleteCluster") - - return -} - -func NewDeleteClusterResponse() (response *DeleteClusterResponse) { - response = &DeleteClusterResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DeleteCluster -// 删除集群(YUNAPI V3版本) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// OPERATIONDENIED_CLUSTERINDELETIONPROTECTION = "OperationDenied.ClusterInDeletionProtection" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -func (c *Client) DeleteCluster(request *DeleteClusterRequest) (response *DeleteClusterResponse, err error) { - return c.DeleteClusterWithContext(context.Background(), request) -} - -// DeleteCluster -// 删除集群(YUNAPI V3版本) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// OPERATIONDENIED_CLUSTERINDELETIONPROTECTION = "OperationDenied.ClusterInDeletionProtection" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -func (c *Client) DeleteClusterWithContext(ctx context.Context, request *DeleteClusterRequest) (response *DeleteClusterResponse, err error) { - if request == nil { - request = NewDeleteClusterRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DeleteCluster require credential") - } - - request.SetContext(ctx) - - response = NewDeleteClusterResponse() - err = c.Send(request, response) - return -} - -func NewDeleteClusterAsGroupsRequest() (request *DeleteClusterAsGroupsRequest) { - request = &DeleteClusterAsGroupsRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterAsGroups") - - return -} - -func NewDeleteClusterAsGroupsResponse() (response *DeleteClusterAsGroupsResponse) { - response = &DeleteClusterAsGroupsResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DeleteClusterAsGroups -// 删除集群伸缩组 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" -// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" -// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" -// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// LIMITEXCEEDED = "LimitExceeded" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// UNKNOWNPARAMETER = "UnknownParameter" -func (c *Client) DeleteClusterAsGroups(request *DeleteClusterAsGroupsRequest) (response *DeleteClusterAsGroupsResponse, err error) { - return c.DeleteClusterAsGroupsWithContext(context.Background(), request) -} - -// DeleteClusterAsGroups -// 删除集群伸缩组 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" -// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" -// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" -// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// LIMITEXCEEDED = "LimitExceeded" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// UNKNOWNPARAMETER = "UnknownParameter" -func (c *Client) DeleteClusterAsGroupsWithContext(ctx context.Context, request *DeleteClusterAsGroupsRequest) (response *DeleteClusterAsGroupsResponse, err error) { - if request == nil { - request = NewDeleteClusterAsGroupsRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DeleteClusterAsGroups require credential") - } - - request.SetContext(ctx) - - response = NewDeleteClusterAsGroupsResponse() - err = c.Send(request, response) - return -} - -func NewDeleteClusterEndpointRequest() (request *DeleteClusterEndpointRequest) { - request = &DeleteClusterEndpointRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterEndpoint") - - return -} - -func NewDeleteClusterEndpointResponse() (response *DeleteClusterEndpointResponse) { - response = &DeleteClusterEndpointResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DeleteClusterEndpoint -// 删除集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DeleteClusterEndpoint(request *DeleteClusterEndpointRequest) (response *DeleteClusterEndpointResponse, err error) { - return c.DeleteClusterEndpointWithContext(context.Background(), request) -} - -// DeleteClusterEndpoint -// 删除集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DeleteClusterEndpointWithContext(ctx context.Context, request *DeleteClusterEndpointRequest) (response *DeleteClusterEndpointResponse, err error) { - if request == nil { - request = NewDeleteClusterEndpointRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DeleteClusterEndpoint require credential") - } - - request.SetContext(ctx) - - response = NewDeleteClusterEndpointResponse() - err = c.Send(request, response) - return -} - -func NewDeleteClusterEndpointVipRequest() (request *DeleteClusterEndpointVipRequest) { - request = &DeleteClusterEndpointVipRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterEndpointVip") - - return -} - -func NewDeleteClusterEndpointVipResponse() (response *DeleteClusterEndpointVipResponse) { - response = &DeleteClusterEndpointVipResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DeleteClusterEndpointVip -// 删除托管集群外网访问端口(老的方式,仅支持托管集群外网端口) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" -// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DeleteClusterEndpointVip(request *DeleteClusterEndpointVipRequest) (response *DeleteClusterEndpointVipResponse, err error) { - return c.DeleteClusterEndpointVipWithContext(context.Background(), request) -} - -// DeleteClusterEndpointVip -// 删除托管集群外网访问端口(老的方式,仅支持托管集群外网端口) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" -// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DeleteClusterEndpointVipWithContext(ctx context.Context, request *DeleteClusterEndpointVipRequest) (response *DeleteClusterEndpointVipResponse, err error) { - if request == nil { - request = NewDeleteClusterEndpointVipRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DeleteClusterEndpointVip require credential") - } - - request.SetContext(ctx) - - response = NewDeleteClusterEndpointVipResponse() - err = c.Send(request, response) - return -} - -func NewDeleteClusterInstancesRequest() (request *DeleteClusterInstancesRequest) { - request = &DeleteClusterInstancesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterInstances") - - return -} - -func NewDeleteClusterInstancesResponse() (response *DeleteClusterInstancesResponse) { - response = &DeleteClusterInstancesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DeleteClusterInstances -// 删除集群中的实例 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -func (c *Client) DeleteClusterInstances(request *DeleteClusterInstancesRequest) (response *DeleteClusterInstancesResponse, err error) { - return c.DeleteClusterInstancesWithContext(context.Background(), request) -} - -// DeleteClusterInstances -// 删除集群中的实例 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -func (c *Client) DeleteClusterInstancesWithContext(ctx context.Context, request *DeleteClusterInstancesRequest) (response *DeleteClusterInstancesResponse, err error) { - if request == nil { - request = NewDeleteClusterInstancesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DeleteClusterInstances require credential") - } - - request.SetContext(ctx) - - response = NewDeleteClusterInstancesResponse() - err = c.Send(request, response) - return -} - -func NewDeleteClusterNodePoolRequest() (request *DeleteClusterNodePoolRequest) { - request = &DeleteClusterNodePoolRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterNodePool") - - return -} - -func NewDeleteClusterNodePoolResponse() (response *DeleteClusterNodePoolResponse) { - response = &DeleteClusterNodePoolResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DeleteClusterNodePool -// 删除节点池 -// -// 可能返回的错误码: -// -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) DeleteClusterNodePool(request *DeleteClusterNodePoolRequest) (response *DeleteClusterNodePoolResponse, err error) { - return c.DeleteClusterNodePoolWithContext(context.Background(), request) -} - -// DeleteClusterNodePool -// 删除节点池 -// -// 可能返回的错误码: -// -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) DeleteClusterNodePoolWithContext(ctx context.Context, request *DeleteClusterNodePoolRequest) (response *DeleteClusterNodePoolResponse, err error) { - if request == nil { - request = NewDeleteClusterNodePoolRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DeleteClusterNodePool require credential") - } - - request.SetContext(ctx) - - response = NewDeleteClusterNodePoolResponse() - err = c.Send(request, response) - return -} - -func NewDeleteClusterRouteRequest() (request *DeleteClusterRouteRequest) { - request = &DeleteClusterRouteRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterRoute") - - return -} - -func NewDeleteClusterRouteResponse() (response *DeleteClusterRouteResponse) { - response = &DeleteClusterRouteResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DeleteClusterRoute -// 删除集群路由 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) DeleteClusterRoute(request *DeleteClusterRouteRequest) (response *DeleteClusterRouteResponse, err error) { - return c.DeleteClusterRouteWithContext(context.Background(), request) -} - -// DeleteClusterRoute -// 删除集群路由 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) DeleteClusterRouteWithContext(ctx context.Context, request *DeleteClusterRouteRequest) (response *DeleteClusterRouteResponse, err error) { - if request == nil { - request = NewDeleteClusterRouteRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DeleteClusterRoute require credential") - } - - request.SetContext(ctx) - - response = NewDeleteClusterRouteResponse() - err = c.Send(request, response) - return -} - -func NewDeleteClusterRouteTableRequest() (request *DeleteClusterRouteTableRequest) { - request = &DeleteClusterRouteTableRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterRouteTable") - - return -} - -func NewDeleteClusterRouteTableResponse() (response *DeleteClusterRouteTableResponse) { - response = &DeleteClusterRouteTableResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DeleteClusterRouteTable -// 删除集群路由表 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_ROUTETABLENOTEMPTY = "InternalError.RouteTableNotEmpty" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" -func (c *Client) DeleteClusterRouteTable(request *DeleteClusterRouteTableRequest) (response *DeleteClusterRouteTableResponse, err error) { - return c.DeleteClusterRouteTableWithContext(context.Background(), request) -} - -// DeleteClusterRouteTable -// 删除集群路由表 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_ROUTETABLENOTEMPTY = "InternalError.RouteTableNotEmpty" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" -func (c *Client) DeleteClusterRouteTableWithContext(ctx context.Context, request *DeleteClusterRouteTableRequest) (response *DeleteClusterRouteTableResponse, err error) { - if request == nil { - request = NewDeleteClusterRouteTableRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DeleteClusterRouteTable require credential") - } - - request.SetContext(ctx) - - response = NewDeleteClusterRouteTableResponse() - err = c.Send(request, response) - return -} - -func NewDeleteEKSClusterRequest() (request *DeleteEKSClusterRequest) { - request = &DeleteEKSClusterRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DeleteEKSCluster") - - return -} - -func NewDeleteEKSClusterResponse() (response *DeleteEKSClusterResponse) { - response = &DeleteEKSClusterResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DeleteEKSCluster -// 删除弹性集群(yunapiv3) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DeleteEKSCluster(request *DeleteEKSClusterRequest) (response *DeleteEKSClusterResponse, err error) { - return c.DeleteEKSClusterWithContext(context.Background(), request) -} - -// DeleteEKSCluster -// 删除弹性集群(yunapiv3) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DeleteEKSClusterWithContext(ctx context.Context, request *DeleteEKSClusterRequest) (response *DeleteEKSClusterResponse, err error) { - if request == nil { - request = NewDeleteEKSClusterRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DeleteEKSCluster require credential") - } - - request.SetContext(ctx) - - response = NewDeleteEKSClusterResponse() - err = c.Send(request, response) - return -} - -func NewDeleteEKSContainerInstancesRequest() (request *DeleteEKSContainerInstancesRequest) { - request = &DeleteEKSContainerInstancesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DeleteEKSContainerInstances") - - return -} - -func NewDeleteEKSContainerInstancesResponse() (response *DeleteEKSContainerInstancesResponse) { - response = &DeleteEKSContainerInstancesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DeleteEKSContainerInstances -// 删除容器实例,可批量删除 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// RESOURCENOTFOUND = "ResourceNotFound" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func DeleteEKSContainerInstances(request *DeleteEKSContainerInstancesRequest) (response *DeleteEKSContainerInstancesResponse, err error) { - provider := pbpod.CloudProvider(request.ProviderId) - var configFile string - flag.StringVar(&configFile, "conf-tencent", "configs/tenanter.yaml", "tenanter.yaml") - flag.Parse() - defer glog.Flush() - - if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { - if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { - glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) - } - glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) - } - - glog.Infof("load tenant from file finished") - var regionId int32 - var pcmId string - podId := request.EksCiIds[0] - podName := request.ContainerGroupName - switch request.ProviderId { - case 0: - regionId, _ = tenanter.GetAliRegionId(request.RegionId) - pcmId = *podId - case 1: - regionId, _ = tenanter.GetTencentRegionId(request.RegionId) - pcmId = *podId - case 2: - regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId) - pcmId = podName - case 3: - regionId, _ = tenanter.GetK8SRegionId(request.RegionId) - pcmId = podName - } - - requestPCM := &pbpod.DeletePodReq{ - RequestSource: "tencent", - Provider: provider, - AccountName: request.AccountName, - PcmId: pcmId, - PodId: *podId, - PodName: podName, - Namespace: request.Namespace, - RegionId: regionId, - } - - resp, err := server.DeletePod(nil, requestPCM) - glog.Infof("CreatePod response %+v", resp) - response = &DeleteEKSContainerInstancesResponse{ - Response: (*struct { - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - })(&struct { - RequestId *string - }{ - RequestId: &resp.RequestId, - }), - BaseResponse: &tchttp.BaseResponse{}, - } - return response, nil -} - -// DeleteEKSContainerInstances -// 删除容器实例,可批量删除 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// RESOURCENOTFOUND = "ResourceNotFound" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DeleteEKSContainerInstancesWithContext(ctx context.Context, request *DeleteEKSContainerInstancesRequest) (response *DeleteEKSContainerInstancesResponse, err error) { - if request == nil { - request = NewDeleteEKSContainerInstancesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DeleteEKSContainerInstances require credential") - } - - request.SetContext(ctx) - - response = NewDeleteEKSContainerInstancesResponse() - err = c.Send(request, response) - return -} - -func NewDeleteImageCachesRequest() (request *DeleteImageCachesRequest) { - request = &DeleteImageCachesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DeleteImageCaches") - - return -} - -func NewDeleteImageCachesResponse() (response *DeleteImageCachesResponse) { - response = &DeleteImageCachesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DeleteImageCaches -// 批量删除镜像缓存 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// RESOURCENOTFOUND = "ResourceNotFound" -func (c *Client) DeleteImageCaches(request *DeleteImageCachesRequest) (response *DeleteImageCachesResponse, err error) { - return c.DeleteImageCachesWithContext(context.Background(), request) -} - -// DeleteImageCaches -// 批量删除镜像缓存 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// RESOURCENOTFOUND = "ResourceNotFound" -func (c *Client) DeleteImageCachesWithContext(ctx context.Context, request *DeleteImageCachesRequest) (response *DeleteImageCachesResponse, err error) { - if request == nil { - request = NewDeleteImageCachesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DeleteImageCaches require credential") - } - - request.SetContext(ctx) - - response = NewDeleteImageCachesResponse() - err = c.Send(request, response) - return -} - -func NewDeletePrometheusAlertRuleRequest() (request *DeletePrometheusAlertRuleRequest) { - request = &DeletePrometheusAlertRuleRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusAlertRule") - - return -} - -func NewDeletePrometheusAlertRuleResponse() (response *DeletePrometheusAlertRuleResponse) { - response = &DeletePrometheusAlertRuleResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DeletePrometheusAlertRule -// 删除告警规则 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" -func (c *Client) DeletePrometheusAlertRule(request *DeletePrometheusAlertRuleRequest) (response *DeletePrometheusAlertRuleResponse, err error) { - return c.DeletePrometheusAlertRuleWithContext(context.Background(), request) -} - -// DeletePrometheusAlertRule -// 删除告警规则 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" -func (c *Client) DeletePrometheusAlertRuleWithContext(ctx context.Context, request *DeletePrometheusAlertRuleRequest) (response *DeletePrometheusAlertRuleResponse, err error) { - if request == nil { - request = NewDeletePrometheusAlertRuleRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DeletePrometheusAlertRule require credential") - } - - request.SetContext(ctx) - - response = NewDeletePrometheusAlertRuleResponse() - err = c.Send(request, response) - return -} - -func NewDeletePrometheusTemplateRequest() (request *DeletePrometheusTemplateRequest) { - request = &DeletePrometheusTemplateRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusTemplate") - - return -} - -func NewDeletePrometheusTemplateResponse() (response *DeletePrometheusTemplateResponse) { - response = &DeletePrometheusTemplateResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DeletePrometheusTemplate -// 删除一个云原生Prometheus配置模板 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" -func (c *Client) DeletePrometheusTemplate(request *DeletePrometheusTemplateRequest) (response *DeletePrometheusTemplateResponse, err error) { - return c.DeletePrometheusTemplateWithContext(context.Background(), request) -} - -// DeletePrometheusTemplate -// 删除一个云原生Prometheus配置模板 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" -func (c *Client) DeletePrometheusTemplateWithContext(ctx context.Context, request *DeletePrometheusTemplateRequest) (response *DeletePrometheusTemplateResponse, err error) { - if request == nil { - request = NewDeletePrometheusTemplateRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DeletePrometheusTemplate require credential") - } - - request.SetContext(ctx) - - response = NewDeletePrometheusTemplateResponse() - err = c.Send(request, response) - return -} - -func NewDeletePrometheusTemplateSyncRequest() (request *DeletePrometheusTemplateSyncRequest) { - request = &DeletePrometheusTemplateSyncRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusTemplateSync") - - return -} - -func NewDeletePrometheusTemplateSyncResponse() (response *DeletePrometheusTemplateSyncResponse) { - response = &DeletePrometheusTemplateSyncResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DeletePrometheusTemplateSync -// 取消模板同步,这将会删除目标中该模板所生产的配置 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" -func (c *Client) DeletePrometheusTemplateSync(request *DeletePrometheusTemplateSyncRequest) (response *DeletePrometheusTemplateSyncResponse, err error) { - return c.DeletePrometheusTemplateSyncWithContext(context.Background(), request) -} - -// DeletePrometheusTemplateSync -// 取消模板同步,这将会删除目标中该模板所生产的配置 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" -func (c *Client) DeletePrometheusTemplateSyncWithContext(ctx context.Context, request *DeletePrometheusTemplateSyncRequest) (response *DeletePrometheusTemplateSyncResponse, err error) { - if request == nil { - request = NewDeletePrometheusTemplateSyncRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DeletePrometheusTemplateSync require credential") - } - - request.SetContext(ctx) - - response = NewDeletePrometheusTemplateSyncResponse() - err = c.Send(request, response) - return -} - -func NewDescribeAvailableClusterVersionRequest() (request *DescribeAvailableClusterVersionRequest) { - request = &DescribeAvailableClusterVersionRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeAvailableClusterVersion") - - return -} - -func NewDescribeAvailableClusterVersionResponse() (response *DescribeAvailableClusterVersionResponse) { - response = &DescribeAvailableClusterVersionResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeAvailableClusterVersion -// 获取集群可以升级的所有版本 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -func (c *Client) DescribeAvailableClusterVersion(request *DescribeAvailableClusterVersionRequest) (response *DescribeAvailableClusterVersionResponse, err error) { - return c.DescribeAvailableClusterVersionWithContext(context.Background(), request) -} - -// DescribeAvailableClusterVersion -// 获取集群可以升级的所有版本 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -func (c *Client) DescribeAvailableClusterVersionWithContext(ctx context.Context, request *DescribeAvailableClusterVersionRequest) (response *DescribeAvailableClusterVersionResponse, err error) { - if request == nil { - request = NewDescribeAvailableClusterVersionRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeAvailableClusterVersion require credential") - } - - request.SetContext(ctx) - - response = NewDescribeAvailableClusterVersionResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClusterAsGroupOptionRequest() (request *DescribeClusterAsGroupOptionRequest) { - request = &DescribeClusterAsGroupOptionRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAsGroupOption") - - return -} - -func NewDescribeClusterAsGroupOptionResponse() (response *DescribeClusterAsGroupOptionResponse) { - response = &DescribeClusterAsGroupOptionResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusterAsGroupOption -// 集群弹性伸缩配置 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeClusterAsGroupOption(request *DescribeClusterAsGroupOptionRequest) (response *DescribeClusterAsGroupOptionResponse, err error) { - return c.DescribeClusterAsGroupOptionWithContext(context.Background(), request) -} - -// DescribeClusterAsGroupOption -// 集群弹性伸缩配置 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeClusterAsGroupOptionWithContext(ctx context.Context, request *DescribeClusterAsGroupOptionRequest) (response *DescribeClusterAsGroupOptionResponse, err error) { - if request == nil { - request = NewDescribeClusterAsGroupOptionRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusterAsGroupOption require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClusterAsGroupOptionResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClusterAsGroupsRequest() (request *DescribeClusterAsGroupsRequest) { - request = &DescribeClusterAsGroupsRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAsGroups") - - return -} - -func NewDescribeClusterAsGroupsResponse() (response *DescribeClusterAsGroupsResponse) { - response = &DescribeClusterAsGroupsResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusterAsGroups -// 集群关联的伸缩组列表 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_PODNOTFOUND = "InternalError.PodNotFound" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" -// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" -func (c *Client) DescribeClusterAsGroups(request *DescribeClusterAsGroupsRequest) (response *DescribeClusterAsGroupsResponse, err error) { - return c.DescribeClusterAsGroupsWithContext(context.Background(), request) -} - -// DescribeClusterAsGroups -// 集群关联的伸缩组列表 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_PODNOTFOUND = "InternalError.PodNotFound" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" -// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" -func (c *Client) DescribeClusterAsGroupsWithContext(ctx context.Context, request *DescribeClusterAsGroupsRequest) (response *DescribeClusterAsGroupsResponse, err error) { - if request == nil { - request = NewDescribeClusterAsGroupsRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusterAsGroups require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClusterAsGroupsResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClusterAuthenticationOptionsRequest() (request *DescribeClusterAuthenticationOptionsRequest) { - request = &DescribeClusterAuthenticationOptionsRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAuthenticationOptions") - - return -} - -func NewDescribeClusterAuthenticationOptionsResponse() (response *DescribeClusterAuthenticationOptionsResponse) { - response = &DescribeClusterAuthenticationOptionsResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusterAuthenticationOptions -// 查看集群认证配置 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -func (c *Client) DescribeClusterAuthenticationOptions(request *DescribeClusterAuthenticationOptionsRequest) (response *DescribeClusterAuthenticationOptionsResponse, err error) { - return c.DescribeClusterAuthenticationOptionsWithContext(context.Background(), request) -} - -// DescribeClusterAuthenticationOptions -// 查看集群认证配置 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -func (c *Client) DescribeClusterAuthenticationOptionsWithContext(ctx context.Context, request *DescribeClusterAuthenticationOptionsRequest) (response *DescribeClusterAuthenticationOptionsResponse, err error) { - if request == nil { - request = NewDescribeClusterAuthenticationOptionsRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusterAuthenticationOptions require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClusterAuthenticationOptionsResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClusterCommonNamesRequest() (request *DescribeClusterCommonNamesRequest) { - request = &DescribeClusterCommonNamesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterCommonNames") - - return -} - -func NewDescribeClusterCommonNamesResponse() (response *DescribeClusterCommonNamesResponse) { - response = &DescribeClusterCommonNamesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusterCommonNames -// 获取指定子账户在RBAC授权模式中对应kube-apiserver客户端证书的CommonName字段,如果没有客户端证书,将会签发一个,此接口有最大传入子账户数量上限,当前为50 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" -// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" -func (c *Client) DescribeClusterCommonNames(request *DescribeClusterCommonNamesRequest) (response *DescribeClusterCommonNamesResponse, err error) { - return c.DescribeClusterCommonNamesWithContext(context.Background(), request) -} - -// DescribeClusterCommonNames -// 获取指定子账户在RBAC授权模式中对应kube-apiserver客户端证书的CommonName字段,如果没有客户端证书,将会签发一个,此接口有最大传入子账户数量上限,当前为50 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" -// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" -func (c *Client) DescribeClusterCommonNamesWithContext(ctx context.Context, request *DescribeClusterCommonNamesRequest) (response *DescribeClusterCommonNamesResponse, err error) { - if request == nil { - request = NewDescribeClusterCommonNamesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusterCommonNames require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClusterCommonNamesResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClusterControllersRequest() (request *DescribeClusterControllersRequest) { - request = &DescribeClusterControllersRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterControllers") - - return -} - -func NewDescribeClusterControllersResponse() (response *DescribeClusterControllersResponse) { - response = &DescribeClusterControllersResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusterControllers -// 用于查询Kubernetes的各个原生控制器是否开启 -// -// 可能返回的错误码: -// -// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) DescribeClusterControllers(request *DescribeClusterControllersRequest) (response *DescribeClusterControllersResponse, err error) { - return c.DescribeClusterControllersWithContext(context.Background(), request) -} - -// DescribeClusterControllers -// 用于查询Kubernetes的各个原生控制器是否开启 -// -// 可能返回的错误码: -// -// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) DescribeClusterControllersWithContext(ctx context.Context, request *DescribeClusterControllersRequest) (response *DescribeClusterControllersResponse, err error) { - if request == nil { - request = NewDescribeClusterControllersRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusterControllers require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClusterControllersResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClusterEndpointStatusRequest() (request *DescribeClusterEndpointStatusRequest) { - request = &DescribeClusterEndpointStatusRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterEndpointStatus") - - return -} - -func NewDescribeClusterEndpointStatusResponse() (response *DescribeClusterEndpointStatusResponse) { - response = &DescribeClusterEndpointStatusResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusterEndpointStatus -// 查询集群访问端口状态(独立集群开启内网/外网访问,托管集群支持开启内网访问) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_KUBERNETESINTERNAL = "InternalError.KubernetesInternal" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeClusterEndpointStatus(request *DescribeClusterEndpointStatusRequest) (response *DescribeClusterEndpointStatusResponse, err error) { - return c.DescribeClusterEndpointStatusWithContext(context.Background(), request) -} - -// DescribeClusterEndpointStatus -// 查询集群访问端口状态(独立集群开启内网/外网访问,托管集群支持开启内网访问) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_KUBERNETESINTERNAL = "InternalError.KubernetesInternal" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeClusterEndpointStatusWithContext(ctx context.Context, request *DescribeClusterEndpointStatusRequest) (response *DescribeClusterEndpointStatusResponse, err error) { - if request == nil { - request = NewDescribeClusterEndpointStatusRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusterEndpointStatus require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClusterEndpointStatusResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClusterEndpointVipStatusRequest() (request *DescribeClusterEndpointVipStatusRequest) { - request = &DescribeClusterEndpointVipStatusRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterEndpointVipStatus") - - return -} - -func NewDescribeClusterEndpointVipStatusResponse() (response *DescribeClusterEndpointVipStatusResponse) { - response = &DescribeClusterEndpointVipStatusResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusterEndpointVipStatus -// 查询集群开启端口流程状态(仅支持托管集群外网端口) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" -// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" -// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeClusterEndpointVipStatus(request *DescribeClusterEndpointVipStatusRequest) (response *DescribeClusterEndpointVipStatusResponse, err error) { - return c.DescribeClusterEndpointVipStatusWithContext(context.Background(), request) -} - -// DescribeClusterEndpointVipStatus -// 查询集群开启端口流程状态(仅支持托管集群外网端口) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" -// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" -// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeClusterEndpointVipStatusWithContext(ctx context.Context, request *DescribeClusterEndpointVipStatusRequest) (response *DescribeClusterEndpointVipStatusResponse, err error) { - if request == nil { - request = NewDescribeClusterEndpointVipStatusRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusterEndpointVipStatus require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClusterEndpointVipStatusResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClusterInstancesRequest() (request *DescribeClusterInstancesRequest) { - request = &DescribeClusterInstancesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterInstances") - - return -} - -func NewDescribeClusterInstancesResponse() (response *DescribeClusterInstancesResponse) { - response = &DescribeClusterInstancesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusterInstances -// -// 查询集群下节点实例信息 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -func (c *Client) DescribeClusterInstances(request *DescribeClusterInstancesRequest) (response *DescribeClusterInstancesResponse, err error) { - return c.DescribeClusterInstancesWithContext(context.Background(), request) -} - -// DescribeClusterInstances -// -// 查询集群下节点实例信息 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -func (c *Client) DescribeClusterInstancesWithContext(ctx context.Context, request *DescribeClusterInstancesRequest) (response *DescribeClusterInstancesResponse, err error) { - if request == nil { - request = NewDescribeClusterInstancesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusterInstances require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClusterInstancesResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClusterKubeconfigRequest() (request *DescribeClusterKubeconfigRequest) { - request = &DescribeClusterKubeconfigRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterKubeconfig") - - return -} - -func NewDescribeClusterKubeconfigResponse() (response *DescribeClusterKubeconfigResponse) { - response = &DescribeClusterKubeconfigResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusterKubeconfig -// 获取集群的kubeconfig文件,不同子账户获取自己的kubeconfig文件,该文件中有每个子账户自己的kube-apiserver的客户端证书,默认首次调此接口时候创建客户端证书,时效20年,未授予任何权限,如果是集群所有者或者主账户,则默认是cluster-admin权限。 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" -// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" -// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" -// INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -// RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" -// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" -func (c *Client) DescribeClusterKubeconfig(request *DescribeClusterKubeconfigRequest) (response *DescribeClusterKubeconfigResponse, err error) { - return c.DescribeClusterKubeconfigWithContext(context.Background(), request) -} - -// DescribeClusterKubeconfig -// 获取集群的kubeconfig文件,不同子账户获取自己的kubeconfig文件,该文件中有每个子账户自己的kube-apiserver的客户端证书,默认首次调此接口时候创建客户端证书,时效20年,未授予任何权限,如果是集群所有者或者主账户,则默认是cluster-admin权限。 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" -// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" -// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" -// INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -// RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" -// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" -func (c *Client) DescribeClusterKubeconfigWithContext(ctx context.Context, request *DescribeClusterKubeconfigRequest) (response *DescribeClusterKubeconfigResponse, err error) { - if request == nil { - request = NewDescribeClusterKubeconfigRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusterKubeconfig require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClusterKubeconfigResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClusterNodePoolDetailRequest() (request *DescribeClusterNodePoolDetailRequest) { - request = &DescribeClusterNodePoolDetailRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterNodePoolDetail") - - return -} - -func NewDescribeClusterNodePoolDetailResponse() (response *DescribeClusterNodePoolDetailResponse) { - response = &DescribeClusterNodePoolDetailResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusterNodePoolDetail -// 查询节点池详情 -// -// 可能返回的错误码: -// -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -func (c *Client) DescribeClusterNodePoolDetail(request *DescribeClusterNodePoolDetailRequest) (response *DescribeClusterNodePoolDetailResponse, err error) { - return c.DescribeClusterNodePoolDetailWithContext(context.Background(), request) -} - -// DescribeClusterNodePoolDetail -// 查询节点池详情 -// -// 可能返回的错误码: -// -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -func (c *Client) DescribeClusterNodePoolDetailWithContext(ctx context.Context, request *DescribeClusterNodePoolDetailRequest) (response *DescribeClusterNodePoolDetailResponse, err error) { - if request == nil { - request = NewDescribeClusterNodePoolDetailRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusterNodePoolDetail require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClusterNodePoolDetailResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClusterNodePoolsRequest() (request *DescribeClusterNodePoolsRequest) { - request = &DescribeClusterNodePoolsRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterNodePools") - - return -} - -func NewDescribeClusterNodePoolsResponse() (response *DescribeClusterNodePoolsResponse) { - response = &DescribeClusterNodePoolsResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusterNodePools -// 查询节点池列表 -// -// 可能返回的错误码: -// -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -func (c *Client) DescribeClusterNodePools(request *DescribeClusterNodePoolsRequest) (response *DescribeClusterNodePoolsResponse, err error) { - return c.DescribeClusterNodePoolsWithContext(context.Background(), request) -} - -// DescribeClusterNodePools -// 查询节点池列表 -// -// 可能返回的错误码: -// -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -func (c *Client) DescribeClusterNodePoolsWithContext(ctx context.Context, request *DescribeClusterNodePoolsRequest) (response *DescribeClusterNodePoolsResponse, err error) { - if request == nil { - request = NewDescribeClusterNodePoolsRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusterNodePools require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClusterNodePoolsResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClusterRouteTablesRequest() (request *DescribeClusterRouteTablesRequest) { - request = &DescribeClusterRouteTablesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterRouteTables") - - return -} - -func NewDescribeClusterRouteTablesResponse() (response *DescribeClusterRouteTablesResponse) { - response = &DescribeClusterRouteTablesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusterRouteTables -// 查询集群路由表 -// -// 可能返回的错误码: -// -// INTERNALERROR_DB = "InternalError.Db" -func (c *Client) DescribeClusterRouteTables(request *DescribeClusterRouteTablesRequest) (response *DescribeClusterRouteTablesResponse, err error) { - return c.DescribeClusterRouteTablesWithContext(context.Background(), request) -} - -// DescribeClusterRouteTables -// 查询集群路由表 -// -// 可能返回的错误码: -// -// INTERNALERROR_DB = "InternalError.Db" -func (c *Client) DescribeClusterRouteTablesWithContext(ctx context.Context, request *DescribeClusterRouteTablesRequest) (response *DescribeClusterRouteTablesResponse, err error) { - if request == nil { - request = NewDescribeClusterRouteTablesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusterRouteTables require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClusterRouteTablesResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClusterRoutesRequest() (request *DescribeClusterRoutesRequest) { - request = &DescribeClusterRoutesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterRoutes") - - return -} - -func NewDescribeClusterRoutesResponse() (response *DescribeClusterRoutesResponse) { - response = &DescribeClusterRoutesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusterRoutes -// 查询集群路由 -// -// 可能返回的错误码: -// -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) DescribeClusterRoutes(request *DescribeClusterRoutesRequest) (response *DescribeClusterRoutesResponse, err error) { - return c.DescribeClusterRoutesWithContext(context.Background(), request) -} - -// DescribeClusterRoutes -// 查询集群路由 -// -// 可能返回的错误码: -// -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) DescribeClusterRoutesWithContext(ctx context.Context, request *DescribeClusterRoutesRequest) (response *DescribeClusterRoutesResponse, err error) { - if request == nil { - request = NewDescribeClusterRoutesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusterRoutes require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClusterRoutesResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClusterSecurityRequest() (request *DescribeClusterSecurityRequest) { - request = &DescribeClusterSecurityRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterSecurity") - - return -} - -func NewDescribeClusterSecurityResponse() (response *DescribeClusterSecurityResponse) { - response = &DescribeClusterSecurityResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusterSecurity -// 集群的密钥信息 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_LBCOMMON = "InternalError.LbCommon" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -// RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeClusterSecurity(request *DescribeClusterSecurityRequest) (response *DescribeClusterSecurityResponse, err error) { - return c.DescribeClusterSecurityWithContext(context.Background(), request) -} - -// DescribeClusterSecurity -// 集群的密钥信息 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_LBCOMMON = "InternalError.LbCommon" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -// RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeClusterSecurityWithContext(ctx context.Context, request *DescribeClusterSecurityRequest) (response *DescribeClusterSecurityResponse, err error) { - if request == nil { - request = NewDescribeClusterSecurityRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusterSecurity require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClusterSecurityResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClusterStatusRequest() (request *DescribeClusterStatusRequest) { - request = &DescribeClusterStatusRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterStatus") - - return -} - -func NewDescribeClusterStatusResponse() (response *DescribeClusterStatusResponse) { - response = &DescribeClusterStatusResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusterStatus -// 查看集群状态列表 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// MISSINGPARAMETER = "MissingParameter" -// UNKNOWNPARAMETER = "UnknownParameter" -func (c *Client) DescribeClusterStatus(request *DescribeClusterStatusRequest) (response *DescribeClusterStatusResponse, err error) { - return c.DescribeClusterStatusWithContext(context.Background(), request) -} - -// DescribeClusterStatus -// 查看集群状态列表 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// MISSINGPARAMETER = "MissingParameter" -// UNKNOWNPARAMETER = "UnknownParameter" -func (c *Client) DescribeClusterStatusWithContext(ctx context.Context, request *DescribeClusterStatusRequest) (response *DescribeClusterStatusResponse, err error) { - if request == nil { - request = NewDescribeClusterStatusRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusterStatus require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClusterStatusResponse() - err = c.Send(request, response) - return -} - -func NewDescribeClustersRequest() (request *DescribeClustersRequest) { - request = &DescribeClustersRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeClusters") - - return -} - -func NewDescribeClustersResponse() (response *DescribeClustersResponse) { - response = &DescribeClustersResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeClusters -// 查询集群列表 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" -// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" -// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// LIMITEXCEEDED = "LimitExceeded" -// RESOURCENOTFOUND = "ResourceNotFound" -// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" -func (c *Client) DescribeClusters(request *DescribeClustersRequest) (response *DescribeClustersResponse, err error) { - return c.DescribeClustersWithContext(context.Background(), request) -} - -// DescribeClusters -// 查询集群列表 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" -// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" -// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// LIMITEXCEEDED = "LimitExceeded" -// RESOURCENOTFOUND = "ResourceNotFound" -// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" -func (c *Client) DescribeClustersWithContext(ctx context.Context, request *DescribeClustersRequest) (response *DescribeClustersResponse, err error) { - if request == nil { - request = NewDescribeClustersRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeClusters require credential") - } - - request.SetContext(ctx) - - response = NewDescribeClustersResponse() - err = c.Send(request, response) - return -} - -func NewDescribeEKSClusterCredentialRequest() (request *DescribeEKSClusterCredentialRequest) { - request = &DescribeEKSClusterCredentialRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSClusterCredential") - - return -} - -func NewDescribeEKSClusterCredentialResponse() (response *DescribeEKSClusterCredentialResponse) { - response = &DescribeEKSClusterCredentialResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeEKSClusterCredential -// 获取弹性容器集群的接入认证信息 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeEKSClusterCredential(request *DescribeEKSClusterCredentialRequest) (response *DescribeEKSClusterCredentialResponse, err error) { - return c.DescribeEKSClusterCredentialWithContext(context.Background(), request) -} - -// DescribeEKSClusterCredential -// 获取弹性容器集群的接入认证信息 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeEKSClusterCredentialWithContext(ctx context.Context, request *DescribeEKSClusterCredentialRequest) (response *DescribeEKSClusterCredentialResponse, err error) { - if request == nil { - request = NewDescribeEKSClusterCredentialRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeEKSClusterCredential require credential") - } - - request.SetContext(ctx) - - response = NewDescribeEKSClusterCredentialResponse() - err = c.Send(request, response) - return -} - -func NewDescribeEKSClustersRequest() (request *DescribeEKSClustersRequest) { - request = &DescribeEKSClustersRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSClusters") - - return -} - -func NewDescribeEKSClustersResponse() (response *DescribeEKSClustersResponse) { - response = &DescribeEKSClustersResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeEKSClusters -// 查询弹性集群列表 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeEKSClusters(request *DescribeEKSClustersRequest) (response *DescribeEKSClustersResponse, err error) { - return c.DescribeEKSClustersWithContext(context.Background(), request) -} - -// DescribeEKSClusters -// 查询弹性集群列表 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeEKSClustersWithContext(ctx context.Context, request *DescribeEKSClustersRequest) (response *DescribeEKSClustersResponse, err error) { - if request == nil { - request = NewDescribeEKSClustersRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeEKSClusters require credential") - } - - request.SetContext(ctx) - - response = NewDescribeEKSClustersResponse() - err = c.Send(request, response) - return -} - -func NewDescribeEKSContainerInstanceEventRequest() (request *DescribeEKSContainerInstanceEventRequest) { - request = &DescribeEKSContainerInstanceEventRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstanceEvent") - - return -} - -func NewDescribeEKSContainerInstanceEventResponse() (response *DescribeEKSContainerInstanceEventResponse) { - response = &DescribeEKSContainerInstanceEventResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeEKSContainerInstanceEvent -// 查询容器实例的事件 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// RESOURCEINSUFFICIENT = "ResourceInsufficient" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// RESOURCESSOLDOUT = "ResourcesSoldOut" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeEKSContainerInstanceEvent(request *DescribeEKSContainerInstanceEventRequest) (response *DescribeEKSContainerInstanceEventResponse, err error) { - return c.DescribeEKSContainerInstanceEventWithContext(context.Background(), request) -} - -// DescribeEKSContainerInstanceEvent -// 查询容器实例的事件 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// RESOURCEINSUFFICIENT = "ResourceInsufficient" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// RESOURCESSOLDOUT = "ResourcesSoldOut" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeEKSContainerInstanceEventWithContext(ctx context.Context, request *DescribeEKSContainerInstanceEventRequest) (response *DescribeEKSContainerInstanceEventResponse, err error) { - if request == nil { - request = NewDescribeEKSContainerInstanceEventRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeEKSContainerInstanceEvent require credential") - } - - request.SetContext(ctx) - - response = NewDescribeEKSContainerInstanceEventResponse() - err = c.Send(request, response) - return -} - -func NewDescribeEKSContainerInstanceRegionsRequest() (request *DescribeEKSContainerInstanceRegionsRequest) { - request = &DescribeEKSContainerInstanceRegionsRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstanceRegions") - - return -} - -func NewDescribeEKSContainerInstanceRegionsResponse() (response *DescribeEKSContainerInstanceRegionsResponse) { - response = &DescribeEKSContainerInstanceRegionsResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeEKSContainerInstanceRegions -// 查询容器实例支持的地域 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) DescribeEKSContainerInstanceRegions(request *DescribeEKSContainerInstanceRegionsRequest) (response *DescribeEKSContainerInstanceRegionsResponse, err error) { - return c.DescribeEKSContainerInstanceRegionsWithContext(context.Background(), request) -} - -// DescribeEKSContainerInstanceRegions -// 查询容器实例支持的地域 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) DescribeEKSContainerInstanceRegionsWithContext(ctx context.Context, request *DescribeEKSContainerInstanceRegionsRequest) (response *DescribeEKSContainerInstanceRegionsResponse, err error) { - if request == nil { - request = NewDescribeEKSContainerInstanceRegionsRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeEKSContainerInstanceRegions require credential") - } - - request.SetContext(ctx) - - response = NewDescribeEKSContainerInstanceRegionsResponse() - err = c.Send(request, response) - return -} - -func NewDescribeEKSContainerInstancesRequest() (request *DescribeEKSContainerInstancesRequest) { - request = &DescribeEKSContainerInstancesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstances") - - return -} - -func NewDescribeEKSContainerInstancesResponse() (response *DescribeEKSContainerInstancesResponse) { - response = &DescribeEKSContainerInstancesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeEKSContainerInstances -// 查询容器实例 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// RESOURCENOTFOUND = "ResourceNotFound" -func DescribeEKSContainerInstances(request *DescribeEKSContainerInstancesRequest) (response *DescribeEKSContainerInstancesResponse, err error) { - provider := pbpod.CloudProvider(request.ProviderId) - EksCis := make([]*EksCi, 0) - //trans Tencent request to PCM request - requestPCM := &pbpod.ListPodReq{ - RequestSource: "tencent", - Provider: provider, - Namespace: "pcm", - } - - resp, err := server.ListPod(nil, requestPCM) - if err != nil { - return nil, err - } - //trans PCM response pcm_pod set to Tencent EksCis set - for k := range resp.Pods { - EksCi := new(EksCi) - EksCi.EksCiId = &resp.Pods[k].PodId - EksCi.EksCiName = &resp.Pods[k].PodName - EksCis = append(EksCis, EksCi) - } - _totalCount := uint64(len(resp.Pods)) - _requestId := "" - response = &DescribeEKSContainerInstancesResponse{ - Response: (*struct { - TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` - EksCis []*EksCi `json:"EksCis,omitempty" name:"EksCis"` - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - })(&struct { - TotalCount *uint64 - EksCis []*EksCi - RequestId *string - }{ - TotalCount: &_totalCount, - EksCis: EksCis, - RequestId: &_requestId, - }), - BaseResponse: &tchttp.BaseResponse{}, - } - return response, nil -} - -// DescribeEKSContainerInstances -// 查询容器实例 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// RESOURCENOTFOUND = "ResourceNotFound" -func (c *Client) DescribeEKSContainerInstancesWithContext(ctx context.Context, request *DescribeEKSContainerInstancesRequest) (response *DescribeEKSContainerInstancesResponse, err error) { - if request == nil { - request = NewDescribeEKSContainerInstancesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeEKSContainerInstances require credential") - } - - request.SetContext(ctx) - - response = NewDescribeEKSContainerInstancesResponse() - err = c.Send(request, response) - return -} - -func NewDescribeEksContainerInstanceLogRequest() (request *DescribeEksContainerInstanceLogRequest) { - request = &DescribeEksContainerInstanceLogRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeEksContainerInstanceLog") - - return -} - -func NewDescribeEksContainerInstanceLogResponse() (response *DescribeEksContainerInstanceLogResponse) { - response = &DescribeEksContainerInstanceLogResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeEksContainerInstanceLog -// 查询容器实例中容器日志 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// RESOURCEUNAVAILABLE_EKSCONTAINERSTATUS = "ResourceUnavailable.EksContainerStatus" -func (c *Client) DescribeEksContainerInstanceLog(request *DescribeEksContainerInstanceLogRequest) (response *DescribeEksContainerInstanceLogResponse, err error) { - return c.DescribeEksContainerInstanceLogWithContext(context.Background(), request) -} - -// DescribeEksContainerInstanceLog -// 查询容器实例中容器日志 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// RESOURCEUNAVAILABLE_EKSCONTAINERSTATUS = "ResourceUnavailable.EksContainerStatus" -func (c *Client) DescribeEksContainerInstanceLogWithContext(ctx context.Context, request *DescribeEksContainerInstanceLogRequest) (response *DescribeEksContainerInstanceLogResponse, err error) { - if request == nil { - request = NewDescribeEksContainerInstanceLogRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeEksContainerInstanceLog require credential") - } - - request.SetContext(ctx) - - response = NewDescribeEksContainerInstanceLogResponse() - err = c.Send(request, response) - return -} - -func NewDescribeEnableVpcCniProgressRequest() (request *DescribeEnableVpcCniProgressRequest) { - request = &DescribeEnableVpcCniProgressRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeEnableVpcCniProgress") - - return -} - -func NewDescribeEnableVpcCniProgressResponse() (response *DescribeEnableVpcCniProgressResponse) { - response = &DescribeEnableVpcCniProgressResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeEnableVpcCniProgress -// 本接口用于查询开启vpc-cni模式的任务进度 -// -// 可能返回的错误码: -// -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -func (c *Client) DescribeEnableVpcCniProgress(request *DescribeEnableVpcCniProgressRequest) (response *DescribeEnableVpcCniProgressResponse, err error) { - return c.DescribeEnableVpcCniProgressWithContext(context.Background(), request) -} - -// DescribeEnableVpcCniProgress -// 本接口用于查询开启vpc-cni模式的任务进度 -// -// 可能返回的错误码: -// -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -func (c *Client) DescribeEnableVpcCniProgressWithContext(ctx context.Context, request *DescribeEnableVpcCniProgressRequest) (response *DescribeEnableVpcCniProgressResponse, err error) { - if request == nil { - request = NewDescribeEnableVpcCniProgressRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeEnableVpcCniProgress require credential") - } - - request.SetContext(ctx) - - response = NewDescribeEnableVpcCniProgressResponse() - err = c.Send(request, response) - return -} - -func NewDescribeExistedInstancesRequest() (request *DescribeExistedInstancesRequest) { - request = &DescribeExistedInstancesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeExistedInstances") - - return -} - -func NewDescribeExistedInstancesResponse() (response *DescribeExistedInstancesResponse) { - response = &DescribeExistedInstancesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeExistedInstances -// 查询已经存在的节点,判断是否可以加入集群 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" -// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" -// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" -// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeExistedInstances(request *DescribeExistedInstancesRequest) (response *DescribeExistedInstancesResponse, err error) { - return c.DescribeExistedInstancesWithContext(context.Background(), request) -} - -// DescribeExistedInstances -// 查询已经存在的节点,判断是否可以加入集群 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" -// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" -// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" -// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" -// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeExistedInstancesWithContext(ctx context.Context, request *DescribeExistedInstancesRequest) (response *DescribeExistedInstancesResponse, err error) { - if request == nil { - request = NewDescribeExistedInstancesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeExistedInstances require credential") - } - - request.SetContext(ctx) - - response = NewDescribeExistedInstancesResponse() - err = c.Send(request, response) - return -} - -func NewDescribeExternalClusterSpecRequest() (request *DescribeExternalClusterSpecRequest) { - request = &DescribeExternalClusterSpecRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeExternalClusterSpec") - - return -} - -func NewDescribeExternalClusterSpecResponse() (response *DescribeExternalClusterSpecResponse) { - response = &DescribeExternalClusterSpecResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeExternalClusterSpec -// 获取导入第三方集群YAML定义 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" -// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" -// INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -// RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" -func (c *Client) DescribeExternalClusterSpec(request *DescribeExternalClusterSpecRequest) (response *DescribeExternalClusterSpecResponse, err error) { - return c.DescribeExternalClusterSpecWithContext(context.Background(), request) -} - -// DescribeExternalClusterSpec -// 获取导入第三方集群YAML定义 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" -// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" -// INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -// RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" -func (c *Client) DescribeExternalClusterSpecWithContext(ctx context.Context, request *DescribeExternalClusterSpecRequest) (response *DescribeExternalClusterSpecResponse, err error) { - if request == nil { - request = NewDescribeExternalClusterSpecRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeExternalClusterSpec require credential") - } - - request.SetContext(ctx) - - response = NewDescribeExternalClusterSpecResponse() - err = c.Send(request, response) - return -} - -func NewDescribeImageCachesRequest() (request *DescribeImageCachesRequest) { - request = &DescribeImageCachesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeImageCaches") - - return -} - -func NewDescribeImageCachesResponse() (response *DescribeImageCachesResponse) { - response = &DescribeImageCachesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeImageCaches -// 查询镜像缓存信息接口 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) DescribeImageCaches(request *DescribeImageCachesRequest) (response *DescribeImageCachesResponse, err error) { - return c.DescribeImageCachesWithContext(context.Background(), request) -} - -// DescribeImageCaches -// 查询镜像缓存信息接口 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) DescribeImageCachesWithContext(ctx context.Context, request *DescribeImageCachesRequest) (response *DescribeImageCachesResponse, err error) { - if request == nil { - request = NewDescribeImageCachesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeImageCaches require credential") - } - - request.SetContext(ctx) - - response = NewDescribeImageCachesResponse() - err = c.Send(request, response) - return -} - -func NewDescribeImagesRequest() (request *DescribeImagesRequest) { - request = &DescribeImagesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeImages") - - return -} - -func NewDescribeImagesResponse() (response *DescribeImagesResponse) { - response = &DescribeImagesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeImages -// 获取镜像信息 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeImages(request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) { - return c.DescribeImagesWithContext(context.Background(), request) -} - -// DescribeImages -// 获取镜像信息 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeImagesWithContext(ctx context.Context, request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) { - if request == nil { - request = NewDescribeImagesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeImages require credential") - } - - request.SetContext(ctx) - - response = NewDescribeImagesResponse() - err = c.Send(request, response) - return -} - -func NewDescribePrometheusAgentInstancesRequest() (request *DescribePrometheusAgentInstancesRequest) { - request = &DescribePrometheusAgentInstancesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAgentInstances") - - return -} - -func NewDescribePrometheusAgentInstancesResponse() (response *DescribePrometheusAgentInstancesResponse) { - response = &DescribePrometheusAgentInstancesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribePrometheusAgentInstances -// 获取关联目标集群的实例列表 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) DescribePrometheusAgentInstances(request *DescribePrometheusAgentInstancesRequest) (response *DescribePrometheusAgentInstancesResponse, err error) { - return c.DescribePrometheusAgentInstancesWithContext(context.Background(), request) -} - -// DescribePrometheusAgentInstances -// 获取关联目标集群的实例列表 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) DescribePrometheusAgentInstancesWithContext(ctx context.Context, request *DescribePrometheusAgentInstancesRequest) (response *DescribePrometheusAgentInstancesResponse, err error) { - if request == nil { - request = NewDescribePrometheusAgentInstancesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribePrometheusAgentInstances require credential") - } - - request.SetContext(ctx) - - response = NewDescribePrometheusAgentInstancesResponse() - err = c.Send(request, response) - return -} - -func NewDescribePrometheusAgentsRequest() (request *DescribePrometheusAgentsRequest) { - request = &DescribePrometheusAgentsRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAgents") - - return -} - -func NewDescribePrometheusAgentsResponse() (response *DescribePrometheusAgentsResponse) { - response = &DescribePrometheusAgentsResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribePrometheusAgents -// 获取被关联集群列表 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) DescribePrometheusAgents(request *DescribePrometheusAgentsRequest) (response *DescribePrometheusAgentsResponse, err error) { - return c.DescribePrometheusAgentsWithContext(context.Background(), request) -} - -// DescribePrometheusAgents -// 获取被关联集群列表 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) DescribePrometheusAgentsWithContext(ctx context.Context, request *DescribePrometheusAgentsRequest) (response *DescribePrometheusAgentsResponse, err error) { - if request == nil { - request = NewDescribePrometheusAgentsRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribePrometheusAgents require credential") - } - - request.SetContext(ctx) - - response = NewDescribePrometheusAgentsResponse() - err = c.Send(request, response) - return -} - -func NewDescribePrometheusAlertHistoryRequest() (request *DescribePrometheusAlertHistoryRequest) { - request = &DescribePrometheusAlertHistoryRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAlertHistory") - - return -} - -func NewDescribePrometheusAlertHistoryResponse() (response *DescribePrometheusAlertHistoryResponse) { - response = &DescribePrometheusAlertHistoryResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribePrometheusAlertHistory -// 获取告警历史 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" -func (c *Client) DescribePrometheusAlertHistory(request *DescribePrometheusAlertHistoryRequest) (response *DescribePrometheusAlertHistoryResponse, err error) { - return c.DescribePrometheusAlertHistoryWithContext(context.Background(), request) -} - -// DescribePrometheusAlertHistory -// 获取告警历史 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" -func (c *Client) DescribePrometheusAlertHistoryWithContext(ctx context.Context, request *DescribePrometheusAlertHistoryRequest) (response *DescribePrometheusAlertHistoryResponse, err error) { - if request == nil { - request = NewDescribePrometheusAlertHistoryRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribePrometheusAlertHistory require credential") - } - - request.SetContext(ctx) - - response = NewDescribePrometheusAlertHistoryResponse() - err = c.Send(request, response) - return -} - -func NewDescribePrometheusAlertRuleRequest() (request *DescribePrometheusAlertRuleRequest) { - request = &DescribePrometheusAlertRuleRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAlertRule") - - return -} - -func NewDescribePrometheusAlertRuleResponse() (response *DescribePrometheusAlertRuleResponse) { - response = &DescribePrometheusAlertRuleResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribePrometheusAlertRule -// 获取告警规则列表 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" -func (c *Client) DescribePrometheusAlertRule(request *DescribePrometheusAlertRuleRequest) (response *DescribePrometheusAlertRuleResponse, err error) { - return c.DescribePrometheusAlertRuleWithContext(context.Background(), request) -} - -// DescribePrometheusAlertRule -// 获取告警规则列表 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" -func (c *Client) DescribePrometheusAlertRuleWithContext(ctx context.Context, request *DescribePrometheusAlertRuleRequest) (response *DescribePrometheusAlertRuleResponse, err error) { - if request == nil { - request = NewDescribePrometheusAlertRuleRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribePrometheusAlertRule require credential") - } - - request.SetContext(ctx) - - response = NewDescribePrometheusAlertRuleResponse() - err = c.Send(request, response) - return -} - -func NewDescribePrometheusInstanceRequest() (request *DescribePrometheusInstanceRequest) { - request = &DescribePrometheusInstanceRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusInstance") - - return -} - -func NewDescribePrometheusInstanceResponse() (response *DescribePrometheusInstanceResponse) { - response = &DescribePrometheusInstanceResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribePrometheusInstance -// 获取实例详细信息 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" -func (c *Client) DescribePrometheusInstance(request *DescribePrometheusInstanceRequest) (response *DescribePrometheusInstanceResponse, err error) { - return c.DescribePrometheusInstanceWithContext(context.Background(), request) -} - -// DescribePrometheusInstance -// 获取实例详细信息 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" -func (c *Client) DescribePrometheusInstanceWithContext(ctx context.Context, request *DescribePrometheusInstanceRequest) (response *DescribePrometheusInstanceResponse, err error) { - if request == nil { - request = NewDescribePrometheusInstanceRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribePrometheusInstance require credential") - } - - request.SetContext(ctx) - - response = NewDescribePrometheusInstanceResponse() - err = c.Send(request, response) - return -} - -func NewDescribePrometheusOverviewsRequest() (request *DescribePrometheusOverviewsRequest) { - request = &DescribePrometheusOverviewsRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusOverviews") - - return -} - -func NewDescribePrometheusOverviewsResponse() (response *DescribePrometheusOverviewsResponse) { - response = &DescribePrometheusOverviewsResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribePrometheusOverviews -// 获取实例列表 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -func (c *Client) DescribePrometheusOverviews(request *DescribePrometheusOverviewsRequest) (response *DescribePrometheusOverviewsResponse, err error) { - return c.DescribePrometheusOverviewsWithContext(context.Background(), request) -} - -// DescribePrometheusOverviews -// 获取实例列表 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -func (c *Client) DescribePrometheusOverviewsWithContext(ctx context.Context, request *DescribePrometheusOverviewsRequest) (response *DescribePrometheusOverviewsResponse, err error) { - if request == nil { - request = NewDescribePrometheusOverviewsRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribePrometheusOverviews require credential") - } - - request.SetContext(ctx) - - response = NewDescribePrometheusOverviewsResponse() - err = c.Send(request, response) - return -} - -func NewDescribePrometheusTargetsRequest() (request *DescribePrometheusTargetsRequest) { - request = &DescribePrometheusTargetsRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTargets") - - return -} - -func NewDescribePrometheusTargetsResponse() (response *DescribePrometheusTargetsResponse) { - response = &DescribePrometheusTargetsResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribePrometheusTargets -// 获取targets信息 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" -// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" -func (c *Client) DescribePrometheusTargets(request *DescribePrometheusTargetsRequest) (response *DescribePrometheusTargetsResponse, err error) { - return c.DescribePrometheusTargetsWithContext(context.Background(), request) -} - -// DescribePrometheusTargets -// 获取targets信息 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" -// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" -// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" -func (c *Client) DescribePrometheusTargetsWithContext(ctx context.Context, request *DescribePrometheusTargetsRequest) (response *DescribePrometheusTargetsResponse, err error) { - if request == nil { - request = NewDescribePrometheusTargetsRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribePrometheusTargets require credential") - } - - request.SetContext(ctx) - - response = NewDescribePrometheusTargetsResponse() - err = c.Send(request, response) - return -} - -func NewDescribePrometheusTemplateSyncRequest() (request *DescribePrometheusTemplateSyncRequest) { - request = &DescribePrometheusTemplateSyncRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTemplateSync") - - return -} - -func NewDescribePrometheusTemplateSyncResponse() (response *DescribePrometheusTemplateSyncResponse) { - response = &DescribePrometheusTemplateSyncResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribePrometheusTemplateSync -// 获取模板同步信息 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" -func (c *Client) DescribePrometheusTemplateSync(request *DescribePrometheusTemplateSyncRequest) (response *DescribePrometheusTemplateSyncResponse, err error) { - return c.DescribePrometheusTemplateSyncWithContext(context.Background(), request) -} - -// DescribePrometheusTemplateSync -// 获取模板同步信息 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" -func (c *Client) DescribePrometheusTemplateSyncWithContext(ctx context.Context, request *DescribePrometheusTemplateSyncRequest) (response *DescribePrometheusTemplateSyncResponse, err error) { - if request == nil { - request = NewDescribePrometheusTemplateSyncRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribePrometheusTemplateSync require credential") - } - - request.SetContext(ctx) - - response = NewDescribePrometheusTemplateSyncResponse() - err = c.Send(request, response) - return -} - -func NewDescribePrometheusTemplatesRequest() (request *DescribePrometheusTemplatesRequest) { - request = &DescribePrometheusTemplatesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTemplates") - - return -} - -func NewDescribePrometheusTemplatesResponse() (response *DescribePrometheusTemplatesResponse) { - response = &DescribePrometheusTemplatesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribePrometheusTemplates -// 拉取模板列表,默认模板将总是在最前面 -// -// 可能返回的错误码: -// -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -func (c *Client) DescribePrometheusTemplates(request *DescribePrometheusTemplatesRequest) (response *DescribePrometheusTemplatesResponse, err error) { - return c.DescribePrometheusTemplatesWithContext(context.Background(), request) -} - -// DescribePrometheusTemplates -// 拉取模板列表,默认模板将总是在最前面 -// -// 可能返回的错误码: -// -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -func (c *Client) DescribePrometheusTemplatesWithContext(ctx context.Context, request *DescribePrometheusTemplatesRequest) (response *DescribePrometheusTemplatesResponse, err error) { - if request == nil { - request = NewDescribePrometheusTemplatesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribePrometheusTemplates require credential") - } - - request.SetContext(ctx) - - response = NewDescribePrometheusTemplatesResponse() - err = c.Send(request, response) - return -} - -func NewDescribeRegionsRequest() (request *DescribeRegionsRequest) { - request = &DescribeRegionsRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeRegions") - - return -} - -func NewDescribeRegionsResponse() (response *DescribeRegionsResponse) { - response = &DescribeRegionsResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeRegions -// 获取容器服务支持的所有地域 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) { - return c.DescribeRegionsWithContext(context.Background(), request) -} - -// DescribeRegions -// 获取容器服务支持的所有地域 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeRegionsWithContext(ctx context.Context, request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) { - if request == nil { - request = NewDescribeRegionsRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeRegions require credential") - } - - request.SetContext(ctx) - - response = NewDescribeRegionsResponse() - err = c.Send(request, response) - return -} - -func NewDescribeRouteTableConflictsRequest() (request *DescribeRouteTableConflictsRequest) { - request = &DescribeRouteTableConflictsRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeRouteTableConflicts") - - return -} - -func NewDescribeRouteTableConflictsResponse() (response *DescribeRouteTableConflictsResponse) { - response = &DescribeRouteTableConflictsResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeRouteTableConflicts -// 查询路由表冲突列表 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" -// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) DescribeRouteTableConflicts(request *DescribeRouteTableConflictsRequest) (response *DescribeRouteTableConflictsResponse, err error) { - return c.DescribeRouteTableConflictsWithContext(context.Background(), request) -} - -// DescribeRouteTableConflicts -// 查询路由表冲突列表 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" -// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) DescribeRouteTableConflictsWithContext(ctx context.Context, request *DescribeRouteTableConflictsRequest) (response *DescribeRouteTableConflictsResponse, err error) { - if request == nil { - request = NewDescribeRouteTableConflictsRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeRouteTableConflicts require credential") - } - - request.SetContext(ctx) - - response = NewDescribeRouteTableConflictsResponse() - err = c.Send(request, response) - return -} - -func NewDescribeTKEEdgeScriptRequest() (request *DescribeTKEEdgeScriptRequest) { - request = &DescribeTKEEdgeScriptRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeTKEEdgeScript") - - return -} - -func NewDescribeTKEEdgeScriptResponse() (response *DescribeTKEEdgeScriptResponse) { - response = &DescribeTKEEdgeScriptResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeTKEEdgeScript -// 获取边缘脚本链接 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeTKEEdgeScript(request *DescribeTKEEdgeScriptRequest) (response *DescribeTKEEdgeScriptResponse, err error) { - return c.DescribeTKEEdgeScriptWithContext(context.Background(), request) -} - -// DescribeTKEEdgeScript -// 获取边缘脚本链接 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeTKEEdgeScriptWithContext(ctx context.Context, request *DescribeTKEEdgeScriptRequest) (response *DescribeTKEEdgeScriptResponse, err error) { - if request == nil { - request = NewDescribeTKEEdgeScriptRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeTKEEdgeScript require credential") - } - - request.SetContext(ctx) - - response = NewDescribeTKEEdgeScriptResponse() - err = c.Send(request, response) - return -} - -func NewDescribeVersionsRequest() (request *DescribeVersionsRequest) { - request = &DescribeVersionsRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeVersions") - - return -} - -func NewDescribeVersionsResponse() (response *DescribeVersionsResponse) { - response = &DescribeVersionsResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeVersions -// 获取集群版本信息 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeVersions(request *DescribeVersionsRequest) (response *DescribeVersionsResponse, err error) { - return c.DescribeVersionsWithContext(context.Background(), request) -} - -// DescribeVersions -// 获取集群版本信息 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeVersionsWithContext(ctx context.Context, request *DescribeVersionsRequest) (response *DescribeVersionsResponse, err error) { - if request == nil { - request = NewDescribeVersionsRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeVersions require credential") - } - - request.SetContext(ctx) - - response = NewDescribeVersionsResponse() - err = c.Send(request, response) - return -} - -func NewDescribeVpcCniPodLimitsRequest() (request *DescribeVpcCniPodLimitsRequest) { - request = &DescribeVpcCniPodLimitsRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DescribeVpcCniPodLimits") - - return -} - -func NewDescribeVpcCniPodLimitsResponse() (response *DescribeVpcCniPodLimitsResponse) { - response = &DescribeVpcCniPodLimitsResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DescribeVpcCniPodLimits -// 本接口查询当前用户和地域在指定可用区下的机型可支持的最大 TKE VPC-CNI 网络模式的 Pod 数量 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// MISSINGPARAMETER = "MissingParameter" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeVpcCniPodLimits(request *DescribeVpcCniPodLimitsRequest) (response *DescribeVpcCniPodLimitsResponse, err error) { - return c.DescribeVpcCniPodLimitsWithContext(context.Background(), request) -} - -// DescribeVpcCniPodLimits -// 本接口查询当前用户和地域在指定可用区下的机型可支持的最大 TKE VPC-CNI 网络模式的 Pod 数量 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// MISSINGPARAMETER = "MissingParameter" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) DescribeVpcCniPodLimitsWithContext(ctx context.Context, request *DescribeVpcCniPodLimitsRequest) (response *DescribeVpcCniPodLimitsResponse, err error) { - if request == nil { - request = NewDescribeVpcCniPodLimitsRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DescribeVpcCniPodLimits require credential") - } - - request.SetContext(ctx) - - response = NewDescribeVpcCniPodLimitsResponse() - err = c.Send(request, response) - return -} - -func NewDisableClusterDeletionProtectionRequest() (request *DisableClusterDeletionProtectionRequest) { - request = &DisableClusterDeletionProtectionRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DisableClusterDeletionProtection") - - return -} - -func NewDisableClusterDeletionProtectionResponse() (response *DisableClusterDeletionProtectionResponse) { - response = &DisableClusterDeletionProtectionResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DisableClusterDeletionProtection -// 关闭集群删除保护 -// -// 可能返回的错误码: -// -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) DisableClusterDeletionProtection(request *DisableClusterDeletionProtectionRequest) (response *DisableClusterDeletionProtectionResponse, err error) { - return c.DisableClusterDeletionProtectionWithContext(context.Background(), request) -} - -// DisableClusterDeletionProtection -// 关闭集群删除保护 -// -// 可能返回的错误码: -// -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) DisableClusterDeletionProtectionWithContext(ctx context.Context, request *DisableClusterDeletionProtectionRequest) (response *DisableClusterDeletionProtectionResponse, err error) { - if request == nil { - request = NewDisableClusterDeletionProtectionRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DisableClusterDeletionProtection require credential") - } - - request.SetContext(ctx) - - response = NewDisableClusterDeletionProtectionResponse() - err = c.Send(request, response) - return -} - -func NewDisableVpcCniNetworkTypeRequest() (request *DisableVpcCniNetworkTypeRequest) { - request = &DisableVpcCniNetworkTypeRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "DisableVpcCniNetworkType") - - return -} - -func NewDisableVpcCniNetworkTypeResponse() (response *DisableVpcCniNetworkTypeResponse) { - response = &DisableVpcCniNetworkTypeResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// DisableVpcCniNetworkType -// 提供给附加了VPC-CNI能力的Global-Route集群关闭VPC-CNI -// -// 可能返回的错误码: -// -// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) DisableVpcCniNetworkType(request *DisableVpcCniNetworkTypeRequest) (response *DisableVpcCniNetworkTypeResponse, err error) { - return c.DisableVpcCniNetworkTypeWithContext(context.Background(), request) -} - -// DisableVpcCniNetworkType -// 提供给附加了VPC-CNI能力的Global-Route集群关闭VPC-CNI -// -// 可能返回的错误码: -// -// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" -// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) DisableVpcCniNetworkTypeWithContext(ctx context.Context, request *DisableVpcCniNetworkTypeRequest) (response *DisableVpcCniNetworkTypeResponse, err error) { - if request == nil { - request = NewDisableVpcCniNetworkTypeRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("DisableVpcCniNetworkType require credential") - } - - request.SetContext(ctx) - - response = NewDisableVpcCniNetworkTypeResponse() - err = c.Send(request, response) - return -} - -func NewEnableClusterDeletionProtectionRequest() (request *EnableClusterDeletionProtectionRequest) { - request = &EnableClusterDeletionProtectionRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "EnableClusterDeletionProtection") - - return -} - -func NewEnableClusterDeletionProtectionResponse() (response *EnableClusterDeletionProtectionResponse) { - response = &EnableClusterDeletionProtectionResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// EnableClusterDeletionProtection -// 启用集群删除保护 -// -// 可能返回的错误码: -// -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) EnableClusterDeletionProtection(request *EnableClusterDeletionProtectionRequest) (response *EnableClusterDeletionProtectionResponse, err error) { - return c.EnableClusterDeletionProtectionWithContext(context.Background(), request) -} - -// EnableClusterDeletionProtection -// 启用集群删除保护 -// -// 可能返回的错误码: -// -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) EnableClusterDeletionProtectionWithContext(ctx context.Context, request *EnableClusterDeletionProtectionRequest) (response *EnableClusterDeletionProtectionResponse, err error) { - if request == nil { - request = NewEnableClusterDeletionProtectionRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("EnableClusterDeletionProtection require credential") - } - - request.SetContext(ctx) - - response = NewEnableClusterDeletionProtectionResponse() - err = c.Send(request, response) - return -} - -func NewEnableVpcCniNetworkTypeRequest() (request *EnableVpcCniNetworkTypeRequest) { - request = &EnableVpcCniNetworkTypeRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "EnableVpcCniNetworkType") - - return -} - -func NewEnableVpcCniNetworkTypeResponse() (response *EnableVpcCniNetworkTypeResponse) { - response = &EnableVpcCniNetworkTypeResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// EnableVpcCniNetworkType -// GR集群可以通过本接口附加vpc-cni容器网络插件,开启vpc-cni容器网络能力 -// -// 可能返回的错误码: -// -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) EnableVpcCniNetworkType(request *EnableVpcCniNetworkTypeRequest) (response *EnableVpcCniNetworkTypeResponse, err error) { - return c.EnableVpcCniNetworkTypeWithContext(context.Background(), request) -} - -// EnableVpcCniNetworkType -// GR集群可以通过本接口附加vpc-cni容器网络插件,开启vpc-cni容器网络能力 -// -// 可能返回的错误码: -// -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) EnableVpcCniNetworkTypeWithContext(ctx context.Context, request *EnableVpcCniNetworkTypeRequest) (response *EnableVpcCniNetworkTypeResponse, err error) { - if request == nil { - request = NewEnableVpcCniNetworkTypeRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("EnableVpcCniNetworkType require credential") - } - - request.SetContext(ctx) - - response = NewEnableVpcCniNetworkTypeResponse() - err = c.Send(request, response) - return -} - -func NewForwardApplicationRequestV3Request() (request *ForwardApplicationRequestV3Request) { - request = &ForwardApplicationRequestV3Request{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "ForwardApplicationRequestV3") - - return -} - -func NewForwardApplicationRequestV3Response() (response *ForwardApplicationRequestV3Response) { - response = &ForwardApplicationRequestV3Response{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// ForwardApplicationRequestV3 -// 操作TKE集群的addon -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" -func (c *Client) ForwardApplicationRequestV3(request *ForwardApplicationRequestV3Request) (response *ForwardApplicationRequestV3Response, err error) { - return c.ForwardApplicationRequestV3WithContext(context.Background(), request) -} - -// ForwardApplicationRequestV3 -// 操作TKE集群的addon -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" -func (c *Client) ForwardApplicationRequestV3WithContext(ctx context.Context, request *ForwardApplicationRequestV3Request) (response *ForwardApplicationRequestV3Response, err error) { - if request == nil { - request = NewForwardApplicationRequestV3Request() - } - - if c.GetCredential() == nil { - return nil, errors.New("ForwardApplicationRequestV3 require credential") - } - - request.SetContext(ctx) - - response = NewForwardApplicationRequestV3Response() - err = c.Send(request, response) - return -} - -func NewGetMostSuitableImageCacheRequest() (request *GetMostSuitableImageCacheRequest) { - request = &GetMostSuitableImageCacheRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "GetMostSuitableImageCache") - - return -} - -func NewGetMostSuitableImageCacheResponse() (response *GetMostSuitableImageCacheResponse) { - response = &GetMostSuitableImageCacheResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// GetMostSuitableImageCache -// 根据镜像列表,查询匹配的镜像缓存 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) GetMostSuitableImageCache(request *GetMostSuitableImageCacheRequest) (response *GetMostSuitableImageCacheResponse, err error) { - return c.GetMostSuitableImageCacheWithContext(context.Background(), request) -} - -// GetMostSuitableImageCache -// 根据镜像列表,查询匹配的镜像缓存 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) GetMostSuitableImageCacheWithContext(ctx context.Context, request *GetMostSuitableImageCacheRequest) (response *GetMostSuitableImageCacheResponse, err error) { - if request == nil { - request = NewGetMostSuitableImageCacheRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("GetMostSuitableImageCache require credential") - } - - request.SetContext(ctx) - - response = NewGetMostSuitableImageCacheResponse() - err = c.Send(request, response) - return -} - -func NewGetTkeAppChartListRequest() (request *GetTkeAppChartListRequest) { - request = &GetTkeAppChartListRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "GetTkeAppChartList") - - return -} - -func NewGetTkeAppChartListResponse() (response *GetTkeAppChartListResponse) { - response = &GetTkeAppChartListResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// GetTkeAppChartList -// 获取TKE支持的App列表 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) GetTkeAppChartList(request *GetTkeAppChartListRequest) (response *GetTkeAppChartListResponse, err error) { - return c.GetTkeAppChartListWithContext(context.Background(), request) -} - -// GetTkeAppChartList -// 获取TKE支持的App列表 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -func (c *Client) GetTkeAppChartListWithContext(ctx context.Context, request *GetTkeAppChartListRequest) (response *GetTkeAppChartListResponse, err error) { - if request == nil { - request = NewGetTkeAppChartListRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("GetTkeAppChartList require credential") - } - - request.SetContext(ctx) - - response = NewGetTkeAppChartListResponse() - err = c.Send(request, response) - return -} - -func NewGetUpgradeInstanceProgressRequest() (request *GetUpgradeInstanceProgressRequest) { - request = &GetUpgradeInstanceProgressRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "GetUpgradeInstanceProgress") - - return -} - -func NewGetUpgradeInstanceProgressResponse() (response *GetUpgradeInstanceProgressResponse) { - response = &GetUpgradeInstanceProgressResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// GetUpgradeInstanceProgress -// 获得节点升级当前的进度 -// -// 可能返回的错误码: -// -// INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) GetUpgradeInstanceProgress(request *GetUpgradeInstanceProgressRequest) (response *GetUpgradeInstanceProgressResponse, err error) { - return c.GetUpgradeInstanceProgressWithContext(context.Background(), request) -} - -// GetUpgradeInstanceProgress -// 获得节点升级当前的进度 -// -// 可能返回的错误码: -// -// INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) GetUpgradeInstanceProgressWithContext(ctx context.Context, request *GetUpgradeInstanceProgressRequest) (response *GetUpgradeInstanceProgressResponse, err error) { - if request == nil { - request = NewGetUpgradeInstanceProgressRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("GetUpgradeInstanceProgress require credential") - } - - request.SetContext(ctx) - - response = NewGetUpgradeInstanceProgressResponse() - err = c.Send(request, response) - return -} - -func NewModifyClusterAsGroupAttributeRequest() (request *ModifyClusterAsGroupAttributeRequest) { - request = &ModifyClusterAsGroupAttributeRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAsGroupAttribute") - - return -} - -func NewModifyClusterAsGroupAttributeResponse() (response *ModifyClusterAsGroupAttributeResponse) { - response = &ModifyClusterAsGroupAttributeResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// ModifyClusterAsGroupAttribute -// 修改集群伸缩组属性 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" -// INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable" -// INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) ModifyClusterAsGroupAttribute(request *ModifyClusterAsGroupAttributeRequest) (response *ModifyClusterAsGroupAttributeResponse, err error) { - return c.ModifyClusterAsGroupAttributeWithContext(context.Background(), request) -} - -// ModifyClusterAsGroupAttribute -// 修改集群伸缩组属性 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" -// INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable" -// INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) ModifyClusterAsGroupAttributeWithContext(ctx context.Context, request *ModifyClusterAsGroupAttributeRequest) (response *ModifyClusterAsGroupAttributeResponse, err error) { - if request == nil { - request = NewModifyClusterAsGroupAttributeRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("ModifyClusterAsGroupAttribute require credential") - } - - request.SetContext(ctx) - - response = NewModifyClusterAsGroupAttributeResponse() - err = c.Send(request, response) - return -} - -func NewModifyClusterAsGroupOptionAttributeRequest() (request *ModifyClusterAsGroupOptionAttributeRequest) { - request = &ModifyClusterAsGroupOptionAttributeRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAsGroupOptionAttribute") - - return -} - -func NewModifyClusterAsGroupOptionAttributeResponse() (response *ModifyClusterAsGroupOptionAttributeResponse) { - response = &ModifyClusterAsGroupOptionAttributeResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// ModifyClusterAsGroupOptionAttribute -// 修改集群弹性伸缩属性 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) ModifyClusterAsGroupOptionAttribute(request *ModifyClusterAsGroupOptionAttributeRequest) (response *ModifyClusterAsGroupOptionAttributeResponse, err error) { - return c.ModifyClusterAsGroupOptionAttributeWithContext(context.Background(), request) -} - -// ModifyClusterAsGroupOptionAttribute -// 修改集群弹性伸缩属性 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" -// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" -// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) ModifyClusterAsGroupOptionAttributeWithContext(ctx context.Context, request *ModifyClusterAsGroupOptionAttributeRequest) (response *ModifyClusterAsGroupOptionAttributeResponse, err error) { - if request == nil { - request = NewModifyClusterAsGroupOptionAttributeRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("ModifyClusterAsGroupOptionAttribute require credential") - } - - request.SetContext(ctx) - - response = NewModifyClusterAsGroupOptionAttributeResponse() - err = c.Send(request, response) - return -} - -func NewModifyClusterAttributeRequest() (request *ModifyClusterAttributeRequest) { - request = &ModifyClusterAttributeRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAttribute") - - return -} - -func NewModifyClusterAttributeResponse() (response *ModifyClusterAttributeResponse) { - response = &ModifyClusterAttributeResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// ModifyClusterAttribute -// 修改集群属性 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon" -// INTERNALERROR_TRADEINSUFFICIENTBALANCE = "InternalError.TradeInsufficientBalance" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -func (c *Client) ModifyClusterAttribute(request *ModifyClusterAttributeRequest) (response *ModifyClusterAttributeResponse, err error) { - return c.ModifyClusterAttributeWithContext(context.Background(), request) -} - -// ModifyClusterAttribute -// 修改集群属性 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon" -// INTERNALERROR_TRADEINSUFFICIENTBALANCE = "InternalError.TradeInsufficientBalance" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -func (c *Client) ModifyClusterAttributeWithContext(ctx context.Context, request *ModifyClusterAttributeRequest) (response *ModifyClusterAttributeResponse, err error) { - if request == nil { - request = NewModifyClusterAttributeRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("ModifyClusterAttribute require credential") - } - - request.SetContext(ctx) - - response = NewModifyClusterAttributeResponse() - err = c.Send(request, response) - return -} - -func NewModifyClusterAuthenticationOptionsRequest() (request *ModifyClusterAuthenticationOptionsRequest) { - request = &ModifyClusterAuthenticationOptionsRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAuthenticationOptions") - - return -} - -func NewModifyClusterAuthenticationOptionsResponse() (response *ModifyClusterAuthenticationOptionsResponse) { - response = &ModifyClusterAuthenticationOptionsResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// ModifyClusterAuthenticationOptions -// 修改集群认证配置 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -func (c *Client) ModifyClusterAuthenticationOptions(request *ModifyClusterAuthenticationOptionsRequest) (response *ModifyClusterAuthenticationOptionsResponse, err error) { - return c.ModifyClusterAuthenticationOptionsWithContext(context.Background(), request) -} - -// ModifyClusterAuthenticationOptions -// 修改集群认证配置 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER = "InvalidParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -func (c *Client) ModifyClusterAuthenticationOptionsWithContext(ctx context.Context, request *ModifyClusterAuthenticationOptionsRequest) (response *ModifyClusterAuthenticationOptionsResponse, err error) { - if request == nil { - request = NewModifyClusterAuthenticationOptionsRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("ModifyClusterAuthenticationOptions require credential") - } - - request.SetContext(ctx) - - response = NewModifyClusterAuthenticationOptionsResponse() - err = c.Send(request, response) - return -} - -func NewModifyClusterEndpointSPRequest() (request *ModifyClusterEndpointSPRequest) { - request = &ModifyClusterEndpointSPRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterEndpointSP") - - return -} - -func NewModifyClusterEndpointSPResponse() (response *ModifyClusterEndpointSPResponse) { - response = &ModifyClusterEndpointSPResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// ModifyClusterEndpointSP -// 修改托管集群外网端口的安全策略(老的方式,仅支持托管集群外网端口) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_VPCUNEXPECTEDERROR = "InternalError.VPCUnexpectedError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) ModifyClusterEndpointSP(request *ModifyClusterEndpointSPRequest) (response *ModifyClusterEndpointSPResponse, err error) { - return c.ModifyClusterEndpointSPWithContext(context.Background(), request) -} - -// ModifyClusterEndpointSP -// 修改托管集群外网端口的安全策略(老的方式,仅支持托管集群外网端口) -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INTERNALERROR_VPCUNEXPECTEDERROR = "InternalError.VPCUnexpectedError" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// OPERATIONDENIED = "OperationDenied" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) ModifyClusterEndpointSPWithContext(ctx context.Context, request *ModifyClusterEndpointSPRequest) (response *ModifyClusterEndpointSPResponse, err error) { - if request == nil { - request = NewModifyClusterEndpointSPRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("ModifyClusterEndpointSP require credential") - } - - request.SetContext(ctx) - - response = NewModifyClusterEndpointSPResponse() - err = c.Send(request, response) - return -} - -func NewModifyClusterNodePoolRequest() (request *ModifyClusterNodePoolRequest) { - request = &ModifyClusterNodePoolRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterNodePool") - - return -} - -func NewModifyClusterNodePoolResponse() (response *ModifyClusterNodePoolResponse) { - response = &ModifyClusterNodePoolResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// ModifyClusterNodePool -// 编辑节点池 -// -// 可能返回的错误码: -// -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// OPERATIONDENIED = "OperationDenied" -// UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed" -func (c *Client) ModifyClusterNodePool(request *ModifyClusterNodePoolRequest) (response *ModifyClusterNodePoolResponse, err error) { - return c.ModifyClusterNodePoolWithContext(context.Background(), request) -} - -// ModifyClusterNodePool -// 编辑节点池 -// -// 可能返回的错误码: -// -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// OPERATIONDENIED = "OperationDenied" -// UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed" -func (c *Client) ModifyClusterNodePoolWithContext(ctx context.Context, request *ModifyClusterNodePoolRequest) (response *ModifyClusterNodePoolResponse, err error) { - if request == nil { - request = NewModifyClusterNodePoolRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("ModifyClusterNodePool require credential") - } - - request.SetContext(ctx) - - response = NewModifyClusterNodePoolResponse() - err = c.Send(request, response) - return -} - -func NewModifyNodePoolDesiredCapacityAboutAsgRequest() (request *ModifyNodePoolDesiredCapacityAboutAsgRequest) { - request = &ModifyNodePoolDesiredCapacityAboutAsgRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "ModifyNodePoolDesiredCapacityAboutAsg") - - return -} - -func NewModifyNodePoolDesiredCapacityAboutAsgResponse() (response *ModifyNodePoolDesiredCapacityAboutAsgResponse) { - response = &ModifyNodePoolDesiredCapacityAboutAsgResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// ModifyNodePoolDesiredCapacityAboutAsg -// 修改节点池关联伸缩组的期望实例数 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -// UNKNOWNPARAMETER = "UnknownParameter" -func (c *Client) ModifyNodePoolDesiredCapacityAboutAsg(request *ModifyNodePoolDesiredCapacityAboutAsgRequest) (response *ModifyNodePoolDesiredCapacityAboutAsgResponse, err error) { - return c.ModifyNodePoolDesiredCapacityAboutAsgWithContext(context.Background(), request) -} - -// ModifyNodePoolDesiredCapacityAboutAsg -// 修改节点池关联伸缩组的期望实例数 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" -// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" -// UNKNOWNPARAMETER = "UnknownParameter" -func (c *Client) ModifyNodePoolDesiredCapacityAboutAsgWithContext(ctx context.Context, request *ModifyNodePoolDesiredCapacityAboutAsgRequest) (response *ModifyNodePoolDesiredCapacityAboutAsgResponse, err error) { - if request == nil { - request = NewModifyNodePoolDesiredCapacityAboutAsgRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("ModifyNodePoolDesiredCapacityAboutAsg require credential") - } - - request.SetContext(ctx) - - response = NewModifyNodePoolDesiredCapacityAboutAsgResponse() - err = c.Send(request, response) - return -} - -func NewModifyNodePoolInstanceTypesRequest() (request *ModifyNodePoolInstanceTypesRequest) { - request = &ModifyNodePoolInstanceTypesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "ModifyNodePoolInstanceTypes") - - return -} - -func NewModifyNodePoolInstanceTypesResponse() (response *ModifyNodePoolInstanceTypesResponse) { - response = &ModifyNodePoolInstanceTypesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// ModifyNodePoolInstanceTypes -// 修改节点池的机型配置 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) ModifyNodePoolInstanceTypes(request *ModifyNodePoolInstanceTypesRequest) (response *ModifyNodePoolInstanceTypesResponse, err error) { - return c.ModifyNodePoolInstanceTypesWithContext(context.Background(), request) -} - -// ModifyNodePoolInstanceTypes -// 修改节点池的机型配置 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) ModifyNodePoolInstanceTypesWithContext(ctx context.Context, request *ModifyNodePoolInstanceTypesRequest) (response *ModifyNodePoolInstanceTypesResponse, err error) { - if request == nil { - request = NewModifyNodePoolInstanceTypesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("ModifyNodePoolInstanceTypes require credential") - } - - request.SetContext(ctx) - - response = NewModifyNodePoolInstanceTypesResponse() - err = c.Send(request, response) - return -} - -func NewModifyPrometheusAlertRuleRequest() (request *ModifyPrometheusAlertRuleRequest) { - request = &ModifyPrometheusAlertRuleRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusAlertRule") - - return -} - -func NewModifyPrometheusAlertRuleResponse() (response *ModifyPrometheusAlertRuleResponse) { - response = &ModifyPrometheusAlertRuleResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// ModifyPrometheusAlertRule -// 修改告警规则 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) ModifyPrometheusAlertRule(request *ModifyPrometheusAlertRuleRequest) (response *ModifyPrometheusAlertRuleResponse, err error) { - return c.ModifyPrometheusAlertRuleWithContext(context.Background(), request) -} - -// ModifyPrometheusAlertRule -// 修改告警规则 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) ModifyPrometheusAlertRuleWithContext(ctx context.Context, request *ModifyPrometheusAlertRuleRequest) (response *ModifyPrometheusAlertRuleResponse, err error) { - if request == nil { - request = NewModifyPrometheusAlertRuleRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("ModifyPrometheusAlertRule require credential") - } - - request.SetContext(ctx) - - response = NewModifyPrometheusAlertRuleResponse() - err = c.Send(request, response) - return -} - -func NewModifyPrometheusTemplateRequest() (request *ModifyPrometheusTemplateRequest) { - request = &ModifyPrometheusTemplateRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusTemplate") - - return -} - -func NewModifyPrometheusTemplateResponse() (response *ModifyPrometheusTemplateResponse) { - response = &ModifyPrometheusTemplateResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// ModifyPrometheusTemplate -// 修改模板内容 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" -func (c *Client) ModifyPrometheusTemplate(request *ModifyPrometheusTemplateRequest) (response *ModifyPrometheusTemplateResponse, err error) { - return c.ModifyPrometheusTemplateWithContext(context.Background(), request) -} - -// ModifyPrometheusTemplate -// 修改模板内容 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" -func (c *Client) ModifyPrometheusTemplateWithContext(ctx context.Context, request *ModifyPrometheusTemplateRequest) (response *ModifyPrometheusTemplateResponse, err error) { - if request == nil { - request = NewModifyPrometheusTemplateRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("ModifyPrometheusTemplate require credential") - } - - request.SetContext(ctx) - - response = NewModifyPrometheusTemplateResponse() - err = c.Send(request, response) - return -} - -func NewRemoveNodeFromNodePoolRequest() (request *RemoveNodeFromNodePoolRequest) { - request = &RemoveNodeFromNodePoolRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "RemoveNodeFromNodePool") - - return -} - -func NewRemoveNodeFromNodePoolResponse() (response *RemoveNodeFromNodePoolResponse) { - response = &RemoveNodeFromNodePoolResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// RemoveNodeFromNodePool -// 移出节点池节点,但保留在集群内 -// -// 可能返回的错误码: -// -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) RemoveNodeFromNodePool(request *RemoveNodeFromNodePoolRequest) (response *RemoveNodeFromNodePoolResponse, err error) { - return c.RemoveNodeFromNodePoolWithContext(context.Background(), request) -} - -// RemoveNodeFromNodePool -// 移出节点池节点,但保留在集群内 -// -// 可能返回的错误码: -// -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) RemoveNodeFromNodePoolWithContext(ctx context.Context, request *RemoveNodeFromNodePoolRequest) (response *RemoveNodeFromNodePoolResponse, err error) { - if request == nil { - request = NewRemoveNodeFromNodePoolRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("RemoveNodeFromNodePool require credential") - } - - request.SetContext(ctx) - - response = NewRemoveNodeFromNodePoolResponse() - err = c.Send(request, response) - return -} - -func NewRestartEKSContainerInstancesRequest() (request *RestartEKSContainerInstancesRequest) { - request = &RestartEKSContainerInstancesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "RestartEKSContainerInstances") - - return -} - -func NewRestartEKSContainerInstancesResponse() (response *RestartEKSContainerInstancesResponse) { - response = &RestartEKSContainerInstancesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// RestartEKSContainerInstances -// 重启弹性容器实例,支持批量操作 -// -// 可能返回的错误码: -// -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND = "ResourceNotFound" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) RestartEKSContainerInstances(request *RestartEKSContainerInstancesRequest) (response *RestartEKSContainerInstancesResponse, err error) { - return c.RestartEKSContainerInstancesWithContext(context.Background(), request) -} - -// RestartEKSContainerInstances -// 重启弹性容器实例,支持批量操作 -// -// 可能返回的错误码: -// -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCENOTFOUND = "ResourceNotFound" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) RestartEKSContainerInstancesWithContext(ctx context.Context, request *RestartEKSContainerInstancesRequest) (response *RestartEKSContainerInstancesResponse, err error) { - if request == nil { - request = NewRestartEKSContainerInstancesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("RestartEKSContainerInstances require credential") - } - - request.SetContext(ctx) - - response = NewRestartEKSContainerInstancesResponse() - err = c.Send(request, response) - return -} - -func NewScaleInClusterMasterRequest() (request *ScaleInClusterMasterRequest) { - request = &ScaleInClusterMasterRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "ScaleInClusterMaster") - - return -} - -func NewScaleInClusterMasterResponse() (response *ScaleInClusterMasterResponse) { - response = &ScaleInClusterMasterResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// ScaleInClusterMaster -// 缩容独立集群master节点 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// OPERATIONDENIED = "OperationDenied" -func (c *Client) ScaleInClusterMaster(request *ScaleInClusterMasterRequest) (response *ScaleInClusterMasterResponse, err error) { - return c.ScaleInClusterMasterWithContext(context.Background(), request) -} - -// ScaleInClusterMaster -// 缩容独立集群master节点 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// OPERATIONDENIED = "OperationDenied" -func (c *Client) ScaleInClusterMasterWithContext(ctx context.Context, request *ScaleInClusterMasterRequest) (response *ScaleInClusterMasterResponse, err error) { - if request == nil { - request = NewScaleInClusterMasterRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("ScaleInClusterMaster require credential") - } - - request.SetContext(ctx) - - response = NewScaleInClusterMasterResponse() - err = c.Send(request, response) - return -} - -func NewScaleOutClusterMasterRequest() (request *ScaleOutClusterMasterRequest) { - request = &ScaleOutClusterMasterRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "ScaleOutClusterMaster") - - return -} - -func NewScaleOutClusterMasterResponse() (response *ScaleOutClusterMasterResponse) { - response = &ScaleOutClusterMasterResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// ScaleOutClusterMaster -// 扩容独立集群master节点 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// OPERATIONDENIED = "OperationDenied" -func (c *Client) ScaleOutClusterMaster(request *ScaleOutClusterMasterRequest) (response *ScaleOutClusterMasterResponse, err error) { - return c.ScaleOutClusterMasterWithContext(context.Background(), request) -} - -// ScaleOutClusterMaster -// 扩容独立集群master节点 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// OPERATIONDENIED = "OperationDenied" -func (c *Client) ScaleOutClusterMasterWithContext(ctx context.Context, request *ScaleOutClusterMasterRequest) (response *ScaleOutClusterMasterResponse, err error) { - if request == nil { - request = NewScaleOutClusterMasterRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("ScaleOutClusterMaster require credential") - } - - request.SetContext(ctx) - - response = NewScaleOutClusterMasterResponse() - err = c.Send(request, response) - return -} - -func NewSetNodePoolNodeProtectionRequest() (request *SetNodePoolNodeProtectionRequest) { - request = &SetNodePoolNodeProtectionRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "SetNodePoolNodeProtection") - - return -} - -func NewSetNodePoolNodeProtectionResponse() (response *SetNodePoolNodeProtectionResponse) { - response = &SetNodePoolNodeProtectionResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// SetNodePoolNodeProtection -// 仅能设置节点池中处于伸缩组的节点 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) SetNodePoolNodeProtection(request *SetNodePoolNodeProtectionRequest) (response *SetNodePoolNodeProtectionResponse, err error) { - return c.SetNodePoolNodeProtectionWithContext(context.Background(), request) -} - -// SetNodePoolNodeProtection -// 仅能设置节点池中处于伸缩组的节点 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -func (c *Client) SetNodePoolNodeProtectionWithContext(ctx context.Context, request *SetNodePoolNodeProtectionRequest) (response *SetNodePoolNodeProtectionResponse, err error) { - if request == nil { - request = NewSetNodePoolNodeProtectionRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("SetNodePoolNodeProtection require credential") - } - - request.SetContext(ctx) - - response = NewSetNodePoolNodeProtectionResponse() - err = c.Send(request, response) - return -} - -func NewSyncPrometheusTemplateRequest() (request *SyncPrometheusTemplateRequest) { - request = &SyncPrometheusTemplateRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "SyncPrometheusTemplate") - - return -} - -func NewSyncPrometheusTemplateResponse() (response *SyncPrometheusTemplateResponse) { - response = &SyncPrometheusTemplateResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// SyncPrometheusTemplate -// 同步模板到实例或者集群 -// -// 可能返回的错误码: -// -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" -// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" -// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" -func (c *Client) SyncPrometheusTemplate(request *SyncPrometheusTemplateRequest) (response *SyncPrometheusTemplateResponse, err error) { - return c.SyncPrometheusTemplateWithContext(context.Background(), request) -} - -// SyncPrometheusTemplate -// 同步模板到实例或者集群 -// -// 可能返回的错误码: -// -// INTERNALERROR_DB = "InternalError.Db" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" -// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" -// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" -func (c *Client) SyncPrometheusTemplateWithContext(ctx context.Context, request *SyncPrometheusTemplateRequest) (response *SyncPrometheusTemplateResponse, err error) { - if request == nil { - request = NewSyncPrometheusTemplateRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("SyncPrometheusTemplate require credential") - } - - request.SetContext(ctx) - - response = NewSyncPrometheusTemplateResponse() - err = c.Send(request, response) - return -} - -func NewUpdateClusterVersionRequest() (request *UpdateClusterVersionRequest) { - request = &UpdateClusterVersionRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "UpdateClusterVersion") - - return -} - -func NewUpdateClusterVersionResponse() (response *UpdateClusterVersionResponse) { - response = &UpdateClusterVersionResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// UpdateClusterVersion -// 升级集群 Master 组件到指定版本 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CLUSTERUPGRADENODEVERSION = "InternalError.ClusterUpgradeNodeVersion" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -func (c *Client) UpdateClusterVersion(request *UpdateClusterVersionRequest) (response *UpdateClusterVersionResponse, err error) { - return c.UpdateClusterVersionWithContext(context.Background(), request) -} - -// UpdateClusterVersion -// 升级集群 Master 组件到指定版本 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INTERNALERROR_CLUSTERUPGRADENODEVERSION = "InternalError.ClusterUpgradeNodeVersion" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -func (c *Client) UpdateClusterVersionWithContext(ctx context.Context, request *UpdateClusterVersionRequest) (response *UpdateClusterVersionResponse, err error) { - if request == nil { - request = NewUpdateClusterVersionRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("UpdateClusterVersion require credential") - } - - request.SetContext(ctx) - - response = NewUpdateClusterVersionResponse() - err = c.Send(request, response) - return -} - -func NewUpdateEKSClusterRequest() (request *UpdateEKSClusterRequest) { - request = &UpdateEKSClusterRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "UpdateEKSCluster") - - return -} - -func NewUpdateEKSClusterResponse() (response *UpdateEKSClusterResponse) { - response = &UpdateEKSClusterResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// UpdateEKSCluster -// 修改弹性集群名称等属性 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) UpdateEKSCluster(request *UpdateEKSClusterRequest) (response *UpdateEKSClusterResponse, err error) { - return c.UpdateEKSClusterWithContext(context.Background(), request) -} - -// UpdateEKSCluster -// 修改弹性集群名称等属性 -// -// 可能返回的错误码: -// -// FAILEDOPERATION = "FailedOperation" -// INTERNALERROR = "InternalError" -// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" -// INVALIDPARAMETER = "InvalidParameter" -// LIMITEXCEEDED = "LimitExceeded" -// MISSINGPARAMETER = "MissingParameter" -// RESOURCEINUSE = "ResourceInUse" -// RESOURCENOTFOUND = "ResourceNotFound" -// RESOURCEUNAVAILABLE = "ResourceUnavailable" -// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" -// UNKNOWNPARAMETER = "UnknownParameter" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) UpdateEKSClusterWithContext(ctx context.Context, request *UpdateEKSClusterRequest) (response *UpdateEKSClusterResponse, err error) { - if request == nil { - request = NewUpdateEKSClusterRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("UpdateEKSCluster require credential") - } - - request.SetContext(ctx) - - response = NewUpdateEKSClusterResponse() - err = c.Send(request, response) - return -} - -func NewUpdateEKSContainerInstanceRequest() (request *UpdateEKSContainerInstanceRequest) { - request = &UpdateEKSContainerInstanceRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "UpdateEKSContainerInstance") - - return -} - -func NewUpdateEKSContainerInstanceResponse() (response *UpdateEKSContainerInstanceResponse) { - response = &UpdateEKSContainerInstanceResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// UpdateEKSContainerInstance -// 更新容器实例 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func UpdateEKSContainerInstance(request *UpdateEKSContainerInstanceRequest) (response *UpdateEKSContainerInstanceResponse, err error) { - provider := pbpod.CloudProvider(request.ProviderId) - var configFile string - flag.StringVar(&configFile, "conf-tencent", "configs/tenanter.yaml", "tenanter.yaml") - flag.Parse() - defer glog.Flush() - - if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { - if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { - glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) - } - glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) - } - - glog.Infof("load tenant from file finished") - var regionId int32 - switch request.ProviderId { - case 0: - regionId, _ = tenanter.GetAliRegionId(request.RegionId) - case 1: - regionId, _ = tenanter.GetTencentRegionId(request.RegionId) - case 2: - regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId) - case 3: - regionId, _ = tenanter.GetK8SRegionId(request.RegionId) - } - containers := request.Containers - requestPCM := &pbpod.UpdatePodReq{ - RequestSource: "tencent", - Provider: provider, - AccountName: request.AccountName, - PcmId: *request.EksCiId, - PodId: *request.EksCiId, - PodName: *request.Name, - Namespace: request.Namespace, - RegionId: regionId, - ContainerImage: *containers[0].Image, - ContainerName: *containers[0].Name, - CpuPod: strconv.FormatFloat(*containers[0].Cpu, 'E', -1, 64), - MemoryPod: strconv.FormatFloat(*containers[0].Memory, 'E', -1, 64), - RestartPolicy: *request.RestartPolicy, - Labels: "", - } - - resp, err := server.UpdatePod(nil, requestPCM) - if err != nil { - glog.Errorf("CreatePod error %+v", err) - return - } - glog.Infof("CreatePod response %+v", resp) - response = &UpdateEKSContainerInstanceResponse{ - Response: (*struct { - EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - })(&struct { - EksCiId *string - RequestId *string - }{ - EksCiId: &resp.PodId, - RequestId: &resp.RequestId, - }), - BaseResponse: &tchttp.BaseResponse{}, - } - return response, nil -} - -// UpdateEKSContainerInstance -// 更新容器实例 -// -// 可能返回的错误码: -// -// INTERNALERROR = "InternalError" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) UpdateEKSContainerInstanceWithContext(ctx context.Context, request *UpdateEKSContainerInstanceRequest) (response *UpdateEKSContainerInstanceResponse, err error) { - if request == nil { - request = NewUpdateEKSContainerInstanceRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("UpdateEKSContainerInstance require credential") - } - - request.SetContext(ctx) - - response = NewUpdateEKSContainerInstanceResponse() - err = c.Send(request, response) - return -} - -func NewUpdateImageCacheRequest() (request *UpdateImageCacheRequest) { - request = &UpdateImageCacheRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "UpdateImageCache") - - return -} - -func NewUpdateImageCacheResponse() (response *UpdateImageCacheResponse) { - response = &UpdateImageCacheResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// UpdateImageCache -// 更新镜像缓存接口 -// -// 可能返回的错误码: -// -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) UpdateImageCache(request *UpdateImageCacheRequest) (response *UpdateImageCacheResponse, err error) { - return c.UpdateImageCacheWithContext(context.Background(), request) -} - -// UpdateImageCache -// 更新镜像缓存接口 -// -// 可能返回的错误码: -// -// UNSUPPORTEDOPERATION = "UnsupportedOperation" -func (c *Client) UpdateImageCacheWithContext(ctx context.Context, request *UpdateImageCacheRequest) (response *UpdateImageCacheResponse, err error) { - if request == nil { - request = NewUpdateImageCacheRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("UpdateImageCache require credential") - } - - request.SetContext(ctx) - - response = NewUpdateImageCacheResponse() - err = c.Send(request, response) - return -} - -func NewUpgradeClusterInstancesRequest() (request *UpgradeClusterInstancesRequest) { - request = &UpgradeClusterInstancesRequest{ - BaseRequest: &tchttp.BaseRequest{}, - } - request.Init().WithApiInfo("tke", APIVersion, "UpgradeClusterInstances") - - return -} - -func NewUpgradeClusterInstancesResponse() (response *UpgradeClusterInstancesResponse) { - response = &UpgradeClusterInstancesResponse{ - BaseResponse: &tchttp.BaseResponse{}, - } - return -} - -// UpgradeClusterInstances -// 给集群的一批work节点进行升级 -// -// 可能返回的错误码: -// -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_TASKALREADYRUNNING = "InternalError.TaskAlreadyRunning" -// INTERNALERROR_TASKLIFESTATEERROR = "InternalError.TaskLifeStateError" -// INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -func (c *Client) UpgradeClusterInstances(request *UpgradeClusterInstancesRequest) (response *UpgradeClusterInstancesResponse, err error) { - return c.UpgradeClusterInstancesWithContext(context.Background(), request) -} - -// UpgradeClusterInstances -// 给集群的一批work节点进行升级 -// -// 可能返回的错误码: -// -// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_TASKALREADYRUNNING = "InternalError.TaskAlreadyRunning" -// INTERNALERROR_TASKLIFESTATEERROR = "InternalError.TaskLifeStateError" -// INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound" -// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" -// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" -// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" -func (c *Client) UpgradeClusterInstancesWithContext(ctx context.Context, request *UpgradeClusterInstancesRequest) (response *UpgradeClusterInstancesResponse, err error) { - if request == nil { - request = NewUpgradeClusterInstancesRequest() - } - - if c.GetCredential() == nil { - return nil, errors.New("UpgradeClusterInstances require credential") - } - - request.SetContext(ctx) - - response = NewUpgradeClusterInstancesResponse() - err = c.Send(request, response) - return -} diff --git a/adaptor/pcm_pod/server/tencent/errors.go b/adaptor/pcm_pod/server/tencent/errors.go deleted file mode 100644 index 919bc6c9e..000000000 --- a/adaptor/pcm_pod/server/tencent/errors.go +++ /dev/null @@ -1,343 +0,0 @@ -// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package v20180525 - -const ( - // 此产品的特有错误码 - - // 操作失败。 - FAILEDOPERATION = "FailedOperation" - - // 子账户RBAC权限不足。 - FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" - - // 内部错误。 - INTERNALERROR = "InternalError" - - // 获取用户认证信息失败。 - INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon" - - // 账户未通过认证。 - INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" - - // 伸缩组资源创建报错。 - INTERNALERROR_ASCOMMON = "InternalError.AsCommon" - - // 没有权限。 - INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" - - // CIDR和其他集群CIDR冲突。 - INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster" - - // CIDR和其他路由冲突。 - INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" - - // CIDR和vpc冲突。 - INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr" - - // CIDR和全局路由冲突。 - INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute" - - // CIDR无效。 - INTERNALERROR_CIDRINVALI = "InternalError.CidrInvali" - - // CIDR掩码无效。 - INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" - - // CIDR不在路由表之内。 - INTERNALERROR_CIDROUTOFROUTETABLE = "InternalError.CidrOutOfRouteTable" - - // 集群未找到。 - INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" - - // 集群状态错误。 - INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" - - // 集群节点版本过低。 - INTERNALERROR_CLUSTERUPGRADENODEVERSION = "InternalError.ClusterUpgradeNodeVersion" - - // 执行命令超时。 - INTERNALERROR_CMDTIMEOUT = "InternalError.CmdTimeout" - - // 内部HTTP客户端错误。 - INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" - - // 请求(http请求)其他云服务失败。 - INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" - - // 容器未找到。 - INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" - - // 创建集群失败。 - INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" - - // cvm创建节点报错。 - INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" - - // cvm不存在。 - INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" - - // 存在云服务器在CVM侧查询不到。 - INTERNALERROR_CVMNUMBERNOTMATCH = "InternalError.CvmNumberNotMatch" - - // cvm状态不正常。 - INTERNALERROR_CVMSTATUS = "InternalError.CvmStatus" - - // db错误。 - INTERNALERROR_DB = "InternalError.Db" - - // DB错误。 - INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" - - // 记录未找到。 - INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" - - // 获得当前安全组总数失败。 - INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" - - // 获得安全组配额失败。 - INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" - - // 不支持空集群。 - INTERNALERROR_EMPTYCLUSTERNOTSUPPORT = "InternalError.EmptyClusterNotSupport" - - // 下一跳地址已关联CIDR。 - INTERNALERROR_GATEWAYALREADYASSOCIATEDCIDR = "InternalError.GatewayAlreadyAssociatedCidr" - - // 镜像未找到。 - INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" - - // 初始化master失败。 - INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" - - // 无效CIDR。 - INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" - - // 连接用户Kubernetes集群失败。 - INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" - - // 创建集群Client出错。 - INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" - - // KubernetesAPI错误。 - INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" - - // kubernetes client建立失败。 - INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" - - // 创建Kubernetes资源失败。 - INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" - - // 删除Kubernetes资源失败。 - INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" - - // 获取Kubernetes资源失败。 - INTERNALERROR_KUBERNETESGETOPERATIONERROR = "InternalError.KubernetesGetOperationError" - - // Kubernetes未知错误。 - INTERNALERROR_KUBERNETESINTERNAL = "InternalError.KubernetesInternal" - - // 底层调用CLB未知错误。 - INTERNALERROR_LBCOMMON = "InternalError.LbCommon" - - // 镜像OS不支持。 - INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" - - // Param。 - INTERNALERROR_PARAM = "InternalError.Param" - - // Pod未找到。 - INTERNALERROR_PODNOTFOUND = "InternalError.PodNotFound" - - // 集群不支持当前操作。 - INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" - - // 超过配额限制。 - INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" - - // 超过配额限制。 - INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" - - // 超过配额限制。 - INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" - - // 安全组配额不足。 - INTERNALERROR_QUOTAUSGLIMIT = "InternalError.QuotaUSGLimit" - - // 资源已存在。 - INTERNALERROR_RESOURCEEXISTALREADY = "InternalError.ResourceExistAlready" - - // 路由表非空。 - INTERNALERROR_ROUTETABLENOTEMPTY = "InternalError.RouteTableNotEmpty" - - // 路由表不存在。 - INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound" - - // 已有相同任务执行中。 - INTERNALERROR_TASKALREADYRUNNING = "InternalError.TaskAlreadyRunning" - - // 创建任务失败。 - INTERNALERROR_TASKCREATEFAILED = "InternalError.TaskCreateFailed" - - // 任务当前所处状态不支持此操作。 - INTERNALERROR_TASKLIFESTATEERROR = "InternalError.TaskLifeStateError" - - // 任务未找到。 - INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound" - - // 询价错误。 - INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon" - - // 账户余额不足。 - INTERNALERROR_TRADEINSUFFICIENTBALANCE = "InternalError.TradeInsufficientBalance" - - // 内部错误。 - INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" - - // 未知的内部错误。 - INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" - - // VPC未知错误。 - INTERNALERROR_VPCUNEXPECTEDERROR = "InternalError.VPCUnexpectedError" - - // VPC报错。 - INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" - - // 对等连接不存在。 - INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" - - // 未发现vpc记录。 - INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" - - // 白名单未知错误。 - INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" - - // 参数错误。 - INVALIDPARAMETER = "InvalidParameter" - - // 弹性伸缩组创建参数错误。 - INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" - - // CIDR掩码超出范围(集群CIDR范围 最小值: 10 最大值: 24)。 - INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange" - - // CIDR和其他集群CIDR冲突。 - INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster" - - // 创建的路由与已存在的其他路由产生冲突。 - INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" - - // CIDR和vpc的CIDR冲突。 - INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" - - // 创建的路由与VPC下已存在的全局路由产生冲突。 - INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" - - // 参数错误,CIDR不符合规范。 - INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" - - // CIDR不在路由表之内。 - INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable" - - // 集群ID不存在。 - INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" - - // 下一跳地址已关联CIDR。 - INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr" - - // 无效的私有CIDR网段。 - INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR" - - // 参数错误。 - INVALIDPARAMETER_PARAM = "InvalidParameter.Param" - - // Prometheus未关联本集群。 - INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" - - // Prometheus实例不存在。 - INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" - - // 资源未找到。 - INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" - - // 路由表非空。 - INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" - - // 超过配额限制。 - LIMITEXCEEDED = "LimitExceeded" - - // 缺少参数错误。 - MISSINGPARAMETER = "MissingParameter" - - // 操作被拒绝。 - OPERATIONDENIED = "OperationDenied" - - // 集群处于删除保护中,禁止删除。 - OPERATIONDENIED_CLUSTERINDELETIONPROTECTION = "OperationDenied.ClusterInDeletionProtection" - - // 资源被占用。 - RESOURCEINUSE = "ResourceInUse" - - // 资源不足。 - RESOURCEINSUFFICIENT = "ResourceInsufficient" - - // 资源不存在。 - RESOURCENOTFOUND = "ResourceNotFound" - - // 伸缩组不存在。 - RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" - - // 集群不存在。 - RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" - - // 用户Kubernetes集群中未找到指定资源。 - RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound" - - // 未找到该kubernetes资源。 - RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" - - // 找不到对应路由表。 - RESOURCENOTFOUND_ROUTETABLENOTFOUND = "ResourceNotFound.RouteTableNotFound" - - // 资源不可用。 - RESOURCEUNAVAILABLE = "ResourceUnavailable" - - // 集群状态不支持该操作。 - RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" - - // Eks Container Instance状态不支持改操作。 - RESOURCEUNAVAILABLE_EKSCONTAINERSTATUS = "ResourceUnavailable.EksContainerStatus" - - // 资源售罄。 - RESOURCESSOLDOUT = "ResourcesSoldOut" - - // 未授权操作。 - UNAUTHORIZEDOPERATION = "UnauthorizedOperation" - - // 无该接口CAM权限。 - UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" - - // 未知参数错误。 - UNKNOWNPARAMETER = "UnknownParameter" - - // 操作不支持。 - UNSUPPORTEDOPERATION = "UnsupportedOperation" - - // AS伸缩关闭导致无法开启CA。 - UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed" - - // 非白名单用户。 - UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" -) diff --git a/adaptor/pcm_pod/server/tencent/models.go b/adaptor/pcm_pod/server/tencent/models.go deleted file mode 100644 index 5edd6eebe..000000000 --- a/adaptor/pcm_pod/server/tencent/models.go +++ /dev/null @@ -1,8695 +0,0 @@ -// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package v20180525 - -import ( - "encoding/json" - tcerr "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" - tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" -) - -type AcquireClusterAdminRoleRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` -} - -func (r *AcquireClusterAdminRoleRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *AcquireClusterAdminRoleRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AcquireClusterAdminRoleRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type AcquireClusterAdminRoleResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *AcquireClusterAdminRoleResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *AcquireClusterAdminRoleResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type AddClusterCIDRRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 增加的ClusterCIDR - ClusterCIDRs []*string `json:"ClusterCIDRs,omitempty" name:"ClusterCIDRs"` - - // 是否忽略ClusterCIDR与VPC路由表的冲突 - IgnoreClusterCIDRConflict *bool `json:"IgnoreClusterCIDRConflict,omitempty" name:"IgnoreClusterCIDRConflict"` -} - -func (r *AddClusterCIDRRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *AddClusterCIDRRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "ClusterCIDRs") - delete(f, "IgnoreClusterCIDRConflict") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddClusterCIDRRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type AddClusterCIDRResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *AddClusterCIDRResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *AddClusterCIDRResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type AddExistedInstancesRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 实例列表,不支持竞价实例 - InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` - - // 实例额外需要设置参数信息(默认值) - InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` - - // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 - EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` - - // 节点登录信息(目前仅支持使用Password或者单个KeyIds) - LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` - - // 重装系统时,可以指定修改实例的HostName(集群为HostName模式时,此参数必传,规则名称除不支持大写字符外与[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口HostName一致) - HostName *string `json:"HostName,omitempty" name:"HostName"` - - // 实例所属安全组。该参数可以通过调用 DescribeSecurityGroups 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。(目前仅支持设置单个sgId) - SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` - - // 节点池选项 - NodePool *NodePoolOption `json:"NodePool,omitempty" name:"NodePool"` - - // 校验规则相关选项,可配置跳过某些校验规则。目前支持GlobalRouteCIDRCheck(跳过GlobalRouter的相关校验),VpcCniCIDRCheck(跳过VpcCni相关校验) - SkipValidateOptions []*string `json:"SkipValidateOptions,omitempty" name:"SkipValidateOptions"` - - // 参数InstanceAdvancedSettingsOverride数组用于定制化地配置各台instance,与InstanceIds顺序对应。当传入InstanceAdvancedSettingsOverrides数组时,将覆盖默认参数InstanceAdvancedSettings;当没有传入参数InstanceAdvancedSettingsOverrides时,InstanceAdvancedSettings参数对每台instance生效。 - // - // 参数InstanceAdvancedSettingsOverride数组的长度应与InstanceIds数组一致;当长度大于InstanceIds数组长度时将报错;当长度小于InstanceIds数组时,没有对应配置的instace将使用默认配置。 - InstanceAdvancedSettingsOverrides []*InstanceAdvancedSettings `json:"InstanceAdvancedSettingsOverrides,omitempty" name:"InstanceAdvancedSettingsOverrides"` -} - -func (r *AddExistedInstancesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *AddExistedInstancesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "InstanceIds") - delete(f, "InstanceAdvancedSettings") - delete(f, "EnhancedService") - delete(f, "LoginSettings") - delete(f, "HostName") - delete(f, "SecurityGroupIds") - delete(f, "NodePool") - delete(f, "SkipValidateOptions") - delete(f, "InstanceAdvancedSettingsOverrides") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddExistedInstancesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type AddExistedInstancesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 失败的节点ID - // 注意:此字段可能返回 null,表示取不到有效值。 - FailedInstanceIds []*string `json:"FailedInstanceIds,omitempty" name:"FailedInstanceIds"` - - // 成功的节点ID - // 注意:此字段可能返回 null,表示取不到有效值。 - SuccInstanceIds []*string `json:"SuccInstanceIds,omitempty" name:"SuccInstanceIds"` - - // 超时未返回出来节点的ID(可能失败,也可能成功) - // 注意:此字段可能返回 null,表示取不到有效值。 - TimeoutInstanceIds []*string `json:"TimeoutInstanceIds,omitempty" name:"TimeoutInstanceIds"` - - // 失败的节点的失败原因 - // 注意:此字段可能返回 null,表示取不到有效值。 - FailedReasons []*string `json:"FailedReasons,omitempty" name:"FailedReasons"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *AddExistedInstancesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *AddExistedInstancesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type AddNodeToNodePoolRequest struct { - *tchttp.BaseRequest - - // 集群id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 节点池id - NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` - - // 节点id - InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` -} - -func (r *AddNodeToNodePoolRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *AddNodeToNodePoolRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "NodePoolId") - delete(f, "InstanceIds") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddNodeToNodePoolRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type AddNodeToNodePoolResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *AddNodeToNodePoolResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *AddNodeToNodePoolResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type AddVpcCniSubnetsRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 为集群容器网络增加的子网列表 - SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` - - // 集群所属的VPC的ID - VpcId *string `json:"VpcId,omitempty" name:"VpcId"` -} - -func (r *AddVpcCniSubnetsRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *AddVpcCniSubnetsRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "SubnetIds") - delete(f, "VpcId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddVpcCniSubnetsRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type AddVpcCniSubnetsResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *AddVpcCniSubnetsResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *AddVpcCniSubnetsResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type AppChart struct { - - // chart名称 - Name *string `json:"Name,omitempty" name:"Name"` - - // chart的标签 - // 注意:此字段可能返回 null,表示取不到有效值。 - Label *string `json:"Label,omitempty" name:"Label"` - - // chart的版本 - LatestVersion *string `json:"LatestVersion,omitempty" name:"LatestVersion"` -} - -type AutoScalingGroupRange struct { - - // 伸缩组最小实例数 - MinSize *int64 `json:"MinSize,omitempty" name:"MinSize"` - - // 伸缩组最大实例数 - MaxSize *int64 `json:"MaxSize,omitempty" name:"MaxSize"` -} - -type AutoUpgradeClusterLevel struct { - - // 是否开启自动变配集群等级 - IsAutoUpgrade *bool `json:"IsAutoUpgrade,omitempty" name:"IsAutoUpgrade"` -} - -type AutoscalingAdded struct { - - // 正在加入中的节点数量 - Joining *int64 `json:"Joining,omitempty" name:"Joining"` - - // 初始化中的节点数量 - Initializing *int64 `json:"Initializing,omitempty" name:"Initializing"` - - // 正常的节点数量 - Normal *int64 `json:"Normal,omitempty" name:"Normal"` - - // 节点总数 - Total *int64 `json:"Total,omitempty" name:"Total"` -} - -type Capabilities struct { - - // 启用安全能力项列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - Add []*string `json:"Add,omitempty" name:"Add"` - - // 禁用安全能力向列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - Drop []*string `json:"Drop,omitempty" name:"Drop"` -} - -type CbsVolume struct { - - // cbs volume 数据卷名称 - Name *string `json:"Name,omitempty" name:"Name"` - - // 腾讯云cbs盘Id - CbsDiskId *string `json:"CbsDiskId,omitempty" name:"CbsDiskId"` -} - -type CheckInstancesUpgradeAbleRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 节点列表,空为全部节点 - InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` - - // 升级类型 - UpgradeType *string `json:"UpgradeType,omitempty" name:"UpgradeType"` - - // 分页Offset - Offset *int64 `json:"Offset,omitempty" name:"Offset"` - - // 分页Limit - Limit *int64 `json:"Limit,omitempty" name:"Limit"` - - // 过滤 - Filter []*Filter `json:"Filter,omitempty" name:"Filter"` -} - -func (r *CheckInstancesUpgradeAbleRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CheckInstancesUpgradeAbleRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "InstanceIds") - delete(f, "UpgradeType") - delete(f, "Offset") - delete(f, "Limit") - delete(f, "Filter") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CheckInstancesUpgradeAbleRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CheckInstancesUpgradeAbleResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 集群master当前小版本 - ClusterVersion *string `json:"ClusterVersion,omitempty" name:"ClusterVersion"` - - // 集群master对应的大版本目前最新小版本 - LatestVersion *string `json:"LatestVersion,omitempty" name:"LatestVersion"` - - // 可升级节点列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - UpgradeAbleInstances []*UpgradeAbleInstancesItem `json:"UpgradeAbleInstances,omitempty" name:"UpgradeAbleInstances"` - - // 总数 - // 注意:此字段可能返回 null,表示取不到有效值。 - Total *int64 `json:"Total,omitempty" name:"Total"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CheckInstancesUpgradeAbleResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CheckInstancesUpgradeAbleResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type Cluster struct { - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 集群名称 - ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` - - // 集群描述 - ClusterDescription *string `json:"ClusterDescription,omitempty" name:"ClusterDescription"` - - // 集群版本(默认值为1.10.5) - ClusterVersion *string `json:"ClusterVersion,omitempty" name:"ClusterVersion"` - - // 集群系统。centos7.2x86_64 或者 ubuntu16.04.1 LTSx86_64,默认取值为ubuntu16.04.1 LTSx86_64 - ClusterOs *string `json:"ClusterOs,omitempty" name:"ClusterOs"` - - // 集群类型,托管集群:MANAGED_CLUSTER,独立集群:INDEPENDENT_CLUSTER。 - ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` - - // 集群网络相关参数 - ClusterNetworkSettings *ClusterNetworkSettings `json:"ClusterNetworkSettings,omitempty" name:"ClusterNetworkSettings"` - - // 集群当前node数量 - ClusterNodeNum *uint64 `json:"ClusterNodeNum,omitempty" name:"ClusterNodeNum"` - - // 集群所属的项目ID - ProjectId *uint64 `json:"ProjectId,omitempty" name:"ProjectId"` - - // 标签描述列表。 - // 注意:此字段可能返回 null,表示取不到有效值。 - TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` - - // 集群状态 (Running 运行中 Creating 创建中 Idling 闲置中 Abnormal 异常 ) - ClusterStatus *string `json:"ClusterStatus,omitempty" name:"ClusterStatus"` - - // 集群属性(包括集群不同属性的MAP,属性字段包括NodeNameType (lan-ip模式和hostname 模式,默认无lan-ip模式)) - // 注意:此字段可能返回 null,表示取不到有效值。 - Property *string `json:"Property,omitempty" name:"Property"` - - // 集群当前master数量 - ClusterMaterNodeNum *uint64 `json:"ClusterMaterNodeNum,omitempty" name:"ClusterMaterNodeNum"` - - // 集群使用镜像id - // 注意:此字段可能返回 null,表示取不到有效值。 - ImageId *string `json:"ImageId,omitempty" name:"ImageId"` - - // OsCustomizeType 系统定制类型 - // 注意:此字段可能返回 null,表示取不到有效值。 - OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` - - // 集群运行环境docker或container - // 注意:此字段可能返回 null,表示取不到有效值。 - ContainerRuntime *string `json:"ContainerRuntime,omitempty" name:"ContainerRuntime"` - - // 创建时间 - // 注意:此字段可能返回 null,表示取不到有效值。 - CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` - - // 删除保护开关 - // 注意:此字段可能返回 null,表示取不到有效值。 - DeletionProtection *bool `json:"DeletionProtection,omitempty" name:"DeletionProtection"` - - // 集群是否开启第三方节点支持 - // 注意:此字段可能返回 null,表示取不到有效值。 - EnableExternalNode *bool `json:"EnableExternalNode,omitempty" name:"EnableExternalNode"` -} - -type ClusterAdvancedSettings struct { - - // 是否启用IPVS - IPVS *bool `json:"IPVS,omitempty" name:"IPVS"` - - // 是否启用集群节点自动扩缩容(创建集群流程不支持开启此功能) - AsEnabled *bool `json:"AsEnabled,omitempty" name:"AsEnabled"` - - // 集群使用的runtime类型,包括"docker"和"containerd"两种类型,默认为"docker" - ContainerRuntime *string `json:"ContainerRuntime,omitempty" name:"ContainerRuntime"` - - // 集群中节点NodeName类型(包括 hostname,lan-ip两种形式,默认为lan-ip。如果开启了hostname模式,创建节点时需要设置HostName参数,并且InstanceName需要和HostName一致) - NodeNameType *string `json:"NodeNameType,omitempty" name:"NodeNameType"` - - // 集群自定义参数 - ExtraArgs *ClusterExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` - - // 集群网络类型(包括GR(全局路由)和VPC-CNI两种模式,默认为GR。 - NetworkType *string `json:"NetworkType,omitempty" name:"NetworkType"` - - // 集群VPC-CNI模式是否为非固定IP,默认: FALSE 固定IP。 - IsNonStaticIpMode *bool `json:"IsNonStaticIpMode,omitempty" name:"IsNonStaticIpMode"` - - // 是否启用集群删除保护 - DeletionProtection *bool `json:"DeletionProtection,omitempty" name:"DeletionProtection"` - - // 集群的网络代理模型,目前tke集群支持的网络代理模式有三种:iptables,ipvs,ipvs-bpf,此参数仅在使用ipvs-bpf模式时使用,三种网络模式的参数设置关系如下: - // iptables模式:IPVS和KubeProxyMode都不设置 - // ipvs模式: 设置IPVS为true, KubeProxyMode不设置 - // ipvs-bpf模式: 设置KubeProxyMode为kube-proxy-bpf - // 使用ipvs-bpf的网络模式需要满足以下条件: - // 1. 集群版本必须为1.14及以上; - // 2. 系统镜像必须是: Tencent Linux 2.4; - KubeProxyMode *string `json:"KubeProxyMode,omitempty" name:"KubeProxyMode"` - - // 是否开启审计开关 - AuditEnabled *bool `json:"AuditEnabled,omitempty" name:"AuditEnabled"` - - // 审计日志上传到的logset日志集 - AuditLogsetId *string `json:"AuditLogsetId,omitempty" name:"AuditLogsetId"` - - // 审计日志上传到的topic - AuditLogTopicId *string `json:"AuditLogTopicId,omitempty" name:"AuditLogTopicId"` - - // 区分共享网卡多IP模式和独立网卡模式,共享网卡多 IP 模式填写"tke-route-eni",独立网卡模式填写"tke-direct-eni",默认为共享网卡模式 - VpcCniType *string `json:"VpcCniType,omitempty" name:"VpcCniType"` - - // 运行时版本 - RuntimeVersion *string `json:"RuntimeVersion,omitempty" name:"RuntimeVersion"` - - // 是否开节点podCIDR大小的自定义模式 - EnableCustomizedPodCIDR *bool `json:"EnableCustomizedPodCIDR,omitempty" name:"EnableCustomizedPodCIDR"` - - // 自定义模式下的基础pod数量 - BasePodNumber *int64 `json:"BasePodNumber,omitempty" name:"BasePodNumber"` - - // 启用 CiliumMode 的模式,空值表示不启用,“clusterIP” 表示启用 Cilium 支持 ClusterIP - CiliumMode *string `json:"CiliumMode,omitempty" name:"CiliumMode"` -} - -type ClusterAsGroup struct { - - // 伸缩组ID - AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` - - // 伸缩组状态(开启 enabled 开启中 enabling 关闭 disabled 关闭中 disabling 更新中 updating 删除中 deleting 开启缩容中 scaleDownEnabling 关闭缩容中 scaleDownDisabling) - Status *string `json:"Status,omitempty" name:"Status"` - - // 节点是否设置成不可调度 - // 注意:此字段可能返回 null,表示取不到有效值。 - IsUnschedulable *bool `json:"IsUnschedulable,omitempty" name:"IsUnschedulable"` - - // 伸缩组的label列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - Labels []*Label `json:"Labels,omitempty" name:"Labels"` - - // 创建时间 - CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` -} - -type ClusterAsGroupAttribute struct { - - // 伸缩组ID - AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` - - // 是否开启 - AutoScalingGroupEnabled *bool `json:"AutoScalingGroupEnabled,omitempty" name:"AutoScalingGroupEnabled"` - - // 伸缩组最大最小实例数 - AutoScalingGroupRange *AutoScalingGroupRange `json:"AutoScalingGroupRange,omitempty" name:"AutoScalingGroupRange"` -} - -type ClusterAsGroupOption struct { - - // 是否开启缩容 - // 注意:此字段可能返回 null,表示取不到有效值。 - IsScaleDownEnabled *bool `json:"IsScaleDownEnabled,omitempty" name:"IsScaleDownEnabled"` - - // 多伸缩组情况下扩容选择算法(random 随机选择,most-pods 最多类型的Pod least-waste 最少的资源浪费,默认为random) - // 注意:此字段可能返回 null,表示取不到有效值。 - Expander *string `json:"Expander,omitempty" name:"Expander"` - - // 最大并发缩容数 - // 注意:此字段可能返回 null,表示取不到有效值。 - MaxEmptyBulkDelete *int64 `json:"MaxEmptyBulkDelete,omitempty" name:"MaxEmptyBulkDelete"` - - // 集群扩容后多少分钟开始判断缩容(默认为10分钟) - // 注意:此字段可能返回 null,表示取不到有效值。 - ScaleDownDelay *int64 `json:"ScaleDownDelay,omitempty" name:"ScaleDownDelay"` - - // 节点连续空闲多少分钟后被缩容(默认为 10分钟) - // 注意:此字段可能返回 null,表示取不到有效值。 - ScaleDownUnneededTime *int64 `json:"ScaleDownUnneededTime,omitempty" name:"ScaleDownUnneededTime"` - - // 节点资源使用量低于多少(百分比)时认为空闲(默认: 50(百分比)) - // 注意:此字段可能返回 null,表示取不到有效值。 - ScaleDownUtilizationThreshold *int64 `json:"ScaleDownUtilizationThreshold,omitempty" name:"ScaleDownUtilizationThreshold"` - - // 含有本地存储Pod的节点是否不缩容(默认: FALSE) - // 注意:此字段可能返回 null,表示取不到有效值。 - SkipNodesWithLocalStorage *bool `json:"SkipNodesWithLocalStorage,omitempty" name:"SkipNodesWithLocalStorage"` - - // 含有kube-system namespace下非DaemonSet管理的Pod的节点是否不缩容 (默认: FALSE) - // 注意:此字段可能返回 null,表示取不到有效值。 - SkipNodesWithSystemPods *bool `json:"SkipNodesWithSystemPods,omitempty" name:"SkipNodesWithSystemPods"` - - // 计算资源使用量时是否默认忽略DaemonSet的实例(默认值: False,不忽略) - // 注意:此字段可能返回 null,表示取不到有效值。 - IgnoreDaemonSetsUtilization *bool `json:"IgnoreDaemonSetsUtilization,omitempty" name:"IgnoreDaemonSetsUtilization"` - - // CA做健康性判断的个数,默认3,即超过OkTotalUnreadyCount个数后,CA会进行健康性判断。 - // 注意:此字段可能返回 null,表示取不到有效值。 - OkTotalUnreadyCount *int64 `json:"OkTotalUnreadyCount,omitempty" name:"OkTotalUnreadyCount"` - - // 未就绪节点的最大百分比,此后CA会停止操作 - // 注意:此字段可能返回 null,表示取不到有效值。 - MaxTotalUnreadyPercentage *int64 `json:"MaxTotalUnreadyPercentage,omitempty" name:"MaxTotalUnreadyPercentage"` - - // 表示未准备就绪的节点在有资格进行缩减之前应该停留多长时间 - // 注意:此字段可能返回 null,表示取不到有效值。 - ScaleDownUnreadyTime *int64 `json:"ScaleDownUnreadyTime,omitempty" name:"ScaleDownUnreadyTime"` - - // CA删除未在Kubernetes中注册的节点之前等待的时间 - // 注意:此字段可能返回 null,表示取不到有效值。 - UnregisteredNodeRemovalTime *int64 `json:"UnregisteredNodeRemovalTime,omitempty" name:"UnregisteredNodeRemovalTime"` -} - -type ClusterBasicSettings struct { - - // 集群系统。centos7.2x86_64 或者 ubuntu16.04.1 LTSx86_64,默认取值为ubuntu16.04.1 LTSx86_64 - ClusterOs *string `json:"ClusterOs,omitempty" name:"ClusterOs"` - - // 集群版本,默认值为1.10.5 - ClusterVersion *string `json:"ClusterVersion,omitempty" name:"ClusterVersion"` - - // 集群名称 - ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` - - // 集群描述 - ClusterDescription *string `json:"ClusterDescription,omitempty" name:"ClusterDescription"` - - // 私有网络ID,形如vpc-xxx。创建托管空集群时必传。 - VpcId *string `json:"VpcId,omitempty" name:"VpcId"` - - // 集群内新增资源所属项目ID。 - ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` - - // 标签描述列表。通过指定该参数可以同时绑定标签到相应的资源实例,当前仅支持绑定标签到集群实例。 - TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` - - // 容器的镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) - OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` - - // 是否开启节点的默认安全组(默认: 否,Aphla特性) - NeedWorkSecurityGroup *bool `json:"NeedWorkSecurityGroup,omitempty" name:"NeedWorkSecurityGroup"` - - // 当选择Cilium Overlay网络插件时,TKE会从该子网获取2个IP用来创建内网负载均衡 - SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` - - // 集群等级,针对托管集群生效 - ClusterLevel *string `json:"ClusterLevel,omitempty" name:"ClusterLevel"` - - // 自动变配集群等级,针对托管集群生效 - AutoUpgradeClusterLevel *AutoUpgradeClusterLevel `json:"AutoUpgradeClusterLevel,omitempty" name:"AutoUpgradeClusterLevel"` -} - -type ClusterCIDRSettings struct { - - // 用于分配集群容器和服务 IP 的 CIDR,不得与 VPC CIDR 冲突,也不得与同 VPC 内其他集群 CIDR 冲突。且网段范围必须在内网网段内,例如:10.1.0.0/14, 192.168.0.1/18,172.16.0.0/16。 - ClusterCIDR *string `json:"ClusterCIDR,omitempty" name:"ClusterCIDR"` - - // 是否忽略 ClusterCIDR 冲突错误, 默认不忽略 - IgnoreClusterCIDRConflict *bool `json:"IgnoreClusterCIDRConflict,omitempty" name:"IgnoreClusterCIDRConflict"` - - // 集群中每个Node上最大的Pod数量。取值范围4~256。不为2的幂值时会向上取最接近的2的幂值。 - MaxNodePodNum *uint64 `json:"MaxNodePodNum,omitempty" name:"MaxNodePodNum"` - - // 集群最大的service数量。取值范围32~32768,不为2的幂值时会向上取最接近的2的幂值。默认值256 - MaxClusterServiceNum *uint64 `json:"MaxClusterServiceNum,omitempty" name:"MaxClusterServiceNum"` - - // 用于分配集群服务 IP 的 CIDR,不得与 VPC CIDR 冲突,也不得与同 VPC 内其他集群 CIDR 冲突。且网段范围必须在内网网段内,例如:10.1.0.0/14, 192.168.0.1/18,172.16.0.0/16。 - ServiceCIDR *string `json:"ServiceCIDR,omitempty" name:"ServiceCIDR"` - - // VPC-CNI网络模式下,弹性网卡的子网Id。 - EniSubnetIds []*string `json:"EniSubnetIds,omitempty" name:"EniSubnetIds"` - - // VPC-CNI网络模式下,弹性网卡IP的回收时间,取值范围[300,15768000) - ClaimExpiredSeconds *int64 `json:"ClaimExpiredSeconds,omitempty" name:"ClaimExpiredSeconds"` -} - -type ClusterCredential struct { - - // CA 根证书 - CACert *string `json:"CACert,omitempty" name:"CACert"` - - // 认证用的Token - Token *string `json:"Token,omitempty" name:"Token"` -} - -type ClusterExtraArgs struct { - - // kube-apiserver自定义参数,参数格式为["k1=v1", "k1=v2"], 例如["max-requests-inflight=500","feature-gates=PodShareProcessNamespace=true,DynamicKubeletConfig=true"] - // 注意:此字段可能返回 null,表示取不到有效值。 - KubeAPIServer []*string `json:"KubeAPIServer,omitempty" name:"KubeAPIServer"` - - // kube-controller-manager自定义参数 - // 注意:此字段可能返回 null,表示取不到有效值。 - KubeControllerManager []*string `json:"KubeControllerManager,omitempty" name:"KubeControllerManager"` - - // kube-scheduler自定义参数 - // 注意:此字段可能返回 null,表示取不到有效值。 - KubeScheduler []*string `json:"KubeScheduler,omitempty" name:"KubeScheduler"` - - // etcd自定义参数,只支持独立集群 - // 注意:此字段可能返回 null,表示取不到有效值。 - Etcd []*string `json:"Etcd,omitempty" name:"Etcd"` -} - -type ClusterInternalLB struct { - - // 是否开启内网访问LB - Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` - - // 内网访问LB关联的子网Id - SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` -} - -type ClusterNetworkSettings struct { - - // 用于分配集群容器和服务 IP 的 CIDR,不得与 VPC CIDR 冲突,也不得与同 VPC 内其他集群 CIDR 冲突 - ClusterCIDR *string `json:"ClusterCIDR,omitempty" name:"ClusterCIDR"` - - // 是否忽略 ClusterCIDR 冲突错误, 默认不忽略 - IgnoreClusterCIDRConflict *bool `json:"IgnoreClusterCIDRConflict,omitempty" name:"IgnoreClusterCIDRConflict"` - - // 集群中每个Node上最大的Pod数量(默认为256) - MaxNodePodNum *uint64 `json:"MaxNodePodNum,omitempty" name:"MaxNodePodNum"` - - // 集群最大的service数量(默认为256) - MaxClusterServiceNum *uint64 `json:"MaxClusterServiceNum,omitempty" name:"MaxClusterServiceNum"` - - // 是否启用IPVS(默认不开启) - Ipvs *bool `json:"Ipvs,omitempty" name:"Ipvs"` - - // 集群的VPCID(如果创建空集群,为必传值,否则自动设置为和集群的节点保持一致) - VpcId *string `json:"VpcId,omitempty" name:"VpcId"` - - // 网络插件是否启用CNI(默认开启) - Cni *bool `json:"Cni,omitempty" name:"Cni"` - - // service的网络模式,当前参数只适用于ipvs+bpf模式 - // 注意:此字段可能返回 null,表示取不到有效值。 - KubeProxyMode *string `json:"KubeProxyMode,omitempty" name:"KubeProxyMode"` - - // 用于分配service的IP range,不得与 VPC CIDR 冲突,也不得与同 VPC 内其他集群 CIDR 冲突 - // 注意:此字段可能返回 null,表示取不到有效值。 - ServiceCIDR *string `json:"ServiceCIDR,omitempty" name:"ServiceCIDR"` - - // 集群关联的容器子网 - // 注意:此字段可能返回 null,表示取不到有效值。 - Subnets []*string `json:"Subnets,omitempty" name:"Subnets"` -} - -type ClusterPublicLB struct { - - // 是否开启公网访问LB - Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` - - // 允许访问的来源CIDR列表 - AllowFromCidrs []*string `json:"AllowFromCidrs,omitempty" name:"AllowFromCidrs"` - - // 安全策略放通单个IP或CIDR(例如: "192.168.1.0/24",默认为拒绝所有) - SecurityPolicies []*string `json:"SecurityPolicies,omitempty" name:"SecurityPolicies"` - - // 外网访问相关的扩展参数,格式为json - ExtraParam *string `json:"ExtraParam,omitempty" name:"ExtraParam"` - - // 新内外网功能,需要传递安全组 - SecurityGroup *string `json:"SecurityGroup,omitempty" name:"SecurityGroup"` -} - -type ClusterStatus struct { - - // 集群Id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 集群状态 - ClusterState *string `json:"ClusterState,omitempty" name:"ClusterState"` - - // 集群下机器实例的状态 - ClusterInstanceState *string `json:"ClusterInstanceState,omitempty" name:"ClusterInstanceState"` - - // 集群是否开启监控 - ClusterBMonitor *bool `json:"ClusterBMonitor,omitempty" name:"ClusterBMonitor"` - - // 集群创建中的节点数,-1表示获取节点状态超时,-2表示获取节点状态失败 - ClusterInitNodeNum *int64 `json:"ClusterInitNodeNum,omitempty" name:"ClusterInitNodeNum"` - - // 集群运行中的节点数,-1表示获取节点状态超时,-2表示获取节点状态失败 - ClusterRunningNodeNum *int64 `json:"ClusterRunningNodeNum,omitempty" name:"ClusterRunningNodeNum"` - - // 集群异常的节点数,-1表示获取节点状态超时,-2表示获取节点状态失败 - ClusterFailedNodeNum *int64 `json:"ClusterFailedNodeNum,omitempty" name:"ClusterFailedNodeNum"` - - // 集群已关机的节点数,-1表示获取节点状态超时,-2表示获取节点状态失败 - // 注意:此字段可能返回 null,表示取不到有效值。 - ClusterClosedNodeNum *int64 `json:"ClusterClosedNodeNum,omitempty" name:"ClusterClosedNodeNum"` - - // 集群关机中的节点数,-1表示获取节点状态超时,-2表示获取节点状态失败 - // 注意:此字段可能返回 null,表示取不到有效值。 - ClusterClosingNodeNum *int64 `json:"ClusterClosingNodeNum,omitempty" name:"ClusterClosingNodeNum"` - - // 集群是否开启删除保护 - // 注意:此字段可能返回 null,表示取不到有效值。 - ClusterDeletionProtection *bool `json:"ClusterDeletionProtection,omitempty" name:"ClusterDeletionProtection"` - - // 集群是否可审计 - // 注意:此字段可能返回 null,表示取不到有效值。 - ClusterAuditEnabled *bool `json:"ClusterAuditEnabled,omitempty" name:"ClusterAuditEnabled"` -} - -type ClusterVersion struct { - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 集群主版本号列表,例如1.18.4 - Versions []*string `json:"Versions,omitempty" name:"Versions"` -} - -type CommonName struct { - - // 子账户UIN - SubaccountUin *string `json:"SubaccountUin,omitempty" name:"SubaccountUin"` - - // 子账户客户端证书中的CommonName字段 - CN *string `json:"CN,omitempty" name:"CN"` -} - -type Container struct { - - // 镜像 - Image *string `json:"Image,omitempty" name:"Image"` - - // 容器名 - Name *string `json:"Name,omitempty" name:"Name"` - - // 容器启动命令 - Commands []*string `json:"Commands,omitempty" name:"Commands"` - - // 容器启动参数 - Args []*string `json:"Args,omitempty" name:"Args"` - - // 容器内操作系统的环境变量 - EnvironmentVars []*EnvironmentVariable `json:"EnvironmentVars,omitempty" name:"EnvironmentVars"` - - // CPU,制改容器最多可使用的核数,该值不可超过容器实例的总核数。单位:核。 - Cpu *float64 `json:"Cpu,omitempty" name:"Cpu"` - - // 内存,限制该容器最多可使用的内存值,该值不可超过容器实例的总内存值。单位:GiB - Memory *float64 `json:"Memory,omitempty" name:"Memory"` - - // 数据卷挂载信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - VolumeMounts []*VolumeMount `json:"VolumeMounts,omitempty" name:"VolumeMounts"` - - // 当前状态 - // 注意:此字段可能返回 null,表示取不到有效值。 - CurrentState *ContainerState `json:"CurrentState,omitempty" name:"CurrentState"` - - // 重启次数 - // 注意:此字段可能返回 null,表示取不到有效值。 - RestartCount *uint64 `json:"RestartCount,omitempty" name:"RestartCount"` - - // 容器工作目录 - // 注意:此字段可能返回 null,表示取不到有效值。 - WorkingDir *string `json:"WorkingDir,omitempty" name:"WorkingDir"` - - // 存活探针 - // 注意:此字段可能返回 null,表示取不到有效值。 - LivenessProbe *LivenessOrReadinessProbe `json:"LivenessProbe,omitempty" name:"LivenessProbe"` - - // 就绪探针 - // 注意:此字段可能返回 null,表示取不到有效值。 - ReadinessProbe *LivenessOrReadinessProbe `json:"ReadinessProbe,omitempty" name:"ReadinessProbe"` - - // Gpu限制 - // 注意:此字段可能返回 null,表示取不到有效值。 - GpuLimit *uint64 `json:"GpuLimit,omitempty" name:"GpuLimit"` - - // 容器的安全上下文 - // 注意:此字段可能返回 null,表示取不到有效值。 - SecurityContext *SecurityContext `json:"SecurityContext,omitempty" name:"SecurityContext"` -} - -type ContainerState struct { - - // 容器运行开始时间 - // 注意:此字段可能返回 null,表示取不到有效值。 - StartTime *string `json:"StartTime,omitempty" name:"StartTime"` - - // 容器状态:created, running, exited, unknown - State *string `json:"State,omitempty" name:"State"` - - // 容器运行结束时间 - // 注意:此字段可能返回 null,表示取不到有效值。 - FinishTime *string `json:"FinishTime,omitempty" name:"FinishTime"` - - // 容器运行退出码 - // 注意:此字段可能返回 null,表示取不到有效值。 - ExitCode *int64 `json:"ExitCode,omitempty" name:"ExitCode"` - - // 容器状态 Reason - // 注意:此字段可能返回 null,表示取不到有效值。 - Reason *string `json:"Reason,omitempty" name:"Reason"` - - // 容器状态信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - Message *string `json:"Message,omitempty" name:"Message"` - - // 容器重启次数 - // 注意:此字段可能返回 null,表示取不到有效值。 - RestartCount *int64 `json:"RestartCount,omitempty" name:"RestartCount"` -} - -type ControllerStatus struct { - - // 控制器的名字 - Name *string `json:"Name,omitempty" name:"Name"` - - // 控制器是否开启 - Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` -} - -type CreateClusterAsGroupRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 伸缩组创建透传参数,json化字符串格式,详见[伸缩组创建实例](https://cloud.tencent.com/document/api/377/20440)接口。LaunchConfigurationId由LaunchConfigurePara参数创建,不支持填写 - AutoScalingGroupPara *string `json:"AutoScalingGroupPara,omitempty" name:"AutoScalingGroupPara"` - - // 启动配置创建透传参数,json化字符串格式,详见[创建启动配置](https://cloud.tencent.com/document/api/377/20447)接口。另外ImageId参数由于集群维度已经有的ImageId信息,这个字段不需要填写。UserData字段设置通过UserScript设置,这个字段不需要填写。 - LaunchConfigurePara *string `json:"LaunchConfigurePara,omitempty" name:"LaunchConfigurePara"` - - // 节点高级配置信息 - InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` - - // 节点Label数组 - Labels []*Label `json:"Labels,omitempty" name:"Labels"` -} - -func (r *CreateClusterAsGroupRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterAsGroupRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "AutoScalingGroupPara") - delete(f, "LaunchConfigurePara") - delete(f, "InstanceAdvancedSettings") - delete(f, "Labels") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterAsGroupRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterAsGroupResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 启动配置ID - LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` - - // 伸缩组ID - AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CreateClusterAsGroupResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterAsGroupResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterEndpointRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 集群端口所在的子网ID (仅在开启非外网访问时需要填,必须为集群所在VPC内的子网) - SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` - - // 是否为外网访问(TRUE 外网访问 FALSE 内网访问,默认值: FALSE) - IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` -} - -func (r *CreateClusterEndpointRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterEndpointRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "SubnetId") - delete(f, "IsExtranet") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterEndpointRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterEndpointResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CreateClusterEndpointResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterEndpointResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterEndpointVipRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 安全策略放通单个IP或CIDR(例如: "192.168.1.0/24",默认为拒绝所有) - SecurityPolicies []*string `json:"SecurityPolicies,omitempty" name:"SecurityPolicies"` -} - -func (r *CreateClusterEndpointVipRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterEndpointVipRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "SecurityPolicies") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterEndpointVipRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterEndpointVipResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 请求任务的FlowId - RequestFlowId *int64 `json:"RequestFlowId,omitempty" name:"RequestFlowId"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CreateClusterEndpointVipResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterEndpointVipResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterInstancesRequest struct { - *tchttp.BaseRequest - - // 集群 ID,请填写 查询集群列表 接口中返回的 clusterId 字段 - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // CVM创建透传参数,json化字符串格式,如需要保证扩展集群节点请求幂等性需要在此参数添加ClientToken字段,详见[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口。 - RunInstancePara *string `json:"RunInstancePara,omitempty" name:"RunInstancePara"` - - // 实例额外需要设置参数信息 - InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` - - // 校验规则相关选项,可配置跳过某些校验规则。目前支持GlobalRouteCIDRCheck(跳过GlobalRouter的相关校验),VpcCniCIDRCheck(跳过VpcCni相关校验) - SkipValidateOptions []*string `json:"SkipValidateOptions,omitempty" name:"SkipValidateOptions"` -} - -func (r *CreateClusterInstancesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterInstancesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "RunInstancePara") - delete(f, "InstanceAdvancedSettings") - delete(f, "SkipValidateOptions") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterInstancesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterInstancesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 节点实例ID - InstanceIdSet []*string `json:"InstanceIdSet,omitempty" name:"InstanceIdSet"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CreateClusterInstancesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterInstancesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterNodePoolFromExistingAsgRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 伸缩组ID - AutoscalingGroupId *string `json:"AutoscalingGroupId,omitempty" name:"AutoscalingGroupId"` -} - -func (r *CreateClusterNodePoolFromExistingAsgRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterNodePoolFromExistingAsgRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "AutoscalingGroupId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterNodePoolFromExistingAsgRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterNodePoolFromExistingAsgResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 节点池ID - NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CreateClusterNodePoolFromExistingAsgResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterNodePoolFromExistingAsgResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterNodePoolRequest struct { - *tchttp.BaseRequest - - // user id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // AutoScalingGroupPara AS组参数 - AutoScalingGroupPara *string `json:"AutoScalingGroupPara,omitempty" name:"AutoScalingGroupPara"` - - // LaunchConfigurePara 运行参数 - LaunchConfigurePara *string `json:"LaunchConfigurePara,omitempty" name:"LaunchConfigurePara"` - - // InstanceAdvancedSettings 示例参数 - InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` - - // 是否启用自动伸缩 - EnableAutoscale *bool `json:"EnableAutoscale,omitempty" name:"EnableAutoscale"` - - // 节点池名称 - Name *string `json:"Name,omitempty" name:"Name"` - - // Labels标签 - Labels []*Label `json:"Labels,omitempty" name:"Labels"` - - // Taints互斥 - Taints []*Taint `json:"Taints,omitempty" name:"Taints"` - - // 节点池os - NodePoolOs *string `json:"NodePoolOs,omitempty" name:"NodePoolOs"` - - // 容器的镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) - OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` - - // 资源标签 - Tags []*Tag `json:"Tags,omitempty" name:"Tags"` -} - -func (r *CreateClusterNodePoolRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterNodePoolRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "AutoScalingGroupPara") - delete(f, "LaunchConfigurePara") - delete(f, "InstanceAdvancedSettings") - delete(f, "EnableAutoscale") - delete(f, "Name") - delete(f, "Labels") - delete(f, "Taints") - delete(f, "NodePoolOs") - delete(f, "OsCustomizeType") - delete(f, "Tags") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterNodePoolRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterNodePoolResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 节点池id - NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CreateClusterNodePoolResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterNodePoolResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterRequest struct { - *tchttp.BaseRequest - - // 集群容器网络配置信息 - ClusterCIDRSettings *ClusterCIDRSettings `json:"ClusterCIDRSettings,omitempty" name:"ClusterCIDRSettings"` - - // 集群类型,托管集群:MANAGED_CLUSTER,独立集群:INDEPENDENT_CLUSTER。 - ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` - - // CVM创建透传参数,json化字符串格式,详见[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口。总机型(包括地域)数量不超过10个,相同机型(地域)购买多台机器可以通过设置参数中RunInstances中InstanceCount来实现。 - RunInstancesForNode []*RunInstancesForNode `json:"RunInstancesForNode,omitempty" name:"RunInstancesForNode"` - - // 集群的基本配置信息 - ClusterBasicSettings *ClusterBasicSettings `json:"ClusterBasicSettings,omitempty" name:"ClusterBasicSettings"` - - // 集群高级配置信息 - ClusterAdvancedSettings *ClusterAdvancedSettings `json:"ClusterAdvancedSettings,omitempty" name:"ClusterAdvancedSettings"` - - // 节点高级配置信息 - InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` - - // 已存在实例的配置信息。所有实例必须在同一个VPC中,最大数量不超过100,不支持添加竞价实例。 - ExistedInstancesForNode []*ExistedInstancesForNode `json:"ExistedInstancesForNode,omitempty" name:"ExistedInstancesForNode"` - - // CVM类型和其对应的数据盘挂载配置信息 - InstanceDataDiskMountSettings []*InstanceDataDiskMountSetting `json:"InstanceDataDiskMountSettings,omitempty" name:"InstanceDataDiskMountSettings"` - - // 需要安装的扩展组件信息 - ExtensionAddons []*ExtensionAddon `json:"ExtensionAddons,omitempty" name:"ExtensionAddons"` -} - -func (r *CreateClusterRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterCIDRSettings") - delete(f, "ClusterType") - delete(f, "RunInstancesForNode") - delete(f, "ClusterBasicSettings") - delete(f, "ClusterAdvancedSettings") - delete(f, "InstanceAdvancedSettings") - delete(f, "ExistedInstancesForNode") - delete(f, "InstanceDataDiskMountSettings") - delete(f, "ExtensionAddons") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CreateClusterResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterRouteRequest struct { - *tchttp.BaseRequest - - // 路由表名称。 - RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` - - // 目的端CIDR。 - DestinationCidrBlock *string `json:"DestinationCidrBlock,omitempty" name:"DestinationCidrBlock"` - - // 下一跳地址。 - GatewayIp *string `json:"GatewayIp,omitempty" name:"GatewayIp"` -} - -func (r *CreateClusterRouteRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterRouteRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "RouteTableName") - delete(f, "DestinationCidrBlock") - delete(f, "GatewayIp") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterRouteRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterRouteResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CreateClusterRouteResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterRouteResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterRouteTableRequest struct { - *tchttp.BaseRequest - - // 路由表名称 - RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` - - // 路由表CIDR - RouteTableCidrBlock *string `json:"RouteTableCidrBlock,omitempty" name:"RouteTableCidrBlock"` - - // 路由表绑定的VPC - VpcId *string `json:"VpcId,omitempty" name:"VpcId"` - - // 是否忽略CIDR冲突 - IgnoreClusterCidrConflict *int64 `json:"IgnoreClusterCidrConflict,omitempty" name:"IgnoreClusterCidrConflict"` -} - -func (r *CreateClusterRouteTableRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterRouteTableRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "RouteTableName") - delete(f, "RouteTableCidrBlock") - delete(f, "VpcId") - delete(f, "IgnoreClusterCidrConflict") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterRouteTableRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CreateClusterRouteTableResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CreateClusterRouteTableResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateClusterRouteTableResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type CreateEKSClusterRequest struct { - *tchttp.BaseRequest - - // k8s版本号。可为1.14.4, 1.12.8。 - K8SVersion *string `json:"K8SVersion,omitempty" name:"K8SVersion"` - - // vpc 的Id - VpcId *string `json:"VpcId,omitempty" name:"VpcId"` - - // 集群名称 - ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` - - // 子网Id 列表 - SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` - - // 集群描述信息 - ClusterDesc *string `json:"ClusterDesc,omitempty" name:"ClusterDesc"` - - // Serivce 所在子网Id - ServiceSubnetId *string `json:"ServiceSubnetId,omitempty" name:"ServiceSubnetId"` - - // 集群自定义的Dns服务器信息 - DnsServers []*DnsServerConf `json:"DnsServers,omitempty" name:"DnsServers"` - - // 扩展参数。须是map[string]string 的json 格式。 - ExtraParam *string `json:"ExtraParam,omitempty" name:"ExtraParam"` - - // 是否在用户集群内开启Dns。默认为true - EnableVpcCoreDNS *bool `json:"EnableVpcCoreDNS,omitempty" name:"EnableVpcCoreDNS"` - - // 标签描述列表。通过指定该参数可以同时绑定标签到相应的资源实例,当前仅支持绑定标签到集群实例。 - TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` -} - -func (r *CreateEKSClusterRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateEKSClusterRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "K8SVersion") - delete(f, "VpcId") - delete(f, "ClusterName") - delete(f, "SubnetIds") - delete(f, "ClusterDesc") - delete(f, "ServiceSubnetId") - delete(f, "DnsServers") - delete(f, "ExtraParam") - delete(f, "EnableVpcCoreDNS") - delete(f, "TagSpecification") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateEKSClusterRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CreateEKSClusterResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 弹性集群Id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CreateEKSClusterResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateEKSClusterResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type CreateEKSContainerInstancesRequest struct { - /*********PCM param************/ - RequestSource string `position:"Query" name:"RequestSource"` - ProviderId int32 `position:"Query" name:"ProviderId"` - AccountName string `position:"Query" name:"AccountName"` - Namespace string `position:"Query" name:"Namespace"` - RegionId string `position:"Query" name:"RegionId"` - /*********PCM param************/ - - *tchttp.BaseRequest - - // 容器组 - Containers []*Container `json:"Containers,omitempty" name:"Containers"` - - // EKS Container Instance容器实例名称 - EksCiName *string `json:"EksCiName,omitempty" name:"EksCiName"` - - // 指定新创建实例所属于的安全组Id - SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` - - // 实例所属子网Id - SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` - - // 实例所属VPC的Id - VpcId *string `json:"VpcId,omitempty" name:"VpcId"` - - // 内存,单位:GiB。可参考[资源规格](https://cloud.tencent.com/document/product/457/39808)文档 - Memory *float64 `json:"Memory,omitempty" name:"Memory"` - - // CPU,单位:核。可参考[资源规格](https://cloud.tencent.com/document/product/457/39808)文档 - Cpu *float64 `json:"Cpu,omitempty" name:"Cpu"` - - // 实例重启策略: Always(总是重启)、Never(从不重启)、OnFailure(失败时重启),默认:Always。 - RestartPolicy *string `json:"RestartPolicy,omitempty" name:"RestartPolicy"` - - // 镜像仓库凭证数组 - ImageRegistryCredentials []*ImageRegistryCredential `json:"ImageRegistryCredentials,omitempty" name:"ImageRegistryCredentials"` - - // 数据卷,包含NfsVolume数组和CbsVolume数组 - EksCiVolume *EksCiVolume `json:"EksCiVolume,omitempty" name:"EksCiVolume"` - - // 实例副本数,默认为1 - Replicas *int64 `json:"Replicas,omitempty" name:"Replicas"` - - // Init 容器 - InitContainers []*Container `json:"InitContainers,omitempty" name:"InitContainers"` - - // 自定义DNS配置 - DnsConfig *DNSConfig `json:"DnsConfig,omitempty" name:"DnsConfig"` - - // 用来绑定容器实例的已有EIP的列表。如传值,需要保证数值和Replicas相等。 - // 另外此参数和AutoCreateEipAttribute互斥。 - ExistedEipIds []*string `json:"ExistedEipIds,omitempty" name:"ExistedEipIds"` - - // 自动创建EIP的可选参数。若传此参数,则会自动创建EIP。 - // 另外此参数和ExistedEipIds互斥 - AutoCreateEipAttribute *EipAttribute `json:"AutoCreateEipAttribute,omitempty" name:"AutoCreateEipAttribute"` - - // 是否为容器实例自动创建EIP,默认为false。若传true,则此参数和ExistedEipIds互斥 - AutoCreateEip *bool `json:"AutoCreateEip,omitempty" name:"AutoCreateEip"` - - // Pod 所需的 CPU 资源型号,如果不填写则默认不强制指定 CPU 类型。目前支持型号如下: - // intel - // amd - // - 支持优先级顺序写法,如 “amd,intel” 表示优先创建 amd 资源 Pod,如果所选地域可用区 amd 资源不足,则会创建 intel 资源 Pod。 - CpuType *string `json:"CpuType,omitempty" name:"CpuType"` - - // 容器实例所需的 GPU 资源型号,目前支持型号如下: - // 1/4\*V100 - // 1/2\*V100 - // V100 - // 1/4\*T4 - // 1/2\*T4 - // T4 - GpuType *string `json:"GpuType,omitempty" name:"GpuType"` - - // Pod 所需的 GPU 数量,如填写,请确保为支持的规格。默认单位为卡,无需再次注明。 - GpuCount *uint64 `json:"GpuCount,omitempty" name:"GpuCount"` - - // 为容器实例关联 CAM 角色,value 填写 CAM 角色名称,容器实例可获取该 CAM 角色包含的权限策略,方便 容器实例 内的程序进行如购买资源、读写存储等云资源操作。 - CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` -} - -func (r *CreateEKSContainerInstancesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateEKSContainerInstancesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "Containers") - delete(f, "EksCiName") - delete(f, "SecurityGroupIds") - delete(f, "SubnetId") - delete(f, "VpcId") - delete(f, "Memory") - delete(f, "Cpu") - delete(f, "RestartPolicy") - delete(f, "ImageRegistryCredentials") - delete(f, "EksCiVolume") - delete(f, "Replicas") - delete(f, "InitContainers") - delete(f, "DnsConfig") - delete(f, "ExistedEipIds") - delete(f, "AutoCreateEipAttribute") - delete(f, "AutoCreateEip") - delete(f, "CpuType") - delete(f, "GpuType") - delete(f, "GpuCount") - delete(f, "CamRoleName") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateEKSContainerInstancesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CreateEKSContainerInstancesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // EKS Container Instance Id集合,格式为eksci-xxx,是容器实例的唯一标识。 - EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CreateEKSContainerInstancesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateEKSContainerInstancesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type CreateImageCacheRequest struct { - *tchttp.BaseRequest - - // 用于制作镜像缓存的容器镜像列表 - Images []*string `json:"Images,omitempty" name:"Images"` - - // 实例所属子网Id - SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` - - // 实例所属VPC Id - VpcId *string `json:"VpcId,omitempty" name:"VpcId"` - - // 镜像缓存名称 - ImageCacheName *string `json:"ImageCacheName,omitempty" name:"ImageCacheName"` - - // 安全组Id - SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` - - // 镜像仓库凭证数组 - ImageRegistryCredentials []*ImageRegistryCredential `json:"ImageRegistryCredentials,omitempty" name:"ImageRegistryCredentials"` - - // 用来绑定容器实例的已有EIP - ExistedEipId *string `json:"ExistedEipId,omitempty" name:"ExistedEipId"` - - // 是否为容器实例自动创建EIP,默认为false。若传true,则此参数和ExistedEipIds互斥 - AutoCreateEip *bool `json:"AutoCreateEip,omitempty" name:"AutoCreateEip"` - - // 自动创建EIP的可选参数。若传此参数,则会自动创建EIP。 - // 另外此参数和ExistedEipIds互斥 - AutoCreateEipAttribute *EipAttribute `json:"AutoCreateEipAttribute,omitempty" name:"AutoCreateEipAttribute"` - - // 镜像缓存的大小。默认为20 GiB。取值范围参考[云硬盘类型](https://cloud.tencent.com/document/product/362/2353)中的高性能云盘类型的大小限制。 - ImageCacheSize *uint64 `json:"ImageCacheSize,omitempty" name:"ImageCacheSize"` - - // 镜像缓存保留时间天数,过期将会自动清理,默认为0,永不过期。 - RetentionDays *uint64 `json:"RetentionDays,omitempty" name:"RetentionDays"` -} - -func (r *CreateImageCacheRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateImageCacheRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "Images") - delete(f, "SubnetId") - delete(f, "VpcId") - delete(f, "ImageCacheName") - delete(f, "SecurityGroupIds") - delete(f, "ImageRegistryCredentials") - delete(f, "ExistedEipId") - delete(f, "AutoCreateEip") - delete(f, "AutoCreateEipAttribute") - delete(f, "ImageCacheSize") - delete(f, "RetentionDays") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateImageCacheRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CreateImageCacheResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 镜像缓存Id - ImageCacheId *string `json:"ImageCacheId,omitempty" name:"ImageCacheId"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CreateImageCacheResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreateImageCacheResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type CreatePrometheusAlertRuleRequest struct { - *tchttp.BaseRequest - - // 实例id - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` - - // 告警配置 - AlertRule *PrometheusAlertRuleDetail `json:"AlertRule,omitempty" name:"AlertRule"` -} - -func (r *CreatePrometheusAlertRuleRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreatePrometheusAlertRuleRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "InstanceId") - delete(f, "AlertRule") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreatePrometheusAlertRuleRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CreatePrometheusAlertRuleResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 告警id - Id *string `json:"Id,omitempty" name:"Id"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CreatePrometheusAlertRuleResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreatePrometheusAlertRuleResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type CreatePrometheusDashboardRequest struct { - *tchttp.BaseRequest - - // 实例id - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` - - // 面板组名称 - DashboardName *string `json:"DashboardName,omitempty" name:"DashboardName"` - - // 面板列表 - // 每一项是一个grafana dashboard的json定义 - Contents []*string `json:"Contents,omitempty" name:"Contents"` -} - -func (r *CreatePrometheusDashboardRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreatePrometheusDashboardRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "InstanceId") - delete(f, "DashboardName") - delete(f, "Contents") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreatePrometheusDashboardRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CreatePrometheusDashboardResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CreatePrometheusDashboardResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreatePrometheusDashboardResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type CreatePrometheusTemplateRequest struct { - *tchttp.BaseRequest - - // 模板设置 - Template *PrometheusTemplate `json:"Template,omitempty" name:"Template"` -} - -func (r *CreatePrometheusTemplateRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreatePrometheusTemplateRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "Template") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreatePrometheusTemplateRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type CreatePrometheusTemplateResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 模板Id - TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *CreatePrometheusTemplateResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *CreatePrometheusTemplateResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DNSConfig struct { - - // DNS 服务器IP地址列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - Nameservers []*string `json:"Nameservers,omitempty" name:"Nameservers"` - - // DNS搜索域列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - Searches []*string `json:"Searches,omitempty" name:"Searches"` - - // 对象选项列表,每个对象由name和value(可选)构成 - // 注意:此字段可能返回 null,表示取不到有效值。 - Options []*DNSConfigOption `json:"Options,omitempty" name:"Options"` -} - -type DNSConfigOption struct { - - // 配置项名称 - // 注意:此字段可能返回 null,表示取不到有效值。 - Name *string `json:"Name,omitempty" name:"Name"` - - // 项值 - // 注意:此字段可能返回 null,表示取不到有效值。 - Value *string `json:"Value,omitempty" name:"Value"` -} - -type DataDisk struct { - - // 云盘类型 - // 注意:此字段可能返回 null,表示取不到有效值。 - DiskType *string `json:"DiskType,omitempty" name:"DiskType"` - - // 文件系统(ext3/ext4/xfs) - // 注意:此字段可能返回 null,表示取不到有效值。 - FileSystem *string `json:"FileSystem,omitempty" name:"FileSystem"` - - // 云盘大小(G) - // 注意:此字段可能返回 null,表示取不到有效值。 - DiskSize *int64 `json:"DiskSize,omitempty" name:"DiskSize"` - - // 是否自动化格式盘并挂载 - // 注意:此字段可能返回 null,表示取不到有效值。 - AutoFormatAndMount *bool `json:"AutoFormatAndMount,omitempty" name:"AutoFormatAndMount"` - - // 挂载目录 - // 注意:此字段可能返回 null,表示取不到有效值。 - MountTarget *string `json:"MountTarget,omitempty" name:"MountTarget"` - - // 挂载设备名或分区名,当且仅当添加已有节点时需要 - // 注意:此字段可能返回 null,表示取不到有效值。 - DiskPartition *string `json:"DiskPartition,omitempty" name:"DiskPartition"` -} - -type DeleteClusterAsGroupsRequest struct { - *tchttp.BaseRequest - - // 集群ID,通过[DescribeClusters](https://cloud.tencent.com/document/api/457/31862)接口获取。 - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 集群伸缩组ID的列表 - AutoScalingGroupIds []*string `json:"AutoScalingGroupIds,omitempty" name:"AutoScalingGroupIds"` - - // 是否保留伸缩组中的节点(默认值: false(不保留)) - KeepInstance *bool `json:"KeepInstance,omitempty" name:"KeepInstance"` -} - -func (r *DeleteClusterAsGroupsRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterAsGroupsRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "AutoScalingGroupIds") - delete(f, "KeepInstance") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterAsGroupsRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DeleteClusterAsGroupsResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DeleteClusterAsGroupsResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterAsGroupsResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DeleteClusterEndpointRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 是否为外网访问(TRUE 外网访问 FALSE 内网访问,默认值: FALSE) - IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` -} - -func (r *DeleteClusterEndpointRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterEndpointRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "IsExtranet") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterEndpointRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DeleteClusterEndpointResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DeleteClusterEndpointResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterEndpointResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DeleteClusterEndpointVipRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` -} - -func (r *DeleteClusterEndpointVipRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterEndpointVipRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterEndpointVipRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DeleteClusterEndpointVipResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DeleteClusterEndpointVipResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterEndpointVipResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DeleteClusterInstancesRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 主机InstanceId列表 - InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` - - // 集群实例删除时的策略:terminate(销毁实例,仅支持按量计费云主机实例) retain (仅移除,保留实例) - InstanceDeleteMode *string `json:"InstanceDeleteMode,omitempty" name:"InstanceDeleteMode"` - - // 是否强制删除(当节点在初始化时,可以指定参数为TRUE) - ForceDelete *bool `json:"ForceDelete,omitempty" name:"ForceDelete"` -} - -func (r *DeleteClusterInstancesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterInstancesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "InstanceIds") - delete(f, "InstanceDeleteMode") - delete(f, "ForceDelete") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterInstancesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DeleteClusterInstancesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 删除成功的实例ID列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - SuccInstanceIds []*string `json:"SuccInstanceIds,omitempty" name:"SuccInstanceIds"` - - // 删除失败的实例ID列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - FailedInstanceIds []*string `json:"FailedInstanceIds,omitempty" name:"FailedInstanceIds"` - - // 未匹配到的实例ID列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - NotFoundInstanceIds []*string `json:"NotFoundInstanceIds,omitempty" name:"NotFoundInstanceIds"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DeleteClusterInstancesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterInstancesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DeleteClusterNodePoolRequest struct { - *tchttp.BaseRequest - - // 节点池对应的 ClusterId - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 需要删除的节点池 Id 列表 - NodePoolIds []*string `json:"NodePoolIds,omitempty" name:"NodePoolIds"` - - // 删除节点池时是否保留节点池内节点(节点仍然会被移出集群,但对应的实例不会被销毁) - KeepInstance *bool `json:"KeepInstance,omitempty" name:"KeepInstance"` -} - -func (r *DeleteClusterNodePoolRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterNodePoolRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "NodePoolIds") - delete(f, "KeepInstance") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterNodePoolRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DeleteClusterNodePoolResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DeleteClusterNodePoolResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterNodePoolResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DeleteClusterRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 集群实例删除时的策略:terminate(销毁实例,仅支持按量计费云主机实例) retain (仅移除,保留实例) - InstanceDeleteMode *string `json:"InstanceDeleteMode,omitempty" name:"InstanceDeleteMode"` - - // 集群删除时资源的删除策略,目前支持CBS(默认保留CBS) - ResourceDeleteOptions []*ResourceDeleteOption `json:"ResourceDeleteOptions,omitempty" name:"ResourceDeleteOptions"` -} - -func (r *DeleteClusterRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "InstanceDeleteMode") - delete(f, "ResourceDeleteOptions") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DeleteClusterResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DeleteClusterResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DeleteClusterRouteRequest struct { - *tchttp.BaseRequest - - // 路由表名称。 - RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` - - // 下一跳地址。 - GatewayIp *string `json:"GatewayIp,omitempty" name:"GatewayIp"` - - // 目的端CIDR。 - DestinationCidrBlock *string `json:"DestinationCidrBlock,omitempty" name:"DestinationCidrBlock"` -} - -func (r *DeleteClusterRouteRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterRouteRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "RouteTableName") - delete(f, "GatewayIp") - delete(f, "DestinationCidrBlock") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterRouteRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DeleteClusterRouteResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DeleteClusterRouteResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterRouteResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DeleteClusterRouteTableRequest struct { - *tchttp.BaseRequest - - // 路由表名称 - RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` -} - -func (r *DeleteClusterRouteTableRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterRouteTableRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "RouteTableName") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterRouteTableRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DeleteClusterRouteTableResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DeleteClusterRouteTableResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteClusterRouteTableResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DeleteEKSClusterRequest struct { - *tchttp.BaseRequest - - // 弹性集群Id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` -} - -func (r *DeleteEKSClusterRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteEKSClusterRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteEKSClusterRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DeleteEKSClusterResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DeleteEKSClusterResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteEKSClusterResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DeleteEKSContainerInstancesRequest struct { - /*********PCM param************/ - RequestSource string `position:"Query" name:"RequestSource"` - ProviderId int32 `position:"Query" name:"ProviderId"` - AccountName string `position:"Query" name:"AccountName"` - Namespace string `position:"Query" name:"Namespace"` - ContainerGroupName string `position:"Query" name:"ContainerGroupName"` - RegionId string `position:"Query" name:"RegionId"` - /*********PCM param************/ - - *tchttp.BaseRequest - - // 需要删除的EksCi的Id。 最大数量不超过20 - EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` - - // 是否释放为EksCi自动创建的Eip - ReleaseAutoCreatedEip *bool `json:"ReleaseAutoCreatedEip,omitempty" name:"ReleaseAutoCreatedEip"` -} - -func (r *DeleteEKSContainerInstancesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteEKSContainerInstancesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "EksCiIds") - delete(f, "ReleaseAutoCreatedEip") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteEKSContainerInstancesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DeleteEKSContainerInstancesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DeleteEKSContainerInstancesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteEKSContainerInstancesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DeleteImageCachesRequest struct { - *tchttp.BaseRequest - - // 镜像缓存Id数组 - ImageCacheIds []*string `json:"ImageCacheIds,omitempty" name:"ImageCacheIds"` -} - -func (r *DeleteImageCachesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteImageCachesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ImageCacheIds") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteImageCachesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DeleteImageCachesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DeleteImageCachesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeleteImageCachesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DeletePrometheusAlertRuleRequest struct { - *tchttp.BaseRequest - - // 实例id - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` - - // 告警规则id列表 - AlertIds []*string `json:"AlertIds,omitempty" name:"AlertIds"` -} - -func (r *DeletePrometheusAlertRuleRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeletePrometheusAlertRuleRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "InstanceId") - delete(f, "AlertIds") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeletePrometheusAlertRuleRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DeletePrometheusAlertRuleResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DeletePrometheusAlertRuleResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeletePrometheusAlertRuleResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DeletePrometheusTemplateRequest struct { - *tchttp.BaseRequest - - // 模板id - TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` -} - -func (r *DeletePrometheusTemplateRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeletePrometheusTemplateRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "TemplateId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeletePrometheusTemplateRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DeletePrometheusTemplateResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DeletePrometheusTemplateResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeletePrometheusTemplateResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DeletePrometheusTemplateSyncRequest struct { - *tchttp.BaseRequest - - // 模板id - TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` - - // 取消同步的对象列表 - Targets []*PrometheusTemplateSyncTarget `json:"Targets,omitempty" name:"Targets"` -} - -func (r *DeletePrometheusTemplateSyncRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeletePrometheusTemplateSyncRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "TemplateId") - delete(f, "Targets") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeletePrometheusTemplateSyncRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DeletePrometheusTemplateSyncResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DeletePrometheusTemplateSyncResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DeletePrometheusTemplateSyncResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeAvailableClusterVersionRequest struct { - *tchttp.BaseRequest - - // 集群 Id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 集群 Id 列表 - ClusterIds []*string `json:"ClusterIds,omitempty" name:"ClusterIds"` -} - -func (r *DescribeAvailableClusterVersionRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeAvailableClusterVersionRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "ClusterIds") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAvailableClusterVersionRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeAvailableClusterVersionResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 可升级的集群版本号 - // 注意:此字段可能返回 null,表示取不到有效值。 - Versions []*string `json:"Versions,omitempty" name:"Versions"` - - // 集群信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - Clusters []*ClusterVersion `json:"Clusters,omitempty" name:"Clusters"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeAvailableClusterVersionResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeAvailableClusterVersionResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterAsGroupOptionRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` -} - -func (r *DescribeClusterAsGroupOptionRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterAsGroupOptionRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterAsGroupOptionRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterAsGroupOptionResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 集群弹性伸缩属性 - // 注意:此字段可能返回 null,表示取不到有效值。 - ClusterAsGroupOption *ClusterAsGroupOption `json:"ClusterAsGroupOption,omitempty" name:"ClusterAsGroupOption"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClusterAsGroupOptionResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterAsGroupOptionResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterAsGroupsRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 伸缩组ID列表,如果为空,表示拉取集群关联的所有伸缩组。 - AutoScalingGroupIds []*string `json:"AutoScalingGroupIds,omitempty" name:"AutoScalingGroupIds"` - - // 偏移量,默认为0。关于Offset的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 - Offset *int64 `json:"Offset,omitempty" name:"Offset"` - - // 返回数量,默认为20,最大值为100。关于Limit的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` -} - -func (r *DescribeClusterAsGroupsRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterAsGroupsRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "AutoScalingGroupIds") - delete(f, "Offset") - delete(f, "Limit") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterAsGroupsRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterAsGroupsResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 集群关联的伸缩组总数 - TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 集群关联的伸缩组列表 - ClusterAsGroupSet []*ClusterAsGroup `json:"ClusterAsGroupSet,omitempty" name:"ClusterAsGroupSet"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClusterAsGroupsResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterAsGroupsResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterAuthenticationOptionsRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` -} - -func (r *DescribeClusterAuthenticationOptionsRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterAuthenticationOptionsRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterAuthenticationOptionsRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterAuthenticationOptionsResponse struct { - *tchttp.BaseResponse - Response *struct { - - // ServiceAccount认证配置 - // 注意:此字段可能返回 null,表示取不到有效值。 - ServiceAccounts *ServiceAccountAuthenticationOptions `json:"ServiceAccounts,omitempty" name:"ServiceAccounts"` - - // 最近一次修改操作结果,返回值可能为:Updating,Success,Failed,TimeOut - // 注意:此字段可能返回 null,表示取不到有效值。 - LatestOperationState *string `json:"LatestOperationState,omitempty" name:"LatestOperationState"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClusterAuthenticationOptionsResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterAuthenticationOptionsResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterCommonNamesRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 子账户列表,不可超出最大值50 - SubaccountUins []*string `json:"SubaccountUins,omitempty" name:"SubaccountUins"` - - // 角色ID列表,不可超出最大值50 - RoleIds []*string `json:"RoleIds,omitempty" name:"RoleIds"` -} - -func (r *DescribeClusterCommonNamesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterCommonNamesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "SubaccountUins") - delete(f, "RoleIds") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterCommonNamesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterCommonNamesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 子账户Uin与其客户端证书的CN字段映射 - CommonNames []*CommonName `json:"CommonNames,omitempty" name:"CommonNames"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClusterCommonNamesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterCommonNamesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterControllersRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` -} - -func (r *DescribeClusterControllersRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterControllersRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterControllersRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterControllersResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 描述集群中各个控制器的状态 - ControllerStatusSet []*ControllerStatus `json:"ControllerStatusSet,omitempty" name:"ControllerStatusSet"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClusterControllersResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterControllersResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterEndpointStatusRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 是否为外网访问(TRUE 外网访问 FALSE 内网访问,默认值: FALSE) - IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` -} - -func (r *DescribeClusterEndpointStatusRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterEndpointStatusRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "IsExtranet") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterEndpointStatusRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterEndpointStatusResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 查询集群访问端口状态(Created 开启成功,Creating 开启中,NotFound 未开启) - // 注意:此字段可能返回 null,表示取不到有效值。 - Status *string `json:"Status,omitempty" name:"Status"` - - // 开启访问入口失败信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - ErrorMsg *string `json:"ErrorMsg,omitempty" name:"ErrorMsg"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClusterEndpointStatusResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterEndpointStatusResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterEndpointVipStatusRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` -} - -func (r *DescribeClusterEndpointVipStatusRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterEndpointVipStatusRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterEndpointVipStatusRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterEndpointVipStatusResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 端口操作状态 (Creating 创建中 CreateFailed 创建失败 Created 创建完成 Deleting 删除中 DeletedFailed 删除失败 Deleted 已删除 NotFound 未发现操作 ) - Status *string `json:"Status,omitempty" name:"Status"` - - // 操作失败的原因 - // 注意:此字段可能返回 null,表示取不到有效值。 - ErrorMsg *string `json:"ErrorMsg,omitempty" name:"ErrorMsg"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClusterEndpointVipStatusResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterEndpointVipStatusResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterInstancesRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 偏移量,默认为0。关于Offset的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 - Offset *int64 `json:"Offset,omitempty" name:"Offset"` - - // 返回数量,默认为20,最大值为100。关于Limit的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` - - // 需要获取的节点实例Id列表。如果为空,表示拉取集群下所有节点实例。 - InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` - - // 节点角色, MASTER, WORKER, ETCD, MASTER_ETCD,ALL, 默认为WORKER。默认为WORKER类型。 - InstanceRole *string `json:"InstanceRole,omitempty" name:"InstanceRole"` - - // 过滤条件列表;Name的可选值为nodepool-id、nodepool-instance-type;Name为nodepool-id表示根据节点池id过滤机器,Value的值为具体的节点池id,Name为nodepool-instance-type表示节点加入节点池的方式,Value的值为MANUALLY_ADDED(手动加入节点池)、AUTOSCALING_ADDED(伸缩组扩容方式加入节点池)、ALL(手动加入节点池 和 伸缩组扩容方式加入节点池) - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` -} - -func (r *DescribeClusterInstancesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterInstancesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "Offset") - delete(f, "Limit") - delete(f, "InstanceIds") - delete(f, "InstanceRole") - delete(f, "Filters") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterInstancesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterInstancesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 集群中实例总数 - TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 集群中实例列表 - InstanceSet []*Instance `json:"InstanceSet,omitempty" name:"InstanceSet"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClusterInstancesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterInstancesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterKubeconfigRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 默认false 获取内网,是否获取外网访问的kubeconfig - IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` -} - -func (r *DescribeClusterKubeconfigRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterKubeconfigRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "IsExtranet") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterKubeconfigRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterKubeconfigResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 子账户kubeconfig文件,可用于直接访问集群kube-apiserver - Kubeconfig *string `json:"Kubeconfig,omitempty" name:"Kubeconfig"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClusterKubeconfigResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterKubeconfigResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterNodePoolDetailRequest struct { - *tchttp.BaseRequest - - // 集群id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 节点池id - NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` -} - -func (r *DescribeClusterNodePoolDetailRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterNodePoolDetailRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "NodePoolId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterNodePoolDetailRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterNodePoolDetailResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 节点池详情 - NodePool *NodePool `json:"NodePool,omitempty" name:"NodePool"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClusterNodePoolDetailResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterNodePoolDetailResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterNodePoolsRequest struct { - *tchttp.BaseRequest - - // ClusterId(集群id) - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // · NodePoolsName - // 按照【节点池名】进行过滤。 - // 类型:String - // 必选:否 - // - // · NodePoolsId - // 按照【节点池id】进行过滤。 - // 类型:String - // 必选:否 - // - // · tags - // 按照【标签键值对】进行过滤。 - // 类型:String - // 必选:否 - // - // · tag:tag-key - // 按照【标签键值对】进行过滤。 - // 类型:String - // 必选:否 - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` -} - -func (r *DescribeClusterNodePoolsRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterNodePoolsRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "Filters") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterNodePoolsRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterNodePoolsResponse struct { - *tchttp.BaseResponse - Response *struct { - - // NodePools(节点池列表) - // 注意:此字段可能返回 null,表示取不到有效值。 - NodePoolSet []*NodePool `json:"NodePoolSet,omitempty" name:"NodePoolSet"` - - // 资源总数 - TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClusterNodePoolsResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterNodePoolsResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterRouteTablesRequest struct { - *tchttp.BaseRequest -} - -func (r *DescribeClusterRouteTablesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterRouteTablesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterRouteTablesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterRouteTablesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 符合条件的实例数量。 - TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 集群路由表对象。 - RouteTableSet []*RouteTableInfo `json:"RouteTableSet,omitempty" name:"RouteTableSet"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClusterRouteTablesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterRouteTablesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterRoutesRequest struct { - *tchttp.BaseRequest - - // 路由表名称。 - RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` - - // 过滤条件,当前只支持按照单个条件GatewayIP进行过滤(可选) - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` -} - -func (r *DescribeClusterRoutesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterRoutesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "RouteTableName") - delete(f, "Filters") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterRoutesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterRoutesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 符合条件的实例数量。 - TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 集群路由对象。 - RouteSet []*RouteInfo `json:"RouteSet,omitempty" name:"RouteSet"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClusterRoutesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterRoutesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterSecurityRequest struct { - *tchttp.BaseRequest - - // 集群 ID,请填写 查询集群列表 接口中返回的 clusterId 字段 - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` -} - -func (r *DescribeClusterSecurityRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterSecurityRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterSecurityRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterSecurityResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 集群的账号名称 - UserName *string `json:"UserName,omitempty" name:"UserName"` - - // 集群的访问密码 - Password *string `json:"Password,omitempty" name:"Password"` - - // 集群访问CA证书 - CertificationAuthority *string `json:"CertificationAuthority,omitempty" name:"CertificationAuthority"` - - // 集群访问的地址 - ClusterExternalEndpoint *string `json:"ClusterExternalEndpoint,omitempty" name:"ClusterExternalEndpoint"` - - // 集群访问的域名 - Domain *string `json:"Domain,omitempty" name:"Domain"` - - // 集群Endpoint地址 - PgwEndpoint *string `json:"PgwEndpoint,omitempty" name:"PgwEndpoint"` - - // 集群访问策略组 - // 注意:此字段可能返回 null,表示取不到有效值。 - SecurityPolicy []*string `json:"SecurityPolicy,omitempty" name:"SecurityPolicy"` - - // 集群Kubeconfig文件 - // 注意:此字段可能返回 null,表示取不到有效值。 - Kubeconfig *string `json:"Kubeconfig,omitempty" name:"Kubeconfig"` - - // 集群JnsGw的访问地址 - // 注意:此字段可能返回 null,表示取不到有效值。 - JnsGwEndpoint *string `json:"JnsGwEndpoint,omitempty" name:"JnsGwEndpoint"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClusterSecurityResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterSecurityResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterStatusRequest struct { - *tchttp.BaseRequest - - // 集群ID列表,不传默认拉取所有集群 - ClusterIds []*string `json:"ClusterIds,omitempty" name:"ClusterIds"` -} - -func (r *DescribeClusterStatusRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterStatusRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterIds") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterStatusRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClusterStatusResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 集群状态列表 - ClusterStatusSet []*ClusterStatus `json:"ClusterStatusSet,omitempty" name:"ClusterStatusSet"` - - // 集群个数 - TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClusterStatusResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClusterStatusResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClustersRequest struct { - *tchttp.BaseRequest - - // 集群ID列表(为空时, - // 表示获取账号下所有集群) - ClusterIds []*string `json:"ClusterIds,omitempty" name:"ClusterIds"` - - // 偏移量,默认0 - Offset *int64 `json:"Offset,omitempty" name:"Offset"` - - // 最大输出条数,默认20,最大为100 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` - - // · ClusterName - // 按照【集群名】进行过滤。 - // 类型:String - // 必选:否 - // - // · ClusterType - // 按照【集群类型】进行过滤。 - // 类型:String - // 必选:否 - // - // · ClusterStatus - // 按照【集群状态】进行过滤。 - // 类型:String - // 必选:否 - // - // · Tags - // 按照【标签键值对】进行过滤。 - // 类型:String - // 必选:否 - // - // · vpc-id - // 按照【VPC】进行过滤。 - // 类型:String - // 必选:否 - // - // · tag-key - // 按照【标签键】进行过滤。 - // 类型:String - // 必选:否 - // - // · tag-value - // 按照【标签值】进行过滤。 - // 类型:String - // 必选:否 - // - // · tag:tag-key - // 按照【标签键值对】进行过滤。 - // 类型:String - // 必选:否 - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` - - // 集群类型,例如:MANAGED_CLUSTER - ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` -} - -func (r *DescribeClustersRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClustersRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterIds") - delete(f, "Offset") - delete(f, "Limit") - delete(f, "Filters") - delete(f, "ClusterType") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClustersRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeClustersResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 集群总个数 - TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 集群信息列表 - Clusters []*Cluster `json:"Clusters,omitempty" name:"Clusters"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeClustersResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeClustersResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeEKSClusterCredentialRequest struct { - *tchttp.BaseRequest - - // 集群Id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` -} - -func (r *DescribeEKSClusterCredentialRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEKSClusterCredentialRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSClusterCredentialRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeEKSClusterCredentialResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 集群的接入地址信息 - Addresses []*IPAddress `json:"Addresses,omitempty" name:"Addresses"` - - // 集群的认证信息 - Credential *ClusterCredential `json:"Credential,omitempty" name:"Credential"` - - // 集群的公网访问信息 - PublicLB *ClusterPublicLB `json:"PublicLB,omitempty" name:"PublicLB"` - - // 集群的内网访问信息 - InternalLB *ClusterInternalLB `json:"InternalLB,omitempty" name:"InternalLB"` - - // 标记是否新的内外网功能 - ProxyLB *bool `json:"ProxyLB,omitempty" name:"ProxyLB"` - - // 连接用户集群k8s 的Config - Kubeconfig *string `json:"Kubeconfig,omitempty" name:"Kubeconfig"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeEKSClusterCredentialResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEKSClusterCredentialResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeEKSClustersRequest struct { - *tchttp.BaseRequest - - // 集群ID列表(为空时, - // 表示获取账号下所有集群) - ClusterIds []*string `json:"ClusterIds,omitempty" name:"ClusterIds"` - - // 偏移量,默认0 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` - - // 最大输出条数,默认20 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` - - // 过滤条件,当前只支持按照单个条件ClusterName进行过滤 - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` -} - -func (r *DescribeEKSClustersRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEKSClustersRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterIds") - delete(f, "Offset") - delete(f, "Limit") - delete(f, "Filters") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSClustersRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeEKSClustersResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 集群总个数 - TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 集群信息列表 - Clusters []*EksCluster `json:"Clusters,omitempty" name:"Clusters"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeEKSClustersResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEKSClustersResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeEKSContainerInstanceEventRequest struct { - *tchttp.BaseRequest - - // 容器实例id - EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` - - // 最大事件数量。默认为50,最大取值100。 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` -} - -func (r *DescribeEKSContainerInstanceEventRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEKSContainerInstanceEventRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "EksCiId") - delete(f, "Limit") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSContainerInstanceEventRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeEKSContainerInstanceEventResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 事件集合 - Events []*Event `json:"Events,omitempty" name:"Events"` - - // 容器实例id - EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeEKSContainerInstanceEventResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEKSContainerInstanceEventResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeEKSContainerInstanceRegionsRequest struct { - *tchttp.BaseRequest -} - -func (r *DescribeEKSContainerInstanceRegionsRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEKSContainerInstanceRegionsRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSContainerInstanceRegionsRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeEKSContainerInstanceRegionsResponse struct { - *tchttp.BaseResponse - Response *struct { - - // EKS Container Instance支持的地域信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - Regions []*EksCiRegionInfo `json:"Regions,omitempty" name:"Regions"` - - // 总数 - TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeEKSContainerInstanceRegionsResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEKSContainerInstanceRegionsResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeEKSContainerInstancesRequest struct { - /*********PCM param************/ - RequestSource string `position:"Query" name:"RequestSource"` - ProviderId int32 `position:"Query" name:"ProviderId"` - AccountName string `position:"Query" name:"AccountName"` - Namespace string `position:"Query" name:"Namespace"` - /*********PCM param************/ - - *tchttp.BaseRequest - - // 限定此次返回资源的数量。如果不设定,默认返回20,最大不能超过100 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` - - // 偏移量,默认0 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` - - // 过滤条件,可条件: - // (1)实例名称 - // KeyName: eks-ci-name - // 类型:String - // - // (2)实例状态 - // KeyName: status - // 类型:String - // 可选值:"Pending", "Running", "Succeeded", "Failed" - // - // (3)内网ip - // KeyName: private-ip - // 类型:String - // - // (4)EIP地址 - // KeyName: eip-address - // 类型:String - // - // (5)VpcId - // KeyName: vpc-id - // 类型:String - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` - - // 容器实例 ID 数组 - EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` -} - -func (r *DescribeEKSContainerInstancesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEKSContainerInstancesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "Limit") - delete(f, "Offset") - delete(f, "Filters") - delete(f, "EksCiIds") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSContainerInstancesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeEKSContainerInstancesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 容器组总数 - TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 容器组列表 - EksCis []*EksCi `json:"EksCis,omitempty" name:"EksCis"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeEKSContainerInstancesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEKSContainerInstancesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeEksContainerInstanceLogRequest struct { - *tchttp.BaseRequest - - // Eks Container Instance Id,即容器实例Id - EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` - - // 容器名称,单容器的实例可选填。如果为多容器实例,请指定容器名称。 - ContainerName *string `json:"ContainerName,omitempty" name:"ContainerName"` - - // 返回最新日志行数,默认500,最大2000。日志内容最大返回 1M 数据。 - Tail *uint64 `json:"Tail,omitempty" name:"Tail"` - - // UTC时间,RFC3339标准 - StartTime *string `json:"StartTime,omitempty" name:"StartTime"` - - // 是否是查上一个容器(如果容器退出重启了) - Previous *bool `json:"Previous,omitempty" name:"Previous"` - - // 查询最近多少秒内的日志 - SinceSeconds *uint64 `json:"SinceSeconds,omitempty" name:"SinceSeconds"` - - // 日志总大小限制 - LimitBytes *uint64 `json:"LimitBytes,omitempty" name:"LimitBytes"` -} - -func (r *DescribeEksContainerInstanceLogRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEksContainerInstanceLogRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "EksCiId") - delete(f, "ContainerName") - delete(f, "Tail") - delete(f, "StartTime") - delete(f, "Previous") - delete(f, "SinceSeconds") - delete(f, "LimitBytes") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEksContainerInstanceLogRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeEksContainerInstanceLogResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 容器名称 - ContainerName *string `json:"ContainerName,omitempty" name:"ContainerName"` - - // 日志内容 - LogContent *string `json:"LogContent,omitempty" name:"LogContent"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeEksContainerInstanceLogResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEksContainerInstanceLogResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeEnableVpcCniProgressRequest struct { - *tchttp.BaseRequest - - // 开启vpc-cni的集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` -} - -func (r *DescribeEnableVpcCniProgressRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEnableVpcCniProgressRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEnableVpcCniProgressRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeEnableVpcCniProgressResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 任务进度的描述:Running/Succeed/Failed - Status *string `json:"Status,omitempty" name:"Status"` - - // 当任务进度为Failed时,对任务状态的进一步描述,例如IPAMD组件安装失败 - // 注意:此字段可能返回 null,表示取不到有效值。 - ErrorMessage *string `json:"ErrorMessage,omitempty" name:"ErrorMessage"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeEnableVpcCniProgressResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeEnableVpcCniProgressResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeExistedInstancesRequest struct { - *tchttp.BaseRequest - - // 集群 ID,请填写查询集群列表 接口中返回的 ClusterId 字段(仅通过ClusterId获取需要过滤条件中的VPCID。节点状态比较时会使用该地域下所有集群中的节点进行比较。参数不支持同时指定InstanceIds和ClusterId。 - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 按照一个或者多个实例ID查询。实例ID形如:ins-xxxxxxxx。(此参数的具体格式可参考API简介的id.N一节)。每次请求的实例的上限为100。参数不支持同时指定InstanceIds和Filters。 - InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` - - // 过滤条件,字段和详见[CVM查询实例](https://cloud.tencent.com/document/api/213/15728)如果设置了ClusterId,会附加集群的VPCID作为查询字段,在此情况下如果在Filter中指定了"vpc-id"作为过滤字段,指定的VPCID必须与集群的VPCID相同。 - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` - - // 实例IP进行过滤(同时支持内网IP和外网IP) - VagueIpAddress *string `json:"VagueIpAddress,omitempty" name:"VagueIpAddress"` - - // 实例名称进行过滤 - VagueInstanceName *string `json:"VagueInstanceName,omitempty" name:"VagueInstanceName"` - - // 偏移量,默认为0。关于Offset的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` - - // 返回数量,默认为20,最大值为100。关于Limit的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` - - // 根据多个实例IP进行过滤 - IpAddresses []*string `json:"IpAddresses,omitempty" name:"IpAddresses"` -} - -func (r *DescribeExistedInstancesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeExistedInstancesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "InstanceIds") - delete(f, "Filters") - delete(f, "VagueIpAddress") - delete(f, "VagueInstanceName") - delete(f, "Offset") - delete(f, "Limit") - delete(f, "IpAddresses") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeExistedInstancesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeExistedInstancesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 已经存在的实例信息数组。 - // 注意:此字段可能返回 null,表示取不到有效值。 - ExistedInstanceSet []*ExistedInstance `json:"ExistedInstanceSet,omitempty" name:"ExistedInstanceSet"` - - // 符合条件的实例数量。 - TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeExistedInstancesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeExistedInstancesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeExternalClusterSpecRequest struct { - *tchttp.BaseRequest - - // 注册集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 默认false 获取内网,是否获取外网版注册命令 - IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` - - // 默认false 不刷新有效时间 ,true刷新有效时间 - IsRefreshExpirationTime *bool `json:"IsRefreshExpirationTime,omitempty" name:"IsRefreshExpirationTime"` -} - -func (r *DescribeExternalClusterSpecRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeExternalClusterSpecRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "IsExtranet") - delete(f, "IsRefreshExpirationTime") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeExternalClusterSpecRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeExternalClusterSpecResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 导入第三方集群YAML定义 - Spec *string `json:"Spec,omitempty" name:"Spec"` - - // agent.yaml文件过期时间字符串,时区UTC - Expiration *string `json:"Expiration,omitempty" name:"Expiration"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeExternalClusterSpecResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeExternalClusterSpecResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeImageCachesRequest struct { - *tchttp.BaseRequest - - // 镜像缓存Id数组 - ImageCacheIds []*string `json:"ImageCacheIds,omitempty" name:"ImageCacheIds"` - - // 镜像缓存名称数组 - ImageCacheNames []*string `json:"ImageCacheNames,omitempty" name:"ImageCacheNames"` - - // 限定此次返回资源的数量。如果不设定,默认返回20,最大不能超过50 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` - - // 偏移量,默认0 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` - - // 过滤条件,可选条件: - // (1)实例名称 - // KeyName: image-cache-name - // 类型:String - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` -} - -func (r *DescribeImageCachesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeImageCachesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ImageCacheIds") - delete(f, "ImageCacheNames") - delete(f, "Limit") - delete(f, "Offset") - delete(f, "Filters") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeImageCachesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeImageCachesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 镜像缓存总数 - TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 镜像缓存信息列表 - ImageCaches []*ImageCache `json:"ImageCaches,omitempty" name:"ImageCaches"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeImageCachesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeImageCachesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeImagesRequest struct { - *tchttp.BaseRequest -} - -func (r *DescribeImagesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeImagesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeImagesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeImagesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 镜像数量 - // 注意:此字段可能返回 null,表示取不到有效值。 - TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 镜像信息列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - ImageInstanceSet []*ImageInstance `json:"ImageInstanceSet,omitempty" name:"ImageInstanceSet"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeImagesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeImagesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusAgentInstancesRequest struct { - *tchttp.BaseRequest - - // 集群id - // 可以是tke, eks, edge的集群id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` -} - -func (r *DescribePrometheusAgentInstancesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusAgentInstancesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusAgentInstancesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusAgentInstancesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 关联该集群的实例列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - Instances []*string `json:"Instances,omitempty" name:"Instances"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribePrometheusAgentInstancesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusAgentInstancesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusAgentsRequest struct { - *tchttp.BaseRequest - - // 实例id - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` - - // 用于分页 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` - - // 用于分页 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` -} - -func (r *DescribePrometheusAgentsRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusAgentsRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "InstanceId") - delete(f, "Offset") - delete(f, "Limit") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusAgentsRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusAgentsResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 被关联集群信息 - Agents []*PrometheusAgentOverview `json:"Agents,omitempty" name:"Agents"` - - // 被关联集群总量 - Total *uint64 `json:"Total,omitempty" name:"Total"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribePrometheusAgentsResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusAgentsResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusAlertHistoryRequest struct { - *tchttp.BaseRequest - - // 实例id - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` - - // 告警名称 - RuleName *string `json:"RuleName,omitempty" name:"RuleName"` - - // 开始时间 - StartTime *string `json:"StartTime,omitempty" name:"StartTime"` - - // 结束时间 - EndTime *string `json:"EndTime,omitempty" name:"EndTime"` - - // label集合 - Labels *string `json:"Labels,omitempty" name:"Labels"` - - // 分片 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` - - // 分片 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` -} - -func (r *DescribePrometheusAlertHistoryRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusAlertHistoryRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "InstanceId") - delete(f, "RuleName") - delete(f, "StartTime") - delete(f, "EndTime") - delete(f, "Labels") - delete(f, "Offset") - delete(f, "Limit") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusAlertHistoryRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusAlertHistoryResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 告警历史 - Items []*PrometheusAlertHistoryItem `json:"Items,omitempty" name:"Items"` - - // 总数 - Total *uint64 `json:"Total,omitempty" name:"Total"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribePrometheusAlertHistoryResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusAlertHistoryResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusAlertRuleRequest struct { - *tchttp.BaseRequest - - // 实例id - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` - - // 分页 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` - - // 分页 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` - - // 过滤 - // 支持ID,Name - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` -} - -func (r *DescribePrometheusAlertRuleRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusAlertRuleRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "InstanceId") - delete(f, "Offset") - delete(f, "Limit") - delete(f, "Filters") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusAlertRuleRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusAlertRuleResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 告警详情 - AlertRules []*PrometheusAlertRuleDetail `json:"AlertRules,omitempty" name:"AlertRules"` - - // 总数 - Total *uint64 `json:"Total,omitempty" name:"Total"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribePrometheusAlertRuleResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusAlertRuleResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusInstanceRequest struct { - *tchttp.BaseRequest - - // 实例id - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` -} - -func (r *DescribePrometheusInstanceRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusInstanceRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "InstanceId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusInstanceRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusInstanceResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 实例id - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` - - // 实例名称 - Name *string `json:"Name,omitempty" name:"Name"` - - // 私有网络id - VpcId *string `json:"VpcId,omitempty" name:"VpcId"` - - // 子网id - SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` - - // cos桶名称 - COSBucket *string `json:"COSBucket,omitempty" name:"COSBucket"` - - // 数据查询地址 - QueryAddress *string `json:"QueryAddress,omitempty" name:"QueryAddress"` - - // 实例中grafana相关的信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - Grafana *PrometheusGrafanaInfo `json:"Grafana,omitempty" name:"Grafana"` - - // 用户自定义alertmanager - // 注意:此字段可能返回 null,表示取不到有效值。 - AlertManagerUrl *string `json:"AlertManagerUrl,omitempty" name:"AlertManagerUrl"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribePrometheusInstanceResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusInstanceResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusOverviewsRequest struct { - *tchttp.BaseRequest - - // 用于分页 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` - - // 用于分页 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` - - // 过滤实例,目前支持: - // ID: 通过实例ID来过滤 - // Name: 通过实例名称来过滤 - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` -} - -func (r *DescribePrometheusOverviewsRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusOverviewsRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "Offset") - delete(f, "Limit") - delete(f, "Filters") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusOverviewsRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusOverviewsResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 实例列表 - Instances []*PrometheusInstanceOverview `json:"Instances,omitempty" name:"Instances"` - - // 实例总数 - // 注意:此字段可能返回 null,表示取不到有效值。 - Total *uint64 `json:"Total,omitempty" name:"Total"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribePrometheusOverviewsResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusOverviewsResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusTargetsRequest struct { - *tchttp.BaseRequest - - // 实例id - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` - - // 集群类型 - ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` - - // 集群id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 过滤条件,当前支持 - // Name=state - // Value=up, down, unknown - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` -} - -func (r *DescribePrometheusTargetsRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusTargetsRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "InstanceId") - delete(f, "ClusterType") - delete(f, "ClusterId") - delete(f, "Filters") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusTargetsRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusTargetsResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 所有Job的targets信息 - Jobs []*PrometheusJobTargets `json:"Jobs,omitempty" name:"Jobs"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribePrometheusTargetsResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusTargetsResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusTemplateSyncRequest struct { - *tchttp.BaseRequest - - // 模板ID - TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` -} - -func (r *DescribePrometheusTemplateSyncRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusTemplateSyncRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "TemplateId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusTemplateSyncRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusTemplateSyncResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 同步目标详情 - Targets []*PrometheusTemplateSyncTarget `json:"Targets,omitempty" name:"Targets"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribePrometheusTemplateSyncResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusTemplateSyncResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusTemplatesRequest struct { - *tchttp.BaseRequest - - // 模糊过滤条件,支持 - // Level 按模板级别过滤 - // Name 按名称过滤 - // Describe 按描述过滤 - // ID 按templateId过滤 - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` - - // 分页偏移 - Offset *uint64 `json:"Offset,omitempty" name:"Offset"` - - // 总数限制 - Limit *uint64 `json:"Limit,omitempty" name:"Limit"` -} - -func (r *DescribePrometheusTemplatesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusTemplatesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "Filters") - delete(f, "Offset") - delete(f, "Limit") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusTemplatesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribePrometheusTemplatesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 模板列表 - Templates []*PrometheusTemplate `json:"Templates,omitempty" name:"Templates"` - - // 总数 - Total *uint64 `json:"Total,omitempty" name:"Total"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribePrometheusTemplatesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribePrometheusTemplatesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeRegionsRequest struct { - *tchttp.BaseRequest -} - -func (r *DescribeRegionsRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeRegionsRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRegionsRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeRegionsResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 地域的数量 - // 注意:此字段可能返回 null,表示取不到有效值。 - TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 地域列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - RegionInstanceSet []*RegionInstance `json:"RegionInstanceSet,omitempty" name:"RegionInstanceSet"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeRegionsResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeRegionsResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeRouteTableConflictsRequest struct { - *tchttp.BaseRequest - - // 路由表CIDR - RouteTableCidrBlock *string `json:"RouteTableCidrBlock,omitempty" name:"RouteTableCidrBlock"` - - // 路由表绑定的VPC - VpcId *string `json:"VpcId,omitempty" name:"VpcId"` -} - -func (r *DescribeRouteTableConflictsRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeRouteTableConflictsRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "RouteTableCidrBlock") - delete(f, "VpcId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRouteTableConflictsRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeRouteTableConflictsResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 路由表是否冲突。 - HasConflict *bool `json:"HasConflict,omitempty" name:"HasConflict"` - - // 路由表冲突列表。 - // 注意:此字段可能返回 null,表示取不到有效值。 - RouteTableConflictSet []*RouteTableConflict `json:"RouteTableConflictSet,omitempty" name:"RouteTableConflictSet"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeRouteTableConflictsResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeRouteTableConflictsResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeTKEEdgeScriptRequest struct { - *tchttp.BaseRequest - - // 集群id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 网卡名 - Interface *string `json:"Interface,omitempty" name:"Interface"` - - // 节点名字 - NodeName *string `json:"NodeName,omitempty" name:"NodeName"` - - // json格式的节点配置 - Config *string `json:"Config,omitempty" name:"Config"` -} - -func (r *DescribeTKEEdgeScriptRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeTKEEdgeScriptRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "Interface") - delete(f, "NodeName") - delete(f, "Config") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeTKEEdgeScriptRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeTKEEdgeScriptResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeTKEEdgeScriptResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeTKEEdgeScriptResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeVersionsRequest struct { - *tchttp.BaseRequest -} - -func (r *DescribeVersionsRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeVersionsRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVersionsRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeVersionsResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 版本数量 - // 注意:此字段可能返回 null,表示取不到有效值。 - TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 版本列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - VersionInstanceSet []*VersionInstance `json:"VersionInstanceSet,omitempty" name:"VersionInstanceSet"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeVersionsResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeVersionsResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DescribeVpcCniPodLimitsRequest struct { - *tchttp.BaseRequest - - // 查询的机型所在可用区,如:ap-guangzhou-3,默认为空,即不按可用区过滤信息 - Zone *string `json:"Zone,omitempty" name:"Zone"` - - // 查询的实例机型系列信息,如:S5,默认为空,即不按机型系列过滤信息 - InstanceFamily *string `json:"InstanceFamily,omitempty" name:"InstanceFamily"` - - // 查询的实例机型信息,如:S5.LARGE8,默认为空,即不按机型过滤信息 - InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` -} - -func (r *DescribeVpcCniPodLimitsRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeVpcCniPodLimitsRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "Zone") - delete(f, "InstanceFamily") - delete(f, "InstanceType") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpcCniPodLimitsRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DescribeVpcCniPodLimitsResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 机型数据数量 - // 注意:此字段可能返回 null,表示取不到有效值。 - TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` - - // 机型信息及其可支持的最大VPC-CNI模式Pod数量信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - PodLimitsInstanceSet []*PodLimitsInstance `json:"PodLimitsInstanceSet,omitempty" name:"PodLimitsInstanceSet"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DescribeVpcCniPodLimitsResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DescribeVpcCniPodLimitsResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DisableClusterDeletionProtectionRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` -} - -func (r *DisableClusterDeletionProtectionRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DisableClusterDeletionProtectionRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisableClusterDeletionProtectionRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DisableClusterDeletionProtectionResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DisableClusterDeletionProtectionResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DisableClusterDeletionProtectionResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DisableVpcCniNetworkTypeRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` -} - -func (r *DisableVpcCniNetworkTypeRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DisableVpcCniNetworkTypeRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisableVpcCniNetworkTypeRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type DisableVpcCniNetworkTypeResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *DisableVpcCniNetworkTypeResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DisableVpcCniNetworkTypeResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type DnsServerConf struct { - - // 域名。空字符串表示所有域名。 - Domain *string `json:"Domain,omitempty" name:"Domain"` - - // dns 服务器地址列表。地址格式 ip:port - DnsServers []*string `json:"DnsServers,omitempty" name:"DnsServers"` -} - -type EipAttribute struct { - - // 容器实例删除后,EIP是否释放。 - // Never表示不释放,其他任意值(包括空字符串)表示释放。 - DeletePolicy *string `json:"DeletePolicy,omitempty" name:"DeletePolicy"` - - // EIP线路类型。默认值:BGP。 - // 已开通静态单线IP白名单的用户,可选值: - // CMCC:中国移动 - // CTCC:中国电信 - // CUCC:中国联通 - // 注意:仅部分地域支持静态单线IP。 - // 注意:此字段可能返回 null,表示取不到有效值。 - InternetServiceProvider *string `json:"InternetServiceProvider,omitempty" name:"InternetServiceProvider"` - - // EIP出带宽上限,单位:Mbps。 - // 注意:此字段可能返回 null,表示取不到有效值。 - InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` -} - -type EksCi struct { - - // EKS Cotainer Instance Id - EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` - - // EKS Cotainer Instance Name - EksCiName *string `json:"EksCiName,omitempty" name:"EksCiName"` - - // 内存大小 - Memory *float64 `json:"Memory,omitempty" name:"Memory"` - - // CPU大小 - Cpu *float64 `json:"Cpu,omitempty" name:"Cpu"` - - // 安全组ID - SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` - - // 容器组的重启策略 - // 注意:此字段可能返回 null,表示取不到有效值。 - RestartPolicy *string `json:"RestartPolicy,omitempty" name:"RestartPolicy"` - - // 返回容器组创建状态:Pending,Running,Succeeded,Failed。其中: - // Failed (运行失败)指的容器组退出,RestartPolilcy为Never, 有容器exitCode非0; - // Succeeded(运行成功)指的是容器组退出了,RestartPolicy为Never或onFailure,所有容器exitCode都为0; - // Failed和Succeeded这两种状态都会停止运行,停止计费。 - // Pending是创建中,Running是 运行中。 - // 注意:此字段可能返回 null,表示取不到有效值。 - Status *string `json:"Status,omitempty" name:"Status"` - - // 接到请求后的系统创建时间。 - // 注意:此字段可能返回 null,表示取不到有效值。 - CreationTime *string `json:"CreationTime,omitempty" name:"CreationTime"` - - // 容器全部成功退出后的时间 - // 注意:此字段可能返回 null,表示取不到有效值。 - SucceededTime *string `json:"SucceededTime,omitempty" name:"SucceededTime"` - - // 容器列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - Containers []*Container `json:"Containers,omitempty" name:"Containers"` - - // 数据卷信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - EksCiVolume *EksCiVolume `json:"EksCiVolume,omitempty" name:"EksCiVolume"` - - // 容器组运行的安全上下文 - // 注意:此字段可能返回 null,表示取不到有效值。 - SecurityContext *SecurityContext `json:"SecurityContext,omitempty" name:"SecurityContext"` - - // 内网ip地址 - // 注意:此字段可能返回 null,表示取不到有效值。 - PrivateIp *string `json:"PrivateIp,omitempty" name:"PrivateIp"` - - // 容器实例绑定的Eip地址,注意可能为空 - // 注意:此字段可能返回 null,表示取不到有效值。 - EipAddress *string `json:"EipAddress,omitempty" name:"EipAddress"` - - // GPU类型。如无使用GPU则不返回 - // 注意:此字段可能返回 null,表示取不到有效值。 - GpuType *string `json:"GpuType,omitempty" name:"GpuType"` - - // CPU类型 - // 注意:此字段可能返回 null,表示取不到有效值。 - CpuType *string `json:"CpuType,omitempty" name:"CpuType"` - - // GPU卡数量 - // 注意:此字段可能返回 null,表示取不到有效值。 - GpuCount *uint64 `json:"GpuCount,omitempty" name:"GpuCount"` - - // 实例所属VPC的Id - // 注意:此字段可能返回 null,表示取不到有效值。 - VpcId *string `json:"VpcId,omitempty" name:"VpcId"` - - // 实例所属子网Id - // 注意:此字段可能返回 null,表示取不到有效值。 - SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` - - // 初始化容器列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - InitContainers []*Container `json:"InitContainers,omitempty" name:"InitContainers"` - - // 为容器实例关联 CAM 角色,value 填写 CAM 角色名称,容器实例可获取该 CAM 角色包含的权限策略,方便 容器实例 内的程序进行如购买资源、读写存储等云资源操作。 - // 注意:此字段可能返回 null,表示取不到有效值。 - CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` - - // 自动为用户创建的EipId - // 注意:此字段可能返回 null,表示取不到有效值。 - AutoCreatedEipId *string `json:"AutoCreatedEipId,omitempty" name:"AutoCreatedEipId"` - - // 容器状态是否持久化 - // 注意:此字段可能返回 null,表示取不到有效值。 - PersistStatus *bool `json:"PersistStatus,omitempty" name:"PersistStatus"` -} - -type EksCiRegionInfo struct { - - // 地域别名,形如gz - Alias *string `json:"Alias,omitempty" name:"Alias"` - - // 地域名,形如ap-guangzhou - RegionName *string `json:"RegionName,omitempty" name:"RegionName"` - - // 地域ID - RegionId *uint64 `json:"RegionId,omitempty" name:"RegionId"` -} - -type EksCiVolume struct { - - // Cbs Volume - // 注意:此字段可能返回 null,表示取不到有效值。 - CbsVolumes []*CbsVolume `json:"CbsVolumes,omitempty" name:"CbsVolumes"` - - // Nfs Volume - // 注意:此字段可能返回 null,表示取不到有效值。 - NfsVolumes []*NfsVolume `json:"NfsVolumes,omitempty" name:"NfsVolumes"` -} - -type EksCluster struct { - - // 集群Id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 集群名称 - ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` - - // Vpc Id - VpcId *string `json:"VpcId,omitempty" name:"VpcId"` - - // 子网列表 - SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` - - // k8s 版本号 - K8SVersion *string `json:"K8SVersion,omitempty" name:"K8SVersion"` - - // 集群状态(running运行中,initializing 初始化中,failed异常) - Status *string `json:"Status,omitempty" name:"Status"` - - // 集群描述信息 - ClusterDesc *string `json:"ClusterDesc,omitempty" name:"ClusterDesc"` - - // 集群创建时间 - CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` - - // Service 子网Id - ServiceSubnetId *string `json:"ServiceSubnetId,omitempty" name:"ServiceSubnetId"` - - // 集群的自定义dns 服务器信息 - DnsServers []*DnsServerConf `json:"DnsServers,omitempty" name:"DnsServers"` - - // 将来删除集群时是否要删除cbs。默认为 FALSE - NeedDeleteCbs *bool `json:"NeedDeleteCbs,omitempty" name:"NeedDeleteCbs"` - - // 是否在用户集群内开启Dns。默认为TRUE - EnableVpcCoreDNS *bool `json:"EnableVpcCoreDNS,omitempty" name:"EnableVpcCoreDNS"` - - // 标签描述列表。 - // 注意:此字段可能返回 null,表示取不到有效值。 - TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` -} - -type EnableClusterDeletionProtectionRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` -} - -func (r *EnableClusterDeletionProtectionRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *EnableClusterDeletionProtectionRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "EnableClusterDeletionProtectionRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type EnableClusterDeletionProtectionResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *EnableClusterDeletionProtectionResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *EnableClusterDeletionProtectionResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type EnableVpcCniNetworkTypeRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 开启vpc-cni的模式,tke-route-eni开启的是策略路由模式,tke-direct-eni开启的是独立网卡模式 - VpcCniType *string `json:"VpcCniType,omitempty" name:"VpcCniType"` - - // 是否开启固定IP模式 - EnableStaticIp *bool `json:"EnableStaticIp,omitempty" name:"EnableStaticIp"` - - // 使用的容器子网 - Subnets []*string `json:"Subnets,omitempty" name:"Subnets"` - - // 在固定IP模式下,Pod销毁后退还IP的时间,传参必须大于300;不传默认IP永不销毁。 - ExpiredSeconds *uint64 `json:"ExpiredSeconds,omitempty" name:"ExpiredSeconds"` -} - -func (r *EnableVpcCniNetworkTypeRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *EnableVpcCniNetworkTypeRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "VpcCniType") - delete(f, "EnableStaticIp") - delete(f, "Subnets") - delete(f, "ExpiredSeconds") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "EnableVpcCniNetworkTypeRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type EnableVpcCniNetworkTypeResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *EnableVpcCniNetworkTypeResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *EnableVpcCniNetworkTypeResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type EnhancedService struct { - - // 开启云安全服务。若不指定该参数,则默认开启云安全服务。 - SecurityService *RunSecurityServiceEnabled `json:"SecurityService,omitempty" name:"SecurityService"` - - // 开启云监控服务。若不指定该参数,则默认开启云监控服务。 - MonitorService *RunMonitorServiceEnabled `json:"MonitorService,omitempty" name:"MonitorService"` - - // 开启云自动化助手服务。若不指定该参数,则默认不开启云自动化助手服务。 - AutomationService *RunAutomationServiceEnabled `json:"AutomationService,omitempty" name:"AutomationService"` -} - -type EnvironmentVariable struct { - - // key - Name *string `json:"Name,omitempty" name:"Name"` - - // val - Value *string `json:"Value,omitempty" name:"Value"` -} - -type Event struct { - - // pod名称 - PodName *string `json:"PodName,omitempty" name:"PodName"` - - // 事件原因内容 - Reason *string `json:"Reason,omitempty" name:"Reason"` - - // 事件类型 - Type *string `json:"Type,omitempty" name:"Type"` - - // 事件出现次数 - Count *int64 `json:"Count,omitempty" name:"Count"` - - // 事件第一次出现时间 - FirstTimestamp *string `json:"FirstTimestamp,omitempty" name:"FirstTimestamp"` - - // 事件最后一次出现时间 - LastTimestamp *string `json:"LastTimestamp,omitempty" name:"LastTimestamp"` - - // 事件内容 - Message *string `json:"Message,omitempty" name:"Message"` -} - -type Exec struct { - - // 容器内检测的命令 - // 注意:此字段可能返回 null,表示取不到有效值。 - Commands []*string `json:"Commands,omitempty" name:"Commands"` -} - -type ExistedInstance struct { - - // 实例是否支持加入集群(TRUE 可以加入 FALSE 不能加入)。 - // 注意:此字段可能返回 null,表示取不到有效值。 - Usable *bool `json:"Usable,omitempty" name:"Usable"` - - // 实例不支持加入的原因。 - // 注意:此字段可能返回 null,表示取不到有效值。 - UnusableReason *string `json:"UnusableReason,omitempty" name:"UnusableReason"` - - // 实例已经所在的集群ID。 - // 注意:此字段可能返回 null,表示取不到有效值。 - AlreadyInCluster *string `json:"AlreadyInCluster,omitempty" name:"AlreadyInCluster"` - - // 实例ID形如:ins-xxxxxxxx。 - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` - - // 实例名称。 - // 注意:此字段可能返回 null,表示取不到有效值。 - InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` - - // 实例主网卡的内网IP列表。 - // 注意:此字段可能返回 null,表示取不到有效值。 - PrivateIpAddresses []*string `json:"PrivateIpAddresses,omitempty" name:"PrivateIpAddresses"` - - // 实例主网卡的公网IP列表。 - // 注意:此字段可能返回 null,表示取不到有效值。 - // 注意:此字段可能返回 null,表示取不到有效值。 - PublicIpAddresses []*string `json:"PublicIpAddresses,omitempty" name:"PublicIpAddresses"` - - // 创建时间。按照ISO8601标准表示,并且使用UTC时间。格式为:YYYY-MM-DDThh:mm:ssZ。 - // 注意:此字段可能返回 null,表示取不到有效值。 - CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` - - // 实例的CPU核数,单位:核。 - // 注意:此字段可能返回 null,表示取不到有效值。 - CPU *uint64 `json:"CPU,omitempty" name:"CPU"` - - // 实例内存容量,单位:GB。 - // 注意:此字段可能返回 null,表示取不到有效值。 - Memory *uint64 `json:"Memory,omitempty" name:"Memory"` - - // 操作系统名称。 - // 注意:此字段可能返回 null,表示取不到有效值。 - OsName *string `json:"OsName,omitempty" name:"OsName"` - - // 实例机型。 - // 注意:此字段可能返回 null,表示取不到有效值。 - InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` - - // 伸缩组ID - // 注意:此字段可能返回 null,表示取不到有效值。 - AutoscalingGroupId *string `json:"AutoscalingGroupId,omitempty" name:"AutoscalingGroupId"` - - // 实例计费模式。取值范围: PREPAID:表示预付费,即包年包月 POSTPAID_BY_HOUR:表示后付费,即按量计费 CDHPAID:CDH付费,即只对CDH计费,不对CDH上的实例计费。 - // 注意:此字段可能返回 null,表示取不到有效值。 - InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` -} - -type ExistedInstancesForNode struct { - - // 节点角色,取值:MASTER_ETCD, WORKER。MASTER_ETCD只有在创建 INDEPENDENT_CLUSTER 独立集群时需要指定。MASTER_ETCD节点数量为3~7,建议为奇数。MASTER_ETCD最小配置为4C8G。 - NodeRole *string `json:"NodeRole,omitempty" name:"NodeRole"` - - // 已存在实例的重装参数 - ExistedInstancesPara *ExistedInstancesPara `json:"ExistedInstancesPara,omitempty" name:"ExistedInstancesPara"` - - // 节点高级设置,会覆盖集群级别设置的InstanceAdvancedSettings(当前只对节点自定义参数ExtraArgs生效) - InstanceAdvancedSettingsOverride *InstanceAdvancedSettings `json:"InstanceAdvancedSettingsOverride,omitempty" name:"InstanceAdvancedSettingsOverride"` - - // 自定义模式集群,可指定每个节点的pod数量 - DesiredPodNumbers []*int64 `json:"DesiredPodNumbers,omitempty" name:"DesiredPodNumbers"` -} - -type ExistedInstancesPara struct { - - // 集群ID - InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` - - // 实例额外需要设置参数信息 - InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` - - // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 - EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` - - // 节点登录信息(目前仅支持使用Password或者单个KeyIds) - LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` - - // 实例所属安全组。该参数可以通过调用 DescribeSecurityGroups 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。 - SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` - - // 重装系统时,可以指定修改实例的HostName(集群为HostName模式时,此参数必传,规则名称除不支持大写字符外与[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口HostName一致) - HostName *string `json:"HostName,omitempty" name:"HostName"` -} - -type ExtensionAddon struct { - - // 扩展组件名称 - AddonName *string `json:"AddonName,omitempty" name:"AddonName"` - - // 扩展组件信息(扩展组件资源对象的json字符串描述) - AddonParam *string `json:"AddonParam,omitempty" name:"AddonParam"` -} - -type Filter struct { - - // 需要过滤的字段。 - Name *string `json:"Name,omitempty" name:"Name"` - - // 字段的过滤值。 - Values []*string `json:"Values,omitempty" name:"Values"` -} - -type ForwardApplicationRequestV3Request struct { - *tchttp.BaseRequest - - // 请求集群addon的访问 - Method *string `json:"Method,omitempty" name:"Method"` - - // 请求集群addon的路径 - Path *string `json:"Path,omitempty" name:"Path"` - - // 请求集群addon后允许接收的数据格式 - Accept *string `json:"Accept,omitempty" name:"Accept"` - - // 请求集群addon的数据格式 - ContentType *string `json:"ContentType,omitempty" name:"ContentType"` - - // 请求集群addon的数据 - RequestBody *string `json:"RequestBody,omitempty" name:"RequestBody"` - - // 集群名称 - ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` - - // 是否编码请求内容 - EncodedBody *string `json:"EncodedBody,omitempty" name:"EncodedBody"` -} - -func (r *ForwardApplicationRequestV3Request) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ForwardApplicationRequestV3Request) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "Method") - delete(f, "Path") - delete(f, "Accept") - delete(f, "ContentType") - delete(f, "RequestBody") - delete(f, "ClusterName") - delete(f, "EncodedBody") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ForwardApplicationRequestV3Request has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type ForwardApplicationRequestV3Response struct { - *tchttp.BaseResponse - Response *struct { - - // 请求集群addon后返回的数据 - ResponseBody *string `json:"ResponseBody,omitempty" name:"ResponseBody"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *ForwardApplicationRequestV3Response) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ForwardApplicationRequestV3Response) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type GetMostSuitableImageCacheRequest struct { - *tchttp.BaseRequest - - // 容器镜像列表 - Images []*string `json:"Images,omitempty" name:"Images"` -} - -func (r *GetMostSuitableImageCacheRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *GetMostSuitableImageCacheRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "Images") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "GetMostSuitableImageCacheRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type GetMostSuitableImageCacheResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 是否有匹配的镜像缓存 - Found *bool `json:"Found,omitempty" name:"Found"` - - // 匹配的镜像缓存 - // 注意:此字段可能返回 null,表示取不到有效值。 - ImageCache *ImageCache `json:"ImageCache,omitempty" name:"ImageCache"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *GetMostSuitableImageCacheResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *GetMostSuitableImageCacheResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type GetTkeAppChartListRequest struct { - *tchttp.BaseRequest - - // app类型,取值log,scheduler,network,storage,monitor,dns,image,other,invisible - Kind *string `json:"Kind,omitempty" name:"Kind"` - - // app支持的操作系统,取值arm32、arm64、amd64 - Arch *string `json:"Arch,omitempty" name:"Arch"` - - // 集群类型,取值tke、eks - ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` -} - -func (r *GetTkeAppChartListRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *GetTkeAppChartListRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "Kind") - delete(f, "Arch") - delete(f, "ClusterType") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "GetTkeAppChartListRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type GetTkeAppChartListResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 所支持的chart列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - AppCharts []*AppChart `json:"AppCharts,omitempty" name:"AppCharts"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *GetTkeAppChartListResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *GetTkeAppChartListResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type GetUpgradeInstanceProgressRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 最多获取多少个节点的进度 - Limit *int64 `json:"Limit,omitempty" name:"Limit"` - - // 从第几个节点开始获取进度 - Offset *int64 `json:"Offset,omitempty" name:"Offset"` -} - -func (r *GetUpgradeInstanceProgressRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *GetUpgradeInstanceProgressRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "Limit") - delete(f, "Offset") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "GetUpgradeInstanceProgressRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type GetUpgradeInstanceProgressResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 升级节点总数 - Total *int64 `json:"Total,omitempty" name:"Total"` - - // 已升级节点总数 - Done *int64 `json:"Done,omitempty" name:"Done"` - - // 升级任务生命周期 - // process 运行中 - // paused 已停止 - // pauing 正在停止 - // done 已完成 - // timeout 已超时 - // aborted 已取消 - LifeState *string `json:"LifeState,omitempty" name:"LifeState"` - - // 各节点升级进度详情 - Instances []*InstanceUpgradeProgressItem `json:"Instances,omitempty" name:"Instances"` - - // 集群当前状态 - ClusterStatus *InstanceUpgradeClusterStatus `json:"ClusterStatus,omitempty" name:"ClusterStatus"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *GetUpgradeInstanceProgressResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *GetUpgradeInstanceProgressResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type HttpGet struct { - - // HttpGet检测的路径 - // 注意:此字段可能返回 null,表示取不到有效值。 - Path *string `json:"Path,omitempty" name:"Path"` - - // HttpGet检测的端口号 - // 注意:此字段可能返回 null,表示取不到有效值。 - Port *int64 `json:"Port,omitempty" name:"Port"` - - // HTTP or HTTPS - // 注意:此字段可能返回 null,表示取不到有效值。 - Scheme *string `json:"Scheme,omitempty" name:"Scheme"` -} - -type IPAddress struct { - - // Ip 地址的类型。可为 advertise, public 等 - Type *string `json:"Type,omitempty" name:"Type"` - - // Ip 地址 - Ip *string `json:"Ip,omitempty" name:"Ip"` - - // 网络端口 - Port *uint64 `json:"Port,omitempty" name:"Port"` -} - -type ImageCache struct { - - // 镜像缓存Id - ImageCacheId *string `json:"ImageCacheId,omitempty" name:"ImageCacheId"` - - // 镜像缓存名称 - ImageCacheName *string `json:"ImageCacheName,omitempty" name:"ImageCacheName"` - - // 镜像缓存大小。单位:GiB - ImageCacheSize *uint64 `json:"ImageCacheSize,omitempty" name:"ImageCacheSize"` - - // 镜像缓存包含的镜像列表 - Images []*string `json:"Images,omitempty" name:"Images"` - - // 创建时间 - CreationTime *string `json:"CreationTime,omitempty" name:"CreationTime"` - - // 到期时间 - ExpireDateTime *string `json:"ExpireDateTime,omitempty" name:"ExpireDateTime"` - - // 镜像缓存事件信息 - Events []*ImageCacheEvent `json:"Events,omitempty" name:"Events"` - - // 最新一次匹配到镜像缓存的时间 - LastMatchedTime *string `json:"LastMatchedTime,omitempty" name:"LastMatchedTime"` - - // 镜像缓存对应的快照Id - SnapshotId *string `json:"SnapshotId,omitempty" name:"SnapshotId"` - - // 镜像缓存状态,可能取值: - // Pending:创建中 - // Ready:创建完成 - // Failed:创建失败 - // Updating:更新中 - // UpdateFailed:更新失败 - // 只有状态为Ready时,才能正常使用镜像缓存 - Status *string `json:"Status,omitempty" name:"Status"` -} - -type ImageCacheEvent struct { - - // 镜像缓存Id - ImageCacheId *string `json:"ImageCacheId,omitempty" name:"ImageCacheId"` - - // 事件类型, Normal或者Warning - Type *string `json:"Type,omitempty" name:"Type"` - - // 事件原因简述 - Reason *string `json:"Reason,omitempty" name:"Reason"` - - // 事件原因详述 - Message *string `json:"Message,omitempty" name:"Message"` - - // 事件第一次出现时间 - FirstTimestamp *string `json:"FirstTimestamp,omitempty" name:"FirstTimestamp"` - - // 事件最后一次出现时间 - LastTimestamp *string `json:"LastTimestamp,omitempty" name:"LastTimestamp"` -} - -type ImageInstance struct { - - // 镜像别名 - // 注意:此字段可能返回 null,表示取不到有效值。 - Alias *string `json:"Alias,omitempty" name:"Alias"` - - // 操作系统名称 - // 注意:此字段可能返回 null,表示取不到有效值。 - OsName *string `json:"OsName,omitempty" name:"OsName"` - - // 镜像ID - // 注意:此字段可能返回 null,表示取不到有效值。 - ImageId *string `json:"ImageId,omitempty" name:"ImageId"` - - // 容器的镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) - // 注意:此字段可能返回 null,表示取不到有效值。 - OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` -} - -type ImageRegistryCredential struct { - - // 镜像仓库地址 - Server *string `json:"Server,omitempty" name:"Server"` - - // 用户名 - Username *string `json:"Username,omitempty" name:"Username"` - - // 密码 - Password *string `json:"Password,omitempty" name:"Password"` - - // ImageRegistryCredential的名字 - Name *string `json:"Name,omitempty" name:"Name"` -} - -type Instance struct { - - // 实例ID - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` - - // 节点角色, MASTER, WORKER, ETCD, MASTER_ETCD,ALL, 默认为WORKER - InstanceRole *string `json:"InstanceRole,omitempty" name:"InstanceRole"` - - // 实例异常(或者处于初始化中)的原因 - FailedReason *string `json:"FailedReason,omitempty" name:"FailedReason"` - - // 实例的状态(running 运行中,initializing 初始化中,failed 异常) - InstanceState *string `json:"InstanceState,omitempty" name:"InstanceState"` - - // 实例是否封锁状态 - // 注意:此字段可能返回 null,表示取不到有效值。 - DrainStatus *string `json:"DrainStatus,omitempty" name:"DrainStatus"` - - // 节点配置 - // 注意:此字段可能返回 null,表示取不到有效值。 - InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` - - // 添加时间 - CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` - - // 节点内网IP - // 注意:此字段可能返回 null,表示取不到有效值。 - LanIP *string `json:"LanIP,omitempty" name:"LanIP"` - - // 资源池ID - // 注意:此字段可能返回 null,表示取不到有效值。 - NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` - - // 自动伸缩组ID - // 注意:此字段可能返回 null,表示取不到有效值。 - AutoscalingGroupId *string `json:"AutoscalingGroupId,omitempty" name:"AutoscalingGroupId"` -} - -type InstanceAdvancedSettings struct { - - // 数据盘挂载点, 默认不挂载数据盘. 已格式化的 ext3,ext4,xfs 文件系统的数据盘将直接挂载,其他文件系统或未格式化的数据盘将自动格式化为ext4 (tlinux系统格式化成xfs)并挂载,请注意备份数据! 无数据盘或有多块数据盘的云主机此设置不生效。 - // 注意,注意,多盘场景请使用下方的DataDisks数据结构,设置对应的云盘类型、云盘大小、挂载路径、是否格式化等信息。 - // 注意:此字段可能返回 null,表示取不到有效值。 - MountTarget *string `json:"MountTarget,omitempty" name:"MountTarget"` - - // dockerd --graph 指定值, 默认为 /var/lib/docker - // 注意:此字段可能返回 null,表示取不到有效值。 - DockerGraphPath *string `json:"DockerGraphPath,omitempty" name:"DockerGraphPath"` - - // base64 编码的用户脚本, 此脚本会在 k8s 组件运行后执行, 需要用户保证脚本的可重入及重试逻辑, 脚本及其生成的日志文件可在节点的 /data/ccs_userscript/ 路径查看, 如果要求节点需要在进行初始化完成后才可加入调度, 可配合 unschedulable 参数使用, 在 userScript 最后初始化完成后, 添加 kubectl uncordon nodename --kubeconfig=/root/.kube/config 命令使节点加入调度 - // 注意:此字段可能返回 null,表示取不到有效值。 - UserScript *string `json:"UserScript,omitempty" name:"UserScript"` - - // 设置加入的节点是否参与调度,默认值为0,表示参与调度;非0表示不参与调度, 待节点初始化完成之后, 可执行kubectl uncordon nodename使node加入调度. - Unschedulable *int64 `json:"Unschedulable,omitempty" name:"Unschedulable"` - - // 节点Label数组 - // 注意:此字段可能返回 null,表示取不到有效值。 - Labels []*Label `json:"Labels,omitempty" name:"Labels"` - - // 多盘数据盘挂载信息:新建节点时请确保购买CVM的参数传递了购买多个数据盘的信息,如CreateClusterInstances API的RunInstancesPara下的DataDisks也需要设置购买多个数据盘, 具体可以参考CreateClusterInstances接口的添加集群节点(多块数据盘)样例;添加已有节点时,请确保填写的分区信息在节点上真实存在 - // 注意:此字段可能返回 null,表示取不到有效值。 - DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` - - // 节点相关的自定义参数信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - ExtraArgs *InstanceExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` - - // 该节点属于podCIDR大小自定义模式时,可指定节点上运行的pod数量上限 - // 注意:此字段可能返回 null,表示取不到有效值。 - DesiredPodNumber *int64 `json:"DesiredPodNumber,omitempty" name:"DesiredPodNumber"` - - // base64 编码的用户脚本,在初始化节点之前执行,目前只对添加已有节点生效 - // 注意:此字段可能返回 null,表示取不到有效值。 - PreStartUserScript *string `json:"PreStartUserScript,omitempty" name:"PreStartUserScript"` -} - -type InstanceDataDiskMountSetting struct { - - // CVM实例类型 - InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` - - // 数据盘挂载信息 - DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` - - // CVM实例所属可用区 - Zone *string `json:"Zone,omitempty" name:"Zone"` -} - -type InstanceExtraArgs struct { - - // kubelet自定义参数,参数格式为["k1=v1", "k1=v2"], 例如["root-dir=/var/lib/kubelet","feature-gates=PodShareProcessNamespace=true,DynamicKubeletConfig=true"] - // 注意:此字段可能返回 null,表示取不到有效值。 - Kubelet []*string `json:"Kubelet,omitempty" name:"Kubelet"` -} - -type InstanceUpgradeClusterStatus struct { - - // pod总数 - PodTotal *int64 `json:"PodTotal,omitempty" name:"PodTotal"` - - // NotReady pod总数 - NotReadyPod *int64 `json:"NotReadyPod,omitempty" name:"NotReadyPod"` -} - -type InstanceUpgradePreCheckResult struct { - - // 检查是否通过 - CheckPass *bool `json:"CheckPass,omitempty" name:"CheckPass"` - - // 检查项数组 - Items []*InstanceUpgradePreCheckResultItem `json:"Items,omitempty" name:"Items"` - - // 本节点独立pod列表 - SinglePods []*string `json:"SinglePods,omitempty" name:"SinglePods"` -} - -type InstanceUpgradePreCheckResultItem struct { - - // 工作负载的命名空间 - Namespace *string `json:"Namespace,omitempty" name:"Namespace"` - - // 工作负载类型 - WorkLoadKind *string `json:"WorkLoadKind,omitempty" name:"WorkLoadKind"` - - // 工作负载名称 - WorkLoadName *string `json:"WorkLoadName,omitempty" name:"WorkLoadName"` - - // 驱逐节点前工作负载running的pod数目 - Before *uint64 `json:"Before,omitempty" name:"Before"` - - // 驱逐节点后工作负载running的pod数目 - After *uint64 `json:"After,omitempty" name:"After"` - - // 工作负载在本节点上的pod列表 - Pods []*string `json:"Pods,omitempty" name:"Pods"` -} - -type InstanceUpgradeProgressItem struct { - - // 节点instanceID - InstanceID *string `json:"InstanceID,omitempty" name:"InstanceID"` - - // 任务生命周期 - // process 运行中 - // paused 已停止 - // pauing 正在停止 - // done 已完成 - // timeout 已超时 - // aborted 已取消 - // pending 还未开始 - LifeState *string `json:"LifeState,omitempty" name:"LifeState"` - - // 升级开始时间 - // 注意:此字段可能返回 null,表示取不到有效值。 - StartAt *string `json:"StartAt,omitempty" name:"StartAt"` - - // 升级结束时间 - // 注意:此字段可能返回 null,表示取不到有效值。 - EndAt *string `json:"EndAt,omitempty" name:"EndAt"` - - // 升级前检查结果 - CheckResult *InstanceUpgradePreCheckResult `json:"CheckResult,omitempty" name:"CheckResult"` - - // 升级步骤详情 - Detail []*TaskStepInfo `json:"Detail,omitempty" name:"Detail"` -} - -type Label struct { - - // map表中的Name - Name *string `json:"Name,omitempty" name:"Name"` - - // map表中的Value - Value *string `json:"Value,omitempty" name:"Value"` -} - -type LivenessOrReadinessProbe struct { - - // 探针参数 - // 注意:此字段可能返回 null,表示取不到有效值。 - Probe *Probe `json:"Probe,omitempty" name:"Probe"` - - // HttpGet检测参数 - // 注意:此字段可能返回 null,表示取不到有效值。 - HttpGet *HttpGet `json:"HttpGet,omitempty" name:"HttpGet"` - - // 容器内检测命令参数 - // 注意:此字段可能返回 null,表示取不到有效值。 - Exec *Exec `json:"Exec,omitempty" name:"Exec"` - - // TcpSocket检测的端口参数 - // 注意:此字段可能返回 null,表示取不到有效值。 - TcpSocket *TcpSocket `json:"TcpSocket,omitempty" name:"TcpSocket"` -} - -type LoginSettings struct { - - // 实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下:
  • Linux实例密码必须8到30位,至少包括两项[a-z],[A-Z]、[0-9] 和 [( ) \` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? / ]中的特殊符号。
  • Windows实例密码必须12到30位,至少包括三项[a-z],[A-Z],[0-9] 和 [( ) \` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? /]中的特殊符号。

    若不指定该参数,则由系统随机生成密码,并通过站内信方式通知到用户。 - // 注意:此字段可能返回 null,表示取不到有效值。 - Password *string `json:"Password,omitempty" name:"Password"` - - // 密钥ID列表。关联密钥后,就可以通过对应的私钥来访问实例;KeyId可通过接口[DescribeKeyPairs](https://cloud.tencent.com/document/api/213/15699)获取,密钥与密码不能同时指定,同时Windows操作系统不支持指定密钥。当前仅支持购买的时候指定一个密钥。 - // 注意:此字段可能返回 null,表示取不到有效值。 - KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` - - // 保持镜像的原始设置。该参数与Password或KeyIds.N不能同时指定。只有使用自定义镜像、共享镜像或外部导入镜像创建实例时才能指定该参数为TRUE。取值范围:
  • TRUE:表示保持镜像的登录设置
  • FALSE:表示不保持镜像的登录设置

    默认取值:FALSE。 - // 注意:此字段可能返回 null,表示取不到有效值。 - KeepImageLogin *string `json:"KeepImageLogin,omitempty" name:"KeepImageLogin"` -} - -type ManuallyAdded struct { - - // 加入中的节点数量 - Joining *int64 `json:"Joining,omitempty" name:"Joining"` - - // 初始化中的节点数量 - Initializing *int64 `json:"Initializing,omitempty" name:"Initializing"` - - // 正常的节点数量 - Normal *int64 `json:"Normal,omitempty" name:"Normal"` - - // 节点总数 - Total *int64 `json:"Total,omitempty" name:"Total"` -} - -type ModifyClusterAsGroupAttributeRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 集群关联的伸缩组属性 - ClusterAsGroupAttribute *ClusterAsGroupAttribute `json:"ClusterAsGroupAttribute,omitempty" name:"ClusterAsGroupAttribute"` -} - -func (r *ModifyClusterAsGroupAttributeRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyClusterAsGroupAttributeRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "ClusterAsGroupAttribute") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterAsGroupAttributeRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type ModifyClusterAsGroupAttributeResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *ModifyClusterAsGroupAttributeResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyClusterAsGroupAttributeResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type ModifyClusterAsGroupOptionAttributeRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 集群弹性伸缩属性 - ClusterAsGroupOption *ClusterAsGroupOption `json:"ClusterAsGroupOption,omitempty" name:"ClusterAsGroupOption"` -} - -func (r *ModifyClusterAsGroupOptionAttributeRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyClusterAsGroupOptionAttributeRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "ClusterAsGroupOption") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterAsGroupOptionAttributeRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type ModifyClusterAsGroupOptionAttributeResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *ModifyClusterAsGroupOptionAttributeResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyClusterAsGroupOptionAttributeResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type ModifyClusterAttributeRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 集群所属项目 - ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` - - // 集群名称 - ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` - - // 集群描述 - ClusterDesc *string `json:"ClusterDesc,omitempty" name:"ClusterDesc"` - - // 集群等级 - ClusterLevel *string `json:"ClusterLevel,omitempty" name:"ClusterLevel"` - - // 自动变配集群等级 - AutoUpgradeClusterLevel *AutoUpgradeClusterLevel `json:"AutoUpgradeClusterLevel,omitempty" name:"AutoUpgradeClusterLevel"` -} - -func (r *ModifyClusterAttributeRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyClusterAttributeRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "ProjectId") - delete(f, "ClusterName") - delete(f, "ClusterDesc") - delete(f, "ClusterLevel") - delete(f, "AutoUpgradeClusterLevel") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterAttributeRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type ModifyClusterAttributeResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 集群所属项目 - // 注意:此字段可能返回 null,表示取不到有效值。 - ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` - - // 集群名称 - // 注意:此字段可能返回 null,表示取不到有效值。 - ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` - - // 集群描述 - // 注意:此字段可能返回 null,表示取不到有效值。 - ClusterDesc *string `json:"ClusterDesc,omitempty" name:"ClusterDesc"` - - // 集群等级 - // 注意:此字段可能返回 null,表示取不到有效值。 - ClusterLevel *string `json:"ClusterLevel,omitempty" name:"ClusterLevel"` - - // 自动变配集群等级 - // 注意:此字段可能返回 null,表示取不到有效值。 - AutoUpgradeClusterLevel *AutoUpgradeClusterLevel `json:"AutoUpgradeClusterLevel,omitempty" name:"AutoUpgradeClusterLevel"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *ModifyClusterAttributeResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyClusterAttributeResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type ModifyClusterAuthenticationOptionsRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // ServiceAccount认证配置 - ServiceAccounts *ServiceAccountAuthenticationOptions `json:"ServiceAccounts,omitempty" name:"ServiceAccounts"` -} - -func (r *ModifyClusterAuthenticationOptionsRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyClusterAuthenticationOptionsRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "ServiceAccounts") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterAuthenticationOptionsRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type ModifyClusterAuthenticationOptionsResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *ModifyClusterAuthenticationOptionsResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyClusterAuthenticationOptionsResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type ModifyClusterEndpointSPRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 安全策略放通单个IP或CIDR(例如: "192.168.1.0/24",默认为拒绝所有) - SecurityPolicies []*string `json:"SecurityPolicies,omitempty" name:"SecurityPolicies"` -} - -func (r *ModifyClusterEndpointSPRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyClusterEndpointSPRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "SecurityPolicies") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterEndpointSPRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type ModifyClusterEndpointSPResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *ModifyClusterEndpointSPResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyClusterEndpointSPResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type ModifyClusterNodePoolRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 节点池ID - NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` - - // 名称 - Name *string `json:"Name,omitempty" name:"Name"` - - // 最大节点数 - MaxNodesNum *int64 `json:"MaxNodesNum,omitempty" name:"MaxNodesNum"` - - // 最小节点数 - MinNodesNum *int64 `json:"MinNodesNum,omitempty" name:"MinNodesNum"` - - // 标签 - Labels []*Label `json:"Labels,omitempty" name:"Labels"` - - // 污点 - Taints []*Taint `json:"Taints,omitempty" name:"Taints"` - - // 是否开启伸缩 - EnableAutoscale *bool `json:"EnableAutoscale,omitempty" name:"EnableAutoscale"` - - // 操作系统名称 - OsName *string `json:"OsName,omitempty" name:"OsName"` - - // 镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) - OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` - - // 节点自定义参数 - ExtraArgs *InstanceExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` - - // 资源标签 - Tags []*Tag `json:"Tags,omitempty" name:"Tags"` - - // 设置加入的节点是否参与调度,默认值为0,表示参与调度;非0表示不参与调度, 待节点初始化完成之后, 可执行kubectl uncordon nodename使node加入调度. - Unschedulable *int64 `json:"Unschedulable,omitempty" name:"Unschedulable"` -} - -func (r *ModifyClusterNodePoolRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyClusterNodePoolRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "NodePoolId") - delete(f, "Name") - delete(f, "MaxNodesNum") - delete(f, "MinNodesNum") - delete(f, "Labels") - delete(f, "Taints") - delete(f, "EnableAutoscale") - delete(f, "OsName") - delete(f, "OsCustomizeType") - delete(f, "ExtraArgs") - delete(f, "Tags") - delete(f, "Unschedulable") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterNodePoolRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type ModifyClusterNodePoolResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *ModifyClusterNodePoolResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyClusterNodePoolResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type ModifyNodePoolDesiredCapacityAboutAsgRequest struct { - *tchttp.BaseRequest - - // 集群id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 节点池id - NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` - - // 节点池所关联的伸缩组的期望实例数 - DesiredCapacity *int64 `json:"DesiredCapacity,omitempty" name:"DesiredCapacity"` -} - -func (r *ModifyNodePoolDesiredCapacityAboutAsgRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyNodePoolDesiredCapacityAboutAsgRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "NodePoolId") - delete(f, "DesiredCapacity") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyNodePoolDesiredCapacityAboutAsgRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type ModifyNodePoolDesiredCapacityAboutAsgResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *ModifyNodePoolDesiredCapacityAboutAsgResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyNodePoolDesiredCapacityAboutAsgResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type ModifyNodePoolInstanceTypesRequest struct { - *tchttp.BaseRequest - - // 集群id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 节点池id - NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` - - // 机型列表 - InstanceTypes []*string `json:"InstanceTypes,omitempty" name:"InstanceTypes"` -} - -func (r *ModifyNodePoolInstanceTypesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyNodePoolInstanceTypesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "NodePoolId") - delete(f, "InstanceTypes") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyNodePoolInstanceTypesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type ModifyNodePoolInstanceTypesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *ModifyNodePoolInstanceTypesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyNodePoolInstanceTypesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type ModifyPrometheusAlertRuleRequest struct { - *tchttp.BaseRequest - - // 实例id - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` - - // 告警配置 - AlertRule *PrometheusAlertRuleDetail `json:"AlertRule,omitempty" name:"AlertRule"` -} - -func (r *ModifyPrometheusAlertRuleRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyPrometheusAlertRuleRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "InstanceId") - delete(f, "AlertRule") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyPrometheusAlertRuleRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type ModifyPrometheusAlertRuleResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *ModifyPrometheusAlertRuleResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyPrometheusAlertRuleResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type ModifyPrometheusTemplateRequest struct { - *tchttp.BaseRequest - - // 模板ID - TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` - - // 修改内容 - Template *PrometheusTemplateModify `json:"Template,omitempty" name:"Template"` -} - -func (r *ModifyPrometheusTemplateRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyPrometheusTemplateRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "TemplateId") - delete(f, "Template") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyPrometheusTemplateRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type ModifyPrometheusTemplateResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *ModifyPrometheusTemplateResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ModifyPrometheusTemplateResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type NfsVolume struct { - - // nfs volume 数据卷名称 - Name *string `json:"Name,omitempty" name:"Name"` - - // NFS 服务器地址 - Server *string `json:"Server,omitempty" name:"Server"` - - // NFS 数据卷路径 - Path *string `json:"Path,omitempty" name:"Path"` - - // 默认为 False - ReadOnly *bool `json:"ReadOnly,omitempty" name:"ReadOnly"` -} - -type NodeCountSummary struct { - - // 手动管理的节点 - // 注意:此字段可能返回 null,表示取不到有效值。 - ManuallyAdded *ManuallyAdded `json:"ManuallyAdded,omitempty" name:"ManuallyAdded"` - - // 自动管理的节点 - // 注意:此字段可能返回 null,表示取不到有效值。 - AutoscalingAdded *AutoscalingAdded `json:"AutoscalingAdded,omitempty" name:"AutoscalingAdded"` -} - -type NodePool struct { - - // NodePoolId 资源池id - NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` - - // Name 资源池名称 - Name *string `json:"Name,omitempty" name:"Name"` - - // ClusterInstanceId 集群实例id - ClusterInstanceId *string `json:"ClusterInstanceId,omitempty" name:"ClusterInstanceId"` - - // LifeState 状态,当前节点池生命周期状态包括:creating,normal,updating,deleting,deleted - LifeState *string `json:"LifeState,omitempty" name:"LifeState"` - - // LaunchConfigurationId 配置 - LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` - - // AutoscalingGroupId 分组id - AutoscalingGroupId *string `json:"AutoscalingGroupId,omitempty" name:"AutoscalingGroupId"` - - // Labels 标签 - Labels []*Label `json:"Labels,omitempty" name:"Labels"` - - // Taints 污点标记 - Taints []*Taint `json:"Taints,omitempty" name:"Taints"` - - // NodeCountSummary 节点列表 - NodeCountSummary *NodeCountSummary `json:"NodeCountSummary,omitempty" name:"NodeCountSummary"` - - // 状态信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - AutoscalingGroupStatus *string `json:"AutoscalingGroupStatus,omitempty" name:"AutoscalingGroupStatus"` - - // 最大节点数量 - // 注意:此字段可能返回 null,表示取不到有效值。 - MaxNodesNum *int64 `json:"MaxNodesNum,omitempty" name:"MaxNodesNum"` - - // 最小节点数量 - // 注意:此字段可能返回 null,表示取不到有效值。 - MinNodesNum *int64 `json:"MinNodesNum,omitempty" name:"MinNodesNum"` - - // 期望的节点数量 - // 注意:此字段可能返回 null,表示取不到有效值。 - DesiredNodesNum *int64 `json:"DesiredNodesNum,omitempty" name:"DesiredNodesNum"` - - // 节点池osName - // 注意:此字段可能返回 null,表示取不到有效值。 - NodePoolOs *string `json:"NodePoolOs,omitempty" name:"NodePoolOs"` - - // 容器的镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) - // 注意:此字段可能返回 null,表示取不到有效值。 - OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` - - // 镜像id - // 注意:此字段可能返回 null,表示取不到有效值。 - ImageId *string `json:"ImageId,omitempty" name:"ImageId"` - - // 集群属于节点podCIDR大小自定义模式时,节点池需要带上pod数量属性 - // 注意:此字段可能返回 null,表示取不到有效值。 - DesiredPodNum *int64 `json:"DesiredPodNum,omitempty" name:"DesiredPodNum"` - - // 用户自定义脚本 - // 注意:此字段可能返回 null,表示取不到有效值。 - UserScript *string `json:"UserScript,omitempty" name:"UserScript"` - - // 资源标签 - // 注意:此字段可能返回 null,表示取不到有效值。 - Tags []*Tag `json:"Tags,omitempty" name:"Tags"` -} - -type NodePoolOption struct { - - // 是否加入节点池 - AddToNodePool *bool `json:"AddToNodePool,omitempty" name:"AddToNodePool"` - - // 节点池id - NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` - - // 是否继承节点池相关配置 - InheritConfigurationFromNodePool *bool `json:"InheritConfigurationFromNodePool,omitempty" name:"InheritConfigurationFromNodePool"` -} - -type PodLimitsByType struct { - - // TKE共享网卡非固定IP模式可支持的Pod数量 - // 注意:此字段可能返回 null,表示取不到有效值。 - TKERouteENINonStaticIP *int64 `json:"TKERouteENINonStaticIP,omitempty" name:"TKERouteENINonStaticIP"` - - // TKE共享网卡固定IP模式可支持的Pod数量 - // 注意:此字段可能返回 null,表示取不到有效值。 - TKERouteENIStaticIP *int64 `json:"TKERouteENIStaticIP,omitempty" name:"TKERouteENIStaticIP"` - - // TKE独立网卡模式可支持的Pod数量 - // 注意:此字段可能返回 null,表示取不到有效值。 - TKEDirectENI *int64 `json:"TKEDirectENI,omitempty" name:"TKEDirectENI"` -} - -type PodLimitsInstance struct { - - // 机型所在可用区 - // 注意:此字段可能返回 null,表示取不到有效值。 - Zone *string `json:"Zone,omitempty" name:"Zone"` - - // 机型所属机型族 - // 注意:此字段可能返回 null,表示取不到有效值。 - InstanceFamily *string `json:"InstanceFamily,omitempty" name:"InstanceFamily"` - - // 实例机型名称 - // 注意:此字段可能返回 null,表示取不到有效值。 - InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` - - // 机型可支持的最大VPC-CNI模式Pod数量信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - PodLimits *PodLimitsByType `json:"PodLimits,omitempty" name:"PodLimits"` -} - -type Probe struct { - - // Number of seconds after the container has started before liveness probes are initiated. - // 注意:此字段可能返回 null,表示取不到有效值。 - InitialDelaySeconds *int64 `json:"InitialDelaySeconds,omitempty" name:"InitialDelaySeconds"` - - // Number of seconds after which the probe times out. - // Defaults to 1 second. Minimum value is 1. - // 注意:此字段可能返回 null,表示取不到有效值。 - TimeoutSeconds *int64 `json:"TimeoutSeconds,omitempty" name:"TimeoutSeconds"` - - // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - // 注意:此字段可能返回 null,表示取不到有效值。 - PeriodSeconds *int64 `json:"PeriodSeconds,omitempty" name:"PeriodSeconds"` - - // Minimum consecutive successes for the probe to be considered successful after having failed.Defaults to 1. Must be 1 for liveness. Minimum value is 1. - // 注意:此字段可能返回 null,表示取不到有效值。 - SuccessThreshold *int64 `json:"SuccessThreshold,omitempty" name:"SuccessThreshold"` - - // Minimum consecutive failures for the probe to be considered failed after having succeeded.Defaults to 3. Minimum value is 1. - // 注意:此字段可能返回 null,表示取不到有效值。 - FailureThreshold *int64 `json:"FailureThreshold,omitempty" name:"FailureThreshold"` -} - -type PrometheusAgentOverview struct { - - // 集群类型 - ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` - - // 集群id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // agent状态 - // normal = 正常 - // abnormal = 异常 - Status *string `json:"Status,omitempty" name:"Status"` - - // 集群名称 - ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` - - // 额外labels - // 本集群的所有指标都会带上这几个label - // 注意:此字段可能返回 null,表示取不到有效值。 - ExternalLabels []*Label `json:"ExternalLabels,omitempty" name:"ExternalLabels"` -} - -type PrometheusAlertHistoryItem struct { - - // 告警名称 - RuleName *string `json:"RuleName,omitempty" name:"RuleName"` - - // 告警开始时间 - StartTime *string `json:"StartTime,omitempty" name:"StartTime"` - - // 告警内容 - Content *string `json:"Content,omitempty" name:"Content"` - - // 告警状态 - // 注意:此字段可能返回 null,表示取不到有效值。 - State *string `json:"State,omitempty" name:"State"` - - // 触发的规则名称 - // 注意:此字段可能返回 null,表示取不到有效值。 - RuleItem *string `json:"RuleItem,omitempty" name:"RuleItem"` - - // 告警渠道的id - // 注意:此字段可能返回 null,表示取不到有效值。 - TopicId *string `json:"TopicId,omitempty" name:"TopicId"` - - // 告警渠道的名称 - // 注意:此字段可能返回 null,表示取不到有效值。 - TopicName *string `json:"TopicName,omitempty" name:"TopicName"` -} - -type PrometheusAlertRule struct { - - // 规则名称 - Name *string `json:"Name,omitempty" name:"Name"` - - // prometheus语句 - Rule *string `json:"Rule,omitempty" name:"Rule"` - - // 额外标签 - Labels []*Label `json:"Labels,omitempty" name:"Labels"` - - // 告警发送模板 - Template *string `json:"Template,omitempty" name:"Template"` - - // 持续时间 - For *string `json:"For,omitempty" name:"For"` - - // 该条规则的描述信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - Describe *string `json:"Describe,omitempty" name:"Describe"` - - // 参考prometheus rule中的annotations - // 注意:此字段可能返回 null,表示取不到有效值。 - Annotations []*Label `json:"Annotations,omitempty" name:"Annotations"` - - // 告警规则状态 - // 注意:此字段可能返回 null,表示取不到有效值。 - RuleState *int64 `json:"RuleState,omitempty" name:"RuleState"` -} - -type PrometheusAlertRuleDetail struct { - - // 规则名称 - Name *string `json:"Name,omitempty" name:"Name"` - - // 规则列表 - Rules []*PrometheusAlertRule `json:"Rules,omitempty" name:"Rules"` - - // 最后修改时间 - UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` - - // 告警渠道 - Notification *PrometheusNotification `json:"Notification,omitempty" name:"Notification"` - - // 告警 id - Id *string `json:"Id,omitempty" name:"Id"` - - // 如果该告警来至模板下发,则TemplateId为模板id - // 注意:此字段可能返回 null,表示取不到有效值。 - TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` - - // 计算周期 - // 注意:此字段可能返回 null,表示取不到有效值。 - Interval *string `json:"Interval,omitempty" name:"Interval"` -} - -type PrometheusConfigItem struct { - - // 名称 - Name *string `json:"Name,omitempty" name:"Name"` - - // 配置内容 - Config *string `json:"Config,omitempty" name:"Config"` - - // 用于出参,如果该配置来至模板,则为模板id - // 注意:此字段可能返回 null,表示取不到有效值。 - TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` -} - -type PrometheusGrafanaInfo struct { - - // 是否启用 - Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` - - // 域名,只有开启外网访问才有效果 - Domain *string `json:"Domain,omitempty" name:"Domain"` - - // 内网地址,或者外网地址 - Address *string `json:"Address,omitempty" name:"Address"` - - // 是否开启了外网访问 - // close = 未开启外网访问 - // opening = 正在开启外网访问 - // open = 已开启外网访问 - Internet *string `json:"Internet,omitempty" name:"Internet"` - - // grafana管理员用户名 - AdminUser *string `json:"AdminUser,omitempty" name:"AdminUser"` -} - -type PrometheusInstanceOverview struct { - - // 实例id - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` - - // 实例名称 - Name *string `json:"Name,omitempty" name:"Name"` - - // 实例vpcId - VpcId *string `json:"VpcId,omitempty" name:"VpcId"` - - // 实例子网Id - SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` - - // 实例当前的状态 - // prepare_env = 初始化环境 - // install_suit = 安装组件 - // running = 运行中 - Status *string `json:"Status,omitempty" name:"Status"` - - // COS桶存储 - COSBucket *string `json:"COSBucket,omitempty" name:"COSBucket"` - - // grafana默认地址,如果开启外网访问得为域名,否则为内网地址 - // 注意:此字段可能返回 null,表示取不到有效值。 - GrafanaURL *string `json:"GrafanaURL,omitempty" name:"GrafanaURL"` - - // 关联集群总数 - // 注意:此字段可能返回 null,表示取不到有效值。 - BoundTotal *uint64 `json:"BoundTotal,omitempty" name:"BoundTotal"` - - // 运行正常的集群数 - // 注意:此字段可能返回 null,表示取不到有效值。 - BoundNormal *uint64 `json:"BoundNormal,omitempty" name:"BoundNormal"` -} - -type PrometheusJobTargets struct { - - // 该Job的targets列表 - Targets []*PrometheusTarget `json:"Targets,omitempty" name:"Targets"` - - // job的名称 - JobName *string `json:"JobName,omitempty" name:"JobName"` - - // targets总数 - Total *uint64 `json:"Total,omitempty" name:"Total"` - - // 健康的target总数 - Up *uint64 `json:"Up,omitempty" name:"Up"` -} - -type PrometheusNotification struct { - - // 是否启用 - Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` - - // 收敛时间 - RepeatInterval *string `json:"RepeatInterval,omitempty" name:"RepeatInterval"` - - // 生效起始时间 - TimeRangeStart *string `json:"TimeRangeStart,omitempty" name:"TimeRangeStart"` - - // 生效结束时间 - TimeRangeEnd *string `json:"TimeRangeEnd,omitempty" name:"TimeRangeEnd"` - - // 告警通知方式。目前有SMS、EMAIL、CALL、WECHAT方式。 - // 分别代表:短信、邮件、电话、微信 - // 注意:此字段可能返回 null,表示取不到有效值。 - NotifyWay []*string `json:"NotifyWay,omitempty" name:"NotifyWay"` - - // 告警接收组(用户组) - // 注意:此字段可能返回 null,表示取不到有效值。 - ReceiverGroups []*uint64 `json:"ReceiverGroups,omitempty" name:"ReceiverGroups"` - - // 电话告警顺序。 - // 注:NotifyWay选择CALL,采用该参数。 - // 注意:此字段可能返回 null,表示取不到有效值。 - PhoneNotifyOrder []*uint64 `json:"PhoneNotifyOrder,omitempty" name:"PhoneNotifyOrder"` - - // 电话告警次数。 - // 注:NotifyWay选择CALL,采用该参数。 - // 注意:此字段可能返回 null,表示取不到有效值。 - PhoneCircleTimes *int64 `json:"PhoneCircleTimes,omitempty" name:"PhoneCircleTimes"` - - // 电话告警轮内间隔。单位:秒 - // 注:NotifyWay选择CALL,采用该参数。 - // 注意:此字段可能返回 null,表示取不到有效值。 - PhoneInnerInterval *int64 `json:"PhoneInnerInterval,omitempty" name:"PhoneInnerInterval"` - - // 电话告警轮外间隔。单位:秒 - // 注:NotifyWay选择CALL,采用该参数。 - // 注意:此字段可能返回 null,表示取不到有效值。 - PhoneCircleInterval *int64 `json:"PhoneCircleInterval,omitempty" name:"PhoneCircleInterval"` - - // 电话告警触达通知 - // 注:NotifyWay选择CALL,采用该参数。 - // 注意:此字段可能返回 null,表示取不到有效值。 - PhoneArriveNotice *bool `json:"PhoneArriveNotice,omitempty" name:"PhoneArriveNotice"` - - // 通道类型,默认为amp,支持以下 - // amp - // webhook - // 注意:此字段可能返回 null,表示取不到有效值。 - Type *string `json:"Type,omitempty" name:"Type"` - - // 如果Type为webhook, 则该字段为必填项 - // 注意:此字段可能返回 null,表示取不到有效值。 - WebHook *string `json:"WebHook,omitempty" name:"WebHook"` -} - -type PrometheusTarget struct { - - // 抓取目标的URL - Url *string `json:"Url,omitempty" name:"Url"` - - // target当前状态,当前支持 - // up = 健康 - // down = 不健康 - // unknown = 未知 - State *string `json:"State,omitempty" name:"State"` - - // target的元label - Labels []*Label `json:"Labels,omitempty" name:"Labels"` - - // 上一次抓取的时间 - LastScrape *string `json:"LastScrape,omitempty" name:"LastScrape"` - - // 上一次抓取的耗时,单位是s - ScrapeDuration *float64 `json:"ScrapeDuration,omitempty" name:"ScrapeDuration"` - - // 上一次抓取如果错误,该字段存储错误信息 - Error *string `json:"Error,omitempty" name:"Error"` -} - -type PrometheusTemplate struct { - - // 模板名称 - Name *string `json:"Name,omitempty" name:"Name"` - - // 模板维度,支持以下类型 - // instance 实例级别 - // user 集群级别 - Level *string `json:"Level,omitempty" name:"Level"` - - // 模板描述 - // 注意:此字段可能返回 null,表示取不到有效值。 - Describe *string `json:"Describe,omitempty" name:"Describe"` - - // 当Level为instance时有效, - // 模板中的告警配置列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - AlertRules []*PrometheusAlertRule `json:"AlertRules,omitempty" name:"AlertRules"` - - // 当Level为instance时有效, - // 模板中的聚合规则列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - RecordRules []*PrometheusConfigItem `json:"RecordRules,omitempty" name:"RecordRules"` - - // 当Level为cluster时有效, - // 模板中的ServiceMonitor规则列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - ServiceMonitors []*PrometheusConfigItem `json:"ServiceMonitors,omitempty" name:"ServiceMonitors"` - - // 当Level为cluster时有效, - // 模板中的PodMonitors规则列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - PodMonitors []*PrometheusConfigItem `json:"PodMonitors,omitempty" name:"PodMonitors"` - - // 当Level为cluster时有效, - // 模板中的RawJobs规则列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - RawJobs []*PrometheusConfigItem `json:"RawJobs,omitempty" name:"RawJobs"` - - // 模板的ID, 用于出参 - // 注意:此字段可能返回 null,表示取不到有效值。 - TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` - - // 最近更新时间,用于出参 - // 注意:此字段可能返回 null,表示取不到有效值。 - UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"` - - // 当前版本,用于出参 - // 注意:此字段可能返回 null,表示取不到有效值。 - Version *string `json:"Version,omitempty" name:"Version"` - - // 是否系统提供的默认模板,用于出参 - // 注意:此字段可能返回 null,表示取不到有效值。 - IsDefault *bool `json:"IsDefault,omitempty" name:"IsDefault"` - - // 当Level为instance时有效, - // 模板中的告警配置列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - AlertDetailRules []*PrometheusAlertRuleDetail `json:"AlertDetailRules,omitempty" name:"AlertDetailRules"` -} - -type PrometheusTemplateModify struct { - - // 修改名称 - Name *string `json:"Name,omitempty" name:"Name"` - - // 修改描述 - // 注意:此字段可能返回 null,表示取不到有效值。 - Describe *string `json:"Describe,omitempty" name:"Describe"` - - // 修改内容,只有当模板类型是Alert时生效 - // 注意:此字段可能返回 null,表示取不到有效值。 - AlertRules []*PrometheusAlertRule `json:"AlertRules,omitempty" name:"AlertRules"` - - // 当Level为instance时有效, - // 模板中的聚合规则列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - RecordRules []*PrometheusConfigItem `json:"RecordRules,omitempty" name:"RecordRules"` - - // 当Level为cluster时有效, - // 模板中的ServiceMonitor规则列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - ServiceMonitors []*PrometheusConfigItem `json:"ServiceMonitors,omitempty" name:"ServiceMonitors"` - - // 当Level为cluster时有效, - // 模板中的PodMonitors规则列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - PodMonitors []*PrometheusConfigItem `json:"PodMonitors,omitempty" name:"PodMonitors"` - - // 当Level为cluster时有效, - // 模板中的RawJobs规则列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - RawJobs []*PrometheusConfigItem `json:"RawJobs,omitempty" name:"RawJobs"` - - // 修改内容,只有当模板类型是Alert时生效 - // 注意:此字段可能返回 null,表示取不到有效值。 - AlertDetailRules []*PrometheusAlertRuleDetail `json:"AlertDetailRules,omitempty" name:"AlertDetailRules"` -} - -type PrometheusTemplateSyncTarget struct { - - // 目标所在地域 - Region *string `json:"Region,omitempty" name:"Region"` - - // 目标实例 - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` - - // 集群id,只有当采集模板的Level为cluster的时候需要 - // 注意:此字段可能返回 null,表示取不到有效值。 - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 最后一次同步时间, 用于出参 - // 注意:此字段可能返回 null,表示取不到有效值。 - SyncTime *string `json:"SyncTime,omitempty" name:"SyncTime"` - - // 当前使用的模板版本,用于出参 - // 注意:此字段可能返回 null,表示取不到有效值。 - Version *string `json:"Version,omitempty" name:"Version"` - - // 集群类型,只有当采集模板的Level为cluster的时候需要 - // 注意:此字段可能返回 null,表示取不到有效值。 - ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` - - // 用于出参,实例名称 - // 注意:此字段可能返回 null,表示取不到有效值。 - InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` - - // 用于出参,集群名称 - // 注意:此字段可能返回 null,表示取不到有效值。 - ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` -} - -type RegionInstance struct { - - // 地域名称 - // 注意:此字段可能返回 null,表示取不到有效值。 - RegionName *string `json:"RegionName,omitempty" name:"RegionName"` - - // 地域ID - // 注意:此字段可能返回 null,表示取不到有效值。 - RegionId *int64 `json:"RegionId,omitempty" name:"RegionId"` - - // 地域状态 - // 注意:此字段可能返回 null,表示取不到有效值。 - Status *string `json:"Status,omitempty" name:"Status"` - - // 地域特性开关(按照JSON的形式返回所有属性) - // 注意:此字段可能返回 null,表示取不到有效值。 - FeatureGates *string `json:"FeatureGates,omitempty" name:"FeatureGates"` - - // 地域简称 - // 注意:此字段可能返回 null,表示取不到有效值。 - Alias *string `json:"Alias,omitempty" name:"Alias"` - - // 地域白名单 - // 注意:此字段可能返回 null,表示取不到有效值。 - Remark *string `json:"Remark,omitempty" name:"Remark"` -} - -type RemoveNodeFromNodePoolRequest struct { - *tchttp.BaseRequest - - // 集群id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 节点池id - NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` - - // 节点id列表,一次最多支持100台 - InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` -} - -func (r *RemoveNodeFromNodePoolRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *RemoveNodeFromNodePoolRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "NodePoolId") - delete(f, "InstanceIds") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RemoveNodeFromNodePoolRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type RemoveNodeFromNodePoolResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *RemoveNodeFromNodePoolResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *RemoveNodeFromNodePoolResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type ResourceDeleteOption struct { - - // 资源类型,例如CBS - ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` - - // 集群删除时资源的删除模式:terminate(销毁),retain (保留) - DeleteMode *string `json:"DeleteMode,omitempty" name:"DeleteMode"` -} - -type RestartEKSContainerInstancesRequest struct { - *tchttp.BaseRequest - - // EKS instance ids - EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` -} - -func (r *RestartEKSContainerInstancesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *RestartEKSContainerInstancesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "EksCiIds") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RestartEKSContainerInstancesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type RestartEKSContainerInstancesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *RestartEKSContainerInstancesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *RestartEKSContainerInstancesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type RouteInfo struct { - - // 路由表名称。 - RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` - - // 目的端CIDR。 - DestinationCidrBlock *string `json:"DestinationCidrBlock,omitempty" name:"DestinationCidrBlock"` - - // 下一跳地址。 - GatewayIp *string `json:"GatewayIp,omitempty" name:"GatewayIp"` -} - -type RouteTableConflict struct { - - // 路由表类型。 - RouteTableType *string `json:"RouteTableType,omitempty" name:"RouteTableType"` - - // 路由表CIDR。 - // 注意:此字段可能返回 null,表示取不到有效值。 - RouteTableCidrBlock *string `json:"RouteTableCidrBlock,omitempty" name:"RouteTableCidrBlock"` - - // 路由表名称。 - // 注意:此字段可能返回 null,表示取不到有效值。 - RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` - - // 路由表ID。 - // 注意:此字段可能返回 null,表示取不到有效值。 - RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` -} - -type RouteTableInfo struct { - - // 路由表名称。 - RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` - - // 路由表CIDR。 - RouteTableCidrBlock *string `json:"RouteTableCidrBlock,omitempty" name:"RouteTableCidrBlock"` - - // VPC实例ID。 - VpcId *string `json:"VpcId,omitempty" name:"VpcId"` -} - -type RunAutomationServiceEnabled struct { - - // 是否开启云自动化助手。取值范围:
  • TRUE:表示开启云自动化助手服务
  • FALSE:表示不开启云自动化助手服务

    默认取值:FALSE。 - Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` -} - -type RunInstancesForNode struct { - - // 节点角色,取值:MASTER_ETCD, WORKER。MASTER_ETCD只有在创建 INDEPENDENT_CLUSTER 独立集群时需要指定。MASTER_ETCD节点数量为3~7,建议为奇数。MASTER_ETCD节点最小配置为4C8G。 - NodeRole *string `json:"NodeRole,omitempty" name:"NodeRole"` - - // CVM创建透传参数,json化字符串格式,详见[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口,传入公共参数外的其他参数即可,其中ImageId会替换为TKE集群OS对应的镜像。 - RunInstancesPara []*string `json:"RunInstancesPara,omitempty" name:"RunInstancesPara"` - - // 节点高级设置,该参数会覆盖集群级别设置的InstanceAdvancedSettings,和上边的RunInstancesPara按照顺序一一对应(当前只对节点自定义参数ExtraArgs生效)。 - InstanceAdvancedSettingsOverrides []*InstanceAdvancedSettings `json:"InstanceAdvancedSettingsOverrides,omitempty" name:"InstanceAdvancedSettingsOverrides"` -} - -type RunMonitorServiceEnabled struct { - - // 是否开启[云监控](/document/product/248)服务。取值范围:
  • TRUE:表示开启云监控服务
  • FALSE:表示不开启云监控服务

    默认取值:TRUE。 - Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` -} - -type RunSecurityServiceEnabled struct { - - // 是否开启[云安全](/document/product/296)服务。取值范围:
  • TRUE:表示开启云安全服务
  • FALSE:表示不开启云安全服务

    默认取值:TRUE。 - Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` -} - -type ScaleInClusterMasterRequest struct { - *tchttp.BaseRequest - - // 集群实例ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // master缩容选项 - ScaleInMasters []*ScaleInMaster `json:"ScaleInMasters,omitempty" name:"ScaleInMasters"` -} - -func (r *ScaleInClusterMasterRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ScaleInClusterMasterRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "ScaleInMasters") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ScaleInClusterMasterRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type ScaleInClusterMasterResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *ScaleInClusterMasterResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ScaleInClusterMasterResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type ScaleInMaster struct { - - // 实例ID - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` - - // 缩容的实例角色:MASTER,ETCD,MASTER_ETCD - NodeRole *string `json:"NodeRole,omitempty" name:"NodeRole"` - - // 实例的保留模式 - InstanceDeleteMode *string `json:"InstanceDeleteMode,omitempty" name:"InstanceDeleteMode"` -} - -type ScaleOutClusterMasterRequest struct { - *tchttp.BaseRequest - - // 集群实例ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 新建节点参数 - RunInstancesForNode []*RunInstancesForNode `json:"RunInstancesForNode,omitempty" name:"RunInstancesForNode"` - - // 添加已有节点相关参数 - ExistedInstancesForNode []*ExistedInstancesForNode `json:"ExistedInstancesForNode,omitempty" name:"ExistedInstancesForNode"` - - // 实例高级设置 - InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` - - // 集群master组件自定义参数 - ExtraArgs *ClusterExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` -} - -func (r *ScaleOutClusterMasterRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ScaleOutClusterMasterRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "RunInstancesForNode") - delete(f, "ExistedInstancesForNode") - delete(f, "InstanceAdvancedSettings") - delete(f, "ExtraArgs") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ScaleOutClusterMasterRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type ScaleOutClusterMasterResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *ScaleOutClusterMasterResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *ScaleOutClusterMasterResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type SecurityContext struct { - - // 安全能力清单 - // 注意:此字段可能返回 null,表示取不到有效值。 - Capabilities *Capabilities `json:"Capabilities,omitempty" name:"Capabilities"` -} - -type ServiceAccountAuthenticationOptions struct { - - // service-account-issuer - // 注意:此字段可能返回 null,表示取不到有效值。 - Issuer *string `json:"Issuer,omitempty" name:"Issuer"` - - // service-account-jwks-uri - // 注意:此字段可能返回 null,表示取不到有效值。 - JWKSURI *string `json:"JWKSURI,omitempty" name:"JWKSURI"` - - // 如果为true,则会自动创建允许匿名用户访问'/.well-known/openid-configuration'和/openid/v1/jwks的rbac规则 - // 注意:此字段可能返回 null,表示取不到有效值。 - AutoCreateDiscoveryAnonymousAuth *bool `json:"AutoCreateDiscoveryAnonymousAuth,omitempty" name:"AutoCreateDiscoveryAnonymousAuth"` -} - -type SetNodePoolNodeProtectionRequest struct { - *tchttp.BaseRequest - - // 集群id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 节点池id - NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` - - // 节点id - InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` - - // 节点是否需要移出保护 - ProtectedFromScaleIn *bool `json:"ProtectedFromScaleIn,omitempty" name:"ProtectedFromScaleIn"` -} - -func (r *SetNodePoolNodeProtectionRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *SetNodePoolNodeProtectionRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "NodePoolId") - delete(f, "InstanceIds") - delete(f, "ProtectedFromScaleIn") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "SetNodePoolNodeProtectionRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type SetNodePoolNodeProtectionResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 成功设置的节点id - // 注意:此字段可能返回 null,表示取不到有效值。 - SucceedInstanceIds []*string `json:"SucceedInstanceIds,omitempty" name:"SucceedInstanceIds"` - - // 没有成功设置的节点id - // 注意:此字段可能返回 null,表示取不到有效值。 - FailedInstanceIds []*string `json:"FailedInstanceIds,omitempty" name:"FailedInstanceIds"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *SetNodePoolNodeProtectionResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *SetNodePoolNodeProtectionResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type SyncPrometheusTemplateRequest struct { - *tchttp.BaseRequest - - // 实例id - TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` - - // 同步目标 - Targets []*PrometheusTemplateSyncTarget `json:"Targets,omitempty" name:"Targets"` -} - -func (r *SyncPrometheusTemplateRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *SyncPrometheusTemplateRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "TemplateId") - delete(f, "Targets") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "SyncPrometheusTemplateRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type SyncPrometheusTemplateResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *SyncPrometheusTemplateResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *SyncPrometheusTemplateResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type Tag struct { - - // 标签键 - Key *string `json:"Key,omitempty" name:"Key"` - - // 标签值 - Value *string `json:"Value,omitempty" name:"Value"` -} - -type TagSpecification struct { - - // 标签绑定的资源类型,当前支持类型:"user" - // 注意:此字段可能返回 null,表示取不到有效值。 - ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` - - // 标签对列表 - // 注意:此字段可能返回 null,表示取不到有效值。 - Tags []*Tag `json:"Tags,omitempty" name:"Tags"` -} - -type Taint struct { - - // Key - Key *string `json:"Key,omitempty" name:"Key"` - - // Value - Value *string `json:"Value,omitempty" name:"Value"` - - // Effect - Effect *string `json:"Effect,omitempty" name:"Effect"` -} - -type TaskStepInfo struct { - - // 步骤名称 - Step *string `json:"Step,omitempty" name:"Step"` - - // 生命周期 - // pending : 步骤未开始 - // running: 步骤执行中 - // success: 步骤成功完成 - // failed: 步骤失败 - LifeState *string `json:"LifeState,omitempty" name:"LifeState"` - - // 步骤开始时间 - // 注意:此字段可能返回 null,表示取不到有效值。 - StartAt *string `json:"StartAt,omitempty" name:"StartAt"` - - // 步骤结束时间 - // 注意:此字段可能返回 null,表示取不到有效值。 - EndAt *string `json:"EndAt,omitempty" name:"EndAt"` - - // 若步骤生命周期为failed,则此字段显示错误信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - FailedMsg *string `json:"FailedMsg,omitempty" name:"FailedMsg"` -} - -type TcpSocket struct { - - // TcpSocket检测的端口 - // 注意:此字段可能返回 null,表示取不到有效值。 - Port *uint64 `json:"Port,omitempty" name:"Port"` -} - -type UpdateClusterVersionRequest struct { - *tchttp.BaseRequest - - // 集群 Id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 需要升级到的版本 - DstVersion *string `json:"DstVersion,omitempty" name:"DstVersion"` - - // 集群自定义参数 - ExtraArgs *ClusterExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` - - // 可容忍的最大不可用pod数目 - MaxNotReadyPercent *float64 `json:"MaxNotReadyPercent,omitempty" name:"MaxNotReadyPercent"` - - // 是否跳过预检查阶段 - SkipPreCheck *bool `json:"SkipPreCheck,omitempty" name:"SkipPreCheck"` -} - -func (r *UpdateClusterVersionRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *UpdateClusterVersionRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "DstVersion") - delete(f, "ExtraArgs") - delete(f, "MaxNotReadyPercent") - delete(f, "SkipPreCheck") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateClusterVersionRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type UpdateClusterVersionResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *UpdateClusterVersionResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *UpdateClusterVersionResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type UpdateEKSClusterRequest struct { - *tchttp.BaseRequest - - // 弹性集群Id - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 弹性集群名称 - ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` - - // 弹性集群描述信息 - ClusterDesc *string `json:"ClusterDesc,omitempty" name:"ClusterDesc"` - - // 子网Id 列表 - SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` - - // 弹性容器集群公网访问LB信息 - PublicLB *ClusterPublicLB `json:"PublicLB,omitempty" name:"PublicLB"` - - // 弹性容器集群内网访问LB信息 - InternalLB *ClusterInternalLB `json:"InternalLB,omitempty" name:"InternalLB"` - - // Service 子网Id - ServiceSubnetId *string `json:"ServiceSubnetId,omitempty" name:"ServiceSubnetId"` - - // 集群自定义的dns 服务器信息 - DnsServers []*DnsServerConf `json:"DnsServers,omitempty" name:"DnsServers"` - - // 是否清空自定义dns 服务器设置。为1 表示 是。其他表示 否。 - ClearDnsServer *string `json:"ClearDnsServer,omitempty" name:"ClearDnsServer"` - - // 将来删除集群时是否要删除cbs。默认为 FALSE - NeedDeleteCbs *bool `json:"NeedDeleteCbs,omitempty" name:"NeedDeleteCbs"` - - // 标记是否是新的内外网。默认为false - ProxyLB *bool `json:"ProxyLB,omitempty" name:"ProxyLB"` - - // 扩展参数。须是map[string]string 的json 格式。 - ExtraParam *string `json:"ExtraParam,omitempty" name:"ExtraParam"` -} - -func (r *UpdateEKSClusterRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *UpdateEKSClusterRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "ClusterName") - delete(f, "ClusterDesc") - delete(f, "SubnetIds") - delete(f, "PublicLB") - delete(f, "InternalLB") - delete(f, "ServiceSubnetId") - delete(f, "DnsServers") - delete(f, "ClearDnsServer") - delete(f, "NeedDeleteCbs") - delete(f, "ProxyLB") - delete(f, "ExtraParam") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateEKSClusterRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type UpdateEKSClusterResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *UpdateEKSClusterResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *UpdateEKSClusterResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type UpdateEKSContainerInstanceRequest struct { - /*********PCM param************/ - RequestSource string `position:"Query" name:"RequestSource"` - ProviderId int32 `position:"Query" name:"ProviderId"` - AccountName string `position:"Query" name:"AccountName"` - Namespace string `position:"Query" name:"Namespace"` - ContainerGroupName string `position:"Query" name:"ContainerGroupName"` - RegionId string `position:"Query" name:"RegionId"` - /*********PCM param************/ - - *tchttp.BaseRequest - - // 容器实例 ID - EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` - - // 实例重启策略: Always(总是重启)、Never(从不重启)、OnFailure(失败时重启) - RestartPolicy *string `json:"RestartPolicy,omitempty" name:"RestartPolicy"` - - // 数据卷,包含NfsVolume数组和CbsVolume数组 - EksCiVolume *EksCiVolume `json:"EksCiVolume,omitempty" name:"EksCiVolume"` - - // 容器组 - Containers []*Container `json:"Containers,omitempty" name:"Containers"` - - // Init 容器组 - InitContainers []*Container `json:"InitContainers,omitempty" name:"InitContainers"` - - // 容器实例名称 - Name *string `json:"Name,omitempty" name:"Name"` - - // 镜像仓库凭证数组 - ImageRegistryCredentials []*ImageRegistryCredential `json:"ImageRegistryCredentials,omitempty" name:"ImageRegistryCredentials"` -} - -func (r *UpdateEKSContainerInstanceRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *UpdateEKSContainerInstanceRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "EksCiId") - delete(f, "RestartPolicy") - delete(f, "EksCiVolume") - delete(f, "Containers") - delete(f, "InitContainers") - delete(f, "Name") - delete(f, "ImageRegistryCredentials") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateEKSContainerInstanceRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type UpdateEKSContainerInstanceResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 容器实例 ID - // 注意:此字段可能返回 null,表示取不到有效值。 - EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *UpdateEKSContainerInstanceResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *UpdateEKSContainerInstanceResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type UpdateImageCacheRequest struct { - *tchttp.BaseRequest - - // 镜像缓存Id - ImageCacheId *string `json:"ImageCacheId,omitempty" name:"ImageCacheId"` - - // 镜像缓存名称 - ImageCacheName *string `json:"ImageCacheName,omitempty" name:"ImageCacheName"` -} - -func (r *UpdateImageCacheRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *UpdateImageCacheRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ImageCacheId") - delete(f, "ImageCacheName") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateImageCacheRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type UpdateImageCacheResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *UpdateImageCacheResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *UpdateImageCacheResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type UpgradeAbleInstancesItem struct { - - // 节点Id - InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` - - // 节点的当前版本 - Version *string `json:"Version,omitempty" name:"Version"` - - // 当前版本的最新小版本 - // 注意:此字段可能返回 null,表示取不到有效值。 - LatestVersion *string `json:"LatestVersion,omitempty" name:"LatestVersion"` -} - -type UpgradeClusterInstancesRequest struct { - *tchttp.BaseRequest - - // 集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // create 表示开始一次升级任务 - // pause 表示停止任务 - // resume表示继续任务 - // abort表示终止任务 - Operation *string `json:"Operation,omitempty" name:"Operation"` - - // 升级类型,只有Operation是create需要设置 - // reset 大版本重装升级 - // hot 小版本热升级 - // major 大版本原地升级 - UpgradeType *string `json:"UpgradeType,omitempty" name:"UpgradeType"` - - // 需要升级的节点列表 - InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` - - // 当节点重新加入集群时候所使用的参数,参考添加已有节点接口 - ResetParam *UpgradeNodeResetParam `json:"ResetParam,omitempty" name:"ResetParam"` - - // 是否忽略节点升级前检查 - SkipPreCheck *bool `json:"SkipPreCheck,omitempty" name:"SkipPreCheck"` - - // 最大可容忍的不可用Pod比例 - MaxNotReadyPercent *float64 `json:"MaxNotReadyPercent,omitempty" name:"MaxNotReadyPercent"` -} - -func (r *UpgradeClusterInstancesRequest) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *UpgradeClusterInstancesRequest) FromJsonString(s string) error { - f := make(map[string]interface{}) - if err := json.Unmarshal([]byte(s), &f); err != nil { - return err - } - delete(f, "ClusterId") - delete(f, "Operation") - delete(f, "UpgradeType") - delete(f, "InstanceIds") - delete(f, "ResetParam") - delete(f, "SkipPreCheck") - delete(f, "MaxNotReadyPercent") - if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpgradeClusterInstancesRequest has unknown keys!", "") - } - return json.Unmarshal([]byte(s), &r) -} - -type UpgradeClusterInstancesResponse struct { - *tchttp.BaseResponse - Response *struct { - - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} - -func (r *UpgradeClusterInstancesResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) -} - -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *UpgradeClusterInstancesResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) -} - -type UpgradeNodeResetParam struct { - - // 实例额外需要设置参数信息 - InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` - - // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 - EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` - - // 节点登录信息(目前仅支持使用Password或者单个KeyIds) - LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` - - // 实例所属安全组。该参数可以通过调用 DescribeSecurityGroups 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。(目前仅支持设置单个sgId) - SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` -} - -type VersionInstance struct { - - // 版本名称 - // 注意:此字段可能返回 null,表示取不到有效值。 - Name *string `json:"Name,omitempty" name:"Name"` - - // 版本信息 - // 注意:此字段可能返回 null,表示取不到有效值。 - Version *string `json:"Version,omitempty" name:"Version"` - - // Remark - // 注意:此字段可能返回 null,表示取不到有效值。 - Remark *string `json:"Remark,omitempty" name:"Remark"` -} - -type VolumeMount struct { - - // volume名称 - // 注意:此字段可能返回 null,表示取不到有效值。 - Name *string `json:"Name,omitempty" name:"Name"` - - // 挂载路径 - // 注意:此字段可能返回 null,表示取不到有效值。 - MountPath *string `json:"MountPath,omitempty" name:"MountPath"` - - // 是否只读 - // 注意:此字段可能返回 null,表示取不到有效值。 - ReadOnly *bool `json:"ReadOnly,omitempty" name:"ReadOnly"` - - // 子路径 - // 注意:此字段可能返回 null,表示取不到有效值。 - SubPath *string `json:"SubPath,omitempty" name:"SubPath"` - - // 传播挂载方式 - // 注意:此字段可能返回 null,表示取不到有效值。 - MountPropagation *string `json:"MountPropagation,omitempty" name:"MountPropagation"` - - // 子路径表达式 - // 注意:此字段可能返回 null,表示取不到有效值。 - SubPathExpr *string `json:"SubPathExpr,omitempty" name:"SubPathExpr"` -} diff --git a/adaptor/pcm_pod/service/ali_eci.go b/adaptor/pcm_pod/service/ali_eci.go deleted file mode 100644 index efd2e3190..000000000 --- a/adaptor/pcm_pod/service/ali_eci.go +++ /dev/null @@ -1,217 +0,0 @@ -package poder - -import ( - pbpod "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/gen/idl" - "context" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" - alieci "github.com/aliyun/alibaba-cloud-sdk-go/services/eci" - "github.com/bitly/go-simplejson" - "github.com/golang/glog" - "strconv" - "sync" - - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - "github.com/pkg/errors" -) - -var aliClientMutex sync.Mutex - -type AliEci struct { - cli *alieci.Client - region tenanter.Region - tenanter tenanter.Tenanter -} - -func (eci *AliEci) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) { - - regions := make([]*pbpod.Region, 0) - - requestRegion := requests.NewCommonRequest() - requestRegion.Method = "POST" - requestRegion.Scheme = "https" // https | http - requestRegion.Domain = "eci.aliyuncs.com" - requestRegion.Version = "2018-08-08" - requestRegion.ApiName = "DescribeRegions" - //这里需要给一个空字符串的RegionId - requestRegion.QueryParams["RegionId"] = "" - - resp, err := eci.cli.ProcessCommonRequest(requestRegion) - - var respRegion *simplejson.Json - respRegion, err = simplejson.NewJson([]byte(resp.GetHttpContentString())) - if err != nil { - panic("解析失败") - } - - i := 0 - for i < len(respRegion.Get("Regions").MustArray()) { - regionsJson := respRegion.Get("Regions").GetIndex(i) - regionName, _ := regionsJson.Get("RegionId").String() - regionId, _ := tenanter.GetAliRegionId(regionName) - regionPod := &pbpod.Region{ - Id: regionId, - Name: regionName, - } - regions = append(regions, regionPod) - i++ - } - - return &pbpod.GetPodRegionResp{Regions: regions}, nil - -} - -func newAliEciClient(region tenanter.Region, tenant tenanter.Tenanter) (Poder, error) { - var ( - client *alieci.Client - err error - ) - - switch t := tenant.(type) { - case *tenanter.AccessKeyTenant: - aliClientMutex.Lock() - client, err = alieci.NewClientWithAccessKey(region.GetName(), t.GetId(), t.GetSecret()) - aliClientMutex.Unlock() - default: - } - - if err != nil { - return nil, errors.Wrap(err, "init ali ecs client error") - } - - return &AliEci{ - cli: client, - region: region, - tenanter: tenant, - }, nil -} - -func (eci *AliEci) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodResp, error) { - request := alieci.CreateCreateContainerGroupRequest() - request.RegionId = eci.region.GetName() - request.ContainerGroupName = req.PodName - requestContainer := make([]alieci.CreateContainerGroupContainer, 1) - requestContainer[0].Image = req.ContainerImage - requestContainer[0].Name = req.ContainerName - requestContainer[0].Cpu = requests.Float(req.CpuPod) - requestContainer[0].Memory = requests.Float(req.MemoryPod) - request.Container = &requestContainer - - resp, err := eci.cli.CreateContainerGroup(request) - if err != nil { - return nil, errors.Wrap(err, "Aliyun CreatePod error") - } - - isFinished := false - if len(resp.ContainerGroupId) > 0 { - isFinished = true - } - glog.Infof("--------------------Aliyun ECI Instance created--------------------") - - return &pbpod.CreatePodResp{ - Finished: isFinished, - RequestId: "Create Ali pcm_pod request ID:" + resp.RequestId, - PodId: resp.ContainerGroupId, - PodName: req.PodName, - }, nil -} - -func (eci *AliEci) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) { - - deleteContainerGroupRequest := alieci.CreateDeleteContainerGroupRequest() - deleteContainerGroupRequest.RegionId = eci.region.GetName() - deleteContainerGroupRequest.ContainerGroupId = req.PcmId - - resp, err := eci.cli.DeleteContainerGroup(deleteContainerGroupRequest) - isFinished := true - if err != nil { - isFinished = false - return nil, err - } - - glog.Infof("--------------------Aliyun ECI Instance deleted--------------------") - - return &pbpod.DeletePodResp{ - Finished: isFinished, - RequestId: "Delete Ali pcm_pod request ID:" + resp.RequestId, - PodId: req.PodId, - PodName: req.PodName, - }, nil -} - -func (eci *AliEci) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) { - - updateContainerGroupRequest := alieci.CreateUpdateContainerGroupRequest() - updateContainerGroupRequest.RegionId = eci.region.GetName() - updateContainerGroupRequest.ContainerGroupId = req.PcmId - - updateContainerRequestContainer := make([]alieci.UpdateContainerGroupContainer, 1) - updateContainerRequestContainer[0].Image = req.ContainerImage - updateContainerRequestContainer[0].Name = req.ContainerName - updateContainerRequestContainer[0].Cpu = requests.Float(req.CpuPod) - updateContainerRequestContainer[0].Memory = requests.Float(req.MemoryPod) - updateContainerGroupRequest.Container = &updateContainerRequestContainer - updateContainerGroupRequest.RestartPolicy = req.RestartPolicy - - resp, err := eci.cli.UpdateContainerGroup(updateContainerGroupRequest) - isFinished := true - if err != nil { - isFinished = false - return nil, err - } - - glog.Infof("--------------------Aliyun ECI Instance updated--------------------") - - return &pbpod.UpdatePodResp{ - Finished: isFinished, - RequestId: "Update Ali pcm_pod request ID:" + resp.RequestId, - PodId: req.PodId, - PodName: req.PodName, - }, nil -} - -func (eci *AliEci) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) { - request := alieci.CreateDescribeContainerGroupsRequest() - request.NextToken = req.NextToken - resp, err := eci.cli.DescribeContainerGroups(request) - - if err != nil { - return nil, err - } - - var ecies = make([]*pbpod.PodInstance, len(resp.ContainerGroups)) - for k, v := range resp.ContainerGroups { - ecies[k] = &pbpod.PodInstance{ - Provider: pbpod.CloudProvider_ali, - AccountName: eci.tenanter.AccountName(), - PcmId: v.ContainerGroupId, - PodId: v.ContainerGroupId, - PodName: v.ContainerGroupName, - RegionId: eci.region.GetId(), - RegionName: v.RegionId, - ContainerImage: v.Containers[0].Image, - ContainerName: v.Containers[0].Name, - CpuPod: strconv.FormatFloat(float64(v.Cpu), 'f', 6, 64), - MemoryPod: strconv.FormatFloat(float64(v.Memory), 'f', 6, 64), - SecurityGroupId: v.SecurityGroupId, - SubnetId: v.InternetIp, - VpcId: v.VpcId, - Namespace: "", - Status: v.Status, - } - - } - - isFinished := false - if len(ecies) < int(req.PageSize) { - isFinished = true - } - - return &pbpod.ListPodDetailResp{ - Pods: ecies, - Finished: isFinished, - PageNumber: req.PageNumber + 1, - PageSize: req.PageSize, - NextToken: resp.NextToken, - RequestId: resp.RequestId, - }, nil -} diff --git a/adaptor/pcm_pod/service/huawei_cci.go b/adaptor/pcm_pod/service/huawei_cci.go deleted file mode 100644 index a72d94998..000000000 --- a/adaptor/pcm_pod/service/huawei_cci.go +++ /dev/null @@ -1,244 +0,0 @@ -package poder - -import ( - pbpod "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/gen/idl" - "context" - "fmt" - util "github.com/alibabacloud-go/tea-utils/service" - "sync" - - "k8s.io/apimachinery/pkg/api/resource" - - "github.com/golang/glog" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - corev1 "k8s.io/api/core/v1" - huaweicci "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/tools/clientcmd/api" - - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - "github.com/pkg/errors" -) - -var huaweiClientMutex sync.Mutex - -type HuaweiCci struct { - cli *huaweicci.Clientset - region tenanter.Region - tenanter tenanter.Tenanter -} - -func (cci *HuaweiCci) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) { - //todo - var ( - regions []*pbpod.Region - ) - huaweiRegionName, _ := tenanter.GetHuaweiRegionName(5) - region := &pbpod.Region{ - Id: 5, - Name: huaweiRegionName, - } - regions = append(regions, region) - resp := &pbpod.GetPodRegionResp{ - Regions: regions, - } - - return resp, nil -} - -// CCI auth through iam -const ( - apiVersion = "client.authentication.k8s.io/v1beta1" - iamEndpoint = "https://iam.myhuaweicloud.com" -) - -func newHuaweiCciClient(region tenanter.Region, tenant tenanter.Tenanter) (Poder, error) { - var ( - client *huaweicci.Clientset - err error - ) - cciEndpoint := "https://cci." + region.GetName() + ".myhuaweicloud.com" - cciConfig, err := clientcmd.BuildConfigFromFlags(cciEndpoint, "") - if err != nil { - return nil, err - } - - switch t := tenant.(type) { - case *tenanter.AccessKeyTenant: - huaweiClientMutex.Lock() - var optionArgs []string - optionArgs = append(optionArgs, fmt.Sprintf("--iam-endpoint=%s", iamEndpoint)) - optionArgs = append(optionArgs, fmt.Sprintf("--project-name=%s", region.GetName())) - optionArgs = append(optionArgs, fmt.Sprintf("--ak=%s", t.GetId())) - optionArgs = append(optionArgs, fmt.Sprintf("--sk=%s", t.GetSecret())) - cciConfig.ExecProvider = &api.ExecConfig{ - Command: "cci-iam-authenticator", - APIVersion: apiVersion, - Args: append([]string{"token"}, optionArgs...), - Env: make([]api.ExecEnvVar, 0), - } - client, err = huaweicci.NewForConfig(cciConfig) - huaweiClientMutex.Unlock() - default: - } - - if err != nil { - return nil, errors.Wrap(err, "init huawei pcm_pod client error") - } - - return &HuaweiCci{ - cli: client, - region: region, - tenanter: tenant, - }, nil -} - -func (cci *HuaweiCci) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodResp, error) { - pod := corev1.Pod{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "core/V1", - Kind: "Pod", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: req.PodName, - Namespace: req.Namespace, - Labels: map[string]string{"name": "test_api"}, - }, - Spec: corev1.PodSpec{ - RestartPolicy: corev1.RestartPolicyAlways, - Containers: []corev1.Container{ - { - Name: req.ContainerName, - Image: req.ContainerImage, - Resources: corev1.ResourceRequirements{ - Limits: map[corev1.ResourceName]resource.Quantity{ - corev1.ResourceCPU: resource.MustParse(req.CpuPod), - corev1.ResourceMemory: resource.MustParse(req.MemoryPod), - }, - }, - }, - }, - }, - Status: corev1.PodStatus{}, - } - - resp, err := cci.cli.CoreV1().Pods(req.Namespace).Create(context.TODO(), &pod, metav1.CreateOptions{}) - if err != nil { - return nil, err - } - - isFinished := false - if len(resp.UID) > 0 { - isFinished = true - } - - glog.Infof("--------------------Huawei CCI Instance created--------------------") - - return &pbpod.CreatePodResp{ - Finished: isFinished, - RequestId: "Create huawei pcm_pod request ID:" + resp.GenerateName, - PodId: string(resp.Generation), - PodName: resp.Name, - }, nil -} - -func (cci *HuaweiCci) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) { - - err := cci.cli.CoreV1().Pods(req.GetNamespace()).Delete(context.TODO(), req.PcmId, metav1.DeleteOptions{}) - - isFinished := true - if err != nil { - return nil, err - } - - glog.Infof("--------------------Huawei CCI Instance deleted--------------------") - glog.Infof(*util.ToJSONString(util.ToMap(err))) - - return &pbpod.DeletePodResp{ - Finished: isFinished, - RequestId: "Delete huawei pcm_pod request ID:" + req.PodName, - PodId: req.PodName, - PodName: req.PodName, - }, nil -} - -func (cci *HuaweiCci) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) { - - qresp, err := cci.cli.CoreV1().Pods(req.GetNamespace()).Get(context.TODO(), req.PcmId, metav1.GetOptions{}) - if err != nil { - return nil, err - } - pod := corev1.Pod{ - TypeMeta: qresp.TypeMeta, - ObjectMeta: metav1.ObjectMeta{ - Name: req.PcmId, - Namespace: req.Namespace, - Labels: map[string]string{"name": req.Labels}, - }, - Spec: qresp.Spec, - Status: qresp.Status, - } - pod.Spec.Containers[0].Image = req.ContainerImage - resp, err := cci.cli.CoreV1().Pods(req.Namespace).Update(context.TODO(), &pod, metav1.UpdateOptions{}) - glog.Info("Huawei update pcm_pod resp", resp) - if err != nil { - return nil, errors.Wrap(err, "Huaweiyun UpdatePod error") - } - - glog.Infof("--------------------Huawei CCI Instance updated--------------------") - - isFinished := false - if len(resp.UID) > 0 { - isFinished = true - } - - return &pbpod.UpdatePodResp{ - Finished: isFinished, - RequestId: "Update huawei pcm_pod request ID:" + resp.GenerateName, - PodId: string(resp.Generation), - PodName: resp.Name, - }, nil -} - -func (cci *HuaweiCci) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) { - - resp, err := cci.cli.CoreV1().Pods(req.GetNamespace()).List(context.TODO(), metav1.ListOptions{}) - - if err != nil { - return nil, err - } - glog.Info("Huaweiyun ListDetail pcm_pod success", resp.Items) - var pods = make([]*pbpod.PodInstance, len(resp.Items)) - for k, v := range resp.Items { - pods[k] = &pbpod.PodInstance{ - Provider: pbpod.CloudProvider_huawei, - AccountName: cci.tenanter.AccountName(), - PcmId: v.Name, - PodId: string(v.GetUID()), - PodName: v.Name, - RegionId: cci.region.GetId(), - ContainerImage: v.Spec.Containers[0].Image, - ContainerName: v.Spec.Containers[0].Name, - CpuPod: v.Spec.Containers[0].Resources.Requests.Cpu().String(), - MemoryPod: v.Spec.Containers[0].Resources.Requests.Memory().String(), - Namespace: v.Namespace, - Status: string(v.Status.Phase), - } - } - - glog.Infof("--------------------Huawei CCI Instance updated--------------------") - - isFinished := false - if len(pods) < int(req.PageSize) { - isFinished = true - } - - return &pbpod.ListPodDetailResp{ - Pods: pods, - Finished: isFinished, - PageNumber: req.PageNumber + 1, - PageSize: req.PageSize, - }, nil -} diff --git a/adaptor/pcm_pod/service/k8s.go b/adaptor/pcm_pod/service/k8s.go deleted file mode 100644 index d4bb8bfa1..000000000 --- a/adaptor/pcm_pod/service/k8s.go +++ /dev/null @@ -1,231 +0,0 @@ -package poder - -import ( - pbpod "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - "context" - "fmt" - "github.com/golang/glog" - "github.com/pkg/errors" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - k8s "k8s.io/client-go/kubernetes" - "k8s.io/client-go/rest" - "sync" -) - -var k8sClientMutex sync.Mutex - -type Config struct { - Host string - Token string - Port int -} - -type K8SPoder struct { - cli *k8s.Clientset - region tenanter.Region - tenanter tenanter.Tenanter -} - -func (k K8SPoder) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) { - //todo - var ( - regions []*pbpod.Region - ) - huaweiRegionName, _ := tenanter.GetK8SRegionName(0) - region := &pbpod.Region{ - Id: 0, - Name: huaweiRegionName, - } - regions = append(regions, region) - resp := &pbpod.GetPodRegionResp{ - Regions: regions, - } - - return resp, nil -} - -func newK8SClient(tenant tenanter.Tenanter) (Poder, error) { - var ( - client *k8s.Clientset - err error - ) - - switch t := tenant.(type) { - case *tenanter.AccessKeyTenant: - - kubeConf := &rest.Config{ - Host: fmt.Sprintf("%s:%d", t.GetUrl(), 6443), - BearerToken: t.GetToken(), - TLSClientConfig: rest.TLSClientConfig{ - Insecure: true, - }, - } - k8sClientMutex.Lock() - client, err = k8s.NewForConfig(kubeConf) - k8sClientMutex.Unlock() - default: - - } - - if err != nil { - return nil, errors.Wrap(err, "init k8s client error") - } - - return &K8SPoder{ - cli: client, - region: nil, - tenanter: tenant, - }, nil -} - -func (k *K8SPoder) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodResp, error) { - - pod := corev1.Pod{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "core/V1", - Kind: "Pod", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: req.PodName, - Namespace: req.Namespace, - Labels: map[string]string{"name": "test_api"}, - }, - Spec: corev1.PodSpec{ - RestartPolicy: corev1.RestartPolicyAlways, - Containers: []corev1.Container{ - { - Name: req.ContainerName, - Image: req.ContainerImage, - Resources: corev1.ResourceRequirements{ - Limits: map[corev1.ResourceName]resource.Quantity{ - corev1.ResourceCPU: resource.MustParse(req.CpuPod), - corev1.ResourceMemory: resource.MustParse(req.MemoryPod), - }, - }, - }, - }, - }, - Status: corev1.PodStatus{}, - } - - resp, err := k.cli.CoreV1().Pods(req.Namespace).Create(context.TODO(), &pod, metav1.CreateOptions{}) - if err != nil { - return nil, err - } - - glog.Infof("--------------------K8S Pod Instance created--------------------") - - isFinished := false - if len(resp.UID) > 0 { - isFinished = true - } - - return &pbpod.CreatePodResp{ - Finished: isFinished, - RequestId: "K8S pcm_pod Name:" + resp.Name, - PodId: string(resp.UID), - PodName: resp.Name, - }, nil - -} - -func (k K8SPoder) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) { - - podName := req.PcmId - fmt.Println("K8S ContainerGroup:", podName, " Deleted") - err := k.cli.CoreV1().Pods(req.Namespace).Delete(context.TODO(), podName, metav1.DeleteOptions{}) - - glog.Infof("--------------------K8S Pod Instance deleted--------------------") - - isFinished := true - if err != nil { - return nil, err - } - - return &pbpod.DeletePodResp{ - Finished: isFinished, - RequestId: "K8S pcm_pod Name:" + req.PodName, - PodId: req.PodName, - PodName: req.PodName, - }, nil -} - -func (k K8SPoder) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) { - - qresp, err := k.cli.CoreV1().Pods(req.GetNamespace()).Get(context.TODO(), req.PcmId, metav1.GetOptions{}) - if err != nil { - return nil, errors.Wrap(err, "K8S UpdatePod error") - } - pod := corev1.Pod{ - TypeMeta: qresp.TypeMeta, - ObjectMeta: metav1.ObjectMeta{ - Name: req.PcmId, - Namespace: req.Namespace, - Labels: map[string]string{"name": req.Labels}, - }, - Spec: qresp.Spec, - Status: qresp.Status, - } - pod.Spec.Containers[0].Image = req.ContainerImage - resp, err := k.cli.CoreV1().Pods(req.Namespace).Update(context.TODO(), &pod, metav1.UpdateOptions{}) - if err != nil { - return nil, err - } - - glog.Infof("--------------------K8S Pod Instance updated--------------------") - - isFinished := false - if len(resp.UID) > 0 { - isFinished = true - } - - return &pbpod.UpdatePodResp{ - Finished: isFinished, - RequestId: "K8S pcm_pod Name:" + req.PodName, - PodId: string(resp.UID), - PodName: req.PodName, - }, nil - -} - -func (k K8SPoder) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) { - resp, err := k.cli.CoreV1().Pods(req.GetNamespace()).List(context.TODO(), metav1.ListOptions{}) - if err != nil { - return nil, err - } - - var pods = make([]*pbpod.PodInstance, len(resp.Items)) - for k, v := range resp.Items { - pods[k] = &pbpod.PodInstance{ - Provider: pbpod.CloudProvider_k8s, - AccountName: req.AccountName, - PcmId: v.Name, - PodId: string(v.GetUID()), - PodName: v.Name, - ContainerImage: v.Spec.Containers[0].Image, - ContainerName: v.Spec.Containers[0].Name, - CpuPod: v.Spec.Containers[0].Resources.Requests.Cpu().String(), - MemoryPod: v.Spec.Containers[0].Resources.Requests.Memory().String(), - Namespace: v.Namespace, - Status: string(v.Status.Phase), - } - } - - glog.Infof("--------------------Huawei CCI Instance updated--------------------") - - isFinished := false - if len(pods) < int(req.PageSize) { - isFinished = true - } - - return &pbpod.ListPodDetailResp{ - Pods: pods, - Finished: isFinished, - PageNumber: req.PageNumber + 1, - PageSize: req.PageSize, - }, nil - -} diff --git a/adaptor/pcm_pod/service/poder.go b/adaptor/pcm_pod/service/poder.go deleted file mode 100644 index 9f3ea8941..000000000 --- a/adaptor/pcm_pod/service/poder.go +++ /dev/null @@ -1,50 +0,0 @@ -package poder - -import ( - pbpod "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - "context" - - "github.com/golang/glog" - "github.com/pkg/errors" -) - -var ( - ErrPodListNotSupported = errors.New("cloud not supported pcm_pod list") - ErrPoderPanic = errors.New("pcm_pod init panic") -) - -type Poder interface { - ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (resp *pbpod.ListPodDetailResp, err error) - CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (resp *pbpod.CreatePodResp, err error) - DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) - UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) - GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) -} - -func NewPodClient(provider pbpod.CloudProvider, region tenanter.Region, tenant tenanter.Tenanter) (poder Poder, err error) { - // 部分sdk会在内部panic - defer func() { - if err1 := recover(); err1 != nil { - glog.Errorf("NewPodClient panic %v", err1) - err = errors.WithMessagef(ErrPoderPanic, "%v", err1) - } - }() - - switch provider { - case pbpod.CloudProvider_ali: - return newAliEciClient(region, tenant) - case pbpod.CloudProvider_tencent: - return newTencentEksClient(region, tenant) - case pbpod.CloudProvider_huawei: - return newHuaweiCciClient(region, tenant) - case pbpod.CloudProvider_k8s: - return newK8SClient(tenant) - //TODO aws - //case pbtenant.CloudProvider_aws: - // return newAwsPodClient(region, tenant) - } - - err = errors.WithMessagef(ErrPodListNotSupported, "cloud provider %v region %v", provider, region) - return -} diff --git a/adaptor/pcm_pod/service/tencent_eks.go b/adaptor/pcm_pod/service/tencent_eks.go deleted file mode 100644 index 7e48088da..000000000 --- a/adaptor/pcm_pod/service/tencent_eks.go +++ /dev/null @@ -1,220 +0,0 @@ -package poder - -import ( - pbpod "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/gen/idl" - "context" - "strconv" - "sync" - - "github.com/golang/glog" - - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - "github.com/pkg/errors" - "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" - "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" - tencenteks "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525" -) - -var tencentClientMutex sync.Mutex - -type TencentEks struct { - cli *tencenteks.Client - region tenanter.Region - tenanter tenanter.Tenanter -} - -func (eks TencentEks) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) { - - regions := make([]*pbpod.Region, 0) - - request := tencenteks.NewDescribeEKSContainerInstanceRegionsRequest() - resp, err := eks.cli.DescribeEKSContainerInstanceRegions(request) - if err != nil { - return nil, errors.Wrap(err, "tencent eks describe region error") - } - for _, eksRegion := range resp.Response.Regions { - - regionId, _ := tenanter.GetTencentRegionId(*eksRegion.RegionName) - regionPod := &pbpod.Region{ - Id: regionId, - Name: *eksRegion.RegionName, - } - regions = append(regions, regionPod) - } - return &pbpod.GetPodRegionResp{Regions: regions}, nil - -} - -func newTencentEksClient(region tenanter.Region, tenant tenanter.Tenanter) (Poder, error) { - var ( - client *tencenteks.Client - err error - ) - - switch t := tenant.(type) { - case *tenanter.AccessKeyTenant: - tencentClientMutex.Lock() - - credential := common.NewCredential( - t.GetId(), - t.GetSecret(), - ) - cpf := profile.NewClientProfile() - client, err = tencenteks.NewClient(credential, region.GetName(), cpf) - tencentClientMutex.Unlock() - default: - } - - if err != nil { - return nil, errors.Wrap(err, "init tencent eks client error") - } - - return &TencentEks{ - cli: client, - region: region, - tenanter: tenant, - }, nil -} - -func (eks TencentEks) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodResp, error) { - - request := tencenteks.NewCreateEKSContainerInstancesRequest() - - eksCiName := req.PodName - containerName := req.ContainerName - containerImage := req.ContainerImage - eksCpu := req.CpuPod - eksMemory := req.MemoryPod - securityGroupId := req.SecurityGroupId - securityGroupIds := make([]*string, 1) - securityGroupIds[0] = &securityGroupId - subNetId := req.SubnetId - vpcId := req.VpcId - - request.EksCiName = &eksCiName - container := make([]*tencenteks.Container, 1) - container[0] = new(tencenteks.Container) - container[0].Name = &containerName - container[0].Image = &containerImage - - request.Containers = container - eksCpu64, err := strconv.ParseFloat(eksCpu, 64) - eksMemory64, err := strconv.ParseFloat(eksMemory, 64) - request.Cpu = &eksCpu64 - request.Memory = &eksMemory64 - request.SecurityGroupIds = securityGroupIds - request.SubnetId = &subNetId - request.VpcId = &vpcId - - resp, err := eks.cli.CreateEKSContainerInstances(request) - if err != nil { - return nil, errors.Wrap(err, "Tencent CreatePod error") - } - - isFinished := false - if resp.Response.RequestId != nil { - isFinished = true - } - - glog.Infof("--------------------K8S Pod Instance created--------------------") - - return &pbpod.CreatePodResp{ - Finished: isFinished, - RequestId: "tencent pcm_pod create request id:" + *resp.Response.RequestId, - PodId: *resp.Response.EksCiIds[0], - PodName: req.PodName, - }, nil - -} - -func (eks *TencentEks) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) { - request := tencenteks.NewDeleteEKSContainerInstancesRequest() - request.EksCiIds = make([]*string, 1) - request.EksCiIds[0] = &req.PcmId - resp, err := eks.cli.DeleteEKSContainerInstances(request) - - isFinished := true - if err != nil { - isFinished = false - return nil, errors.Wrap(err, "Tencent DeletePod error") - } - - glog.Infof("--------------------K8S Pod Instance deleted--------------------") - - return &pbpod.DeletePodResp{ - Finished: isFinished, - RequestId: "tencent pcm_pod delete request id:" + *resp.Response.RequestId, - PodId: req.PodId, - PodName: req.PodName, - }, nil -} - -func (eks *TencentEks) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) { - //创建更新pod请求 - request := tencenteks.NewUpdateEKSContainerInstanceRequest() - request.EksCiId = &req.PcmId - request.Name = &req.PodName - request.RestartPolicy = &req.RestartPolicy - request.Containers = make([]*tencenteks.Container, 1) - request.Containers[0] = new(tencenteks.Container) - request.Containers[0].Name = &req.ContainerName - request.Containers[0].Image = &req.ContainerImage - resp, err := eks.cli.UpdateEKSContainerInstance(request) - isFinished := true - if err != nil { - isFinished = false - return nil, errors.Wrap(err, "Tencent UpdatePod error") - } - - glog.Infof("--------------------K8S Pod Instance deleted--------------------") - - return &pbpod.UpdatePodResp{ - Finished: isFinished, - RequestId: "tencent pcm_pod update request id:" + *resp.Response.RequestId, - PodId: req.PodId, - PodName: req.PodName, - }, nil -} - -func (eks TencentEks) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) { - request := tencenteks.NewDescribeEKSContainerInstancesRequest() - resp, err := eks.cli.DescribeEKSContainerInstances(request) - if err != nil { - return nil, errors.Wrap(err, "Tencent ListDetail pcm_pod error") - } - var ekspods = make([]*pbpod.PodInstance, len(resp.Response.EksCis)) - for k, v := range resp.Response.EksCis { - ekspods[k] = &pbpod.PodInstance{ - Provider: pbpod.CloudProvider_tencent, - AccountName: eks.tenanter.AccountName(), - PcmId: *v.EksCiId, - PodId: *v.EksCiId, - PodName: *v.EksCiName, - RegionId: eks.region.GetId(), - RegionName: eks.region.GetName(), - ContainerImage: *v.Containers[0].Image, - ContainerName: *v.Containers[0].Name, - CpuPod: strconv.FormatFloat(*v.Cpu, 'f', 6, 64), - MemoryPod: strconv.FormatFloat(*v.Memory, 'f', 6, 64), - SecurityGroupId: *v.SecurityGroupIds[0], - SubnetId: *v.SubnetId, - VpcId: *v.VpcId, - Namespace: "", - Status: *v.Status, - } - } - isFinished := false - if len(ekspods) < int(req.PageSize) { - isFinished = true - } - - glog.Infof("--------------------K8S Pod Instance listed--------------------") - - return &pbpod.ListPodDetailResp{ - Pods: ekspods, - Finished: isFinished, - PageNumber: req.PageNumber + 1, - PageSize: req.PageSize, - RequestId: *resp.Response.RequestId, - }, nil -} diff --git a/adaptor/pcm_slurm/buf.gen.yaml b/adaptor/pcm_slurm/buf.gen.yaml deleted file mode 100644 index 404e111af..000000000 --- a/adaptor/pcm_slurm/buf.gen.yaml +++ /dev/null @@ -1,17 +0,0 @@ -version: v1 -plugins: - - name: go - out: gen - opt: - - paths=source_relative - - name: go-grpc - out: gen - opt: - - paths=source_relative - - name: grpc-gateway - out: gen - opt: - - paths=source_relative - - grpc_api_configuration=idl/slurm.yaml - - name: openapiv2 - out: gen/openapiv2 \ No newline at end of file diff --git a/adaptor/pcm_slurm/buf.yaml b/adaptor/pcm_slurm/buf.yaml deleted file mode 100644 index ea7eb0163..000000000 --- a/adaptor/pcm_slurm/buf.yaml +++ /dev/null @@ -1,13 +0,0 @@ -version: v1 -name: buf.build/JCCE/PCM -breaking: - use: - - FILE -lint: - use: - - DEFAULT -# ignore: -# - google/type/datetime.proto -deps: - - buf.build/googleapis/googleapis - - buf.build/grpc-ecosystem/grpc-gateway \ No newline at end of file diff --git a/adaptor/pcm_slurm/idl/slurm.proto b/adaptor/pcm_slurm/idl/slurm.proto deleted file mode 100644 index 3e297f9d1..000000000 --- a/adaptor/pcm_slurm/idl/slurm.proto +++ /dev/null @@ -1,123 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "idl/slurm_node.proto"; -import "idl/slurm_partition.proto"; -import "idl/slurm_reservation.proto"; -import "idl/slurm_ping.proto"; -import "idl/slurmdb_cluster.proto"; -import "idl/slurmdb_user.proto"; -import "idl/slurmdb_assoc.proto"; -import "idl/slurmdb_account.proto"; -import "idl/slurmdb_qos.proto"; -import "idl/slurmdb_wckey.proto"; -import "idl/slurm_job.proto"; -import "idl/slurm_diag.proto"; -import "idl/slurmdb_job.proto"; - -// Slurm Services -service SlurmService { - - // list all users from slurmdb - rpc ListUsers(ListUsersReq) returns (ListUsersResp); - - // get specific user info from slurmdb - rpc GetUser(GetUserReq) returns (GetUserResp); - - // add new user - rpc AddUser(AddUserReq) returns (AddUserResp); - - // delete specific user - rpc DeleteUser(DeleteUserReq) returns (DeleteUserResp); - - // list all associations from slurmdb - rpc ListAssociations(ListAssociationsReq) returns (ListAssociationsResp); - - // get specific association info from slurmdb - rpc GetAssociation(GetAssociationReq) returns (GetAssociationResp); - - // list all accounts info from slurmdb - rpc ListAccounts(ListAccountsReq) returns (ListAccountsResp); - - // get specific account info from slurmdb - rpc GetAccount(GetAccountReq) returns (GetAccountResp); - - // add account - rpc AddAccount(AddAccountReq) returns (AddAccountResp); - - // delete account - rpc DeleteAccount(DeleteAccountReq) returns (DeleteAccountResp); - - // list all wckeys info from slurmdb - rpc ListWckeys(ListWckeysReq) returns (ListWckeysResp); - - // get specific wckey info from slurmdb - rpc GetWckey(GetWckeyReq) returns (GetWckeyResp); - - // list all Cluster from slurmdb - rpc ListClusters(ListClustersReq) returns (ListClustersResp); - - // get specific user info from slurmdb - rpc GetCluster(GetClusterReq) returns (GetClusterResp); - - // add new user - rpc AddCluster(AddClusterReq) returns (AddClusterResp); - - // delete specific user - rpc DeleteCluster(DeleteClusterReq) returns (DeleteClusterResp); - - // list all Node from slurm - rpc ListNodes(ListNodesReq) returns (ListNodesResp); - - // get specific Node info from slurm - rpc GetNode(GetNodeReq) returns (GetNodeResp); - - // list all Partition from slurm - rpc ListPartitions(ListPartitionsReq) returns (ListPartitionsResp); - - // get specific Partition info from slurm - rpc GetPartition(GetPartitionReq) returns (GetPartitionResp); - - // list all Reservation from slurm - rpc ListReservations(ListReservationsReq) returns (ListReservationsResp); - - // get specific Reservation info from slurm - rpc GetReservation(GetReservationReq) returns (GetReservationResp); - - // list all jobs from slurm - rpc GetAllJobs(JobInfoMsgReq) returns (JobInfoMsgResp); - - // get job by id from slurm - rpc GetJob(JobInfoMsgReq) returns (JobInfoMsgResp); - - // submit job to slurm - rpc SubmitJob(SubmitJobReq) returns (SubmitJobResp); - - // delete job from slurm - rpc DeleteJob(DeleteJobReq) returns (DeleteJobResp); - - // update job from slurm - rpc UpdateJob(UpdateJobReq) returns (UpdateJobResp); - - // list all diag from slurm - rpc GetDiag(DiagReq) returns (DiagResp); - - // list all qoses from slurm - rpc GetQos(QosReq) returns (QosResp); - - // list all jobs from slurmdb - rpc GetSlurmdbJobs(SlurmDbJobReq) returns (SlurmDbJobResp); - - // get job by id from slurmdb - rpc GetSlurmdbJobById(SlurmDbJobReq) returns (SlurmDbJobResp); - - // delete qos from slurmdb - rpc DeleteQos(DeleteQosReq) returns (DeleteQosResp); - - // get qos by name from slurmdb - rpc GetQosByName(QosReq) returns (QosResp); - - // add qos to slurmdb - rpc AddQos(AddQosReq) returns (AddQosResp); -} diff --git a/adaptor/pcm_slurm/idl/slurm.yaml b/adaptor/pcm_slurm/idl/slurm.yaml deleted file mode 100644 index c32d69faa..000000000 --- a/adaptor/pcm_slurm/idl/slurm.yaml +++ /dev/null @@ -1,75 +0,0 @@ -type: google.api.Service -config_version: 3 - -http: - rules: - - selector: slurm.SlurmService.ListUsers - get: "/apis/slurm/listUsers" - - selector: slurm.SlurmService.GetUser - get: "/apis/slurm/getUser" - - selector: slurm.SlurmService.AddUser - post: "/apis/slurm/addUser" - - selector: slurm.SlurmService.DeleteUser - delete: "/apis/slurm/deleteUser" - - selector: slurm.SlurmService.ListAssociations - get: "/apis/slurm/listAssociations" - - selector: slurm.SlurmService.GetAssociation - get: "/apis/slurm/getAssociation" - - selector: slurm.SlurmService.ListAccounts - get: "/apis/slurm/listAccounts" - - selector: slurm.SlurmService.GetAccount - get: "/apis/slurm/getAccount" - - selector: slurm.SlurmService.AddAccount - post: "/apis/slurm/addAccount" - - selector: slurm.SlurmService.DeleteAccount - delete: "/apis/slurm/deleteAccount" - - selector: slurm.SlurmService.ListWckeys - get: "/apis/slurm/listWckeys" - - selector: slurm.SlurmService.GetWckey - get: "/apis/slurm/getWckey" - - selector: slurm.SlurmService.ListClusters - get: "/apis/slurm/listClusters" - - selector: slurm.SlurmService.GetCluster - get: "/apis/slurm/getCluster" - - selector: slurm.SlurmService.AddCluster - post: "/apis/slurm/addCluster" - - selector: slurm.SlurmService.DeleteCluster - delete: "/apis/slurm/deleteCluster" - - selector: slurm.SlurmService.ListNodes - get: "/apis/slurm/listNodes" - - selector: slurm.SlurmService.GetNode - get: "/apis/slurm/getNode" - - selector: slurm.SlurmService.ListPartitions - get: "/apis/slurm/listPartitions" - - selector: slurm.SlurmService.GetPartition - get: "/apis/slurm/getPartition" - - selector: slurm.SlurmService.ListReservations - get: "/apis/slurm/listReservations" - - selector: slurm.SlurmService.GetReservation - get: "/apis/slurm/getReservation" - - selector: slurm.SlurmService.GetAllJobs - get: "/apis/slurm/getAllJobs" - - selector: slurm.SlurmService.GetJob - get: "/apis/slurm/getJob/{JobId}" - - selector: slurm.SlurmService.SubmitJob - post: "/apis/slurm/submitJob/data" - body: "data" - - selector: slurm.SlurmService.DeleteJob - delete: "/apis/slurm/deleteJob/{JobId}" - - selector: slurm.SlurmService.UpdateJob - post: "/apis/slurm/updateJob/data" - body: "data" - - selector: slurm.SlurmService.GetDiag - get: "/apis/slurm/getDiag" - - selector: slurm.SlurmService.GetQos - get: "/apis/slurm/getQos" - - selector: slurm.SlurmService.GetSlurmdbJobs - get: "/apis/slurm/getAllSlurmdbJobs" - - selector: slurm.SlurmService.GetSlurmdbJobById - get: "/apis/slurm/getSlurmdbJobById/{JobId}" - - selector: slurm.SlurmService.DeleteQos - delete: "/apis/slurm/deleteQos" - - selector: slurm.SlurmService.GetQosByName - get: "/apis/slurm/getQosByName/{name}" - - selector: slurm.SlurmService.AddQos - post: "/apis/slurm/addQos" diff --git a/adaptor/pcm_slurm/idl/slurm_diag.proto b/adaptor/pcm_slurm/idl/slurm_diag.proto deleted file mode 100644 index 7264b836f..000000000 --- a/adaptor/pcm_slurm/idl/slurm_diag.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "idl/static.proto"; - -message DiagReq{ - SlurmVersion slurmVersion = 1; -} - -message DiagResp{ - StatsInfoResponseMsg statsInfoResponseMsg = 1; -} - -message StatsInfoResponseMsg { - uint32 parts_packed =1; - int64 req_time=2; - int64 req_time_start=3; - uint32 server_thread_count=4; - uint32 agent_queue_size=5; - - uint32 schedule_cycle_max=6; - uint32 schedule_cycle_last=7; - uint32 schedule_cycle_sum=8; - uint32 schedule_cycle_counter=9; - uint32 schedule_cycle_depth=10; - uint32 schedule_queue_len=11; - - uint32 jobs_submitted=12; - uint32 jobs_started=13; - uint32 jobs_completed=14; - uint32 jobs_canceled=15; - uint32 jobs_failed=16; - - uint32 bf_backfilled_jobs=17; - uint32 bf_last_backfilled_jobs=18; - uint32 bf_cycle_counter=19; - uint32 bf_cycle_sum=20; - uint32 bf_cycle_last=21; - uint32 bf_cycle_max=22; - uint32 bf_last_depth=23; - uint32 bf_last_depth_try=24; - uint32 bf_depth_sum=25; - uint32 bf_depth_try_sum=26; - uint32 bf_queue_len=27; - uint32 bf_queue_len_sum=28; - int64 bf_when_last_cycle=29; - uint32 bf_active=30; -} \ No newline at end of file diff --git a/adaptor/pcm_slurm/idl/slurm_job.proto b/adaptor/pcm_slurm/idl/slurm_job.proto deleted file mode 100644 index 828df347d..000000000 --- a/adaptor/pcm_slurm/idl/slurm_job.proto +++ /dev/null @@ -1,314 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "idl/static.proto"; - -message UpdateJobReq{ - uint32 JobId = 1; - Update_job_options data = 2; - SlurmVersion slurmVersion = 3; -} - -message UpdateJobResp{ - int32 Error_code=1; -} - -message SubmitJobReq{ - JobDescriptor data = 1; - SlurmVersion slurmVersion = 2; -} - -message SubmitJobResp{ - repeated Submit_response_msg submitResponseMsg = 1; -} - -message DeleteJobReq{ - uint32 JobId = 1; - SlurmVersion slurmVersion = 2; -} - -message DeleteJobResp{ - int32 Error_code=1; -} - -message Argv{ - string argv =1; -} - -message Environment{ - string environment =1; -} - -message JobDescriptor{ - string Account =1; /* charge to specified account */ - string Acctg_freq =2; /* accounting polling intervals (seconds) */ - string Alloc_node=3; /* node making resource allocation request - * NOTE: Normally set by slurm_submit* or - * slurm_allocate* function */ - uint32 Alloc_resp_port=4; /* port to send allocation confirmation to */ - uint32 Alloc_sid =5; /* local sid making resource allocation request - * NOTE: Normally set by slurm_submit* or - * slurm_allocate* function - * NOTE: Also used for update flags, see - * ALLOC_SID_* flags */ - uint32 Argc =6; /* number of arguments to the script */ - repeated Argv argv = 7; /* arguments to the script */ - string Array_inx =8; /* job array index values */ - //void *array_bitmap; /* NOTE: Set by slurmctld */ - int64 Begin_time = 9; /* delay initiation until this time */ - uint32 Ckpt_interval=10; /* periodically checkpoint this job */ - string Ckpt_dir =11; /* directory to store checkpoint images */ - string Comment =12; /* arbitrary comment (used by Moab scheduler) */ - uint32 Contiguous=13; /* 1 if job requires contiguous nodes, - * 0 otherwise,default=0 */ - string Cpu_bind=14; /* binding map for map/mask_cpu */ - uint32 Cpu_bind_type=15; /* see cpu_bind_type_t */ - string Dependency =16; /* synchronize job execution with other jobs */ - int64 End_time=17; /* time by which job must complete, used for - * job update only now, possible deadline - * scheduling in the future */ - repeated Environment environment=18; /* environment variables to set for job, - * name=value pairs, one per line */ - uint32 Env_size =19; /* element count in environment */ - string Exc_nodes =20; /* comma separated list of nodes excluded - * from job's allocation, default NONE */ - string Features =21; /* comma separated list of required features, - * default NONE */ - string Gres =22; /* comma separated list of required generic - * resources, default NONE */ - uint32 Group_id =23; /* group to assume, if run as root. */ - uint32 Immediate=24; /* 1 if allocate to run or fail immediately, - * 0 if to be queued awaiting resources */ - uint32 Job_id =25; /* job ID, default set by SLURM */ - uint32 Kill_on_node_fail=26; /* 1 if node failure to kill job, - * 0 otherwise,default=1 */ - string Licenses=27; /* licenses required by the job */ - uint32 Mail_type=28; /* see MAIL_JOB_ definitions above */ - string Mail_user =29; /* user to receive notification */ - string Mem_bind =30; /* binding map for map/mask_cpu */ - uint32 Mem_bind_type=31; /* see mem_bind_type_t */ - string Name =32; /* name of the job, default "" */ - string Network=33; /* network use spec */ - uint32 Nice =34; /* requested priority change, - * NICE_OFFSET == no change */ - uint32 Num_tasks=35; /* number of tasks to be started, - * for batch only */ - uint32 Open_mode=36; /* out/err open mode truncate or append, - * see OPEN_MODE_* */ - uint32 Other_port=37; /* port to send various notification msg to */ - uint32 Overcommit =38; /* over subscribe resources, for batch only */ - string Partition=39; /* name of requested partition, - * default in SLURM config */ - uint32 Plane_size =40; /* plane size when task_dist = - SLURM_DIST_PLANE */ - uint32 Priority =41; /* relative priority of the job, - * explicitly set only for user root, - * 0 == held (don't initiate) */ - uint32 Profile =42; /* Level of acct_gather_profile {all | none} */ - string Qos =43; /* Quality of Service */ - string Resp_host=44; /* NOTE: Set by slurmctld */ - string Req_nodes=45; /* comma separated list of required nodes - * default NONE */ - uint32 Requeue=46; /* enable or disable job requeue option */ - string Reservation=47; /* name of reservation to use */ - string Script=48; /* the actual job script, default NONE */ - uint32 Shared =49; /* 1 if job can share nodes with other jobs, - * 0 if job needs exclusive access to the node, - * or NO_VAL to accept the system default. - * SHARED_FORCE to eliminate user control. */ - //char **spank_job_env; environment variables for job prolog/epilog - // * scripts as set by SPANK plugins - uint32 Spank_job_env_size=50; /* element count in spank_env */ - uint32 Task_dist =51; /* see enum task_dist_state */ - uint32 Time_limit =52; /* maximum run time in minutes, default is - * partition limit */ - uint32 Time_min =53; /* minimum run time in minutes, default is - * time_limit */ - uint32 User_id=54; /* set only if different from current UID, - * can only be explicitly set by user root */ - uint32 Wait_all_nodes=55; /* 0 to start job immediately after allocation - * 1 to start job after all nodes booted - * or NO_VAL to use system default */ - uint32 Warn_signal=56; /* signal to send when approaching end time */ - uint32 Warn_time=57; /* time before end to send signal (seconds) */ - string Work_dir =58; /* pathname of working directory */ - - /* job constraints: */ - uint32 Cpus_per_task=59; /* number of processors required for - * each task */ - uint32 Min_cpus =60; /* minimum number of processors required, - * default=0 */ - uint32 Max_cpus=61; /* maximum number of processors required, - * default=0 */ - uint32 Min_nodes=62; /* minimum number of nodes required by job, - * default=0 */ - uint32 Max_nodes=63; /* maximum number of nodes usable by job, - * default=0 */ - uint32 Boards_per_node =64; /* boards per node required by job */ - uint32 Sockets_per_board=65; /* sockets per board required by job */ - uint32 Sockets_per_node =66; /* sockets per node required by job */ - uint32 Cores_per_socket=67; /* cores per socket required by job */ - uint32 Threads_per_core=68; /* threads per core required by job */ - uint32 Ntasks_per_node =69; /* number of tasks to invoke on each node */ - uint32 Ntasks_per_socket=70; /* number of tasks to invoke on - * each socket */ - uint32 Ntasks_per_core =71; /* number of tasks to invoke on each core */ - uint32 Ntasks_per_board=72; /* number of tasks to invoke on each board */ - uint32 Pn_min_cpus =73; /* minimum # CPUs per node, default=0 */ - uint32 Pn_min_memory=74; /* minimum real memory per node OR - * real memory per CPU | MEM_PER_CPU, - * default=0 (no limit) */ - uint32 Pn_min_tmp_disk =75; /* minimum tmp disk per node, - * default=0 */ - - /* - * The following parameters are only meaningful on a Blue Gene - * system at present. Some will be of value on other system. Don't remove these - * they are needed for LCRM and others that can't talk to the opaque data type - * select_jobinfo. - */ - //uint16_t geometry[HIGHEST_DIMENSIONS]; node count in various - // * dimensions, e.g. X, Y, and Z - //uint16_t conn_type[HIGHEST_DIMENSIONS]; see enum connection_type - uint32 Reboot=76; /* force node reboot before startup */ - uint32 Rotate=77; /* permit geometry rotation if set */ - //char *blrtsimage; /* BlrtsImage for block */ - //char *linuximage; /* LinuxImage for block */ - //char *mloaderimage; /* MloaderImage for block */ - //char *ramdiskimage; /* RamDiskImage for block */ - - /* End of Blue Gene specific values */ - uint32 Req_switch =78; /* Minimum number of switches */ - //dynamic_plugin_data_t *select_jobinfo; /* opaque data type, - // * SLURM internal use only */ - string Std_err=79; /* pathname of stderr */ - string Std_in =80; /* pathname of stdin */ - string Std_out=81; /* pathname of stdout */ - uint32 Wait4switch=82; /* Maximum time to wait for minimum switches */ - string Wckey =83; /* wckey for job */ -} - -message Submit_response_msg{ - uint32 Job_id = 1; - uint32 Step_id =2; - uint32 Error_code=3; -} - -message JobInfoMsgReq{ - uint32 JobId = 1; - SlurmVersion slurmVersion = 2; -} - -message JobInfoMsgResp { - Job_info_msg jobInfoMsg =1; -} - -message Job_info_msg{ - int64 Last_update = 1; - uint32 Record_count = 2; - repeated Job_info Job_list = 3; -} - -message Job_info{ - string account = 1; /* charge to specified account */ - string alloc_node = 2; /* local node making resource alloc */ - uint32 alloc_sid =3; /* local sid making resource alloc */ - uint32 array_job_id =4; /* job_id of a job array or 0 if N/A */ - uint32 array_task_id =5; /* task_id of a job array */ - uint32 assoc_id =6; /* association id for job */ - uint32 batch_flag =7; /* 1 if batch: queued job with script */ - string batch_host =8; /* name of host running batch script */ - string batch_script=9; /* contents of batch script */ - string command =10; /* command to be executed, built from submitted - * job's argv and NULL for salloc command */ - string comment =11; /* arbitrary comment (used by Moab scheduler) */ - uint32 contiguous =12; /* 1 if job requires contiguous nodes */ - uint32 cpus_per_task=13; /* number of processors required for - * each task */ - string dependency =14; /* synchronize job execution with other jobs */ - uint32 derived_ec =15; /* highest exit code of all job steps */ - int64 eligible_time =16; /* time job is eligible for running */ - int64 end_time =17; /* time of termination, actual or expected */ - string exc_nodes =18; /* comma separated list of excluded nodes */ - int32 exc_node_inx =19; /* excluded list index pairs into node_table: - * start_range_1, end_range_1, - * start_range_2, .., -1 */ - uint32 exit_code =20; /* exit code for job (status from wait call) */ - string features =21; /* comma separated list of required features */ - string gres =22; /* comma separated list of generic resources */ - uint32 group_id =23; /* group job sumitted as */ - uint32 job_id =24; /* job ID */ - uint32 job_state =25; /* state of the job, see enum job_states */ - string licenses =26; /* licenses required by the job */ - uint32 max_cpus =27; /* maximum number of cpus usable by job */ - uint32 max_nodes =28; /* maximum number of nodes usable by job */ - uint32 boards_per_node =29; /* boards per node required by job */ - uint32 sockets_per_board=30; /* sockets per board required by job */ - uint32 sockets_per_node=31; /* sockets per node required by job */ - uint32 cores_per_socket=32; /* cores per socket required by job */ - uint32 threads_per_core=33; /* threads per core required by job */ - string name =34; /* name of the job */ - string network =35; /* network specification */ - string nodes =36; /* list of nodes allocated to job */ - uint32 nice =37; /* requested priority change */ - int32 node_inx =38; /* list index pairs into node_table for *nodes: - * start_range_1, end_range_1, - * start_range_2, .., -1 */ - uint32 ntasks_per_core =39; /* number of tasks to invoke on each core */ - uint32 ntasks_per_node =40; /* number of tasks to invoke on each node */ - uint32 ntasks_per_socket =41; /* number of tasks to invoke on each socket*/ - uint32 ntasks_per_board =42; /* number of tasks to invoke on each board */ - - uint32 num_nodes =43; /* minimum number of nodes required by job */ - uint32 num_cpus =44; /* minimum number of cpus required by job */ - string partition =45; /* name of assigned partition */ - uint32 pn_min_memory =46; /* minimum real memory per node, default=0 */ - uint32 pn_min_cpus =47; /* minimum # CPUs per node, default=0 */ - uint32 pn_min_tmp_disk =48; /* minimum tmp disk per node, default=0 */ - int64 pre_sus_time =49; /* time job ran prior to last suspend */ - uint32 priority =50; /* relative priority of the job, - * 0=held, 1=required nodes DOWN/DRAINED */ - uint32 profile =51; /* Level of acct_gather_profile {all | none} */ - string qos =52; /* Quality of Service */ - string req_nodes =53; /* comma separated list of required nodes */ - int32 req_node_inx =54; /* required list index pairs into node_table: - * start_range_1, end_range_1, - * start_range_2, .., -1 */ - uint32 req_switch =55; /* Minimum number of switches */ - uint32 requeue =56; /* enable or disable job requeue option */ - int64 resize_time =57; /* time of latest size change */ - uint32 restart_cnt =58;/* count of job restarts */ - string resv_name =59; /* reservation name */ - /*dynamic_plugin_data_t *select_jobinfo;*/ /* opaque data type, - * process using - * slurm_get_select_jobinfo() - */ - /*job_resources_t *job_resrcs;*/ /* opaque data type, job resources */ - uint32 shared =60; /* 1 if job can share nodes with other jobs */ - uint32 show_flags =61; /* conveys level of details requested */ - int64 start_time =62; /* time execution begins, actual or expected */ - string state_desc =63; /* optional details for state_reason */ - uint32 state_reason =64; /* reason job still pending or failed, see - * slurm.h:enum job_state_reason */ - int64 submit_time =65; /* time of job submission */ - int64 suspend_time =66; /* time job last suspended or resumed */ - uint32 time_limit =67; /* maximum run time in minutes or INFINITE */ - uint32 time_min =68; /* minimum run time in minutes or INFINITE */ - uint32 user_id =69; /* user the job runs as */ - int64 preempt_time =70; /* preemption signal time */ - uint32 wait4switch =71;/* Maximum time to wait for minimum switches */ - string wckey =72; /* wckey for job */ - string work_dir =73; /* pathname of working directory */ -} - -message Update_job_options { - string Partition =1; - string Qos =2; - uint32 Num_tasks =3; - uint32 Ntasks_per_node =4; - uint32 Ntasks_per_socket =5; - uint32 Ntasks_per_core =6; - uint32 Min_nodes =7; - uint32 Max_nodes =8; -} \ No newline at end of file diff --git a/adaptor/pcm_slurm/idl/slurm_node.proto b/adaptor/pcm_slurm/idl/slurm_node.proto deleted file mode 100644 index ffb37efbb..000000000 --- a/adaptor/pcm_slurm/idl/slurm_node.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "idl/static.proto"; - -message NodeInfo{ - string Arch = 1 ; - uint32 Boards = 2 ; - int64 Boot_time = 3 ; - uint32 Cores = 4 ; - uint32 Cpu_load = 5 ; - uint32 Cpus = 6 ; - string Features = 7; - string Gres = 8 ; - string Name = 9 ; - string Node_addr = 10 ; - string Node_hostname = 11 ; - uint32 Node_state = 12 ; - string Os = 13 ; - uint64 Real_memory = 14 ; - string Reason = 15 ; - int64 Reason_time = 16 ; - uint32 Reason_uid = 17 ; - int64 Slurmd_start_time = 18 ; - uint32 Sockets = 19 ; - uint32 Threads = 20 ; - uint32 Tmp_disk = 21 ; - uint32 Weight = 22 ; -} - -message ListNodesReq{ - SlurmVersion slurm_version = 1; -} - - -message ListNodesResp { - repeated NodeInfo node_infos = 1; -} - -message GetNodeReq{ - SlurmVersion slurm_version = 1; - string node_name = 2; -} - -message GetNodeResp { - repeated NodeInfo node_infos = 1; -} - -/*message Nodes_info_msg{ - int64 Last_update =1; - uint32 Record_count =2; - uint32 Error_code =3; - repeated NodeInfo node_infos =4; -}*/ - diff --git a/adaptor/pcm_slurm/idl/slurm_partition.proto b/adaptor/pcm_slurm/idl/slurm_partition.proto deleted file mode 100644 index 21be1e837..000000000 --- a/adaptor/pcm_slurm/idl/slurm_partition.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "idl/static.proto"; - -message PartitionInfo{ - string Allow_alloc_nodes =1; - string Allow_groups =2; - string Alternate =3; - uint32 Cr_type =4; - uint64 Def_mem_per_cpu =5; - uint32 Default_time = 6; - uint32 Flags =7; - uint32 Grace_time =8; - uint32 Max_cpus_per_node =9; - uint64 Max_mem_per_cpu =10; - uint32 Max_nodes =11; - uint32 Max_share =12; - uint32 Max_time =13; - uint32 Min_nodes =14; - string Name =15; - int32 Node_inx =16; - string Nodes =17; - uint32 Preempt_mode =18; - uint32 State_up =19; - uint32 Total_cpus =20; - uint32 Total_nodes =21; -} - -message ListPartitionsReq{ - SlurmVersion SlurmVersion = 1; -} - -message ListPartitionsResp{ - repeated PartitionInfo Partition_list =1; -} - -message GetPartitionReq{ - SlurmVersion slurm_version = 1; - string partition_name = 2; -} - -message GetPartitionResp { - repeated PartitionInfo partition_infos = 1; -} - -/*message Partition_info_msg{ - int64 Last_update =1; - uint32 Record_count =2; - uint32 Error_code =3; - repeated PartitionInfo Partition_list =4; -}*/ - diff --git a/adaptor/pcm_slurm/idl/slurm_ping.proto b/adaptor/pcm_slurm/idl/slurm_ping.proto deleted file mode 100644 index 315286e4c..000000000 --- a/adaptor/pcm_slurm/idl/slurm_ping.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "idl/static.proto"; - -message PingInfoMsgReq{ - SlurmVersion SlurmVersion = 1; - int32 controller = 2; -} - -message PingInfoMsgResp{ - int32 Ping_result =1; -} \ No newline at end of file diff --git a/adaptor/pcm_slurm/idl/slurm_reservation.proto b/adaptor/pcm_slurm/idl/slurm_reservation.proto deleted file mode 100644 index ca6c4298b..000000000 --- a/adaptor/pcm_slurm/idl/slurm_reservation.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "idl/static.proto"; - -message ReservationInfo{ - string Accounts = 1; - int64 End_time =2; - string Features =3; - uint32 Flags =4; - string Licenses =5; - string Name =6; - uint32 Node_cnt =7; - uint32 Core_cnt =8; - int32 Node_inx =9; - string Node_list =10; - string Partition =11; - int64 Start_time =12; - string Users =13; -} - -message ListReservationsReq{ - SlurmVersion SlurmVersion = 1; -} - -message ListReservationsResp{ - repeated ReservationInfo Reservation_list =1; -} - -message GetReservationReq{ - SlurmVersion slurm_version = 1; - string reservation_name = 2; -} - -message GetReservationResp { - repeated ReservationInfo reservation_infos = 1; -} - -/*message Partition_info_msg{ - int64 Last_update =1; - uint32 Record_count =2; - uint32 Error_code =3; - repeated PartitionInfo Partition_list =4; -}*/ - diff --git a/adaptor/pcm_slurm/idl/slurmdb_account.proto b/adaptor/pcm_slurm/idl/slurmdb_account.proto deleted file mode 100644 index 23313b43f..000000000 --- a/adaptor/pcm_slurm/idl/slurmdb_account.proto +++ /dev/null @@ -1,71 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "google/protobuf/timestamp.proto"; -import "idl/static.proto"; -import "idl/slurmdb_assoc.proto"; -import "idl/slurmdb_coord.proto"; - -message AccountInfo{ - repeated AssociationInfo assoc_list = 1; - repeated CoordInfo coordinators = 2; - string description = 3; - string name = 4; - string organization = 5; -} - -message ListAccountsReq{ - SlurmVersion slurm_version = 1; -} - -message ListAccountsResp { - repeated AccountInfo account_infos = 1; -} - -message GetAccountReq{ - SlurmVersion slurm_version = 1; - string account_name = 2; -} - -message GetAccountResp { - repeated AccountInfo account_infos = 1; -} - -message AddAccountReq{ - SlurmVersion slurm_version = 1; - string clusters =2; - string default_qos=3; - string description=4; - string fair_share=5; - string grp_cpu_mins=6; - string grp_cpus=7; - string grp_jobs=8; - string grp_memory=9; - string grp_nodes=10; - string grp_submit_jobs=11; - string grp_wall=12; - string max_cpu_mins=13; - string max_cpus=14; - string max_jobs=15; - string max_nodes=16; - string max_submit_jobs=17; - string max_wall=18; - string names=19; - string organization=20; - string parent=21; - string qos_level=22; -} - -message AddAccountResp { - string result = 1; -} - -message DeleteAccountReq{ - SlurmVersion slurm_version = 1; - string names=2; -} - -message DeleteAccountResp { - string result = 1; -} \ No newline at end of file diff --git a/adaptor/pcm_slurm/idl/slurmdb_accounting.proto b/adaptor/pcm_slurm/idl/slurmdb_accounting.proto deleted file mode 100644 index f97d5b5dc..000000000 --- a/adaptor/pcm_slurm/idl/slurmdb_accounting.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "google/protobuf/timestamp.proto"; -import "idl/static.proto"; - -message AccountingInfo{ - int64 alloc_secs = 1 ; - int32 id = 2 ; - google.protobuf.Timestamp period_start = 3; -} diff --git a/adaptor/pcm_slurm/idl/slurmdb_assoc.proto b/adaptor/pcm_slurm/idl/slurmdb_assoc.proto deleted file mode 100644 index 24ebae189..000000000 --- a/adaptor/pcm_slurm/idl/slurmdb_assoc.proto +++ /dev/null @@ -1,76 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "google/protobuf/timestamp.proto"; -import "idl/static.proto"; -import "idl/slurmdb_accounting.proto"; -import "idl/slurmdb_qos.proto"; - - -message AssocUsageInfo{ - -} - -message AssociationInfo{ - repeated AccountingInfo accounting_list = 1 ; - string acct = 2 ; - string cluster = 3 ; - int32 def_qos_id = 4 ; - int64 grp_cpu_mins = 5 ; - int64 grp_gpu_run_mins = 6 ; - int32 grp_cpus = 7 ; - int32 grp_jobs = 8 ; - int32 grp_mem = 9 ; - int32 grp_nodes = 10 ; - int32 grp_submit_jobs = 11 ; - int32 grp_wall = 12 ; - int32 id = 13 ; - int32 is_def = 14 ; - int32 lft = 15 ; - int64 max_cpu_mins_pj = 16 ; - int64 max_cpu_run_mins = 17 ; - int32 max_cpus_pj = 18 ; - int32 max_jobs = 19 ; - int32 max_nodes_pj = 20 ; - int32 max_submit_jobs = 21 ; - int32 max_wall_pj = 22 ; - string parent_acct = 23 ; - int32 parent_id = 24 ; - string partition = 25 ; - repeated Slurmdb_qos_rec qos_list = 26 ; - int32 rgt = 27 ; - int32 shares_raw = 28 ; - int32 uid = 29 ; - AssocUsageInfo assoc_usage = 30 ; - string user = 31 ; -} - -message ListAssociationsReq{ - SlurmVersion slurm_version = 1; -} - -message ListAssociationsResp { - repeated AssociationInfo assoc_infos = 1; -} - -message GetAssociationReq{ - SlurmVersion slurm_version = 1; - string cluster = 2; - string account = 3; - string user = 4; - string partition = 5; -} - -message GetAssociationResp { - repeated AssociationInfo assoc_infos = 1; -} - -message SetAssociationReq{ - SlurmVersion slurm_version = 1; - AssociationInfo assoc_info = 2; -} - -message SetAssociationResp { - bool result = 1; -} diff --git a/adaptor/pcm_slurm/idl/slurmdb_cluster.proto b/adaptor/pcm_slurm/idl/slurmdb_cluster.proto deleted file mode 100644 index 2c90c29df..000000000 --- a/adaptor/pcm_slurm/idl/slurmdb_cluster.proto +++ /dev/null @@ -1,69 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "google/protobuf/timestamp.proto"; -import "idl/static.proto"; -import "idl/slurmdb_accounting.proto"; -import "idl/slurmdb_assoc.proto"; - -message ClusterInfo{ - repeated AccountingInfo accounting_list = 1 ; - int32 classification = 2 ; - string control_host = 3 ; - int32 control_port = 4 ; - int32 cpu_count = 5 ; - int32 dimensions = 6 ; - int32 dim_size = 7 ; - int32 flags = 8 ; - string name = 9 ; - string nodes = 10 ; - int32 plugin_id_select = 11 ; - AssociationInfo root_assoc = 12 ; - int32 rpc_version = 13 ; -} - -message ListClustersReq{ - SlurmVersion slurm_version = 1; -} - -message ListClustersResp { - repeated ClusterInfo cluster_infos = 1; -} - -message GetClusterReq{ - SlurmVersion slurm_version = 1; - string cluster_name = 2; -} - -message GetClusterResp { - repeated ClusterInfo cluster_infos = 1; -} - -message AddClusterReq{ - SlurmVersion slurm_version = 1; - string name =2; - string nodes =3; - string control_port = 4 ; - string cpu_count = 5 ; - string dimensions = 6 ; - string dim_size = 7 ; - string flags = 8 ; - string classification = 9 ; - string control_host = 10 ; - string plugin_id_select = 11 ; - string rpc_version = 13 ; -} - -message AddClusterResp { - string result = 1; -} - -message DeleteClusterReq{ - SlurmVersion slurm_version = 1; - string names=2; -} - -message DeleteClusterResp { - string result = 1; -} \ No newline at end of file diff --git a/adaptor/pcm_slurm/idl/slurmdb_coord.proto b/adaptor/pcm_slurm/idl/slurmdb_coord.proto deleted file mode 100644 index 607bdad4c..000000000 --- a/adaptor/pcm_slurm/idl/slurmdb_coord.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "google/protobuf/timestamp.proto"; -import "idl/static.proto"; - - -message CoordInfo{ - string name = 1 ; - int32 direct = 2 ; -} diff --git a/adaptor/pcm_slurm/idl/slurmdb_job.proto b/adaptor/pcm_slurm/idl/slurmdb_job.proto deleted file mode 100644 index f492d2f6b..000000000 --- a/adaptor/pcm_slurm/idl/slurmdb_job.proto +++ /dev/null @@ -1,92 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "idl/static.proto"; - -message SlurmDbJobReq{ - SlurmVersion slurmVersion = 1; - uint32 JobId = 2; -} - -message SlurmDbJobResp{ - repeated Slurmdb_job_rec slurmdb_job_rec = 1; -} - -message Slurmdb_job_rec { - uint32 alloc_cpu = 1; - uint32 alloc_nodes =2; - string account= 3; - uint32 associd=4; - string blockid=5; - string cluster=6; - uint32 derived_ec=7; - string derived_es=8; - uint32 elapsed=9; - int64 eligible=10; - int64 end=11; - uint32 exitcode=12; - // void *first_step_ptr; - uint32 gid=13; - uint32 jobid=14; - string jobname=15; - uint32 lft=16; - string partition=17; - string nodes=18; - uint32 priority=19; - uint32 qosid=20; - uint32 req_cpus=21; - uint32 req_mem=22; - uint32 requid=23; - uint32 resvid=24; - uint32 show_full=25; - int64 start=26; - uint32 state=27; - // repeated slurmdb_stats_t stats=28; - // List steps; - int64 submit=28; - uint32 suspended=29; - uint32 sys_cpu_sec=30; - uint32 sys_cpu_usec=31; - uint32 timelimit=32; - uint32 tot_cpu_sec=33; - uint32 tot_cpu_usec=34; - uint32 track_steps=35; - uint32 uid=36; - string user=37; - uint32 user_cpu_sec=38; - uint32 user_cpu_usec=39; - string wckey=40; - uint32 wckeyid=41; -} - -message slurmdb_stats_t{ - double act_cpufreq =1; - double cpu_ave=2; - double consumed_energy=3; - uint32 cpu_min=4; - uint32 cpu_min_nodeid=5; - uint32 cpu_min_taskid=6; - double disk_read_ave=7; - double disk_read_max=8; - uint32 disk_read_max_nodeid=9; - uint32 disk_read_max_taskid=10; - double disk_write_ave=11; - double disk_write_max=12; - uint32 disk_write_max_nodeid=13; - uint32 disk_write_max_taskid=14; - double pages_ave=15; - uint32 pages_max=16; - uint32 pages_max_nodeid=17; - uint32 pages_max_taskid=18; - double rss_ave=19; - uint32 rss_max=20; - uint32 rss_max_nodeid=21; - uint32 rss_max_taskid=22; - double vsize_ave=23; - uint32 vsize_max=24; - uint32 vsize_max_nodeid=25; - uint32 vsize_max_taskid=26; -} - - diff --git a/adaptor/pcm_slurm/idl/slurmdb_qos.proto b/adaptor/pcm_slurm/idl/slurmdb_qos.proto deleted file mode 100644 index f16700754..000000000 --- a/adaptor/pcm_slurm/idl/slurmdb_qos.proto +++ /dev/null @@ -1,96 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "idl/static.proto"; - -message QosReq{ - SlurmVersion slurmVersion = 1; - string name=2; -} - -message QosResp{ - repeated Slurmdb_qos_rec slurmdb_qos_rec = 1; -} - -message DeleteQosReq{ - SlurmVersion slurmVersion = 1; - string names=2; -} - -message DeleteQosResp { - string result =1; -} - -message AddQosReq { - SlurmVersion slurmVersion = 1; - Slurmdb_qos_rec slurmdb_qos_rec=2; -} - -message AddQosResp { - string result =1; -} - -message Qos_info_msg { - uint32 Record_count = 1; - repeated Slurmdb_qos_rec slurmdb_qos_rec = 2; -} - -message Slurmdb_qos_rec{ - string Description=1; - uint32 Id=2; - uint32 Flags =3; /* flags for various things to enforce or - override other limits */ - uint32 Grace_time =4; /* preemption grace time */ - uint64 Grp_cpu_mins =5; /* max number of cpu minutes all jobs - * running under this qos can run for */ - uint64 Grp_cpu_run_mins=6; /* max number of cpu minutes all jobs - * running under this qos can - * having running at one time */ - uint32 Grp_cpus =7; /* max number of cpus this qos - can allocate at one time */ - uint32 Grp_jobs=8; /* max number of jobs this qos can run - * at one time */ - uint32 Grp_mem =9; /* max amount of memory this qos - can allocate at one time */ - uint32 Grp_nodes=10; /* max number of nodes this qos - can allocate at once */ - uint32 Grp_submit_jobs=11; /* max number of jobs this qos can submit at - * one time */ - uint32 Grp_wall =12; /* total time in hours this qos can run for */ - - uint64 Max_cpu_mins_pj=13; /* max number of cpu mins a job can - * use with this qos */ - uint64 Max_cpu_run_mins_pu=14; /* max number of cpu mins a user can - * allocate at a given time when - * using this qos (Not yet valid option) */ - uint32 Max_cpus_pj =15; /* max number of cpus a job can - * allocate with this qos */ - uint32 Max_cpus_pu=16; /* max number of cpus a user can - * allocate with this qos at one time */ - uint32 Max_jobs_pu =17; /* max number of jobs a user can - * run with this qos at one time */ - uint32 Max_nodes_pj =18; /* max number of nodes a job can - * allocate with this qos at one time */ - uint32 Max_nodes_pu=19; /* max number of nodes a user can - * allocate with this qos at one time */ - uint32 Max_submit_jobs_pu=20; /* max number of jobs a user can - submit with this qos at once */ - uint32 Max_wall_pj =21; /* longest time this - * qos can run a job */ - - string Name =22; - //bitstr_t *preempt_bitstr; /* other qos' this qos can preempt */ - - repeated string preempt_list = 23; /* List preempt_list; list of char *'s only used to add or - * change the other qos' this can preempt, - * when doing a get use the preempt_bitstr */ - uint32 preempt_mode=24; /* See PREEMPT_MODE_* in slurm/slurm.h */ - uint32 priority=25; /* ranged int needs to be a unint for - * heterogeneous systems */ - //assoc_mgr_qos_usage_t *usage; /* For internal use only, DON'T PACK */ - double usage_factor=26; /* double, factor to apply to usage in this qos */ - double usage_thres=27; /* double, percent of effective usage of an - association when breached will deny - pending and new jobs */ -} \ No newline at end of file diff --git a/adaptor/pcm_slurm/idl/slurmdb_user.proto b/adaptor/pcm_slurm/idl/slurmdb_user.proto deleted file mode 100644 index d769c4f45..000000000 --- a/adaptor/pcm_slurm/idl/slurmdb_user.proto +++ /dev/null @@ -1,75 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "google/protobuf/timestamp.proto"; -import "idl/static.proto"; -import "idl/slurmdb_coord.proto"; -import "idl/slurmdb_wckey.proto"; -import "idl/slurmdb_assoc.proto"; - -message UserInfoList{ - repeated UserInfo userInfos = 1 ; -} -message UserInfo{ - int32 adminLevel = 1 ; - repeated AssociationInfo association_list= 2 ; - repeated CoordInfo coord_list = 3 ; - string default_acct = 4 ; - string default_wckey = 5 ; - string name = 6 ; - string oldName = 7 ; - int32 uid = 8 ; - repeated WckeyInfo wckey_list = 9 ; -} - -message ListUsersReq{ - SlurmVersion slurm_version = 1; -} - -message ListUsersResp { - repeated UserInfo user_infos =1; -} - -message GetUserReq{ - SlurmVersion slurm_version = 1; - string user_name = 2; -} - -message GetUserResp { - repeated UserInfo user_info = 1; -} - -message AddUserReq{ - SlurmVersion slurm_version = 1; - string accounts=2; - string admin_level=3; - string clusters=4; - string default_account=5; - string default_qos=6; - string default_wckey=7; - string fair_share=8; - string max_cpu_mins=9; - string max_cpus=10; - string max_jobs=11; - string max_nodes=12; - string max_submit_jobs=13; - string max_wall=14; - string names=15; - string partitions=16; - string qos_level=17; -} - -message AddUserResp { - string result =1; -} - - -message DeleteUserReq{ - SlurmVersion slurm_version = 1; - string names=2; -} - -message DeleteUserResp { - string result =1; -} \ No newline at end of file diff --git a/adaptor/pcm_slurm/idl/slurmdb_wckey.proto b/adaptor/pcm_slurm/idl/slurmdb_wckey.proto deleted file mode 100644 index f3db6aee0..000000000 --- a/adaptor/pcm_slurm/idl/slurmdb_wckey.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "google/protobuf/timestamp.proto"; -import "idl/static.proto"; -import "idl/slurmdb_accounting.proto"; - -message WckeyInfo{ - repeated AccountingInfo accounting_list = 1 ; - string cluster= 2 ; - int32 id = 3 ; - int32 is_def = 4 ; - string name = 5 ; - int32 uid = 6 ; - string user = 7 ; -} - -message ListWckeysReq{ - SlurmVersion slurm_version = 1; -} - -message ListWckeysResp { - repeated WckeyInfo wckey_infos =1; -} - -message GetWckeyReq{ - SlurmVersion slurm_version = 1; - string wckey = 2; -} - -message GetWckeyResp { - repeated WckeyInfo wckey_info = 1; -} \ No newline at end of file diff --git a/adaptor/pcm_slurm/idl/static.proto b/adaptor/pcm_slurm/idl/static.proto deleted file mode 100644 index 12d053788..000000000 --- a/adaptor/pcm_slurm/idl/static.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; - -// slurm version -enum SlurmVersion { - // 0 - tianhe hpc - tianhe = 0; - // 1 - shenwei hpc - shenwei = 1; -} \ No newline at end of file diff --git a/adaptor/pcm_slurm/main.go b/adaptor/pcm_slurm/main.go deleted file mode 100644 index 804440246..000000000 --- a/adaptor/pcm_slurm/main.go +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - slurmserver "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/server" - "code.gitlink.org.cn/JCCE/PCM.git/common/config" - "code.gitlink.org.cn/JCCE/PCM.git/common/global" - "code.gitlink.org.cn/JCCE/PCM.git/common/server" - "go.uber.org/zap" - "google.golang.org/grpc" -) - -func main() { - - // 初始化配置以及数据库 - config.InitConfig() - - // 新建一个zap logger实例 - logger, _ := zap.NewDevelopment() - - // logger.Sugar().Fatal 直接可以少几行判错的代码 - logger.Sugar().Fatal(server.RunGRPCServer(&server.GRPCConfig{ - Name: "pcm_slurm", - Addr: global.S.SlurmInfo.Address, - RegisterFunc: func(g *grpc.Server) { - slurmpb.RegisterSlurmServiceServer(g, &slurmserver.Server{}) - }, - Logger: logger, - })) -} diff --git a/adaptor/pcm_slurm/rest/get_nodes.go b/adaptor/pcm_slurm/rest/get_nodes.go deleted file mode 100644 index 98d9e88e8..000000000 --- a/adaptor/pcm_slurm/rest/get_nodes.go +++ /dev/null @@ -1,3 +0,0 @@ -package rest - -//TODO diff --git a/adaptor/pcm_slurm/server/slurm.go b/adaptor/pcm_slurm/server/slurm.go deleted file mode 100644 index 364101aed..000000000 --- a/adaptor/pcm_slurm/server/slurm.go +++ /dev/null @@ -1,342 +0,0 @@ -package server - -import ( - slurmpb "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "context" - "github.com/golang/glog" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -type Server struct { - slurmpb.UnimplementedSlurmServiceServer -} - -// ListUsers return all slurm users -func (s *Server) ListUsers(ctx context.Context, req *slurmpb.ListUsersReq) (*slurmpb.ListUsersResp, error) { - resp, err := ListUsers(ctx, req) - if err != nil { - glog.Errorf("ListSlurmUsers error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// GetUser return specific slurm user -func (s *Server) GetUser(ctx context.Context, req *slurmpb.GetUserReq) (*slurmpb.GetUserResp, error) { - resp, err := GetUser(ctx, req) - if err != nil { - glog.Errorf("GetSlurmUser error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// AddUser add slurm user -func (s *Server) AddUser(ctx context.Context, req *slurmpb.AddUserReq) (*slurmpb.AddUserResp, error) { - resp, err := AddUser(ctx, req) - if err != nil { - glog.Errorf("AddSlurmUser error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// DeleteUser delete specific slurm user -func (s *Server) DeleteUser(ctx context.Context, req *slurmpb.DeleteUserReq) (*slurmpb.DeleteUserResp, error) { - resp, err := DeleteUser(ctx, req) - if err != nil { - glog.Errorf("DeleteSlurmUser error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// ListAssociations return all slurm associations -func (s *Server) ListAssociations(ctx context.Context, req *slurmpb.ListAssociationsReq) (*slurmpb.ListAssociationsResp, error) { - resp, err := ListAssociations(ctx, req) - if err != nil { - glog.Errorf("ListSlurmAssociations error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// GetAssociation return specific slurm associations -func (s *Server) GetAssociation(ctx context.Context, req *slurmpb.GetAssociationReq) (*slurmpb.GetAssociationResp, error) { - resp, err := GetAssociation(ctx, req) - if err != nil { - glog.Errorf("GetSlurmAssociations error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// ListAccounts return all slurm accounts -func (s *Server) ListAccounts(ctx context.Context, req *slurmpb.ListAccountsReq) (*slurmpb.ListAccountsResp, error) { - resp, err := ListAccounts(ctx, req) - if err != nil { - glog.Errorf("ListSlurmAccounts error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// GetAccount return specific slurm account -func (s *Server) GetAccount(ctx context.Context, req *slurmpb.GetAccountReq) (*slurmpb.GetAccountResp, error) { - resp, err := GetAccount(ctx, req) - if err != nil { - glog.Errorf("GetSlurmAccount error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// AddAccount return result -func (s *Server) AddAccount(ctx context.Context, req *slurmpb.AddAccountReq) (*slurmpb.AddAccountResp, error) { - resp, err := AddAccount(ctx, req) - if err != nil { - glog.Errorf("Add error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// DeleteAccount return result -func (s *Server) DeleteAccount(ctx context.Context, req *slurmpb.DeleteAccountReq) (*slurmpb.DeleteAccountResp, error) { - resp, err := DeleteAccount(ctx, req) - if err != nil { - glog.Errorf("Delete error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// ListQoss return all slurm qos -func (s *Server) GetQos(ctx context.Context, req *slurmpb.QosReq) (*slurmpb.QosResp, error) { - resp, err := GetQos(ctx, req) - if err != nil { - glog.Errorf("ListSlurmQoss error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// ListWckeys return all slurm wckeys -func (s *Server) ListWckeys(ctx context.Context, req *slurmpb.ListWckeysReq) (*slurmpb.ListWckeysResp, error) { - resp, err := ListWckeys(ctx, req) - if err != nil { - glog.Errorf("ListSlurmWckeys error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// GetWckey return specific slurm wckey -func (s *Server) GetWckey(ctx context.Context, req *slurmpb.GetWckeyReq) (*slurmpb.GetWckeyResp, error) { - resp, err := GetWckey(ctx, req) - if err != nil { - glog.Errorf("GetSlurmWckey error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// ListUsers return all slurm Clusters -func (s *Server) ListClusters(ctx context.Context, req *slurmpb.ListClustersReq) (*slurmpb.ListClustersResp, error) { - resp, err := ListClusters(ctx, req) - if err != nil { - glog.Errorf("ListSlurmUsers error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// GetUser return specific slurm user -func (s *Server) GetCluster(ctx context.Context, req *slurmpb.GetClusterReq) (*slurmpb.GetClusterResp, error) { - resp, err := GetCluster(ctx, req) - if err != nil { - glog.Errorf("GetSlurmUser error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// DeleteUser delete specific slurm user -func (s *Server) DeleteCluster(ctx context.Context, req *slurmpb.DeleteClusterReq) (*slurmpb.DeleteClusterResp, error) { - resp, err := DeleteCluster(ctx, req) - if err != nil { - glog.Errorf("DeleteSlurmUser error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// AddCluster add slurm user -func (s *Server) AddCluster(ctx context.Context, req *slurmpb.AddClusterReq) (*slurmpb.AddClusterResp, error) { - resp, err := AddCluster(ctx, req) - if err != nil { - glog.Errorf("AddSlurmCluster error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// GetNode return specific slurm user -func (s *Server) GetNode(ctx context.Context, req *slurmpb.GetNodeReq) (*slurmpb.GetNodeResp, error) { - resp, err := GetNode(ctx, req) - if err != nil { - glog.Errorf("GetSlurmUser error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// ListUsers return all slurm Clusters -func (s *Server) ListNodes(ctx context.Context, req *slurmpb.ListNodesReq) (*slurmpb.ListNodesResp, error) { - resp, err := ListNodes(ctx, req) - if err != nil { - glog.Errorf("ListSlurmNodes error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// ListUsers return all slurm Clusters -func (s *Server) ListPartitions(ctx context.Context, req *slurmpb.ListPartitionsReq) (*slurmpb.ListPartitionsResp, error) { - resp, err := ListPartitions(ctx, req) - if err != nil { - glog.Errorf("ListPartitions error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// GetNode return specific slurm user -func (s *Server) GetPartition(ctx context.Context, req *slurmpb.GetPartitionReq) (*slurmpb.GetPartitionResp, error) { - resp, err := GetPartition(ctx, req) - if err != nil { - glog.Errorf("GetPartition error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// GetReservation return specific slurm user -func (s *Server) GetReservation(ctx context.Context, req *slurmpb.GetReservationReq) (*slurmpb.GetReservationResp, error) { - resp, err := GetReservation(ctx, req) - if err != nil { - glog.Errorf("GetPartition error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// ListUsers return all slurm Clusters -func (s *Server) ListReservations(ctx context.Context, req *slurmpb.ListReservationsReq) (*slurmpb.ListReservationsResp, error) { - resp, err := ListReservations(ctx, req) - if err != nil { - glog.Errorf("ListReservations error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -func (s *Server) GetAllJobs(ctx context.Context, req *slurmpb.JobInfoMsgReq) (*slurmpb.JobInfoMsgResp, error) { - resp, err := GetAllJobs(ctx, req) - if err != nil { - glog.Errorf("GetAllJobs error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -func (s *Server) GetJob(ctx context.Context, req *slurmpb.JobInfoMsgReq) (*slurmpb.JobInfoMsgResp, error) { - resp, err := GetJob(ctx, req) - if err != nil { - glog.Errorf("GetJob error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -func (s *Server) SubmitJob(ctx context.Context, req *slurmpb.SubmitJobReq) (*slurmpb.SubmitJobResp, error) { - resp, err := SubmitJob(ctx, req) - if err != nil { - glog.Errorf("SubmitJob error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -func (s *Server) DeleteJob(ctx context.Context, req *slurmpb.DeleteJobReq) (*slurmpb.DeleteJobResp, error) { - resp, err := DeleteJob(ctx, req) - if err != nil { - glog.Errorf("DeleteJob error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -func (s *Server) UpdateJob(ctx context.Context, req *slurmpb.UpdateJobReq) (*slurmpb.UpdateJobResp, error) { - resp, err := UpdateJob(ctx, req) - if err != nil { - glog.Errorf("UpdateJob error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -func (s *Server) GetDiag(ctx context.Context, req *slurmpb.DiagReq) (*slurmpb.DiagResp, error) { - resp, err := GetDiag(ctx, req) - if err != nil { - glog.Errorf("GetDiag error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -func (s *Server) GetSlurmdbJobs(ctx context.Context, req *slurmpb.SlurmDbJobReq) (*slurmpb.SlurmDbJobResp, error) { - resp, err := GetSlurmdbJobs(ctx, req) - if err != nil { - glog.Errorf("GetSlurmdbJobs error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -func (s *Server) GetSlurmdbJobById(ctx context.Context, req *slurmpb.SlurmDbJobReq) (*slurmpb.SlurmDbJobResp, error) { - resp, err := GetSlurmdbJobById(ctx, req) - if err != nil { - glog.Errorf("GetSlurmdbJobById error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -func (s *Server) DeleteQos(ctx context.Context, req *slurmpb.DeleteQosReq) (*slurmpb.DeleteQosResp, error) { - resp, err := DeleteQos(ctx, req) - if err != nil { - glog.Errorf("DeleteQos error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -func (s *Server) AddQos(ctx context.Context, req *slurmpb.AddQosReq) (*slurmpb.AddQosResp, error) { - resp, err := AddQos(ctx, req) - if err != nil { - glog.Errorf("AddQos error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -func (s *Server) GetQosByName(ctx context.Context, req *slurmpb.QosReq) (*slurmpb.QosResp, error) { - resp, err := GetQosByName(ctx, req) - if err != nil { - glog.Errorf("GetQosByName error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} diff --git a/adaptor/pcm_slurm/server/slurmImpl.go b/adaptor/pcm_slurm/server/slurmImpl.go deleted file mode 100644 index 4385598df..000000000 --- a/adaptor/pcm_slurm/server/slurmImpl.go +++ /dev/null @@ -1,313 +0,0 @@ -package server - -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - slurmer "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/service/common" - "context" -) - -func ListUsers(ctx context.Context, req *pbslurm.ListUsersReq) (*pbslurm.ListUsersResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.ListUsers(ctx, req) - return resp, nil -} - -func GetUser(ctx context.Context, req *pbslurm.GetUserReq) (*pbslurm.GetUserResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.GetUser(ctx, req) - return resp, nil -} - -func AddUser(ctx context.Context, req *pbslurm.AddUserReq) (*pbslurm.AddUserResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.AddUser(ctx, req) - return resp, nil -} - -func DeleteUser(ctx context.Context, req *pbslurm.DeleteUserReq) (*pbslurm.DeleteUserResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.DeleteUser(ctx, req) - return resp, nil -} - -func ListAssociations(ctx context.Context, req *pbslurm.ListAssociationsReq) (*pbslurm.ListAssociationsResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.ListAssociations(ctx, req) - return resp, nil -} - -func GetAssociation(ctx context.Context, req *pbslurm.GetAssociationReq) (*pbslurm.GetAssociationResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.GetAssociation(ctx, req) - return resp, nil -} - -func ListAccounts(ctx context.Context, req *pbslurm.ListAccountsReq) (*pbslurm.ListAccountsResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.ListAccounts(ctx, req) - return resp, nil -} - -func GetAccount(ctx context.Context, req *pbslurm.GetAccountReq) (*pbslurm.GetAccountResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.GetAccount(ctx, req) - return resp, nil -} - -func AddAccount(ctx context.Context, req *pbslurm.AddAccountReq) (*pbslurm.AddAccountResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.AddAccount(ctx, req) - return resp, nil -} - -func DeleteAccount(ctx context.Context, req *pbslurm.DeleteAccountReq) (*pbslurm.DeleteAccountResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.DeleteAccount(ctx, req) - return resp, nil -} - -func GetQos(ctx context.Context, req *pbslurm.QosReq) (*pbslurm.QosResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.GetQos(ctx, req) - return resp, nil -} - -func ListWckeys(ctx context.Context, req *pbslurm.ListWckeysReq) (*pbslurm.ListWckeysResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.ListWckeys(ctx, req) - return resp, nil -} - -func GetWckey(ctx context.Context, req *pbslurm.GetWckeyReq) (*pbslurm.GetWckeyResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.GetWckey(ctx, req) - return resp, nil -} - -func ListClusters(ctx context.Context, req *pbslurm.ListClustersReq) (*pbslurm.ListClustersResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.ListClusters(ctx, req) - return resp, nil -} - -func GetCluster(ctx context.Context, req *pbslurm.GetClusterReq) (*pbslurm.GetClusterResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.GetCluster(ctx, req) - return resp, nil -} - -func DeleteCluster(ctx context.Context, req *pbslurm.DeleteClusterReq) (*pbslurm.DeleteClusterResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.DeleteCluster(ctx, req) - return resp, nil -} - -func AddCluster(ctx context.Context, req *pbslurm.AddClusterReq) (*pbslurm.AddClusterResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.AddCluster(ctx, req) - return resp, nil -} - -func ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (*pbslurm.ListNodesResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.ListNodes(ctx, req) - return resp, nil -} - -func GetNode(ctx context.Context, req *pbslurm.GetNodeReq) (*pbslurm.GetNodeResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.GetNode(ctx, req) - return resp, nil -} - -func ListPartitions(ctx context.Context, req *pbslurm.ListPartitionsReq) (*pbslurm.ListPartitionsResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.ListPartitions(ctx, req) - return resp, nil -} - -func GetPartition(ctx context.Context, req *pbslurm.GetPartitionReq) (*pbslurm.GetPartitionResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.GetPartition(ctx, req) - return resp, nil -} - -func GetReservation(ctx context.Context, req *pbslurm.GetReservationReq) (*pbslurm.GetReservationResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.GetReservation(ctx, req) - return resp, nil -} - -func ListReservations(ctx context.Context, req *pbslurm.ListReservationsReq) (*pbslurm.ListReservationsResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.ListReservations(ctx, req) - return resp, nil -} - -func GetAllJobs(ctx context.Context, req *pbslurm.JobInfoMsgReq) (*pbslurm.JobInfoMsgResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.GetAllJobs(ctx, req) - return resp, nil -} - -func GetJob(ctx context.Context, req *pbslurm.JobInfoMsgReq) (*pbslurm.JobInfoMsgResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.GetJob(ctx, req) - return resp, nil -} - -func SubmitJob(ctx context.Context, req *pbslurm.SubmitJobReq) (*pbslurm.SubmitJobResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.SubmitJob(ctx, req) - return resp, nil -} - -func DeleteJob(ctx context.Context, req *pbslurm.DeleteJobReq) (*pbslurm.DeleteJobResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.DeleteJob(ctx, req) - return resp, nil -} - -func UpdateJob(ctx context.Context, req *pbslurm.UpdateJobReq) (*pbslurm.UpdateJobResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.UpdateJob(ctx, req) - return resp, nil -} - -func GetDiag(ctx context.Context, req *pbslurm.DiagReq) (*pbslurm.DiagResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.GetDiag(ctx, req) - return resp, nil -} - -func GetSlurmdbJobs(ctx context.Context, req *pbslurm.SlurmDbJobReq) (*pbslurm.SlurmDbJobResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.GetSlurmdbJobs(ctx, req) - return resp, nil -} - -func GetSlurmdbJobById(ctx context.Context, req *pbslurm.SlurmDbJobReq) (*pbslurm.SlurmDbJobResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.GetSlurmdbJobById(ctx, req) - return resp, nil -} - -func DeleteQos(ctx context.Context, req *pbslurm.DeleteQosReq) (*pbslurm.DeleteQosResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.DeleteQos(ctx, req) - return resp, nil -} - -func AddQos(ctx context.Context, req *pbslurm.AddQosReq) (*pbslurm.AddQosResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.AddQos(ctx, req) - return resp, nil -} - -func GetQosByName(ctx context.Context, req *pbslurm.QosReq) (*pbslurm.QosResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.GetQosByName(ctx, req) - return resp, nil -} diff --git a/adaptor/pcm_slurm/service/common/account_db.go b/adaptor/pcm_slurm/service/common/account_db.go deleted file mode 100644 index 32ae7e7cb..000000000 --- a/adaptor/pcm_slurm/service/common/account_db.go +++ /dev/null @@ -1,130 +0,0 @@ -package slurmer - -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/service/tianhe" - "code.gitlink.org.cn/JCCE/PCM.git/common/ssh" - "context" - "strings" -) - -func (slurmStruct SlurmStruct) ListAccounts(ctx context.Context, req *pbslurm.ListAccountsReq) (*pbslurm.ListAccountsResp, error) { - - acctList := tianhe.GetAcctInfo() - - resp := pbslurm.ListAccountsResp{} - for _, acct := range acctList.AcctInfoList { - //AcctInfoResult := pbslurm.AccountInfo{} - //AcctInfoResult.Name = Acct.Name - acctInfoResult := acct - - resp.AccountInfos = append(resp.AccountInfos, &acctInfoResult) - } - - return &resp, nil -} - -func (slurmStruct SlurmStruct) GetAccount(ctx context.Context, req *pbslurm.GetAccountReq) (*pbslurm.GetAccountResp, error) { - - acctList := tianhe.GetAcctInfo() - - resp := pbslurm.GetAccountResp{} - for _, acct := range acctList.AcctInfoList { - acctInfoResult := acct - if strings.Contains(acct.Name, req.AccountName) { - resp.AccountInfos = append(resp.AccountInfos, &acctInfoResult) - } - } - - return &resp, nil -} - -func (slurmStruct SlurmStruct) AddAccount(ctx context.Context, req *pbslurm.AddAccountReq) (*pbslurm.AddAccountResp, error) { - - cmd := "/usr/local/bin/sacctmgr add account " - - cmd = cmd + req.Names - if len(req.Clusters) != 0 { - cmd = cmd + " Clusters=" + req.Clusters - } - if len(req.DefaultQos) != 0 { - cmd = cmd + " DefaultQOS=" + req.DefaultQos - } - if len(req.Description) != 0 { - cmd = cmd + " Description=\"" + req.Description + "\"" - } - if len(req.FairShare) != 0 { - cmd = cmd + " Fairshare=" + req.FairShare - } - if len(req.GrpCpuMins) != 0 { - cmd = cmd + " GrpCPUMins=" + req.GrpCpuMins - } - if len(req.GrpCpus) != 0 { - cmd = cmd + " GrpCPUs=" + req.GrpCpus - } - if len(req.GrpJobs) != 0 { - cmd = cmd + " GrpJobs=" + req.GrpJobs - } - if len(req.GrpMemory) != 0 { - cmd = cmd + " GrpMemory=" + req.GrpMemory - } - if len(req.GrpNodes) != 0 { - cmd = cmd + " GrpNodes=" + req.GrpNodes - } - if len(req.GrpSubmitJobs) != 0 { - cmd = cmd + " GrpSubmitJob=" + req.GrpSubmitJobs - } - if len(req.GrpWall) != 0 { - cmd = cmd + " GrpWall=" + req.GrpWall - } - if len(req.MaxCpuMins) != 0 { - cmd = cmd + " MaxCPUMins=" + req.MaxCpuMins - } - if len(req.MaxCpus) != 0 { - cmd = cmd + " MaxCPUs=" + req.MaxCpus - } - if len(req.MaxJobs) != 0 { - cmd = cmd + " MaxJobs=" + req.MaxJobs - } - if len(req.MaxNodes) != 0 { - cmd = cmd + " MaxNodes=" + req.MaxNodes - } - if len(req.MaxSubmitJobs) != 0 { - cmd = cmd + " MaxSubmitJobs=" + req.MaxSubmitJobs - } - if len(req.MaxWall) != 0 { - cmd = cmd + " MaxWall=" + req.MaxWall - } - if len(req.Organization) != 0 { - cmd = cmd + " Organization=" + req.Organization - } - if len(req.Parent) != 0 { - cmd = cmd + " Parent=" + req.Parent - } - if len(req.QosLevel) != 0 { - cmd = cmd + " QosLevel=" + req.QosLevel - } - - cmd = cmd + " -i" - - result := ssh.ExecCommand(cmd) - - resp := pbslurm.AddAccountResp{} - resp.Result = result - - return &resp, nil -} - -func (slurmStruct SlurmStruct) DeleteAccount(ctx context.Context, req *pbslurm.DeleteAccountReq) (*pbslurm.DeleteAccountResp, error) { - - cmd := "/usr/local/bin/sacctmgr delete account " - cmd = cmd + req.Names - cmd = cmd + " -i" - - result := ssh.ExecCommand(cmd) - - resp := pbslurm.DeleteAccountResp{} - resp.Result = result - - return &resp, nil -} diff --git a/adaptor/pcm_slurm/service/common/association_db.go b/adaptor/pcm_slurm/service/common/association_db.go deleted file mode 100644 index 85d2d6125..000000000 --- a/adaptor/pcm_slurm/service/common/association_db.go +++ /dev/null @@ -1,38 +0,0 @@ -package slurmer - -import "C" -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/service/tianhe" - "context" - "strings" -) - -func (slurmStruct SlurmStruct) ListAssociations(ctx context.Context, req *pbslurm.ListAssociationsReq) (*pbslurm.ListAssociationsResp, error) { - - assocList := tianhe.GetAssociationInfos() - - resp := pbslurm.ListAssociationsResp{} - for _, assoc := range assocList.AssocInfoList { - assocResult := assoc - resp.AssocInfos = append(resp.AssocInfos, &assocResult) - } - - return &resp, nil -} - -func (slurmStruct SlurmStruct) GetAssociation(ctx context.Context, req *pbslurm.GetAssociationReq) (*pbslurm.GetAssociationResp, error) { - - assocList := tianhe.GetAssociationInfos() - - resp := pbslurm.GetAssociationResp{} - - for _, assoc := range assocList.AssocInfoList { - if (len(req.Cluster) != 0 || len(req.User) != 0 || len(req.Account) != 0 || len(req.Partition) != 0) && strings.Contains(assoc.Cluster, req.Cluster) && strings.Contains(assoc.Acct, req.Account) && strings.Contains(assoc.User, req.User) && strings.Contains(assoc.Partition, req.Partition) { - assocResult := assoc - resp.AssocInfos = append(resp.AssocInfos, &assocResult) - } - } - - return &resp, nil -} diff --git a/adaptor/pcm_slurm/service/common/cluster_db.go b/adaptor/pcm_slurm/service/common/cluster_db.go deleted file mode 100644 index 7936cfaae..000000000 --- a/adaptor/pcm_slurm/service/common/cluster_db.go +++ /dev/null @@ -1,97 +0,0 @@ -package slurmer - -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/service/tianhe" - "code.gitlink.org.cn/JCCE/PCM.git/common/ssh" - "context" - "strings" -) - -func (slurmStruct SlurmStruct) ListClusters(ctx context.Context, req *pbslurm.ListClustersReq) (*pbslurm.ListClustersResp, error) { - - clusterList := tianhe.GetClusterInfo() - - resp := pbslurm.ListClustersResp{} - for _, cluster := range clusterList.ClusterInfoList { - clusterInfoResult := pbslurm.ClusterInfo{} - clusterInfoResult = cluster - resp.ClusterInfos = append(resp.ClusterInfos, &clusterInfoResult) - } - return &resp, nil -} - -func (slurmStruct SlurmStruct) DeleteCluster(ctx context.Context, req *pbslurm.DeleteClusterReq) (*pbslurm.DeleteClusterResp, error) { - - cmd := "usr/local/bin/sacctmgr delete cluster" - cmd = cmd + req.Names - cmd = cmd + "-i" - - result := ssh.ExecCommand(cmd) - //var go_cluster_buffer ClusterInfoMsg - resp := pbslurm.DeleteClusterResp{} - resp.Result = result - return &resp, nil - -} - -func (slurmStruct SlurmStruct) AddCluster(ctx context.Context, req *pbslurm.AddClusterReq) (*pbslurm.AddClusterResp, error) { - - cmd := "/usr/local/bin/sacctmgr add cluster " - - cmd = cmd + req.Name - if len(req.Nodes) != 0 { - cmd = cmd + " Nodes=" + req.Nodes - } - if len(req.Classification) != 0 { - cmd = cmd + " Classification=" + req.Classification - } - if len(req.ControlHost) != 0 { - cmd = cmd + " ControlHost=\"" + req.ControlHost + "\"" - } - if len(req.ControlPort) != 0 { - cmd = cmd + " ControlPort=" + req.ControlPort - } - if len(req.CpuCount) != 0 { - cmd = cmd + " CpuCount=" + req.CpuCount - } - if len(req.Dimensions) != 0 { - cmd = cmd + " Dimensions=" + req.Dimensions - } - if len(req.DimSize) != 0 { - cmd = cmd + " DimSize=" + req.DimSize - } - if len(req.Flags) != 0 { - cmd = cmd + " Flags=" + req.Flags - } - if len(req.PluginIdSelect) != 0 { - cmd = cmd + " GrpNodes=" + req.PluginIdSelect - } - if len(req.RpcVersion) != 0 { - cmd = cmd + " RpcVersion=" + req.RpcVersion - } - - cmd = cmd + " -i" - - result := ssh.ExecCommand(cmd) - - resp := pbslurm.AddClusterResp{} - resp.Result = result - - return &resp, nil -} - -func (slurmStruct SlurmStruct) GetCluster(ctx context.Context, req *pbslurm.GetClusterReq) (*pbslurm.GetClusterResp, error) { - - clusterList := tianhe.GetClusterInfo() - - resp := pbslurm.GetClusterResp{} - for _, cluster := range clusterList.ClusterInfoList { - clusterInfoResult := cluster - if strings.Contains(cluster.Name, req.ClusterName) { - resp.ClusterInfos = append(resp.ClusterInfos, &clusterInfoResult) - } - } - - return &resp, nil -} diff --git a/adaptor/pcm_slurm/service/common/diag.go b/adaptor/pcm_slurm/service/common/diag.go deleted file mode 100644 index fd7bdb329..000000000 --- a/adaptor/pcm_slurm/service/common/diag.go +++ /dev/null @@ -1,16 +0,0 @@ -package slurmer - -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/service/tianhe" - "context" -) - -func (slurmStruct SlurmStruct) GetDiag(ctx context.Context, req *pbslurm.DiagReq) (*pbslurm.DiagResp, error) { - stats := tianhe.Get_diag() - - var resp = pbslurm.DiagResp{} - resp.StatsInfoResponseMsg = &stats - - return &resp, nil -} diff --git a/adaptor/pcm_slurm/service/common/job.go b/adaptor/pcm_slurm/service/common/job.go deleted file mode 100644 index 168a20253..000000000 --- a/adaptor/pcm_slurm/service/common/job.go +++ /dev/null @@ -1,30 +0,0 @@ -package slurmer - -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/service/tianhe" - "context" -) - -func (slurmStruct SlurmStruct) GetAllJobs(ctx context.Context, req *pbslurm.JobInfoMsgReq) (*pbslurm.JobInfoMsgResp, error) { - job_info_msg := tianhe.Get_all_jobs() - var resp = pbslurm.JobInfoMsgResp{} - resp.JobInfoMsg = &job_info_msg - - return &resp, nil -} - -func (slurmStruct SlurmStruct) GetJob(ctx context.Context, req *pbslurm.JobInfoMsgReq) (*pbslurm.JobInfoMsgResp, error) { - job_info_msg := tianhe.Get_job(req.JobId) - var resp = pbslurm.JobInfoMsgResp{} - resp.JobInfoMsg = &job_info_msg - - return &resp, nil -} - -func (slurmStruct SlurmStruct) DeleteJob(ctx context.Context, req *pbslurm.DeleteJobReq) (*pbslurm.DeleteJobResp, error) { - errorCode := tianhe.Delete_job(req.JobId) - var resp = pbslurm.DeleteJobResp{} - resp.ErrorCode = errorCode - return &resp, nil -} diff --git a/adaptor/pcm_slurm/service/common/job_db.go b/adaptor/pcm_slurm/service/common/job_db.go deleted file mode 100644 index 642c1fd04..000000000 --- a/adaptor/pcm_slurm/service/common/job_db.go +++ /dev/null @@ -1,23 +0,0 @@ -package slurmer - -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/service/tianhe" - "context" -) - -func (slurmStruct SlurmStruct) GetSlurmdbJobs(ctx context.Context, req *pbslurm.SlurmDbJobReq) (*pbslurm.SlurmDbJobResp, error) { - slurmdbJobs := tianhe.GetAllSlurmdbJobs() - var resp = pbslurm.SlurmDbJobResp{} - resp.SlurmdbJobRec = slurmdbJobs - - return &resp, nil -} - -func (slurmStruct SlurmStruct) GetSlurmdbJobById(ctx context.Context, req *pbslurm.SlurmDbJobReq) (*pbslurm.SlurmDbJobResp, error) { - slurmdbjob := tianhe.GetSlurmdbJobById(int(req.JobId)) - var resp = pbslurm.SlurmDbJobResp{} - resp.SlurmdbJobRec = slurmdbjob - - return &resp, nil -} diff --git a/adaptor/pcm_slurm/service/common/job_submit.go b/adaptor/pcm_slurm/service/common/job_submit.go deleted file mode 100644 index da91ad528..000000000 --- a/adaptor/pcm_slurm/service/common/job_submit.go +++ /dev/null @@ -1,27 +0,0 @@ -package slurmer - -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/service/tianhe" - "context" -) - -func (slurmStruct SlurmStruct) SubmitJob(ctx context.Context, req *pbslurm.SubmitJobReq) (*pbslurm.SubmitJobResp, error) { - submit_response_msg := tianhe.Submit_job(req.Data) - var resp = pbslurm.SubmitJobResp{} - submitResponseMsg := pbslurm.SubmitResponseMsg{} - submitResponseMsg.JobId = submit_response_msg.JobId - submitResponseMsg.StepId = submit_response_msg.StepId - submitResponseMsg.ErrorCode = submit_response_msg.ErrorCode - - resp.SubmitResponseMsg = append(resp.SubmitResponseMsg, &submitResponseMsg) - - return &resp, nil -} - -func (slurmStruct SlurmStruct) UpdateJob(ctx context.Context, req *pbslurm.UpdateJobReq) (*pbslurm.UpdateJobResp, error) { - errorCode := tianhe.Update_job(req.Data, req.JobId) - var resp = pbslurm.UpdateJobResp{} - resp.ErrorCode = errorCode - return &resp, nil -} diff --git a/adaptor/pcm_slurm/service/common/node.go b/adaptor/pcm_slurm/service/common/node.go deleted file mode 100644 index a36fc55fc..000000000 --- a/adaptor/pcm_slurm/service/common/node.go +++ /dev/null @@ -1,53 +0,0 @@ -package slurmer - -import "C" -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/service/tianhe" - "context" - "strings" -) - -func (slurmStruct SlurmStruct) ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (*pbslurm.ListNodesResp, error) { - nodeList := tianhe.Get_all_nodes() - var resp = pbslurm.ListNodesResp{} - for _, node := range nodeList.NodeInfoList { - nodeInfoResult := pbslurm.NodeInfo{} - nodeInfoResult.Cpus = uint32(node.Cpus) - nodeInfoResult.Boards = uint32(node.Boards) - nodeInfoResult.RealMemory = node.RealMemory - nodeInfoResult.Sockets = uint32(node.Sockets) - nodeInfoResult.Threads = uint32(node.Threads) - resp.NodeInfos = append(resp.NodeInfos, &nodeInfoResult) - } - - return &resp, nil -} - -func (slurmStruct SlurmStruct) GetNode(ctx context.Context, req *pbslurm.GetNodeReq) (*pbslurm.GetNodeResp, error) { - NodeList := tianhe.GetNodeInfo() - resp := pbslurm.GetNodeResp{} - for _, node := range NodeList.NodeInfoList { - nodeInfoResult := node - if strings.Contains(node.Name, req.NodeName) { - resp.NodeInfos = append(resp.NodeInfos, &nodeInfoResult) - } - } - return &resp, nil -} - -/*func (slurmStruct SlurmStruct) GetNodeByName(ctx context.Context, req *pbnode.NodeInfoMsgReq) (*pbnode.NodeInfoMsgResp, error) { - node := Get_node_info(req.NodeName) - var resp = pbnode.NodeInfoMsgResp{} - for _, node := range node.Node_list { - nodeInfoResult := pbnode.Node_Info{} - nodeInfoResult.Cpus = uint32(node.Cpus) - nodeInfoResult.Boards = uint32(node.Boards) - nodeInfoResult.RealMemory = node.RealMemory - nodeInfoResult.Sockets = uint32(node.Sockets) - nodeInfoResult.Threads = uint32(node.Threads) - resp.NodeList = append(resp.NodeList, &nodeInfoResult) - } - - return &resp, nil -}*/ diff --git a/adaptor/pcm_slurm/service/common/partition.go b/adaptor/pcm_slurm/service/common/partition.go deleted file mode 100644 index 46e9cc140..000000000 --- a/adaptor/pcm_slurm/service/common/partition.go +++ /dev/null @@ -1,31 +0,0 @@ -package slurmer - -import "C" -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/service/tianhe" - "context" - "strings" -) - -func (slurmStruct SlurmStruct) ListPartitions(ctx context.Context, req *pbslurm.ListPartitionsReq) (*pbslurm.ListPartitionsResp, error) { - partitionList := tianhe.Get_partitions() - var resp = pbslurm.ListPartitionsResp{} - for _, partition := range partitionList.PartitionInfoList { - partitionInfoResult := partition - resp.PartitionList = append(resp.PartitionList, &partitionInfoResult) - } - return &resp, nil -} - -func (slurmStruct SlurmStruct) GetPartition(ctx context.Context, req *pbslurm.GetPartitionReq) (*pbslurm.GetPartitionResp, error) { - PartitionList := tianhe.GetPartitionsInfo() - resp := pbslurm.GetPartitionResp{} - for _, partition := range PartitionList.PartitionInfoList { - partitionInfoResult := partition - if strings.Contains(partition.Name, req.PartitionName) { - resp.PartitionInfos = append(resp.PartitionInfos, &partitionInfoResult) - } - } - return &resp, nil -} diff --git a/adaptor/pcm_slurm/service/common/ping.go b/adaptor/pcm_slurm/service/common/ping.go deleted file mode 100644 index 00827481f..000000000 --- a/adaptor/pcm_slurm/service/common/ping.go +++ /dev/null @@ -1,31 +0,0 @@ -package slurmer - -/* -//#cgo LDFLAGS: -lslurm -#include -#include -#include - - // int ping_result; - // ping_result = slurm_ping(int ping) - int slurm_ping(int controller){ - int ping_result; - ping_result = slurm_ping(controller); - return ping_result; - } - -*/ -import "C" -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "context" -) - -func (slurmStruct SlurmStruct) GetPingResult(ctx context.Context, req *pbslurm.PingInfoMsgReq) (*pbslurm.PingInfoMsgResp, error) { - cgoIntA := C.int(req.Controller) - Ping_result := C.slurm_ping(cgoIntA) - //C.free(unsafe.Pointer(cgoIntA)) - var resp = pbslurm.PingInfoMsgResp{} - resp.PingResult = int32(Ping_result) - return &resp, nil -} diff --git a/adaptor/pcm_slurm/service/common/qos_db.go b/adaptor/pcm_slurm/service/common/qos_db.go deleted file mode 100644 index 2b7c84c24..000000000 --- a/adaptor/pcm_slurm/service/common/qos_db.go +++ /dev/null @@ -1,60 +0,0 @@ -package slurmer - -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/service/tianhe" - "code.gitlink.org.cn/JCCE/PCM.git/common/ssh" - "context" -) - -func (slurmStruct SlurmStruct) GetQos(ctx context.Context, req *pbslurm.QosReq) (*pbslurm.QosResp, error) { - qoslist := tianhe.Get_Qos() - var resp = pbslurm.QosResp{} - resp.SlurmdbQosRec = qoslist - return &resp, nil -} - -func (slurmStruct SlurmStruct) DeleteQos(ctx context.Context, req *pbslurm.DeleteQosReq) (*pbslurm.DeleteQosResp, error) { - - cmd := "/usr/local/bin/sacctmgr delete qos " - cmd = cmd + req.Names - cmd = cmd + " -i" - - result := ssh.ExecCommand(cmd) - - resp := pbslurm.DeleteQosResp{} - resp.Result = result - - return &resp, nil -} - -func (slurmStruct SlurmStruct) GetQosByName(ctx context.Context, req *pbslurm.QosReq) (*pbslurm.QosResp, error) { - qos := tianhe.GetQosByName(req.Name) - var resp = pbslurm.QosResp{} - slurmdbRosRec := []*pbslurm.SlurmdbQosRec{} - slurmdbRosRec = append(slurmdbRosRec, &qos) - resp.SlurmdbQosRec = slurmdbRosRec - - return &resp, nil -} - -func (slurmStruct SlurmStruct) AddQos(ctx context.Context, req *pbslurm.AddQosReq) (*pbslurm.AddQosResp, error) { - cmd := "/usr/local/bin/sacctmgr add qos " - cmd = cmd + req.SlurmdbQosRec.Name - - if len(req.SlurmdbQosRec.Description) != 0 { - cmd = cmd + " Description=" + req.SlurmdbQosRec.Description - } - - if len(req.SlurmdbQosRec.Name) != 0 { - cmd = cmd + " Name=" + req.SlurmdbQosRec.Name - } - - cmd = cmd + " -i" - - result := ssh.ExecCommand(cmd) - resp := pbslurm.AddQosResp{} - - resp.Result = result - return &resp, nil -} diff --git a/adaptor/pcm_slurm/service/common/reservation.go b/adaptor/pcm_slurm/service/common/reservation.go deleted file mode 100644 index 6d895f2a8..000000000 --- a/adaptor/pcm_slurm/service/common/reservation.go +++ /dev/null @@ -1,67 +0,0 @@ -package slurmer - -import "C" -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/service/tianhe" - "context" - "strings" -) - -func (slurmStruct SlurmStruct) ListReservations(ctx context.Context, req *pbslurm.ListReservationsReq) (*pbslurm.ListReservationsResp, error) { - reservationList := tianhe.Get_all_reservation() - - var resp = pbslurm.ListReservationsResp{} - for _, reservation := range reservationList.ReservationList { - reservationInfoResult := reservation - resp.ReservationList = append(resp.ReservationList, &reservationInfoResult) - } - return &resp, nil -} - -func (slurmStruct SlurmStruct) GetReservation(ctx context.Context, req *pbslurm.GetReservationReq) (*pbslurm.GetReservationResp, error) { - ReservationList := tianhe.GetReservationsInfo() - resp := pbslurm.GetReservationResp{} - for _, reservation := range ReservationList.ReservationList { - reservationInfoResult := reservation - if strings.Contains(reservation.Name, req.ReservationName) { - resp.ReservationInfos = append(resp.ReservationInfos, &reservationInfoResult) - } - } - return &resp, nil -} - -/*func (slurmStruct SlurmStruct) GetReservationByName(ctx context.Context, req *pbslurm.ReservationInfoMsgReq) (*pbslurm.ReservationInfoMsgResp, error) { - reservation := Get_reservation_info(req.ReservationName) - var resp = pbslurm.ReservationInfoMsgResp{} - for _, reservation := range reservation.Reservation_list { - reservationInfoResult := pbslurm.Reservation_Info{} - reservationInfoResult.Name = reservation.Name - /*nodeInfoResult.Boards = uint32(node.Boards) - nodeInfoResult.RealMemory = node.Real_memory - nodeInfoResult.Sockets = uint32(node.Sockets) - nodeInfoResult.Threads = uint32(node.Threads)* - resp.ReservationList = append(resp.ReservationList, &reservationInfoResult) - } - return &resp, nil -} - -func Get_reservation_info(name string) ReserveInfoMsg { - go_reservation_buffer := Get_all_reservation() - //partitionList := list.New() - for i := range go_reservation_buffer.ReservationList { - //遍历nodeList集合 - reservation := go_reservation_buffer.ReservationList[i] - fmt.Println("reservationName: " + reservation.Name) - //当集合中的名字等于传过来的值 - if name == reservation.Name { - /*partitionList.PushFront(partition.Name) - partitionList.PushFront(partition.Nodes)* - } else { - - } - //fmt.Println(partition.Node_inx) - } - return go_reservation_buffer - -}*/ diff --git a/adaptor/pcm_slurm/service/common/slurmer.go b/adaptor/pcm_slurm/service/common/slurmer.go deleted file mode 100644 index ec7310a77..000000000 --- a/adaptor/pcm_slurm/service/common/slurmer.go +++ /dev/null @@ -1,54 +0,0 @@ -package slurmer - -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "context" -) - -type Slurmer interface { - ListUsers(ctx context.Context, req *pbslurm.ListUsersReq) (resp *pbslurm.ListUsersResp, err error) //list slurm users - GetUser(ctx context.Context, req *pbslurm.GetUserReq) (resp *pbslurm.GetUserResp, err error) //get specific slurm user - AddUser(ctx context.Context, req *pbslurm.AddUserReq) (resp *pbslurm.AddUserResp, err error) //add slurm user - DeleteUser(ctx context.Context, req *pbslurm.DeleteUserReq) (resp *pbslurm.DeleteUserResp, err error) //delete slurm user - ListAssociations(ctx context.Context, req *pbslurm.ListAssociationsReq) (resp *pbslurm.ListAssociationsResp, err error) //list slurm associations - GetAssociation(ctx context.Context, req *pbslurm.GetAssociationReq) (resp *pbslurm.GetAssociationResp, err error) //get specific slurm associations - ListAccounts(ctx context.Context, req *pbslurm.ListAccountsReq) (resp *pbslurm.ListAccountsResp, err error) //list slurm accounts - GetAccount(ctx context.Context, req *pbslurm.GetAccountReq) (resp *pbslurm.GetAccountResp, err error) //get specific slurm account - AddAccount(ctx context.Context, req *pbslurm.AddAccountReq) (resp *pbslurm.AddAccountResp, err error) //add slurm account - DeleteAccount(ctx context.Context, req *pbslurm.DeleteAccountReq) (resp *pbslurm.DeleteAccountResp, err error) //delete slurm account - GetQos(ctx context.Context, req *pbslurm.QosReq) (resp *pbslurm.QosResp, err error) //list slurm qoss - ListWckeys(ctx context.Context, req *pbslurm.ListWckeysReq) (resp *pbslurm.ListWckeysResp, err error) //list slurm wckeys - GetWckey(ctx context.Context, req *pbslurm.GetWckeyReq) (resp *pbslurm.GetWckeyResp, err error) //list slurm wckeys - ListClusters(ctx context.Context, req *pbslurm.ListClustersReq) (resp *pbslurm.ListClustersResp, err error) - GetCluster(ctx context.Context, req *pbslurm.GetClusterReq) (resp *pbslurm.GetClusterResp, err error) - DeleteCluster(ctx context.Context, req *pbslurm.DeleteClusterReq) (resp *pbslurm.DeleteClusterResp, err error) - AddCluster(ctx context.Context, req *pbslurm.AddClusterReq) (resp *pbslurm.AddClusterResp, err error) - ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (resp *pbslurm.ListNodesResp, err error) - GetNode(ctx context.Context, req *pbslurm.GetNodeReq) (resp *pbslurm.GetNodeResp, err error) - ListPartitions(ctx context.Context, req *pbslurm.ListPartitionsReq) (resp *pbslurm.ListPartitionsResp, err error) - GetPartition(ctx context.Context, req *pbslurm.GetPartitionReq) (resp *pbslurm.GetPartitionResp, err error) - ListReservations(ctx context.Context, req *pbslurm.ListReservationsReq) (resp *pbslurm.ListReservationsResp, err error) - GetReservation(ctx context.Context, req *pbslurm.GetReservationReq) (resp *pbslurm.GetReservationResp, err error) - GetAllJobs(ctx context.Context, req *pbslurm.JobInfoMsgReq) (resp *pbslurm.JobInfoMsgResp, err error) - GetJob(ctx context.Context, req *pbslurm.JobInfoMsgReq) (resp *pbslurm.JobInfoMsgResp, err error) - SubmitJob(ctx context.Context, req *pbslurm.SubmitJobReq) (resp *pbslurm.SubmitJobResp, err error) - DeleteJob(ctx context.Context, req *pbslurm.DeleteJobReq) (resp *pbslurm.DeleteJobResp, err error) - UpdateJob(ctx context.Context, req *pbslurm.UpdateJobReq) (resp *pbslurm.UpdateJobResp, err error) - GetDiag(ctx context.Context, req *pbslurm.DiagReq) (resp *pbslurm.DiagResp, err error) - GetSlurmdbJobs(ctx context.Context, req *pbslurm.SlurmDbJobReq) (resp *pbslurm.SlurmDbJobResp, err error) - GetSlurmdbJobById(ctx context.Context, req *pbslurm.SlurmDbJobReq) (resp *pbslurm.SlurmDbJobResp, err error) - DeleteQos(ctx context.Context, req *pbslurm.DeleteQosReq) (resp *pbslurm.DeleteQosResp, err error) - GetQosByName(ctx context.Context, req *pbslurm.QosReq) (resp *pbslurm.QosResp, err error) - AddQos(ctx context.Context, req *pbslurm.AddQosReq) (resp *pbslurm.AddQosResp, err error) -} - -func SelectSlurmVersion(slurmVersion pbslurm.SlurmVersion) (slurmer Slurmer, err error) { - - switch slurmVersion { - case pbslurm.SlurmVersion_tianhe: - return SelectTianhe() - case pbslurm.SlurmVersion_shenwei: - print("no adaptor for shenwei right now") - } - return -} diff --git a/adaptor/pcm_slurm/service/common/tianhe.go b/adaptor/pcm_slurm/service/common/tianhe.go deleted file mode 100644 index 5f73d2844..000000000 --- a/adaptor/pcm_slurm/service/common/tianhe.go +++ /dev/null @@ -1,12 +0,0 @@ -package slurmer - -type SlurmStruct struct { - version string -} - -func SelectTianhe() (Slurmer, error) { - - return &SlurmStruct{ - version: "2.6.9.1", - }, nil -} diff --git a/adaptor/pcm_slurm/service/common/user_db.go b/adaptor/pcm_slurm/service/common/user_db.go deleted file mode 100644 index 2b6a7fcc3..000000000 --- a/adaptor/pcm_slurm/service/common/user_db.go +++ /dev/null @@ -1,195 +0,0 @@ -package slurmer - -/* -#cgo LDFLAGS: -lslurmdb - -#include -#include -#include -#include -#include - -typedef struct user_info_msg { - uint32_t record_count; - slurmdb_user_rec_t *user_array; -} user_info_msg_t; - -typedef struct slurmdb_user_rec{ - uint16_t admin_level; - List assoc_list; - List coord_accts; - char *default_acct; - char *default_wckey; - char *name; - char *old_name; - uint32_t uid; - List wckey_list; -} slurmdb_user_rec_pcm; - -struct user_info_msg get_user_info() { - struct user_info_msg userinfo; - List userList = NULL; - slurmdb_user_cond_t *user_cond = NULL; - void *db_conn; - db_conn = slurmdb_connection_get(); - userList = slurmdb_users_get(db_conn, user_cond); - slurmdb_connection_close(&db_conn); - - slurmdb_user_rec_t *rec = NULL; - ListIterator itr = slurm_list_iterator_create(userList); - int i = 0; - uint32_t length; - length = slurm_list_count(userList); - userinfo.record_count = length; - userinfo.user_array = malloc(length * sizeof(slurmdb_user_rec_t)); - while ((rec = slurm_list_next(itr))) { - userinfo.user_array[i] = *rec; - i++; - } - return userinfo; -} - -struct slurmdb_user_rec *user_from_list(struct user_info_msg *list, int i) { - return (struct slurmdb_user_rec *) &list->user_array[i]; -} - -*/ -import "C" -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - ssh "code.gitlink.org.cn/JCCE/PCM.git/common/ssh" - "context" - "strings" -) - -type UserInfoMsg struct { - LastUpdate int64 - RecordCount uint32 - UserInfoList []pbslurm.UserInfo -} - -func UserDescriptorConvertCToGo(cStruct *C.struct_slurmdb_user_rec) pbslurm.UserInfo { - var goStruct pbslurm.UserInfo - goStruct.Name = C.GoString(cStruct.name) - return goStruct -} - -func GetUserInfo() UserInfoMsg { - var goUserBuffer UserInfoMsg - cUserBuffer := C.get_user_info() - goUserBuffer.RecordCount = uint32(cUserBuffer.record_count) - goUserBuffer.UserInfoList = make([]pbslurm.UserInfo, cUserBuffer.record_count, cUserBuffer.record_count) - - for i := uint32(0); i < goUserBuffer.RecordCount; i++ { - user := C.user_from_list(&cUserBuffer, C.int(i)) - goUser := UserDescriptorConvertCToGo(user) - goUserBuffer.UserInfoList[i] = goUser - } - return goUserBuffer -} - -func (slurmStruct SlurmStruct) ListUsers(ctx context.Context, req *pbslurm.ListUsersReq) (*pbslurm.ListUsersResp, error) { - - userList := GetUserInfo() - - resp := pbslurm.ListUsersResp{} - for _, user := range userList.UserInfoList { - userInfoResult := user - //userInfoResult.Name = user.Name - - resp.UserInfos = append(resp.UserInfos, &userInfoResult) - } - - return &resp, nil -} - -func (slurmStruct SlurmStruct) GetUser(ctx context.Context, req *pbslurm.GetUserReq) (*pbslurm.GetUserResp, error) { - - userList := GetUserInfo() - - resp := pbslurm.GetUserResp{} - for _, user := range userList.UserInfoList { - if strings.Contains(user.Name, req.UserName) { - userInfoResult := user - resp.UserInfo = append(resp.UserInfo, &userInfoResult) - } - - } - - return &resp, nil -} - -func (slurmStruct SlurmStruct) AddUser(ctx context.Context, req *pbslurm.AddUserReq) (*pbslurm.AddUserResp, error) { - - cmd := "/usr/local/bin/sacctmgr add user " - - cmd = cmd + req.Names - if len(req.Accounts) != 0 { - cmd = cmd + " Accounts=" + req.Accounts - } - if len(req.AdminLevel) != 0 { - cmd = cmd + " AdminLevel=" + req.AdminLevel - } - if len(req.Clusters) != 0 { - cmd = cmd + " Clusters=" + req.Clusters - } - if len(req.DefaultAccount) != 0 { - cmd = cmd + " DefaultAccount=" + req.DefaultAccount - } - if len(req.DefaultQos) != 0 { - cmd = cmd + " DefaultQOS=" + req.DefaultQos - } - if len(req.DefaultWckey) != 0 { - cmd = cmd + " DefaultWCKey=" + req.DefaultWckey - } - if len(req.FairShare) != 0 { - cmd = cmd + " Fairshare=" + req.FairShare - } - if len(req.MaxCpuMins) != 0 { - cmd = cmd + " MaxCPUMins=" + req.MaxCpuMins - } - if len(req.MaxCpus) != 0 { - cmd = cmd + " MaxCPUs=" + req.MaxCpus - } - if len(req.MaxJobs) != 0 { - cmd = cmd + " MaxJobs=" + req.MaxJobs - } - if len(req.MaxNodes) != 0 { - cmd = cmd + " MaxNodes=" + req.MaxNodes - } - if len(req.MaxSubmitJobs) != 0 { - cmd = cmd + " MaxSubmitJobs=" + req.MaxSubmitJobs - } - if len(req.MaxWall) != 0 { - cmd = cmd + " MaxWall=" + req.MaxWall - } - if len(req.Partitions) != 0 { - cmd = cmd + " Partitions=" + req.Partitions - } - if len(req.QosLevel) != 0 { - cmd = cmd + " QosLevel=" + req.QosLevel - } - - cmd = cmd + " -i" - - result := ssh.ExecCommand(cmd) - - resp := pbslurm.AddUserResp{} - resp.Result = result - - return &resp, nil -} - -func (slurmStruct SlurmStruct) DeleteUser(ctx context.Context, req *pbslurm.DeleteUserReq) (*pbslurm.DeleteUserResp, error) { - - cmd := "/usr/local/bin/sacctmgr delete user " - cmd = cmd + req.Names - cmd = cmd + " -i" - - result := ssh.ExecCommand(cmd) - - resp := pbslurm.DeleteUserResp{} - resp.Result = result - - return &resp, nil -} diff --git a/adaptor/pcm_slurm/service/common/wckey_db.go b/adaptor/pcm_slurm/service/common/wckey_db.go deleted file mode 100644 index 039601d0f..000000000 --- a/adaptor/pcm_slurm/service/common/wckey_db.go +++ /dev/null @@ -1,119 +0,0 @@ -package slurmer - -/* -#cgo LDFLAGS: -lslurmdb - -#include -#include -#include -#include -#include - -typedef struct wckey_info_msg { - uint32_t record_count; - slurmdb_wckey_rec_t *wckey_array; -} wckey_info_msg_t; - -typedef struct slurmdb_wckey_rec{ - uint16_t admin_level; - List assoc_list; - List coord_accts; - char *default_acct; - char *default_wckey; - char *name; - char *old_name; - uint32_t uid; - List wckey_list; -} slurmdb_wckey_rec_pcm; - -struct wckey_info_msg get_wckey_info() { - struct wckey_info_msg wckeyinfo; - List wckeyList = NULL; - slurmdb_wckey_cond_t *wckey_cond = NULL; - void *db_conn; - db_conn = slurmdb_connection_get(); - wckeyList = slurmdb_wckeys_get(db_conn, wckey_cond); - slurmdb_connection_close(&db_conn); - - slurmdb_wckey_rec_t *rec = NULL; - ListIterator itr = slurm_list_iterator_create(wckeyList); - int i = 0; - uint32_t length; - length = slurm_list_count(wckeyList); - wckeyinfo.record_count = length; - wckeyinfo.wckey_array = malloc(length * sizeof(slurmdb_wckey_rec_t)); - while ((rec = slurm_list_next(itr))) { - wckeyinfo.wckey_array[i] = *rec; - i++; - } - return wckeyinfo; -} - -struct slurmdb_wckey_rec *wckey_from_list(struct wckey_info_msg *list, int i) { - return (struct slurmdb_wckey_rec *) &list->wckey_array[i]; -} - -*/ -import "C" -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "context" -) - -type WckeyInfoMsg struct { - LastUpdate int64 - RecordCount uint32 - WckeyInfoList []pbslurm.WckeyInfo -} - -func WckeyDescriptorConvertCToGo(cStruct *C.struct_slurmdb_wckey_rec) pbslurm.WckeyInfo { - var goStruct pbslurm.WckeyInfo - goStruct.Name = C.GoString(cStruct.name) - return goStruct -} - -func GetWckeyInfo() WckeyInfoMsg { - var goWckeyBuffer WckeyInfoMsg - cWckeyBuffer := C.get_wckey_info() - goWckeyBuffer.RecordCount = uint32(cWckeyBuffer.record_count) - goWckeyBuffer.WckeyInfoList = make([]pbslurm.WckeyInfo, cWckeyBuffer.record_count, cWckeyBuffer.record_count) - - for i := uint32(0); i < goWckeyBuffer.RecordCount; i++ { - wckey := C.wckey_from_list(&cWckeyBuffer, C.int(i)) - goWckey := WckeyDescriptorConvertCToGo(wckey) - goWckeyBuffer.WckeyInfoList[i] = goWckey - } - return goWckeyBuffer -} - -func (slurmStruct SlurmStruct) ListWckeys(ctx context.Context, req *pbslurm.ListWckeysReq) (*pbslurm.ListWckeysResp, error) { - - wckeyList := GetWckeyInfo() - - resp := pbslurm.ListWckeysResp{} - for _, wckey := range wckeyList.WckeyInfoList { - wckeyInfoResult := wckey - //wckeyInfoResult.Name = wckey.Name - - resp.WckeyInfos = append(resp.WckeyInfos, &wckeyInfoResult) - } - - return &resp, nil -} - -func (slurmStruct SlurmStruct) GetWckey(ctx context.Context, req *pbslurm.GetWckeyReq) (*pbslurm.GetWckeyResp, error) { - - wckeyList := GetWckeyInfo() - - resp := pbslurm.GetWckeyResp{} - for _, wckey := range wckeyList.WckeyInfoList { - //wckeyInfoResult := pbslurm.WckeyInfo{} - //todo add filter logic - wckeyInfoResult := wckey - //wckeyInfoResult.Name = wckey.Name - - resp.WckeyInfo = append(resp.WckeyInfo, &wckeyInfoResult) - } - - return &resp, nil -} diff --git a/adaptor/pcm_slurm/service/tianhe/account.go b/adaptor/pcm_slurm/service/tianhe/account.go deleted file mode 100644 index 1090d1ffe..000000000 --- a/adaptor/pcm_slurm/service/tianhe/account.go +++ /dev/null @@ -1,82 +0,0 @@ -package tianhe - -/* -#cgo LDFLAGS: -lslurmdb - -#include -#include -#include -#include -#include - -typedef struct account_info_msg { - uint32_t record_count; - slurmdb_account_rec_t *account_array; -} account_info_msg_t; - -typedef struct slurmdb_account_rec{ - List assoc_list; - List coord_accts; - char *description; - char *name; - char *organization; -} slurmdb_account_rec_pcm; - -struct account_info_msg get_account_info() { - struct account_info_msg accountinfo; - List accountList = NULL; - slurmdb_account_cond_t *account_cond = NULL; - void *db_conn; - db_conn = slurmdb_connection_get(); - accountList = slurmdb_accounts_get(db_conn, account_cond); - slurmdb_connection_close(&db_conn); - - slurmdb_account_rec_t *rec = NULL; - ListIterator itr = slurm_list_iterator_create(accountList); - int i = 0; - uint32_t length; - length = slurm_list_count(accountList); - accountinfo.record_count = length; - accountinfo.account_array = malloc(length * sizeof(slurmdb_account_rec_t)); - while ((rec = slurm_list_next(itr))) { - accountinfo.account_array[i] = *rec; - i++; - } - return accountinfo; -} - -struct slurmdb_account_rec *account_from_list(struct account_info_msg *list, int i) { - return (struct slurmdb_account_rec *) &list->account_array[i]; -} - -*/ -import "C" -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" -) - -type AcctInfoMsg struct { - LastUpdate int64 - RecordCount uint32 - AcctInfoList []pbslurm.AccountInfo -} - -func AcctDescriptorConvertCToGo(cStruct *C.struct_slurmdb_account_rec) pbslurm.AccountInfo { - var goStruct pbslurm.AccountInfo - goStruct.Name = C.GoString(cStruct.name) - return goStruct -} - -func GetAcctInfo() AcctInfoMsg { - var goAcctBuffer AcctInfoMsg - cAcctBuffer := C.get_account_info() - goAcctBuffer.RecordCount = uint32(cAcctBuffer.record_count) - goAcctBuffer.AcctInfoList = make([]pbslurm.AccountInfo, cAcctBuffer.record_count, cAcctBuffer.record_count) - - for i := uint32(0); i < goAcctBuffer.RecordCount; i++ { - Acct := C.account_from_list(&cAcctBuffer, C.int(i)) - goAcct := AcctDescriptorConvertCToGo(Acct) - goAcctBuffer.AcctInfoList[i] = goAcct - } - return goAcctBuffer -} diff --git a/adaptor/pcm_slurm/service/tianhe/association.go b/adaptor/pcm_slurm/service/tianhe/association.go deleted file mode 100644 index 3c4af025c..000000000 --- a/adaptor/pcm_slurm/service/tianhe/association.go +++ /dev/null @@ -1,145 +0,0 @@ -package tianhe - -/* -#cgo LDFLAGS: -lslurmdb - -#include -#include -#include -#include -#include - -typedef struct assoc_info_msg { - uint32_t record_count; - slurmdb_association_rec_t *assoc_array; -} assoc_info_msg_t; - -typedef struct list_assoc_req { - uint32_t slurm_version; - char *cluster; - char *account; - char *user; - char *partition; -} list_assoc_req_t; - -typedef struct slurmdb_association_rec{ - List accounting_list; - char *acct; - char *cluster; - uint32_t def_qos_id; - uint64_t grp_cpu_mins; - uint64_t grp_cpu_run_mins; - uint32_t grp_cpus; - uint32_t grp_jobs; - uint32_t grp_mem; - uint32_t grp_nodes; - uint32_t grp_submit_jobs; - uint32_t grp_wall; - uint32_t id; - uint16_t is_def; - uint32_t lft; - uint64_t max_cpu_mins_pj; - uint64_t max_cpu_run_mins; - uint32_t max_cpus_pj; - uint32_t max_jobs; - uint32_t max_nodes_pj; - uint32_t max_submit_jobs; - uint32_t max_wall_pj; - char *parent_acct; - uint32_t parent_id; - char *partition; - List qos_list; - uint32_t rgt; - uint32_t shares_raw; - uint32_t uid; - assoc_mgr_association_usage_t *usage; - char *user; -} slurmdb_association_rec_pcm; - -struct assoc_info_msg get_assoc_infos() { - struct assoc_info_msg associnfo; - List assocList = NULL; - slurmdb_association_cond_t *assoc_cond = NULL; - void *db_conn; - db_conn = slurmdb_connection_get(); - assocList = slurmdb_associations_get(db_conn, assoc_cond); - slurmdb_connection_close(&db_conn); - - slurmdb_association_rec_t *rec = NULL; - ListIterator itr = slurm_list_iterator_create(assocList); - int i = 0; - uint32_t length; - length = slurm_list_count(assocList); - associnfo.record_count = length; - associnfo.assoc_array = malloc(length * sizeof(slurmdb_association_rec_t)); - while ((rec = slurm_list_next(itr))) { - associnfo.assoc_array[i] = *rec; - i++; - } - return associnfo; -} - -struct slurmdb_association_rec *assoc_from_list(struct assoc_info_msg *list, int i) { - return (struct slurmdb_association_rec *) &list->assoc_array[i]; -} - -*/ -import "C" -import pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - -type AssocInfoMsg struct { - LastUpdate int64 - RecordCount uint32 - AssocInfoList []pbslurm.AssociationInfo -} - -func AssocDescriptorConvertCToGo(cStruct *C.struct_slurmdb_association_rec) pbslurm.AssociationInfo { - var goStruct pbslurm.AssociationInfo - //goStruct.AccountingList = cStruct.accounting_list - goStruct.Acct = C.GoString(cStruct.acct) - goStruct.Cluster = C.GoString(cStruct.cluster) - goStruct.DefQosId = int32(cStruct.def_qos_id) - goStruct.GrpCpuMins = int64(cStruct.grp_cpu_mins) - goStruct.GrpGpuRunMins = int64(cStruct.grp_cpu_run_mins) - goStruct.GrpCpus = int32(cStruct.grp_cpus) - goStruct.GrpJobs = int32(cStruct.grp_jobs) - goStruct.GrpMem = int32(cStruct.grp_mem) - goStruct.GrpNodes = int32(cStruct.grp_nodes) - goStruct.GrpSubmitJobs = int32(cStruct.grp_submit_jobs) - goStruct.GrpWall = int32(cStruct.grp_wall) - goStruct.Id = int32(cStruct.id) - goStruct.IsDef = int32(cStruct.is_def) - goStruct.Lft = int32(cStruct.lft) - goStruct.MaxCpuMinsPj = int64(cStruct.max_cpu_mins_pj) - goStruct.MaxCpuRunMins = int64(cStruct.max_cpu_run_mins) - goStruct.MaxCpusPj = int32(cStruct.max_cpus_pj) - goStruct.MaxJobs = int32(cStruct.max_jobs) - goStruct.MaxNodesPj = int32(cStruct.max_nodes_pj) - goStruct.MaxSubmitJobs = int32(cStruct.max_submit_jobs) - goStruct.MaxWallPj = int32(cStruct.max_wall_pj) - goStruct.ParentAcct = C.GoString(cStruct.parent_acct) - goStruct.ParentId = int32(cStruct.parent_id) - goStruct.Partition = C.GoString(cStruct.partition) - //goStruct.QosList = cStruct.qos_list - goStruct.Rgt = int32(cStruct.rgt) - goStruct.SharesRaw = int32(cStruct.shares_raw) - goStruct.Uid = int32(cStruct.uid) - //goStruct.AssocUsage = cStruct.usage - goStruct.User = C.GoString(cStruct.user) - return goStruct -} - -// GetAssociationInfos list info for all associations -func GetAssociationInfos() AssocInfoMsg { - var goAssocBuffer AssocInfoMsg - cAssocBuffer := C.get_assoc_infos() - goAssocBuffer.RecordCount = uint32(cAssocBuffer.record_count) - goAssocBuffer.AssocInfoList = make([]pbslurm.AssociationInfo, cAssocBuffer.record_count, cAssocBuffer.record_count) - - for i := uint32(0); i < goAssocBuffer.RecordCount; i++ { - assoc := C.assoc_from_list(&cAssocBuffer, C.int(i)) - goAssociation := AssocDescriptorConvertCToGo(assoc) - goAssocBuffer.AssocInfoList[i] = goAssociation - } - return goAssocBuffer -} diff --git a/adaptor/pcm_slurm/service/tianhe/cluster.go b/adaptor/pcm_slurm/service/tianhe/cluster.go deleted file mode 100644 index 4049183a9..000000000 --- a/adaptor/pcm_slurm/service/tianhe/cluster.go +++ /dev/null @@ -1,78 +0,0 @@ -package tianhe - -/* -#cgo LDFLAGS: -lslurmdb - -#include -#include -#include -#include -#include - -typedef struct cluster_info_msg { - uint32_t record_count; - slurmdb_cluster_rec_t *cluster_array; -} cluster_info_msg_t; - -typedef struct slurmdb_cluster_rec{ - char *name; -} slurmdb_cluster_rec_pcm; - -struct cluster_info_msg get_cluster_info() { - struct cluster_info_msg clusterinfo; - List clusterList = NULL; - slurmdb_cluster_cond_t *cluster_cond = NULL; - void *db_conn; - db_conn = slurmdb_connection_get(); - clusterList = slurmdb_clusters_get(db_conn, cluster_cond); - slurmdb_connection_close(&db_conn); - - slurmdb_cluster_rec_t *rec = NULL; - ListIterator itr = slurm_list_iterator_create(clusterList); - int i = 0; - uint32_t length; - length = slurm_list_count(clusterList); - clusterinfo.record_count = length; - clusterinfo.cluster_array = malloc(length * sizeof(slurmdb_cluster_rec_t)); - while ((rec = slurm_list_next(itr))) { - clusterinfo.cluster_array[i] = *rec; - i++; - } - return clusterinfo; -} - -struct slurmdb_cluster_rec *cluster_from_list(struct cluster_info_msg *list, int i) { - return (struct slurmdb_cluster_rec *) &list->cluster_array[i]; -} - -*/ -import "C" -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" -) - -type ClusterInfoMsg struct { - Last_update int64 - Record_count uint32 - ClusterInfoList []pbslurm.ClusterInfo -} - -func Cluster_descriptor_convert_c_to_go(c_struct *C.struct_slurmdb_cluster_rec) pbslurm.ClusterInfo { - var go_struct pbslurm.ClusterInfo - go_struct.Name = C.GoString(c_struct.name) - return go_struct -} - -func GetClusterInfo() ClusterInfoMsg { - var go_cluster_buffer ClusterInfoMsg - c_cluster_buffer := C.get_cluster_info() - go_cluster_buffer.Record_count = uint32(c_cluster_buffer.record_count) - go_cluster_buffer.ClusterInfoList = make([]pbslurm.ClusterInfo, c_cluster_buffer.record_count, c_cluster_buffer.record_count) - - for i := uint32(0); i < go_cluster_buffer.Record_count; i++ { - cluster := C.cluster_from_list(&c_cluster_buffer, C.int(i)) - go_cluster := Cluster_descriptor_convert_c_to_go(cluster) - go_cluster_buffer.ClusterInfoList[i] = go_cluster - } - return go_cluster_buffer -} diff --git a/adaptor/pcm_slurm/service/tianhe/converter.go b/adaptor/pcm_slurm/service/tianhe/converter.go deleted file mode 100644 index e5722bf57..000000000 --- a/adaptor/pcm_slurm/service/tianhe/converter.go +++ /dev/null @@ -1,134 +0,0 @@ -package tianhe - -/* -#cgo LDFLAGS: -lslurm -#include -#include -#include -#include -#include -#include - -inline uint8_t uint8_ptr(uint8_t* pointer) { - if (NULL == pointer) { - return -1;} - return *pointer; -} -inline int8_t int8_ptr(int8_t* pointer) { - if (NULL == pointer) { - return -1;} - return *pointer; -} -inline uint16_t uint16_ptr(uint16_t* pointer) { - if (NULL == pointer) { - return -1;} - return *pointer; -} -inline int16_t int16_ptr(int16_t* pointer) { - if (NULL == pointer) { - return -1;} - return *pointer; -} -inline uint32_t uint32_ptr(uint32_t* pointer) { - if (NULL == pointer) { - return -1;} - return *pointer; -} -inline int32_t int32_ptr(int32_t* pointer) { - if (NULL == pointer) { - return -1;} - return *pointer; -} -inline uint64_t uint64_ptr(uint64_t* pointer) { - if (NULL == pointer) { - return -1;} - return *pointer; -} -inline int64_t int64_ptr(int16_t* pointer) { - if (NULL == pointer) { - return -1;} - return *pointer; -} -*/ -import "C" -import pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - -func Job_info_convert_c_to_go(c_struct *C.struct_job_info) pbslurm.JobInfo { - var go_struct pbslurm.JobInfo - - go_struct.Account = C.GoString(c_struct.account) - go_struct.AllocNode = C.GoString(c_struct.alloc_node) - go_struct.AllocSid = uint32(c_struct.alloc_sid) - go_struct.ArrayJobId = uint32(c_struct.array_job_id) - go_struct.ArrayTaskId = uint32(c_struct.array_task_id) - go_struct.AssocId = uint32(c_struct.assoc_id) - go_struct.BatchFlag = uint32(c_struct.batch_flag) - go_struct.BatchHost = C.GoString(c_struct.batch_host) - go_struct.BoardsPerNode = uint32(c_struct.boards_per_node) - go_struct.BatchScript = C.GoString(c_struct.batch_script) - go_struct.Command = C.GoString(c_struct.command) - go_struct.Comment = C.GoString(c_struct.comment) - go_struct.Contiguous = uint32(c_struct.contiguous) - go_struct.CoresPerSocket = uint32(c_struct.cores_per_socket) - go_struct.CpusPerTask = uint32(c_struct.cpus_per_task) - go_struct.Dependency = C.GoString(c_struct.dependency) - go_struct.DerivedEc = uint32(c_struct.derived_ec) - go_struct.EligibleTime = int64(c_struct.eligible_time) - go_struct.EndTime = int64(c_struct.end_time) - go_struct.ExcNodes = C.GoString(c_struct.exc_nodes) - go_struct.ExcNodeInx = int32(C.int32_ptr(c_struct.exc_node_inx)) - go_struct.ExitCode = uint32(c_struct.exit_code) - go_struct.Features = C.GoString(c_struct.features) - go_struct.GroupId = uint32(c_struct.group_id) - go_struct.Gres = C.GoString(c_struct.gres) - go_struct.JobId = uint32(c_struct.job_id) - go_struct.JobState = uint32(c_struct.job_state) - go_struct.Licenses = C.GoString(c_struct.licenses) - go_struct.MaxCpus = uint32(c_struct.max_cpus) - go_struct.MaxNodes = uint32(c_struct.max_nodes) - go_struct.Name = C.GoString(c_struct.name) - go_struct.Network = C.GoString(c_struct.network) - go_struct.Nodes = C.GoString(c_struct.nodes) - go_struct.Nice = uint32(c_struct.nice) - go_struct.NodeInx = int32(C.int32_ptr(c_struct.node_inx)) - go_struct.NtasksPerCore = uint32(c_struct.ntasks_per_core) - go_struct.NtasksPerNode = uint32(c_struct.ntasks_per_node) - go_struct.NtasksPerSocket = uint32(c_struct.ntasks_per_socket) - go_struct.NtasksPerBoard = uint32(c_struct.ntasks_per_board) - go_struct.NumCpus = uint32(c_struct.num_cpus) - go_struct.NumNodes = uint32(c_struct.num_nodes) - go_struct.Partition = C.GoString(c_struct.partition) - go_struct.PnMinMemory = uint32(c_struct.pn_min_memory) - go_struct.PnMinCpus = uint32(c_struct.pn_min_cpus) - go_struct.PnMinTmpDisk = uint32(c_struct.pn_min_tmp_disk) - go_struct.PreemptTime = int64(c_struct.preempt_time) - go_struct.PreSusTime = int64(c_struct.pre_sus_time) - go_struct.Priority = uint32(c_struct.priority) - go_struct.Profile = uint32(c_struct.profile) - go_struct.Qos = C.GoString(c_struct.qos) - go_struct.ReqNodes = C.GoString(c_struct.req_nodes) - go_struct.ReqNodeInx = int32(C.int32_ptr(c_struct.req_node_inx)) - go_struct.ReqSwitch = uint32(c_struct.req_switch) - go_struct.Requeue = uint32(c_struct.requeue) - go_struct.ResizeTime = int64(c_struct.resize_time) - go_struct.RestartCnt = uint32(c_struct.restart_cnt) - go_struct.ResvName = C.GoString(c_struct.resv_name) - go_struct.Shared = uint32(c_struct.shared) - go_struct.ShowFlags = uint32(c_struct.show_flags) - go_struct.SocketsPerBoard = uint32(c_struct.sockets_per_board) - go_struct.SocketsPerNode = uint32(c_struct.sockets_per_node) - go_struct.StartTime = int64(c_struct.start_time) - go_struct.StateDesc = C.GoString(c_struct.state_desc) - go_struct.StateReason = uint32(c_struct.state_reason) - go_struct.SubmitTime = int64(c_struct.submit_time) - go_struct.SuspendTime = int64(c_struct.suspend_time) - go_struct.TimeLimit = uint32(c_struct.time_limit) - go_struct.TimeMin = uint32(c_struct.time_min) - go_struct.ThreadsPerCore = uint32(c_struct.threads_per_core) - go_struct.UserId = uint32(c_struct.user_id) - go_struct.Wait4Switch = uint32(c_struct.wait4switch) - go_struct.Wckey = C.GoString(c_struct.wckey) - go_struct.WorkDir = C.GoString(c_struct.work_dir) - - return go_struct -} diff --git a/adaptor/pcm_slurm/service/tianhe/diag.go b/adaptor/pcm_slurm/service/tianhe/diag.go deleted file mode 100644 index 2c3083073..000000000 --- a/adaptor/pcm_slurm/service/tianhe/diag.go +++ /dev/null @@ -1,76 +0,0 @@ -package tianhe - -/* -#include -#include -#include -#include -#include -#include - -stats_info_response_msg_t *getStats(){ - stats_info_response_msg_t *buf; - stats_info_request_msg_t req; - - int rc; - req.command_id = STAT_COMMAND_GET; - rc = slurm_get_statistics(&buf, (stats_info_request_msg_t *)&req); - if (rc != SLURM_SUCCESS) { - slurm_perror("slurm_get_statistics"); - return NULL; - } - //slurm_free_stats_info_request_msg(&req); - return buf; -} -*/ -import "C" -import pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - -func Get_diag() pbslurm.StatsInfoResponseMsg { - var go_stats_buffer pbslurm.StatsInfoResponseMsg - c_stats_buffer := C.getStats() - if c_stats_buffer == nil { - return go_stats_buffer - } - - go_stats_buffer = Stats_convert_c_to_go(c_stats_buffer) - //C.slurm_free_stats_response_msg(c_stats_buffer) - return go_stats_buffer -} - -func Stats_convert_c_to_go(c_struct *C.stats_info_response_msg_t) pbslurm.StatsInfoResponseMsg { - var go_struct pbslurm.StatsInfoResponseMsg - - go_struct.AgentQueueSize = uint32(c_struct.agent_queue_size) - go_struct.BfActive = uint32(c_struct.bf_active) - go_struct.BfBackfilledJobs = uint32(c_struct.bf_backfilled_jobs) - go_struct.BfCycleCounter = uint32(c_struct.bf_cycle_counter) - go_struct.BfCycleLast = uint32(c_struct.bf_cycle_last) - go_struct.BfCycleMax = uint32(c_struct.bf_cycle_max) - go_struct.BfCycleSum = uint32(c_struct.bf_cycle_sum) - go_struct.BfDepthSum = uint32(c_struct.bf_depth_sum) - go_struct.BfDepthTrySum = uint32(c_struct.bf_depth_try_sum) - go_struct.BfLastBackfilledJobs = uint32(c_struct.bf_last_backfilled_jobs) - go_struct.BfLastDepth = uint32(c_struct.bf_last_depth) - go_struct.BfLastDepthTry = uint32(c_struct.bf_last_depth_try) - go_struct.BfQueueLen = uint32(c_struct.bf_queue_len) - go_struct.BfQueueLenSum = uint32(c_struct.bf_queue_len_sum) - go_struct.BfWhenLastCycle = int64(c_struct.bf_when_last_cycle) - go_struct.JobsCompleted = uint32(c_struct.jobs_completed) - go_struct.JobsCanceled = uint32(c_struct.jobs_canceled) - go_struct.JobsFailed = uint32(c_struct.jobs_failed) - go_struct.JobsStarted = uint32(c_struct.jobs_started) - go_struct.JobsSubmitted = uint32(c_struct.jobs_submitted) - go_struct.PartsPacked = uint32(c_struct.parts_packed) - go_struct.ReqTime = int64(c_struct.req_time) - go_struct.ReqTimeStart = int64(c_struct.req_time_start) - go_struct.ScheduleCycleDepth = uint32(c_struct.schedule_cycle_depth) - go_struct.ScheduleCycleCounter = uint32(c_struct.schedule_cycle_counter) - go_struct.ScheduleCycleLast = uint32(c_struct.schedule_cycle_last) - go_struct.ScheduleCycleMax = uint32(c_struct.schedule_cycle_max) - go_struct.ScheduleCycleSum = uint32(c_struct.schedule_cycle_sum) - go_struct.ScheduleQueueLen = uint32(c_struct.schedule_queue_len) - go_struct.ServerThreadCount = uint32(c_struct.server_thread_count) - - return go_struct -} diff --git a/adaptor/pcm_slurm/service/tianhe/job.go b/adaptor/pcm_slurm/service/tianhe/job.go deleted file mode 100644 index d1ebe7efb..000000000 --- a/adaptor/pcm_slurm/service/tianhe/job.go +++ /dev/null @@ -1,116 +0,0 @@ -package tianhe - -/* -#include -#include -#include -#include -#include -#include - - struct job_info_msg *get_job_info(){ - - struct job_info_msg* job_buffer; - if(slurm_load_jobs ((time_t) NULL, - &job_buffer, SHOW_ALL)) { - return NULL; - } - - return job_buffer; - } - -struct job_info* job_from_list(struct job_info_msg *list, int i){ - return &list->job_array[i]; -} - - struct job_info_msg *get_single_job_info(uint32_t id){ - struct job_info_msg* job_buffer; - if( slurm_load_job (&job_buffer, id, SHOW_DETAIL)) { - return NULL; - } - return job_buffer; - } - -int delete_job(uint32_t id) { - int error_code = 0; - error_code = slurm_kill_job (id, SIGKILL, 0); - if (error_code) { - char msg[64]; - sprintf(msg, "slurm_kill_job(%.12s)",id); - slurm_perror (msg); - return error_code; - } - return (error_code); -} - - //static time_t last_update_time = (time_t) NULL; - //int error_code; - //job_info_msg_t * job_info_msg_ptr = NULL; - // - //error_code = slurm_load_jobs (last_update_time, &job_info_msg_ptr, 1); - //if (error_code) { - // slurm_perror ("slurm_load_jobs"); - // return (error_code); - //} - // - //slurm_print_job_info_msg ( stdout, job_info_msg_ptr, 1 ) ; - // - //slurm_free_job_info_msg ( job_info_msg_ptr ) ; - -*/ -import "C" -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" -) - -func Get_all_jobs() pbslurm.JobInfoMsg { - var go_job_buffer pbslurm.JobInfoMsg - c_job_buffer := C.get_job_info() - if c_job_buffer == nil { - go_job_buffer.LastUpdate = int64(0) - go_job_buffer.RecordCount = uint32(0) - go_job_buffer.JobList = nil - return go_job_buffer - } - - go_job_buffer.LastUpdate = int64(c_job_buffer.last_update) - go_job_buffer.RecordCount = uint32(c_job_buffer.record_count) - for i := uint32(0); i < go_job_buffer.RecordCount; i++ { - job := C.job_from_list(c_job_buffer, C.int(i)) - go_job := Job_info_convert_c_to_go(job) - go_job_buffer.JobList = append(go_job_buffer.JobList, &go_job) - //fmt.Println(Reason_to_string(go_job.Job_state)) - //fmt.Println(state_to_string(uint32(go_job.Job_state))) - } - C.slurm_free_job_info_msg(c_job_buffer) - - return go_job_buffer -} - -func Delete_job(id uint32) int32 { - error_code := C.slurm_kill_job(C.uint32_t(id), C.SIGKILL, C.uint16_t(0)) - return int32(error_code) -} - -func Get_job(id uint32) pbslurm.JobInfoMsg { - var go_job_buffer pbslurm.JobInfoMsg - c_job_buffer := C.get_single_job_info(C.uint32_t(id)) - if c_job_buffer == nil { - go_job_buffer.LastUpdate = int64(0) - go_job_buffer.RecordCount = uint32(0) - go_job_buffer.JobList = nil - return go_job_buffer - } - go_job_buffer.LastUpdate = int64(c_job_buffer.last_update) - go_job_buffer.RecordCount = uint32(c_job_buffer.record_count) - for i := uint32(0); i < go_job_buffer.RecordCount; i++ { - job := C.job_from_list(c_job_buffer, C.int(i)) - go_job := Job_info_convert_c_to_go(job) - go_job_buffer.JobList = append(go_job_buffer.JobList, &go_job) - //fmt.Println(Reason_to_string(go_job.Job_state)) - //fmt.Println(state_to_string(uint32(go_job.Job_state))) - } - C.slurm_free_job_info_msg(c_job_buffer) - - return go_job_buffer -} diff --git a/adaptor/pcm_slurm/service/tianhe/job_db.go b/adaptor/pcm_slurm/service/tianhe/job_db.go deleted file mode 100644 index 344dd17b0..000000000 --- a/adaptor/pcm_slurm/service/tianhe/job_db.go +++ /dev/null @@ -1,139 +0,0 @@ -package tianhe - -/* -#cgo LDFLAGS: -lslurmdb - -#include -#include -#include -#include -#include -#include -#include -#include - -slurmdb_job_rec_t *get_all_slurmdb_job() { - - slurmdb_job_cond_t *job_cond = NULL; - void *conn = slurmdb_connection_get(); - - List joblist = slurmdb_jobs_get(conn, job_cond); - - uint16_t listsize = slurm_list_count(joblist); - //qosinfo.record_count = size; - slurmdb_job_rec_t *jobarray = malloc(listsize * sizeof(slurmdb_job_rec_t)); - - ListIterator itr = slurm_list_iterator_create(joblist); - - slurmdb_job_rec_t *rec = NULL; - int i = 0; - while ((rec = slurm_list_next(itr))) { - jobarray[i] = *rec; - i++; - } - slurmdb_connection_close(&conn); - slurm_list_destroy(joblist); - //int arraysize = sizeof(jobarray); - //printf("%d\n", arraysize); - return jobarray; -} - -slurmdb_job_rec_t *job_from_array(slurmdb_job_rec_t *job_rec_array, int i) { - return (slurmdb_job_rec_t *) &(job_rec_array[i]); -} - -slurmdb_job_rec_t *job_from_array_by_id(slurmdb_job_rec_t *job_rec_array, int job_id) { - int i; - int arraysize = sizeof(job_rec_array); - for (i=0; i -#include -#include -#include -#include - -struct submit_response_msg *submit_job(struct job_descriptor *desc) -{ - - struct submit_response_msg *resp_msg; - if (slurm_submit_batch_job(desc, - &resp_msg)) { - return NULL; - } - return resp_msg; - -} - -void free_submit_response_msg(struct submit_response_msg *msg) -{ - slurm_free_submit_response_response_msg(msg); -} - -int update_job (struct job_descriptor *msg) { - - return slurm_update_job (msg); -} -*/ -import "C" -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" - "fmt" - "unsafe" -) - -func Submit_job(go_struct *pbslurm.JobDescriptor) pbslurm.SubmitResponseMsg { - - var c_struct C.struct_job_descriptor - - C.slurm_init_job_desc_msg(&c_struct) - if go_struct.Account != "" { - account_s := C.CString(go_struct.Account) - defer C.free(unsafe.Pointer(account_s)) - c_struct.account = account_s - } - if go_struct.AcctgFreq != "" { - acctg_freq_s := C.CString(go_struct.AcctgFreq) - defer C.free(unsafe.Pointer(acctg_freq_s)) - c_struct.acctg_freq = acctg_freq_s - } - if go_struct.AllocNode != "" { - alloc_node_s := C.CString(go_struct.AllocNode) - defer C.free(unsafe.Pointer(alloc_node_s)) - c_struct.alloc_node = alloc_node_s - } - if go_struct.AllocRespPort != 0 { - c_struct.alloc_resp_port = C.uint16_t(go_struct.AllocRespPort) - } - if go_struct.AllocSid != 0 { - c_struct.alloc_sid = C.uint32_t(go_struct.AllocSid) - } - if len(go_struct.Argv) > 0 { - c_struct.argc = C.uint32_t(len(go_struct.Argv)) - cArray := C.malloc(C.size_t(C.size_t(len(go_struct.Argv)) * C.size_t(unsafe.Sizeof(uintptr(0))))) - a := (*[1<<30 - 1]*C.char)(cArray) - for i := 0; i < len(go_struct.Argv); i++ { - a[i] = C.CString(go_struct.Argv[i].String()) - } - c_struct.argv = (**C.char)(cArray) - fmt.Printf("test\n") - } - - if go_struct.ArrayInx != "" { - array_inx_s := C.CString(go_struct.ArrayInx) - defer C.free(unsafe.Pointer(array_inx_s)) - c_struct.array_inx = array_inx_s - } - if go_struct.BeginTime != 0 { - c_struct.begin_time = C.int64_t(go_struct.BeginTime) - } - if go_struct.CkptInterval != 0 { - c_struct.ckpt_interval = C.uint16_t(go_struct.CkptInterval) - } - if go_struct.CkptDir != "" { - ckpt_dir_s := C.CString(go_struct.CkptDir) - defer C.free(unsafe.Pointer(ckpt_dir_s)) - c_struct.ckpt_dir = ckpt_dir_s - } - if go_struct.Comment != "" { - comment_s := C.CString(go_struct.Comment) - defer C.free(unsafe.Pointer(comment_s)) - c_struct.comment = comment_s - } - if go_struct.Contiguous != 0 { - c_struct.contiguous = C.uint16_t(go_struct.Contiguous) - } - if go_struct.CpuBind != "" { - cpu_bind_s := C.CString(go_struct.CpuBind) - defer C.free(unsafe.Pointer(cpu_bind_s)) - c_struct.cpu_bind = cpu_bind_s - } - if go_struct.CpuBindType != 0 { - c_struct.cpu_bind_type = C.uint16_t(go_struct.CpuBindType) - } - if go_struct.Dependency != "" { - dependency_s := C.CString(go_struct.Dependency) - defer C.free(unsafe.Pointer(dependency_s)) - c_struct.dependency = dependency_s - } - if go_struct.EndTime != 0 { - c_struct.end_time = C.int64_t(go_struct.EndTime) - } - if len(go_struct.Environment) > 0 { - c_struct.env_size = C.uint32_t(len(go_struct.Environment)) - cArray := C.malloc(C.size_t(C.size_t(len(go_struct.Environment)) * C.size_t(unsafe.Sizeof(uintptr(0))))) - a := (*[1<<30 - 1]*C.char)(cArray) - for i := 0; i < len(go_struct.Environment); i++ { - a[i] = C.CString(go_struct.Environment[i].String()) - defer C.free(unsafe.Pointer(a[i])) - } - c_struct.environment = (**C.char)(cArray) - } else { - c_struct.env_size = 1 - cArray := C.malloc(C.size_t(C.size_t(1) * C.size_t(unsafe.Sizeof(uintptr(0))))) - a := (*[1<<30 - 1]*C.char)(cArray) - a[0] = C.CString("SLURM_GO_JOB=TRUE") - defer C.free(unsafe.Pointer(a[0])) - c_struct.environment = (**C.char)(cArray) - - } - if go_struct.ExcNodes != "" { - exc_nodes_s := C.CString(go_struct.ExcNodes) - defer C.free(unsafe.Pointer(exc_nodes_s)) - c_struct.exc_nodes = exc_nodes_s - } - if go_struct.Features != "" { - features_s := C.CString(go_struct.Features) - defer C.free(unsafe.Pointer(features_s)) - c_struct.features = features_s - } - if go_struct.GroupId != 0 { - c_struct.group_id = C.uint32_t(go_struct.GroupId) - } - if go_struct.Immediate != 0 { - c_struct.immediate = C.uint16_t(go_struct.Immediate) - } - if go_struct.JobId != 0 { - c_struct.job_id = C.uint32_t(go_struct.JobId) - } - if go_struct.KillOnNodeFail != 0 { - c_struct.kill_on_node_fail = C.uint16_t(go_struct.KillOnNodeFail) - } - if go_struct.Licenses != "" { - licenses_s := C.CString(go_struct.Licenses) - defer C.free(unsafe.Pointer(licenses_s)) - c_struct.licenses = licenses_s - } - if go_struct.MailType != 0 { - c_struct.mail_type = C.uint16_t(go_struct.MailType) - } - if go_struct.MailUser != "" { - mail_user_s := C.CString(go_struct.MailUser) - defer C.free(unsafe.Pointer(mail_user_s)) - c_struct.mail_user = mail_user_s - } - if go_struct.MemBind != "" { - mem_bind_s := C.CString(go_struct.MemBind) - defer C.free(unsafe.Pointer(mem_bind_s)) - c_struct.mem_bind = mem_bind_s - } - if go_struct.MemBindType != 0 { - c_struct.mem_bind_type = C.uint16_t(go_struct.MemBindType) - } - if go_struct.Name != "" { - name_s := C.CString(go_struct.Name) - defer C.free(unsafe.Pointer(name_s)) - c_struct.name = name_s - } - if go_struct.Network != "" { - network_s := C.CString(go_struct.Network) - defer C.free(unsafe.Pointer(network_s)) - c_struct.network = network_s - } - if go_struct.Nice != 0 { - c_struct.nice = C.uint16_t(go_struct.Nice) - } - if go_struct.NumTasks != 0 { - c_struct.num_tasks = C.uint32_t(go_struct.NumTasks) - } - if go_struct.OpenMode != 0 { - c_struct.open_mode = C.uint8_t(go_struct.OpenMode) - } - if go_struct.OtherPort != 0 { - c_struct.other_port = C.uint16_t(go_struct.OtherPort) - } - if go_struct.Overcommit != 0 { - c_struct.overcommit = C.uint8_t(go_struct.Overcommit) - } - if go_struct.Partition != "" { - partition_s := C.CString(go_struct.Partition) - defer C.free(unsafe.Pointer(partition_s)) - c_struct.partition = partition_s - } - if go_struct.PlaneSize != 0 { - c_struct.plane_size = C.uint16_t(go_struct.PlaneSize) - } - if go_struct.Priority != 0 { - c_struct.priority = C.uint32_t(go_struct.Priority) - } - if go_struct.Profile != 0 { - c_struct.profile = C.uint32_t(go_struct.Profile) - } - if go_struct.Qos != "" { - qos_s := C.CString(go_struct.Qos) - defer C.free(unsafe.Pointer(qos_s)) - c_struct.qos = qos_s - } - if go_struct.Reboot != 0 { - c_struct.reboot = C.uint16_t(go_struct.Reboot) - } - if go_struct.RespHost != "" { - resp_host_s := C.CString(go_struct.RespHost) - defer C.free(unsafe.Pointer(resp_host_s)) - c_struct.resp_host = resp_host_s - } - if go_struct.ReqNodes != "" { - req_nodes_s := C.CString(go_struct.ReqNodes) - defer C.free(unsafe.Pointer(req_nodes_s)) - c_struct.req_nodes = req_nodes_s - } - if go_struct.Requeue != 0 { - c_struct.requeue = C.uint16_t(go_struct.Requeue) - } - if go_struct.Reservation != "" { - reservation_s := C.CString(go_struct.Reservation) - defer C.free(unsafe.Pointer(reservation_s)) - c_struct.reservation = reservation_s - } - if go_struct.Script != "" { - script_s := C.CString(go_struct.Script) - defer C.free(unsafe.Pointer(script_s)) - c_struct.script = script_s - } - if go_struct.Shared != 0 { - c_struct.shared = C.uint16_t(go_struct.Shared) - } - if go_struct.SpankJobEnvSize != 0 { - c_struct.spank_job_env_size = C.uint32_t(go_struct.SpankJobEnvSize) - } - if go_struct.TaskDist != 0 { - c_struct.task_dist = C.uint16_t(go_struct.TaskDist) - } - if go_struct.TimeLimit != 0 { - c_struct.time_limit = C.uint32_t(go_struct.TimeLimit) - } - if go_struct.TimeMin != 0 { - c_struct.time_min = C.uint32_t(go_struct.TimeMin) - } - //if go_struct.User_id != 0 { - // c_struct.user_id = C.uint32_t(go_struct.User_id) - //} - c_struct.user_id = C.uint32_t(go_struct.UserId) - - if go_struct.WaitAllNodes != 0 { - c_struct.wait_all_nodes = C.uint16_t(go_struct.WaitAllNodes) - } - if go_struct.WarnSignal != 0 { - c_struct.warn_signal = C.uint16_t(go_struct.WarnSignal) - } - if go_struct.WarnTime != 0 { - c_struct.warn_time = C.uint16_t(go_struct.WarnTime) - } - if go_struct.WorkDir != "" { - work_dir_s := C.CString(go_struct.WorkDir) - defer C.free(unsafe.Pointer(work_dir_s)) - c_struct.work_dir = work_dir_s - } - if go_struct.CpusPerTask != 0 { - c_struct.cpus_per_task = C.uint16_t(go_struct.CpusPerTask) - } - if go_struct.MinCpus != 0 { - c_struct.min_cpus = C.uint32_t(go_struct.MinCpus) - } - if go_struct.MaxCpus != 0 { - c_struct.max_cpus = C.uint32_t(go_struct.MaxCpus) - } - if go_struct.MinNodes != 0 { - c_struct.min_nodes = C.uint32_t(go_struct.MinNodes) - } - if go_struct.MaxNodes != 0 { - c_struct.max_nodes = C.uint32_t(go_struct.MaxNodes) - } - if go_struct.BoardsPerNode != 0 { - c_struct.boards_per_node = C.uint16_t(go_struct.BoardsPerNode) - } - if go_struct.SocketsPerBoard != 0 { - c_struct.sockets_per_board = C.uint16_t(go_struct.SocketsPerBoard) - } - if go_struct.SocketsPerNode != 0 { - c_struct.sockets_per_node = C.uint16_t(go_struct.SocketsPerNode) - } - if go_struct.CoresPerSocket != 0 { - c_struct.cores_per_socket = C.uint16_t(go_struct.CoresPerSocket) - } - if go_struct.ThreadsPerCore != 0 { - c_struct.threads_per_core = C.uint16_t(go_struct.ThreadsPerCore) - } - if go_struct.NtasksPerNode != 0 { - c_struct.ntasks_per_node = C.uint16_t(go_struct.NtasksPerNode) - } - if go_struct.NtasksPerSocket != 0 { - c_struct.ntasks_per_socket = C.uint16_t(go_struct.NtasksPerSocket) - } - if go_struct.NtasksPerCore != 0 { - c_struct.ntasks_per_core = C.uint16_t(go_struct.NtasksPerCore) - } - if go_struct.NtasksPerBoard != 0 { - c_struct.ntasks_per_board = C.uint16_t(go_struct.NtasksPerBoard) - } - if go_struct.PnMinCpus != 0 { - c_struct.pn_min_cpus = C.uint16_t(go_struct.PnMinCpus) - } - if go_struct.PnMinMemory != 0 { - c_struct.pn_min_memory = C.uint32_t(go_struct.PnMinMemory) - } - if go_struct.PnMinTmpDisk != 0 { - c_struct.pn_min_tmp_disk = C.uint32_t(go_struct.PnMinTmpDisk) - } - if go_struct.ReqSwitch != 0 { - c_struct.req_switch = C.uint32_t(go_struct.ReqSwitch) - } - if go_struct.StdErr != "" { - std_err_s := C.CString(go_struct.StdErr) - defer C.free(unsafe.Pointer(std_err_s)) - c_struct.std_err = std_err_s - } - if go_struct.StdIn != "" { - std_in_s := C.CString(go_struct.StdIn) - defer C.free(unsafe.Pointer(std_in_s)) - c_struct.std_in = std_in_s - } - if go_struct.StdOut != "" { - std_out_s := C.CString(go_struct.StdOut) - defer C.free(unsafe.Pointer(std_out_s)) - c_struct.std_out = std_out_s - } - - if go_struct.Wait4Switch != 0 { - c_struct.wait4switch = C.uint32_t(go_struct.Wait4Switch) - } - if go_struct.Wckey != "" { - wckey_s := C.CString(go_struct.Wckey) - defer C.free(unsafe.Pointer(wckey_s)) - c_struct.wckey = wckey_s - } - - c_msg := C.submit_job(&c_struct) - - defer C.free_submit_response_msg(c_msg) - if c_msg == nil { - go_msg := pbslurm.SubmitResponseMsg{} - go_msg.JobId = 1<<31 - 1 - go_msg.ErrorCode = uint32(C.slurm_get_errno()) - return go_msg - } - go_msg := submit_response_msg_convert_c_to_go(c_msg) - - return go_msg - -} - -func Update_job(update_info *pbslurm.UpdateJobOptions, JobId uint32) int32 { - - var c_struct C.struct_job_descriptor - C.slurm_init_job_desc_msg(&c_struct) - if update_info.Partition != "" { - partition_s := C.CString(update_info.Partition) - defer C.free(unsafe.Pointer(partition_s)) - c_struct.partition = partition_s - } - if update_info.Qos != "" { - qos_s := C.CString(update_info.Qos) - defer C.free(unsafe.Pointer(qos_s)) - c_struct.qos = qos_s - } - if update_info.NumTasks != 0 { - c_struct.num_tasks = C.uint32_t(update_info.NumTasks) - } - if update_info.NtasksPerCore != 0 { - c_struct.ntasks_per_core = C.uint16_t(update_info.NtasksPerCore) - } - - if update_info.NtasksPerNode != 0 { - c_struct.ntasks_per_node = C.uint16_t(update_info.NtasksPerNode) - } - if update_info.NtasksPerSocket != 0 { - c_struct.ntasks_per_socket = C.uint16_t(update_info.NtasksPerSocket) - } - - if update_info.MaxNodes != 0 { - c_struct.max_nodes = C.uint32_t(update_info.MaxNodes) - } - if update_info.MinNodes != 0 { - c_struct.min_nodes = C.uint32_t(update_info.MinNodes) - } - - job_list := Get_job(JobId) - - if job_list.JobList == nil { - return -1 - } - - job := job_list.JobList[0] - if job.JobState != C.JOB_PENDING { - return int32(C.ESLURM_JOB_NOT_PENDING) - } - c_struct.job_id = C.uint32_t(JobId) - - err := C.update_job(&c_struct) - - return int32(err) - -} - -func submit_response_msg_convert_c_to_go(c_struct *C.struct_submit_response_msg) pbslurm.SubmitResponseMsg { - var go_struct pbslurm.SubmitResponseMsg - - go_struct.JobId = uint32(c_struct.job_id) - go_struct.StepId = uint32(c_struct.step_id) - go_struct.ErrorCode = uint32(c_struct.error_code) - return go_struct -} diff --git a/adaptor/pcm_slurm/service/tianhe/node.go b/adaptor/pcm_slurm/service/tianhe/node.go deleted file mode 100644 index 6325a1f43..000000000 --- a/adaptor/pcm_slurm/service/tianhe/node.go +++ /dev/null @@ -1,111 +0,0 @@ -package tianhe - -/* -#include -#include -#include - - struct node_info_msg *get_node_info(){ - struct node_info_msg* node_buffer; - if(slurm_load_node ((time_t) NULL, - &node_buffer, SHOW_ALL)) - return NULL; - return node_buffer; - } - struct node_info_msg *get_single_node_info(char* name){ - struct node_info_msg* node_buffer; - if( slurm_load_node_single (&node_buffer, name, SHOW_DETAIL)) - return NULL; - return node_buffer; - } - - struct node_info* node_from_list(struct node_info_msg *list, int i){ - return &list->node_array[i]; -} - void free_node_buffer(void* buffer){ - - slurm_free_node_info_msg ((struct node_info_msg*)buffer); - } - - -*/ -import "C" -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" -) - -type NodeInfoMsg struct { - LastUpdate int64 - RecordCount uint32 - ErrorCode uint32 - NodeInfoList []pbslurm.NodeInfo -} - -func Node_info_convert_c_to_go(c_struct *C.struct_node_info) pbslurm.NodeInfo { - var go_struct pbslurm.NodeInfo - - go_struct.Arch = C.GoString(c_struct.arch) - go_struct.Boards = uint32(c_struct.boards) - go_struct.BootTime = int64(c_struct.boot_time) - go_struct.Cores = uint32(c_struct.cores) - go_struct.CpuLoad = uint32(c_struct.cpu_load) - go_struct.Cpus = uint32(c_struct.cpus) - go_struct.Features = C.GoString(c_struct.features) - go_struct.Gres = C.GoString(c_struct.gres) - go_struct.Name = C.GoString(c_struct.name) - go_struct.NodeAddr = C.GoString(c_struct.node_addr) - go_struct.NodeHostname = C.GoString(c_struct.node_hostname) - go_struct.NodeState = uint32(c_struct.node_state) - go_struct.Os = C.GoString(c_struct.os) - go_struct.RealMemory = uint64(c_struct.real_memory) - go_struct.Reason = C.GoString(c_struct.reason) - go_struct.ReasonTime = int64(c_struct.reason_time) - go_struct.ReasonUid = uint32(c_struct.reason_uid) - go_struct.SlurmdStartTime = int64(c_struct.slurmd_start_time) - go_struct.Sockets = uint32(c_struct.sockets) - go_struct.Threads = uint32(c_struct.threads) - go_struct.TmpDisk = uint32(c_struct.tmp_disk) - go_struct.Weight = uint32(c_struct.weight) - return go_struct -} - -func NodeDescriptorConvertCToGo(cStruct *C.struct_node_info) pbslurm.NodeInfo { - var goStruct pbslurm.NodeInfo - goStruct.Name = C.GoString(cStruct.name) - return goStruct -} - -func GetNodeInfo() NodeInfoMsg { - var goNodeBuffer NodeInfoMsg - cNodeBuffer := C.get_node_info() - goNodeBuffer.RecordCount = uint32(cNodeBuffer.record_count) - goNodeBuffer.NodeInfoList = make([]pbslurm.NodeInfo, cNodeBuffer.record_count, cNodeBuffer.record_count) - for i := uint32(0); i < goNodeBuffer.RecordCount; i++ { - Node := C.node_from_list(cNodeBuffer, C.int(i)) - goNode := NodeDescriptorConvertCToGo(Node) - goNodeBuffer.NodeInfoList[i] = goNode - } - return goNodeBuffer -} - -func Get_all_nodes() NodeInfoMsg { - var go_node_buffer NodeInfoMsg - c_node_buffer := C.get_node_info() - if c_node_buffer == nil { - go_node_buffer.LastUpdate = int64(0) - go_node_buffer.RecordCount = uint32(0) - go_node_buffer.ErrorCode = uint32(C.slurm_get_errno()) - return go_node_buffer - } - go_node_buffer.LastUpdate = int64(c_node_buffer.last_update) - go_node_buffer.RecordCount = uint32(c_node_buffer.record_count) - go_node_buffer.NodeInfoList = make([]pbslurm.NodeInfo, c_node_buffer.record_count, c_node_buffer.record_count) - for i := uint32(0); i < go_node_buffer.RecordCount; i++ { - node := C.node_from_list(c_node_buffer, C.int(i)) - go_node := Node_info_convert_c_to_go(node) - go_node_buffer.NodeInfoList[i] = go_node - } - C.slurm_free_node_info_msg(c_node_buffer) - - return go_node_buffer -} diff --git a/adaptor/pcm_slurm/service/tianhe/partition.go b/adaptor/pcm_slurm/service/tianhe/partition.go deleted file mode 100644 index a8846c3bb..000000000 --- a/adaptor/pcm_slurm/service/tianhe/partition.go +++ /dev/null @@ -1,109 +0,0 @@ -package tianhe - -/* -//#cgo LDFLAGS: -lslurm -#include -#include - - - - struct partition_info_msg *get_partition_info(){ - struct partition_info_msg* partition_buffer; - if( slurm_load_partitions ((time_t) NULL, - &partition_buffer, SHOW_ALL)) - return NULL; - return partition_buffer; - } - struct partition_info* partition_from_list(struct partition_info_msg *list, int i){ - return &list->partition_array[i]; -} - void free_partition_buffer(void* buffer){ - - slurm_free_partition_info_msg ((struct partition_info_msg*)buffer); - } -*/ -import "C" -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" -) - -func Partition_info_convert_c_to_go(c_struct *C.struct_partition_info) pbslurm.PartitionInfo { - var go_struct pbslurm.PartitionInfo - - go_struct.AllowAllocNodes = C.GoString(c_struct.allow_alloc_nodes) - go_struct.AllowGroups = C.GoString(c_struct.allow_groups) - go_struct.Alternate = C.GoString(c_struct.alternate) - go_struct.CrType = uint32(c_struct.cr_type) - go_struct.DefMemPerCpu = uint64(c_struct.def_mem_per_cpu) - go_struct.DefaultTime = uint32(c_struct.default_time) - go_struct.Flags = uint32(c_struct.flags) - go_struct.GraceTime = uint32(c_struct.grace_time) - go_struct.MaxCpusPerNode = uint32(c_struct.max_cpus_per_node) - go_struct.MaxMemPerCpu = uint64(c_struct.max_mem_per_cpu) - go_struct.MaxNodes = uint32(c_struct.max_nodes) - go_struct.MaxShare = uint32(c_struct.max_share) - go_struct.MaxTime = uint32(c_struct.max_time) - go_struct.MinNodes = uint32(c_struct.min_nodes) - go_struct.Name = C.GoString(c_struct.name) - //go_struct.Node_inx = int32(C.int32_ptr(c_struct.node_inx)) - /*t := C.find_node_inx(c_struct.node_inx) - fmt.Printf("%d", t) - go_struct.Node_inx = make([]int32, t, t) - for i := int32(0); i < int32(t); i++ { - go_struct.Node_inx[i] = int32(C.int32_ptr(c_struct.node_inx, C.int(i))) - - }*/ - go_struct.Nodes = C.GoString(c_struct.nodes) - go_struct.PreemptMode = uint32(c_struct.preempt_mode) - go_struct.StateUp = uint32(c_struct.state_up) - go_struct.TotalCpus = uint32(c_struct.total_cpus) - go_struct.TotalNodes = uint32(c_struct.total_nodes) - return go_struct -} - -type PartitionInfoMsg struct { - LastUpdate int64 - RecordCount uint32 - PartitionInfoList []pbslurm.PartitionInfo -} - -func Get_partitions() PartitionInfoMsg { - var go_partition_buffer PartitionInfoMsg - c_partition_buffer := C.get_partition_info() - if c_partition_buffer == nil { - go_partition_buffer.LastUpdate = int64(0) - go_partition_buffer.RecordCount = uint32(0) - return go_partition_buffer - } - go_partition_buffer.LastUpdate = int64(c_partition_buffer.last_update) - go_partition_buffer.RecordCount = uint32(c_partition_buffer.record_count) - go_partition_buffer.PartitionInfoList = make([]pbslurm.PartitionInfo, c_partition_buffer.record_count, c_partition_buffer.record_count) - for i := uint32(0); i < go_partition_buffer.RecordCount; i++ { - partition := C.partition_from_list(c_partition_buffer, C.int(i)) - go_partition := Partition_info_convert_c_to_go(partition) - go_partition_buffer.PartitionInfoList[i] = go_partition - } - C.slurm_free_partition_info_msg(c_partition_buffer) - - return go_partition_buffer -} - -func GetPartitionsInfo() PartitionInfoMsg { - var goPartitionBuffer PartitionInfoMsg - cPartitionBuffer := C.get_partition_info() - goPartitionBuffer.RecordCount = uint32(cPartitionBuffer.record_count) - goPartitionBuffer.PartitionInfoList = make([]pbslurm.PartitionInfo, cPartitionBuffer.record_count, cPartitionBuffer.record_count) - - for i := uint32(0); i < goPartitionBuffer.RecordCount; i++ { - partition := C.partition_from_list(cPartitionBuffer, C.int(i)) - goPartition := PartitionDescriptorConvertCToGo(partition) - goPartitionBuffer.PartitionInfoList[i] = goPartition - } - return goPartitionBuffer -} - -func PartitionDescriptorConvertCToGo(cStruct *C.struct_partition_info) pbslurm.PartitionInfo { - var goStruct pbslurm.PartitionInfo - goStruct.Name = C.GoString(cStruct.name) - return goStruct -} diff --git a/adaptor/pcm_slurm/service/tianhe/qos.go b/adaptor/pcm_slurm/service/tianhe/qos.go deleted file mode 100644 index 667cfa070..000000000 --- a/adaptor/pcm_slurm/service/tianhe/qos.go +++ /dev/null @@ -1,159 +0,0 @@ -package tianhe - -/* -#cgo LDFLAGS: -lslurmdb - -#include -#include -#include -#include -#include -#include -#include -#include - -typedef struct slurmdb_qos_rec { - char *description; - uint32_t id; - uint32_t flags; - uint32_t grace_time; - uint64_t grp_cpu_mins; - uint64_t grp_cpu_run_mins; - uint32_t grp_cpus; - uint32_t grp_jobs; - uint32_t grp_mem; - uint32_t grp_nodes; - uint32_t grp_submit_jobs; - uint32_t grp_wall; - uint64_t max_cpu_mins_pj; - uint64_t max_cpu_run_mins_pu; - uint32_t max_cpus_pj; - uint32_t max_cpus_pu; - uint32_t max_jobs_pu; - uint32_t max_nodes_pj; - uint32_t max_nodes_pu; - uint32_t max_submit_jobs_pu; - uint32_t max_wall_pj; - char *name; - bitstr_t *preempt_bitstr; - List preempt_list; - uint16_t preempt_mode; - uint32_t priority; - assoc_mgr_qos_usage_t *usage; - double usage_factor; - double usage_thres; -} slurmdb_qos_rec_a; - -typedef struct qos_info { - uint32_t record_count; - slurmdb_qos_rec_t *array; -} qos_info_t; - -struct qos_info Get_qos_list() { - struct qos_info qosinfo; - - slurmdb_qos_cond_t *qos_cond = NULL; - void *conn = slurmdb_connection_get(); - List qoslist = slurmdb_qos_get(conn, qos_cond); - - uint16_t size = slurm_list_count(qoslist); - qosinfo.record_count = size; - qosinfo.array = malloc(size * sizeof(slurmdb_qos_rec_t)); - - slurmdb_qos_rec_t *rec = NULL; - - //slurmdb_init_qos_rec() - - ListIterator itr = slurm_list_iterator_create(qoslist); - - int i = 0; - while ((rec = slurm_list_next(itr))) { - qosinfo.array[i] = *rec; - i++; - } - slurmdb_connection_close(&conn); - slurm_list_destroy(qoslist); - - return qosinfo; -} - - slurmdb_qos_rec_t *qos_from_list(struct qos_info *qos_rec_t, int i) { - return (slurmdb_qos_rec_t *) &qos_rec_t->array[i]; -} - -slurmdb_qos_rec_t *qos_from_list_by_name(slurmdb_qos_rec_t *qos_rec_array, char* qos_name) { - int i; - int arraysize = sizeof(qos_rec_array); - for (i=0; i -#include -#include - struct reserve_info_msg *get_reserve_info(){ - struct reserve_info_msg* reservation_buffer; - if(slurm_load_reservations ((time_t) NULL, - &reservation_buffer)) - return NULL; - return reservation_buffer; - } - struct reserve_info* reservation_from_list(struct reserve_info_msg *list, int i){ - return &list->reservation_array[i]; -} - void free_reservation_buffer(void* buffer){ - slurm_free_reservation_info_msg ((struct reserve_info_msg*)buffer); - } -*/ -import "C" -import ( - pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" -) - -type ReservationInfoMsg struct { - LastUpdate int64 - RecordCount uint32 - ReservationList []pbslurm.ReservationInfo - ErrorCode uint32 -} - -func Reservation_info_convert_c_to_go(c_struct *C.struct_reserve_info) pbslurm.ReservationInfo { - var go_struct pbslurm.ReservationInfo - - go_struct.Accounts = C.GoString(c_struct.accounts) - go_struct.EndTime = int64(c_struct.end_time) - go_struct.Features = C.GoString(c_struct.features) - go_struct.Flags = uint32(c_struct.flags) - go_struct.Licenses = C.GoString(c_struct.licenses) - go_struct.Name = C.GoString(c_struct.name) - go_struct.Features = C.GoString(c_struct.features) - go_struct.NodeCnt = uint32(c_struct.node_cnt) - go_struct.CoreCnt = uint32(c_struct.core_cnt) - /*t := C.find_node_inx(c_struct.node_inx) - - fmt.Printf("%d", t) - go_struct.Node_inx = make([]int32, t, t) - for i := int32(0); i < int32(t); i++ { - go_struct.Node_inx[i] = int32(C.int32_ptr(c_struct.node_inx, C.int(i))) - - }*/ - go_struct.NodeList = C.GoString(c_struct.node_list) - go_struct.Partition = C.GoString(c_struct.partition) - go_struct.StartTime = int64(c_struct.start_time) - //go_struct.clusters = C.GoString(c_struct.clusters) - return go_struct -} - -func Get_all_reservation() ReservationInfoMsg { - var go_reservation_buffer ReservationInfoMsg - c_reservation_buffer := C.get_reserve_info() - if c_reservation_buffer == nil { - go_reservation_buffer.LastUpdate = int64(0) - go_reservation_buffer.RecordCount = uint32(0) - go_reservation_buffer.ErrorCode = uint32(C.slurm_get_errno()) - return go_reservation_buffer - } - go_reservation_buffer.LastUpdate = int64(c_reservation_buffer.last_update) - go_reservation_buffer.RecordCount = uint32(c_reservation_buffer.record_count) - go_reservation_buffer.ReservationList = make([]pbslurm.ReservationInfo, c_reservation_buffer.record_count, c_reservation_buffer.record_count) - for i := uint32(0); i < go_reservation_buffer.RecordCount; i++ { - reservation := C.reservation_from_list(c_reservation_buffer, C.int(i)) - go_reservation := Reservation_info_convert_c_to_go(reservation) - go_reservation_buffer.ReservationList[i] = go_reservation - } - C.slurm_free_reservation_info_msg(c_reservation_buffer) - - return go_reservation_buffer -} - -func GetReservationsInfo() ReservationInfoMsg { - var goReservationBuffer ReservationInfoMsg - cReservationBuffer := C.get_reserve_info() - goReservationBuffer.RecordCount = uint32(cReservationBuffer.record_count) - goReservationBuffer.ReservationList = make([]pbslurm.ReservationInfo, cReservationBuffer.record_count, cReservationBuffer.record_count) - - for i := uint32(0); i < goReservationBuffer.RecordCount; i++ { - Reservation := C.reservation_from_list(cReservationBuffer, C.int(i)) - goReservation := ReservationDescriptorConvertCToGo(Reservation) - goReservationBuffer.ReservationList[i] = goReservation - } - return goReservationBuffer -} - -func ReservationDescriptorConvertCToGo(cStruct *C.struct_reserve_info) pbslurm.ReservationInfo { - var goStruct pbslurm.ReservationInfo - goStruct.Name = C.GoString(cStruct.name) - return goStruct -} diff --git a/adaptor/pcm_vm/buf.gen.yaml b/adaptor/pcm_vm/buf.gen.yaml deleted file mode 100644 index f5e58160b..000000000 --- a/adaptor/pcm_vm/buf.gen.yaml +++ /dev/null @@ -1,17 +0,0 @@ -version: v1 -plugins: - - name: go - out: gen - opt: - - paths=source_relative - - name: go-grpc - out: gen - opt: - - paths=source_relative - - name: grpc-gateway - out: gen - opt: - - paths=source_relative - - grpc_api_configuration=idl/ecs.yaml - - name: openapiv2 - out: gen/openapiv2 \ No newline at end of file diff --git a/adaptor/pcm_vm/buf.yaml b/adaptor/pcm_vm/buf.yaml deleted file mode 100644 index ea7eb0163..000000000 --- a/adaptor/pcm_vm/buf.yaml +++ /dev/null @@ -1,13 +0,0 @@ -version: v1 -name: buf.build/JCCE/PCM -breaking: - use: - - FILE -lint: - use: - - DEFAULT -# ignore: -# - google/type/datetime.proto -deps: - - buf.build/googleapis/googleapis - - buf.build/grpc-ecosystem/grpc-gateway \ No newline at end of file diff --git a/adaptor/pcm_vm/gen/idl/ecs.pb.go b/adaptor/pcm_vm/gen/idl/ecs.pb.go deleted file mode 100644 index 68980226f..000000000 --- a/adaptor/pcm_vm/gen/idl/ecs.pb.go +++ /dev/null @@ -1,3049 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: idl/ecs.proto - -package ecspb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// 云提供商 -type CloudProvider int32 - -const ( - // 0 - 阿里云 - CloudProvider_ali CloudProvider = 0 - // 1 - 腾讯云 - CloudProvider_tencent CloudProvider = 1 - // 2 - 华为云 - CloudProvider_huawei CloudProvider = 2 - // 3 - K8S - CloudProvider_k8s CloudProvider = 3 - // 3 - Harvester - CloudProvider_harvester CloudProvider = 4 -) - -// Enum value maps for CloudProvider. -var ( - CloudProvider_name = map[int32]string{ - 0: "ali", - 1: "tencent", - 2: "huawei", - 3: "k8s", - 4: "harvester", - } - CloudProvider_value = map[string]int32{ - "ali": 0, - "tencent": 1, - "huawei": 2, - "k8s": 3, - "harvester": 4, - } -) - -func (x CloudProvider) Enum() *CloudProvider { - p := new(CloudProvider) - *p = x - return p -} - -func (x CloudProvider) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CloudProvider) Descriptor() protoreflect.EnumDescriptor { - return file_idl_ecs_proto_enumTypes[0].Descriptor() -} - -func (CloudProvider) Type() protoreflect.EnumType { - return &file_idl_ecs_proto_enumTypes[0] -} - -func (x CloudProvider) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CloudProvider.Descriptor instead. -func (CloudProvider) EnumDescriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{0} -} - -// 网络计费类型 -type InternetChargeType int32 - -const ( - // 按固定带宽计费。 - InternetChargeType_PayByBandwidth InternetChargeType = 0 - // (默认):按使用流量计费 - InternetChargeType_PayByTraffic InternetChargeType = 1 -) - -// Enum value maps for InternetChargeType. -var ( - InternetChargeType_name = map[int32]string{ - 0: "PayByBandwidth", - 1: "PayByTraffic", - } - InternetChargeType_value = map[string]int32{ - "PayByBandwidth": 0, - "PayByTraffic": 1, - } -) - -func (x InternetChargeType) Enum() *InternetChargeType { - p := new(InternetChargeType) - *p = x - return p -} - -func (x InternetChargeType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (InternetChargeType) Descriptor() protoreflect.EnumDescriptor { - return file_idl_ecs_proto_enumTypes[1].Descriptor() -} - -func (InternetChargeType) Type() protoreflect.EnumType { - return &file_idl_ecs_proto_enumTypes[1] -} - -func (x InternetChargeType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use InternetChargeType.Descriptor instead. -func (InternetChargeType) EnumDescriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{1} -} - -// 虚拟机状态操作 -type ActionType int32 - -const ( - // 启动 - ActionType_start ActionType = 0 - // 停止 - ActionType_stop ActionType = 1 - // 重启 - ActionType_restart ActionType = 2 -) - -// Enum value maps for ActionType. -var ( - ActionType_name = map[int32]string{ - 0: "start", - 1: "stop", - 2: "restart", - } - ActionType_value = map[string]int32{ - "start": 0, - "stop": 1, - "restart": 2, - } -) - -func (x ActionType) Enum() *ActionType { - p := new(ActionType) - *p = x - return p -} - -func (x ActionType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ActionType) Descriptor() protoreflect.EnumDescriptor { - return file_idl_ecs_proto_enumTypes[2].Descriptor() -} - -func (ActionType) Type() protoreflect.EnumType { - return &file_idl_ecs_proto_enumTypes[2] -} - -func (x ActionType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ActionType.Descriptor instead. -func (ActionType) EnumDescriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{2} -} - -// ECS 实例 -type EcsInstance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云类型 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"` - // 账号名称 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // 实例id - InstanceId string `protobuf:"bytes,3,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` - // 实例名称 - InstanceName string `protobuf:"bytes,4,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` - // 地域,数据中心 - RegionName string `protobuf:"bytes,5,opt,name=region_name,json=regionName,proto3" json:"region_name,omitempty"` - // 公网ip - PublicIps []string `protobuf:"bytes,6,rep,name=public_ips,json=publicIps,proto3" json:"public_ips,omitempty"` - // 实例类型 - InstanceType string `protobuf:"bytes,7,opt,name=instance_type,json=instanceType,proto3" json:"instance_type,omitempty"` - // vcpu数 - Cpu string `protobuf:"bytes,8,opt,name=cpu,proto3" json:"cpu,omitempty"` - // 内存MB - Memory string `protobuf:"bytes,9,opt,name=memory,proto3" json:"memory,omitempty"` - // 实例描述 - Description string `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty"` - // 状态 - Status string `protobuf:"bytes,11,opt,name=status,proto3" json:"status,omitempty"` - // 创建时间,ISO8601 - CreationTime string `protobuf:"bytes,12,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` - // 过期时间 - ExpireTime string `protobuf:"bytes,13,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` - // 内网ip - InnerIps []string `protobuf:"bytes,14,rep,name=inner_ips,json=innerIps,proto3" json:"inner_ips,omitempty"` - // vpc id - VpcId string `protobuf:"bytes,15,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` - // 资源组id - ResourceGroupId string `protobuf:"bytes,16,opt,name=resource_group_id,json=resourceGroupId,proto3" json:"resource_group_id,omitempty"` - // 收费类型 - InstanceChargeType string `protobuf:"bytes,17,opt,name=instance_charge_type,json=instanceChargeType,proto3" json:"instance_charge_type,omitempty"` - // -----------harvester--------- - // 虚拟机所在的节点 - Node string `protobuf:"bytes,18,opt,name=node,proto3" json:"node,omitempty"` - // namespace - Namespace string `protobuf:"bytes,20,opt,name=namespace,proto3" json:"namespace,omitempty"` -} - -func (x *EcsInstance) Reset() { - *x = EcsInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EcsInstance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EcsInstance) ProtoMessage() {} - -func (x *EcsInstance) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EcsInstance.ProtoReflect.Descriptor instead. -func (*EcsInstance) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{0} -} - -func (x *EcsInstance) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *EcsInstance) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *EcsInstance) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -func (x *EcsInstance) GetInstanceName() string { - if x != nil { - return x.InstanceName - } - return "" -} - -func (x *EcsInstance) GetRegionName() string { - if x != nil { - return x.RegionName - } - return "" -} - -func (x *EcsInstance) GetPublicIps() []string { - if x != nil { - return x.PublicIps - } - return nil -} - -func (x *EcsInstance) GetInstanceType() string { - if x != nil { - return x.InstanceType - } - return "" -} - -func (x *EcsInstance) GetCpu() string { - if x != nil { - return x.Cpu - } - return "" -} - -func (x *EcsInstance) GetMemory() string { - if x != nil { - return x.Memory - } - return "" -} - -func (x *EcsInstance) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *EcsInstance) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *EcsInstance) GetCreationTime() string { - if x != nil { - return x.CreationTime - } - return "" -} - -func (x *EcsInstance) GetExpireTime() string { - if x != nil { - return x.ExpireTime - } - return "" -} - -func (x *EcsInstance) GetInnerIps() []string { - if x != nil { - return x.InnerIps - } - return nil -} - -func (x *EcsInstance) GetVpcId() string { - if x != nil { - return x.VpcId - } - return "" -} - -func (x *EcsInstance) GetResourceGroupId() string { - if x != nil { - return x.ResourceGroupId - } - return "" -} - -func (x *EcsInstance) GetInstanceChargeType() string { - if x != nil { - return x.InstanceChargeType - } - return "" -} - -func (x *EcsInstance) GetNode() string { - if x != nil { - return x.Node - } - return "" -} - -func (x *EcsInstance) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -// 创建多家云ECS入参 -type CreateEcsMultipleReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CreateEcsReqs []*CreateEcsReq `protobuf:"bytes,1,rep,name=createEcsReqs,proto3" json:"createEcsReqs,omitempty"` -} - -func (x *CreateEcsMultipleReq) Reset() { - *x = CreateEcsMultipleReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateEcsMultipleReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateEcsMultipleReq) ProtoMessage() {} - -func (x *CreateEcsMultipleReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateEcsMultipleReq.ProtoReflect.Descriptor instead. -func (*CreateEcsMultipleReq) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{1} -} - -func (x *CreateEcsMultipleReq) GetCreateEcsReqs() []*CreateEcsReq { - if x != nil { - return x.CreateEcsReqs - } - return nil -} - -// 创建多家云ECS返回值 -type CreateEcsMultipleResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 请求ID - RequestId []string `protobuf:"bytes,1,rep,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - Finished bool `protobuf:"varint,2,opt,name=finished,proto3" json:"finished,omitempty"` -} - -func (x *CreateEcsMultipleResp) Reset() { - *x = CreateEcsMultipleResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateEcsMultipleResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateEcsMultipleResp) ProtoMessage() {} - -func (x *CreateEcsMultipleResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateEcsMultipleResp.ProtoReflect.Descriptor instead. -func (*CreateEcsMultipleResp) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{2} -} - -func (x *CreateEcsMultipleResp) GetRequestId() []string { - if x != nil { - return x.RequestId - } - return nil -} - -func (x *CreateEcsMultipleResp) GetFinished() bool { - if x != nil { - return x.Finished - } - return false -} - -// 创建ECS入参 -type CreateEcsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云类型 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"` - // 账号名称 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // 地域,数据中心 - RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` - // 镜像id - ImageId string `protobuf:"bytes,4,opt,name=image_id,json=imageId,proto3" json:"image_id,omitempty"` - // 实例的付费方式 - InstanceChargeType string `protobuf:"bytes,5,opt,name=instance_charge_type,json=instanceChargeType,proto3" json:"instance_charge_type,omitempty"` - // 实例的资源规格 - InstanceType string `protobuf:"bytes,6,opt,name=instance_type,json=instanceType,proto3" json:"instance_type,omitempty"` - // 安全组id - SecurityGroupId string `protobuf:"bytes,7,opt,name=security_group_id,json=securityGroupId,proto3" json:"security_group_id,omitempty"` - // 交换机id - VSwitchId string `protobuf:"bytes,8,opt,name=v_switch_id,json=vSwitchId,proto3" json:"v_switch_id,omitempty"` - // 实例名称 - InstanceName string `protobuf:"bytes,9,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` - // 实例描述 - Description string `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty"` - // 可用区id - ZoneId string `protobuf:"bytes,11,opt,name=zone_id,json=zoneId,proto3" json:"zone_id,omitempty"` - // 系统磁盘 - SystemDisk *SystemDisk `protobuf:"bytes,12,opt,name=system_disk,json=systemDisk,proto3" json:"system_disk,omitempty"` - // 创建ECS的数量 - Amount int32 `protobuf:"varint,13,opt,name=amount,proto3" json:"amount,omitempty"` - // 预检此次请求,为true时请求通过,则返回 Request validation has been passed with DryRun flag set - DryRun string `protobuf:"bytes,14,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` - // 数据盘N的云盘种类。取值范围:cloud_efficiency:高效云盘;cloud_ssd:SSD云盘;cloud_essd:ESSD云盘;cloud:普通云盘。 - Category string `protobuf:"bytes,15,opt,name=category,proto3" json:"category,omitempty"` - // 网络计费类型。取值范围:PayByBandwidth:按固定带宽计费。PayByTraffic(默认):按使用流量计费 - InternetChargeType InternetChargeType `protobuf:"varint,16,opt,name=internet_charge_type,json=internetChargeType,proto3,enum=ecs.InternetChargeType" json:"internet_charge_type,omitempty"` - // 公网入带宽最大值,单位为Mbit/s。创建的实例如果参数InternetMaxBandwidthOut的值大于0,则自动为实例分配公网IP。 - InternetMaxBandwidthOut int32 `protobuf:"varint,17,opt,name=internet_max_bandwidth_out,json=internetMaxBandwidthOut,proto3" json:"internet_max_bandwidth_out,omitempty"` - // vpc id 华为云必需 - VpcId string `protobuf:"bytes,18,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` - // 待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网(subnet)的网络ID,UUID格式。华为云必需 - SubnetId string `protobuf:"bytes,19,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` - // -------------harvester--------------- - // 命名空间 - Namespace string `protobuf:"bytes,20,opt,name=namespace,proto3" json:"namespace,omitempty"` - // vCpu - Cpu int32 `protobuf:"varint,21,opt,name=cpu,proto3" json:"cpu,omitempty"` - // memory - Memory string `protobuf:"bytes,22,opt,name=memory,proto3" json:"memory,omitempty"` - // ssh_key - SshKey string `protobuf:"bytes,23,opt,name=ssh_key,json=sshKey,proto3" json:"ssh_key,omitempty"` - // diskName - DiskName string `protobuf:"bytes,24,opt,name=disk_name,json=diskName,proto3" json:"disk_name,omitempty"` - // disk类型 disk,cd-rom - DiskType string `protobuf:"bytes,25,opt,name=disk_type,json=diskType,proto3" json:"disk_type,omitempty"` - // 卷大小 - DiskSize string `protobuf:"bytes,26,opt,name=disk_size,json=diskSize,proto3" json:"disk_size,omitempty"` - // bus 总线指示要模拟的磁盘设备的类型,支持virtio, sata, scsi. - Bus string `protobuf:"bytes,27,opt,name=bus,proto3" json:"bus,omitempty"` - // 网络名称 - NetworkName string `protobuf:"bytes,28,opt,name=network_name,json=networkName,proto3" json:"network_name,omitempty"` - // network_model 网络模式,支持e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio. - NetworkModel string `protobuf:"bytes,29,opt,name=network_model,json=networkModel,proto3" json:"network_model,omitempty"` - // 网络 - Network string `protobuf:"bytes,30,opt,name=network,proto3" json:"network,omitempty"` - // 网络连接方法,默认bridge - NetworkType string `protobuf:"bytes,31,opt,name=network_type,json=networkType,proto3" json:"network_type,omitempty"` - // osType //系统类型 - OsType string `protobuf:"bytes,32,opt,name=os_type,json=osType,proto3" json:"os_type,omitempty"` - // machineType //机器类型 none、q35、pc - MachineType string `protobuf:"bytes,33,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"` - // machineName //主机名称,默认为虚拟机名称 - MachineName string `protobuf:"bytes,34,opt,name=machine_name,json=machineName,proto3" json:"machine_name,omitempty"` - // userDataTemplate //用户数据模板 - UserDataTemplate string `protobuf:"bytes,35,opt,name=user_data_template,json=userDataTemplate,proto3" json:"user_data_template,omitempty"` - // networkDataTemplate //网络数据模板 - NetworkDataTemplate string `protobuf:"bytes,36,opt,name=network_data_template,json=networkDataTemplate,proto3" json:"network_data_template,omitempty"` - // vmTemplateName //模板名称 - VmTemplateName string `protobuf:"bytes,37,opt,name=vm_template_name,json=vmTemplateName,proto3" json:"vm_template_name,omitempty"` - // vmTemplateVersion //版本号 - VmTemplateVersion string `protobuf:"bytes,38,opt,name=vm_template_version,json=vmTemplateVersion,proto3" json:"vm_template_version,omitempty"` -} - -func (x *CreateEcsReq) Reset() { - *x = CreateEcsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateEcsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateEcsReq) ProtoMessage() {} - -func (x *CreateEcsReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateEcsReq.ProtoReflect.Descriptor instead. -func (*CreateEcsReq) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{3} -} - -func (x *CreateEcsReq) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *CreateEcsReq) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *CreateEcsReq) GetRegionId() int32 { - if x != nil { - return x.RegionId - } - return 0 -} - -func (x *CreateEcsReq) GetImageId() string { - if x != nil { - return x.ImageId - } - return "" -} - -func (x *CreateEcsReq) GetInstanceChargeType() string { - if x != nil { - return x.InstanceChargeType - } - return "" -} - -func (x *CreateEcsReq) GetInstanceType() string { - if x != nil { - return x.InstanceType - } - return "" -} - -func (x *CreateEcsReq) GetSecurityGroupId() string { - if x != nil { - return x.SecurityGroupId - } - return "" -} - -func (x *CreateEcsReq) GetVSwitchId() string { - if x != nil { - return x.VSwitchId - } - return "" -} - -func (x *CreateEcsReq) GetInstanceName() string { - if x != nil { - return x.InstanceName - } - return "" -} - -func (x *CreateEcsReq) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *CreateEcsReq) GetZoneId() string { - if x != nil { - return x.ZoneId - } - return "" -} - -func (x *CreateEcsReq) GetSystemDisk() *SystemDisk { - if x != nil { - return x.SystemDisk - } - return nil -} - -func (x *CreateEcsReq) GetAmount() int32 { - if x != nil { - return x.Amount - } - return 0 -} - -func (x *CreateEcsReq) GetDryRun() string { - if x != nil { - return x.DryRun - } - return "" -} - -func (x *CreateEcsReq) GetCategory() string { - if x != nil { - return x.Category - } - return "" -} - -func (x *CreateEcsReq) GetInternetChargeType() InternetChargeType { - if x != nil { - return x.InternetChargeType - } - return InternetChargeType_PayByBandwidth -} - -func (x *CreateEcsReq) GetInternetMaxBandwidthOut() int32 { - if x != nil { - return x.InternetMaxBandwidthOut - } - return 0 -} - -func (x *CreateEcsReq) GetVpcId() string { - if x != nil { - return x.VpcId - } - return "" -} - -func (x *CreateEcsReq) GetSubnetId() string { - if x != nil { - return x.SubnetId - } - return "" -} - -func (x *CreateEcsReq) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *CreateEcsReq) GetCpu() int32 { - if x != nil { - return x.Cpu - } - return 0 -} - -func (x *CreateEcsReq) GetMemory() string { - if x != nil { - return x.Memory - } - return "" -} - -func (x *CreateEcsReq) GetSshKey() string { - if x != nil { - return x.SshKey - } - return "" -} - -func (x *CreateEcsReq) GetDiskName() string { - if x != nil { - return x.DiskName - } - return "" -} - -func (x *CreateEcsReq) GetDiskType() string { - if x != nil { - return x.DiskType - } - return "" -} - -func (x *CreateEcsReq) GetDiskSize() string { - if x != nil { - return x.DiskSize - } - return "" -} - -func (x *CreateEcsReq) GetBus() string { - if x != nil { - return x.Bus - } - return "" -} - -func (x *CreateEcsReq) GetNetworkName() string { - if x != nil { - return x.NetworkName - } - return "" -} - -func (x *CreateEcsReq) GetNetworkModel() string { - if x != nil { - return x.NetworkModel - } - return "" -} - -func (x *CreateEcsReq) GetNetwork() string { - if x != nil { - return x.Network - } - return "" -} - -func (x *CreateEcsReq) GetNetworkType() string { - if x != nil { - return x.NetworkType - } - return "" -} - -func (x *CreateEcsReq) GetOsType() string { - if x != nil { - return x.OsType - } - return "" -} - -func (x *CreateEcsReq) GetMachineType() string { - if x != nil { - return x.MachineType - } - return "" -} - -func (x *CreateEcsReq) GetMachineName() string { - if x != nil { - return x.MachineName - } - return "" -} - -func (x *CreateEcsReq) GetUserDataTemplate() string { - if x != nil { - return x.UserDataTemplate - } - return "" -} - -func (x *CreateEcsReq) GetNetworkDataTemplate() string { - if x != nil { - return x.NetworkDataTemplate - } - return "" -} - -func (x *CreateEcsReq) GetVmTemplateName() string { - if x != nil { - return x.VmTemplateName - } - return "" -} - -func (x *CreateEcsReq) GetVmTemplateVersion() string { - if x != nil { - return x.VmTemplateVersion - } - return "" -} - -// 系统磁盘 -type SystemDisk struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 系统盘大小,单位为GiB。取值范围:20~500。该参数的取值必须大于或者等于max{20, ImageSize}。默认值:max{40, 参数ImageId对应的镜像大小} - Size string `protobuf:"bytes,1,opt,name=size,proto3" json:"size,omitempty"` - // 系统盘类型。系统盘的云盘种类。取值范围:cloud_efficiency:高效云盘。cloud_ssd:SSD云盘。cloud_essd:ESSD云盘。cloud:普通云盘。 - Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` - // 系统盘名称 - DiskName string `protobuf:"bytes,3,opt,name=disk_name,json=diskName,proto3" json:"disk_name,omitempty"` - // 系统盘描述 - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - // 创建ESSD云盘作为系统盘使用时,设置云盘的性能等级。取值范围:PL0:单盘最高随机读写IOPS 1万。PL1(默认):单盘最高随机读写IOPS 5万。PL2:单盘最高随机读写IOPS 10万。PL3:单盘最高随机读写IOPS 100万。 - PerformanceLevel string `protobuf:"bytes,5,opt,name=performance_level,json=performanceLevel,proto3" json:"performance_level,omitempty"` - // 系统盘采用的自动快照策略ID。 - AutoSnapshotPolicyId string `protobuf:"bytes,6,opt,name=auto_snapshot_policy_id,json=autoSnapshotPolicyId,proto3" json:"auto_snapshot_policy_id,omitempty"` -} - -func (x *SystemDisk) Reset() { - *x = SystemDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SystemDisk) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SystemDisk) ProtoMessage() {} - -func (x *SystemDisk) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SystemDisk.ProtoReflect.Descriptor instead. -func (*SystemDisk) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{4} -} - -func (x *SystemDisk) GetSize() string { - if x != nil { - return x.Size - } - return "" -} - -func (x *SystemDisk) GetCategory() string { - if x != nil { - return x.Category - } - return "" -} - -func (x *SystemDisk) GetDiskName() string { - if x != nil { - return x.DiskName - } - return "" -} - -func (x *SystemDisk) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *SystemDisk) GetPerformanceLevel() string { - if x != nil { - return x.PerformanceLevel - } - return "" -} - -func (x *SystemDisk) GetAutoSnapshotPolicyId() string { - if x != nil { - return x.AutoSnapshotPolicyId - } - return "" -} - -// 创建ECS返回值 -type CreateEcsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云名称 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"` - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // 区域Id,参考 tenant.proto 中的各个云的区域 - RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` - // 请求ID - RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // 订单id - OrderId string `protobuf:"bytes,5,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` - // 订单成交价 - TradePrice float32 `protobuf:"fixed32,6,opt,name=trade_price,json=tradePrice,proto3" json:"trade_price,omitempty"` - // 实例ID(InstanceIdSet)列表 - InstanceIdSets []string `protobuf:"bytes,7,rep,name=instance_id_sets,json=instanceIdSets,proto3" json:"instance_id_sets,omitempty"` - // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - Finished bool `protobuf:"varint,8,opt,name=finished,proto3" json:"finished,omitempty"` -} - -func (x *CreateEcsResp) Reset() { - *x = CreateEcsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateEcsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateEcsResp) ProtoMessage() {} - -func (x *CreateEcsResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateEcsResp.ProtoReflect.Descriptor instead. -func (*CreateEcsResp) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{5} -} - -func (x *CreateEcsResp) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *CreateEcsResp) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *CreateEcsResp) GetRegionId() int32 { - if x != nil { - return x.RegionId - } - return 0 -} - -func (x *CreateEcsResp) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -func (x *CreateEcsResp) GetOrderId() string { - if x != nil { - return x.OrderId - } - return "" -} - -func (x *CreateEcsResp) GetTradePrice() float32 { - if x != nil { - return x.TradePrice - } - return 0 -} - -func (x *CreateEcsResp) GetInstanceIdSets() []string { - if x != nil { - return x.InstanceIdSets - } - return nil -} - -func (x *CreateEcsResp) GetFinished() bool { - if x != nil { - return x.Finished - } - return false -} - -// 删除ECS入参 -type DeleteEcsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云类型 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"` - // 账号名称 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // 地域,数据中心 - RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` - // 是否只预检此次请求是否只预检此次请求。true:发送检查请求,不会查询资源状况。检查项包括AccessKey是否有效、RAM用户的授权情况和是否填写了必需参数。如果检查不通过,则返回对应错误。如果检查通过,会返回错误码DRYRUN.SUCCESS。 - // false(默认值):发送正常请求,通过检查后返回2XX HTTP状态码并直接查询资源状况。 - DryRun string `protobuf:"bytes,4,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` - // Force是否强制释放**运行中**;true:强制释放运行中(Running)的实例。强制释放相当于断电,实例内存以及存储中的临时数据都会被擦除,无法恢复。 - // false(默认值):正常释放实例,此时实例必须处于已停止(Stopped)状态 - Force string `protobuf:"bytes,5,opt,name=force,proto3" json:"force,omitempty"` - // 是否释放已到期的包年包月实例 true,false - TerminateSubscription string `protobuf:"bytes,6,opt,name=terminate_subscription,json=terminateSubscription,proto3" json:"terminate_subscription,omitempty"` - // 实例ID数组以”,“分割。列:i-8vb2nlubkow0fxbq2218,i-8vb2nlubkow0fxbq2216 - InstanceIds string `protobuf:"bytes,7,opt,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"` - // 配置删除云服务器是否删除云服务器绑定的弹性IP。如果选择不删除,则系统仅做解绑定操作,保留弹性IP资源。 - // 取值为true或false。默认false;华为云 - DeletePublicip string `protobuf:"bytes,8,opt,name=delete_publicip,json=deletePublicip,proto3" json:"delete_publicip,omitempty"` - // 配置删除云服务器是否删除云服务器对应的数据盘,如果选择不删除,则系统仅做卸载操作,保留云硬盘资源。默认为false。 - // 取值为true或false。默认false;华为云 - DeleteVolume string `protobuf:"bytes,9,opt,name=delete_volume,json=deleteVolume,proto3" json:"delete_volume,omitempty"` - // ----------------harvester---------------- - // 虚拟机名称 - InstanceName string `protobuf:"bytes,10,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` - // namespace - Namespace string `protobuf:"bytes,11,opt,name=namespace,proto3" json:"namespace,omitempty"` - // diskName,以“,” 分割 - DiskName string `protobuf:"bytes,12,opt,name=disk_name,json=diskName,proto3" json:"disk_name,omitempty"` -} - -func (x *DeleteEcsReq) Reset() { - *x = DeleteEcsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteEcsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteEcsReq) ProtoMessage() {} - -func (x *DeleteEcsReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteEcsReq.ProtoReflect.Descriptor instead. -func (*DeleteEcsReq) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{6} -} - -func (x *DeleteEcsReq) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *DeleteEcsReq) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *DeleteEcsReq) GetRegionId() int32 { - if x != nil { - return x.RegionId - } - return 0 -} - -func (x *DeleteEcsReq) GetDryRun() string { - if x != nil { - return x.DryRun - } - return "" -} - -func (x *DeleteEcsReq) GetForce() string { - if x != nil { - return x.Force - } - return "" -} - -func (x *DeleteEcsReq) GetTerminateSubscription() string { - if x != nil { - return x.TerminateSubscription - } - return "" -} - -func (x *DeleteEcsReq) GetInstanceIds() string { - if x != nil { - return x.InstanceIds - } - return "" -} - -func (x *DeleteEcsReq) GetDeletePublicip() string { - if x != nil { - return x.DeletePublicip - } - return "" -} - -func (x *DeleteEcsReq) GetDeleteVolume() string { - if x != nil { - return x.DeleteVolume - } - return "" -} - -func (x *DeleteEcsReq) GetInstanceName() string { - if x != nil { - return x.InstanceName - } - return "" -} - -func (x *DeleteEcsReq) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *DeleteEcsReq) GetDiskName() string { - if x != nil { - return x.DiskName - } - return "" -} - -// 删除ECS返回值 -type DeleteEcsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云名称 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"` - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // 区域Id,参考 tenant.proto 中的各个云的区域 - RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` - // 请求ID - RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` -} - -func (x *DeleteEcsResp) Reset() { - *x = DeleteEcsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteEcsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteEcsResp) ProtoMessage() {} - -func (x *DeleteEcsResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteEcsResp.ProtoReflect.Descriptor instead. -func (*DeleteEcsResp) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{7} -} - -func (x *DeleteEcsResp) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *DeleteEcsResp) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *DeleteEcsResp) GetRegionId() int32 { - if x != nil { - return x.RegionId - } - return 0 -} - -func (x *DeleteEcsResp) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -// 更新ECS入参 -type UpdateEcsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云类型 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"` - // 账号名称 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // 地域,数据中心 - RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` - // 实例id - InstanceIds string `protobuf:"bytes,4,opt,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"` - // 实例状态不能为启动中(Starting)。重启实例后,重置生效,且必须是在ECS控制台重启或者调用API RebootInstance重启,新密码才能生效。在操作系统内部重启不能生效。 - Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` - // 操作系统的主机名 - HostName string `protobuf:"bytes,6,opt,name=host_name,json=hostName,proto3" json:"host_name,omitempty"` - // 实例名称 - InstanceName string `protobuf:"bytes,7,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` - // 实例描述 - Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` - // 实例重新加入的安全组列表,安全组ID不能重复。以”,“分割 - SecurityGroupIds string `protobuf:"bytes,9,opt,name=security_group_ids,json=securityGroupIds,proto3" json:"security_group_ids,omitempty"` - // ---------------harvester----------------- - // namespace - Namespace string `protobuf:"bytes,10,opt,name=namespace,proto3" json:"namespace,omitempty"` - // cpu - Cpu string `protobuf:"bytes,11,opt,name=cpu,proto3" json:"cpu,omitempty"` - // memory - Memory string `protobuf:"bytes,12,opt,name=memory,proto3" json:"memory,omitempty"` - // 修改配置后是否重启 - IsRestart bool `protobuf:"varint,13,opt,name=is_restart,json=isRestart,proto3" json:"is_restart,omitempty"` -} - -func (x *UpdateEcsReq) Reset() { - *x = UpdateEcsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateEcsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateEcsReq) ProtoMessage() {} - -func (x *UpdateEcsReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateEcsReq.ProtoReflect.Descriptor instead. -func (*UpdateEcsReq) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{8} -} - -func (x *UpdateEcsReq) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *UpdateEcsReq) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *UpdateEcsReq) GetRegionId() int32 { - if x != nil { - return x.RegionId - } - return 0 -} - -func (x *UpdateEcsReq) GetInstanceIds() string { - if x != nil { - return x.InstanceIds - } - return "" -} - -func (x *UpdateEcsReq) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -func (x *UpdateEcsReq) GetHostName() string { - if x != nil { - return x.HostName - } - return "" -} - -func (x *UpdateEcsReq) GetInstanceName() string { - if x != nil { - return x.InstanceName - } - return "" -} - -func (x *UpdateEcsReq) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *UpdateEcsReq) GetSecurityGroupIds() string { - if x != nil { - return x.SecurityGroupIds - } - return "" -} - -func (x *UpdateEcsReq) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *UpdateEcsReq) GetCpu() string { - if x != nil { - return x.Cpu - } - return "" -} - -func (x *UpdateEcsReq) GetMemory() string { - if x != nil { - return x.Memory - } - return "" -} - -func (x *UpdateEcsReq) GetIsRestart() bool { - if x != nil { - return x.IsRestart - } - return false -} - -// 更新ECS返回值 -type UpdateEcsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云名称 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"` - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // 区域Id,参考 tenant.proto 中的各个云的区域 - RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` - // 请求ID - RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` -} - -func (x *UpdateEcsResp) Reset() { - *x = UpdateEcsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateEcsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateEcsResp) ProtoMessage() {} - -func (x *UpdateEcsResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateEcsResp.ProtoReflect.Descriptor instead. -func (*UpdateEcsResp) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{9} -} - -func (x *UpdateEcsResp) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *UpdateEcsResp) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *UpdateEcsResp) GetRegionId() int32 { - if x != nil { - return x.RegionId - } - return 0 -} - -func (x *UpdateEcsResp) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -// 查询ECS入参 -type ListDetailReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云名称 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"` - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // 区域Id,参考 tenant.proto 中的各个云的区域 - RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` - // 分页相关参数,页码 - PageNumber int32 `protobuf:"varint,4,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` - // 分页相关参数,每页数量 - PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // 分页相关参数,下一页的token - NextToken string `protobuf:"bytes,6,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` - // --------harvester--------- - // namespace - Namespace string `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace,omitempty"` -} - -func (x *ListDetailReq) Reset() { - *x = ListDetailReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListDetailReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDetailReq) ProtoMessage() {} - -func (x *ListDetailReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListDetailReq.ProtoReflect.Descriptor instead. -func (*ListDetailReq) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{10} -} - -func (x *ListDetailReq) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *ListDetailReq) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *ListDetailReq) GetRegionId() int32 { - if x != nil { - return x.RegionId - } - return 0 -} - -func (x *ListDetailReq) GetPageNumber() int32 { - if x != nil { - return x.PageNumber - } - return 0 -} - -func (x *ListDetailReq) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListDetailReq) GetNextToken() string { - if x != nil { - return x.NextToken - } - return "" -} - -func (x *ListDetailReq) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -// 查询ECS返回值 -type ListDetailResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Ecs 机器集合 - Ecses []*EcsInstance `protobuf:"bytes,1,rep,name=ecses,proto3" json:"ecses,omitempty"` - // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - Finished bool `protobuf:"varint,2,opt,name=finished,proto3" json:"finished,omitempty"` - // 分页相关参数,页码 - PageNumber int32 `protobuf:"varint,3,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` - // 分页相关参数,每页数量 - PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // 分页相关参数,下一页的token - NextToken string `protobuf:"bytes,5,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` - // 请求id,出现问题后提供给云厂商,排查问题 - RequestId string `protobuf:"bytes,6,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` -} - -func (x *ListDetailResp) Reset() { - *x = ListDetailResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListDetailResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDetailResp) ProtoMessage() {} - -func (x *ListDetailResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListDetailResp.ProtoReflect.Descriptor instead. -func (*ListDetailResp) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{11} -} - -func (x *ListDetailResp) GetEcses() []*EcsInstance { - if x != nil { - return x.Ecses - } - return nil -} - -func (x *ListDetailResp) GetFinished() bool { - if x != nil { - return x.Finished - } - return false -} - -func (x *ListDetailResp) GetPageNumber() int32 { - if x != nil { - return x.PageNumber - } - return 0 -} - -func (x *ListDetailResp) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListDetailResp) GetNextToken() string { - if x != nil { - return x.NextToken - } - return "" -} - -func (x *ListDetailResp) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -type ActionReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云名称 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"` - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // 区域Id,参考 tenant.proto 中的各个云的区域 - RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` - // 命名空间 - Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"` - // 虚拟机名称 - VmName string `protobuf:"bytes,5,opt,name=vm_name,json=vmName,proto3" json:"vm_name,omitempty"` - // 虚拟机操作状态 - ActionType ActionType `protobuf:"varint,6,opt,name=action_type,json=actionType,proto3,enum=ecs.ActionType" json:"action_type,omitempty"` -} - -func (x *ActionReq) Reset() { - *x = ActionReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ActionReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActionReq) ProtoMessage() {} - -func (x *ActionReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActionReq.ProtoReflect.Descriptor instead. -func (*ActionReq) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{12} -} - -func (x *ActionReq) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *ActionReq) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *ActionReq) GetRegionId() int32 { - if x != nil { - return x.RegionId - } - return 0 -} - -func (x *ActionReq) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ActionReq) GetVmName() string { - if x != nil { - return x.VmName - } - return "" -} - -func (x *ActionReq) GetActionType() ActionType { - if x != nil { - return x.ActionType - } - return ActionType_start -} - -type ActionResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云名称 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"` - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // Ecs 机器集合 - Ecses []*EcsInstance `protobuf:"bytes,3,rep,name=ecses,proto3" json:"ecses,omitempty"` - // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - Finished bool `protobuf:"varint,4,opt,name=finished,proto3" json:"finished,omitempty"` - // vm状态 - Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` -} - -func (x *ActionResp) Reset() { - *x = ActionResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ActionResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActionResp) ProtoMessage() {} - -func (x *ActionResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActionResp.ProtoReflect.Descriptor instead. -func (*ActionResp) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{13} -} - -func (x *ActionResp) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *ActionResp) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *ActionResp) GetEcses() []*EcsInstance { - if x != nil { - return x.Ecses - } - return nil -} - -func (x *ActionResp) GetFinished() bool { - if x != nil { - return x.Finished - } - return false -} - -func (x *ActionResp) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -type ListReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云名称 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"` -} - -func (x *ListReq) Reset() { - *x = ListReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListReq) ProtoMessage() {} - -func (x *ListReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListReq.ProtoReflect.Descriptor instead. -func (*ListReq) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{14} -} - -func (x *ListReq) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -type ListResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Ecs 机器集合 - Ecses []*EcsInstance `protobuf:"bytes,1,rep,name=ecses,proto3" json:"ecses,omitempty"` -} - -func (x *ListResp) Reset() { - *x = ListResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListResp) ProtoMessage() {} - -func (x *ListResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListResp.ProtoReflect.Descriptor instead. -func (*ListResp) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{15} -} - -func (x *ListResp) GetEcses() []*EcsInstance { - if x != nil { - return x.Ecses - } - return nil -} - -type ListAllReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ListAllReq) Reset() { - *x = ListAllReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListAllReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListAllReq) ProtoMessage() {} - -func (x *ListAllReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListAllReq.ProtoReflect.Descriptor instead. -func (*ListAllReq) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{16} -} - -type ListImagesReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云名称 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"` - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // 区域Id,参考 tenant.proto 中的各个云的区域 - RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` - // 命名空间 - Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"` - // 分页相关参数,页码 - PageNumber int32 `protobuf:"varint,5,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` - // 分页相关参数,每页数量 - PageSize int32 `protobuf:"varint,6,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` -} - -func (x *ListImagesReq) Reset() { - *x = ListImagesReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListImagesReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListImagesReq) ProtoMessage() {} - -func (x *ListImagesReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListImagesReq.ProtoReflect.Descriptor instead. -func (*ListImagesReq) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{17} -} - -func (x *ListImagesReq) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *ListImagesReq) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *ListImagesReq) GetRegionId() int32 { - if x != nil { - return x.RegionId - } - return 0 -} - -func (x *ListImagesReq) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ListImagesReq) GetPageNumber() int32 { - if x != nil { - return x.PageNumber - } - return 0 -} - -func (x *ListImagesReq) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -type Image struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云名称 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"` - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` - // 镜像状态 - Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` - // 镜像名称 - DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - // 命名空间 - Namespace string `protobuf:"bytes,5,opt,name=namespace,proto3" json:"namespace,omitempty"` - // 镜像id - Id string `protobuf:"bytes,6,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *Image) Reset() { - *x = Image{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Image) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Image) ProtoMessage() {} - -func (x *Image) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Image.ProtoReflect.Descriptor instead. -func (*Image) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{18} -} - -func (x *Image) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *Image) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -func (x *Image) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *Image) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Image) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *Image) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type ListImagesResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云名称 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"` - // 镜像集合 - Images []*Image `protobuf:"bytes,2,rep,name=images,proto3" json:"images,omitempty"` -} - -func (x *ListImagesResp) Reset() { - *x = ListImagesResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_ecs_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListImagesResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListImagesResp) ProtoMessage() {} - -func (x *ListImagesResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_ecs_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListImagesResp.ProtoReflect.Descriptor instead. -func (*ListImagesResp) Descriptor() ([]byte, []int) { - return file_idl_ecs_proto_rawDescGZIP(), []int{19} -} - -func (x *ListImagesResp) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *ListImagesResp) GetImages() []*Image { - if x != nil { - return x.Images - } - return nil -} - -var File_idl_ecs_proto protoreflect.FileDescriptor - -var file_idl_ecs_proto_rawDesc = []byte{ - 0x0a, 0x0d, 0x69, 0x64, 0x6c, 0x2f, 0x65, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x03, 0x65, 0x63, 0x73, 0x22, 0xf9, 0x04, 0x0a, 0x0b, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x6c, 0x6f, - 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x73, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x73, 0x12, 0x23, 0x0a, - 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x63, 0x70, 0x75, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, - 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, - 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x70, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x08, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x70, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x76, 0x70, 0x63, - 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x70, 0x63, 0x49, 0x64, - 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, - 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x22, 0x4f, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x37, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, - 0x65, 0x71, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, - 0x73, 0x22, 0x52, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, - 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, - 0x69, 0x73, 0x68, 0x65, 0x64, 0x22, 0xc1, 0x0a, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, - 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, - 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, - 0x64, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x68, - 0x61, 0x72, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x12, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x75, - 0x72, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x76, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, - 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x53, 0x77, 0x69, 0x74, - 0x63, 0x68, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x7a, - 0x6f, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x7a, 0x6f, - 0x6e, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x64, - 0x69, 0x73, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x65, 0x63, 0x73, 0x2e, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, - 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, - 0x6f, 0x72, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, - 0x6f, 0x72, 0x79, 0x12, 0x49, 0x0a, 0x14, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, - 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x17, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3b, - 0x0a, 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x62, - 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x11, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x42, - 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x4f, 0x75, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x76, - 0x70, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x70, 0x63, - 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x14, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x63, 0x70, 0x75, 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, - 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, - 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x18, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, - 0x73, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, - 0x69, 0x73, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, 0x1b, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x62, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x1d, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x64, 0x65, - 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x1e, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x1f, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, - 0x0a, 0x07, 0x6f, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x20, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, - 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, - 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x22, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, - 0x12, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x44, - 0x61, 0x74, 0x61, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, - 0x28, 0x0a, 0x10, 0x76, 0x6d, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x6d, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x6d, 0x5f, - 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x26, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x76, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xdf, 0x01, 0x0a, 0x0a, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, - 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x4c, - 0x65, 0x76, 0x65, 0x6c, 0x12, 0x35, 0x0a, 0x17, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x22, 0xa0, 0x02, 0x0a, 0x0d, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2e, 0x0a, - 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, - 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x64, 0x65, - 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x74, 0x72, - 0x61, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x53, 0x65, - 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x22, 0xb5, - 0x03, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, - 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, - 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x35, - 0x0a, 0x16, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, - 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x69, - 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, - 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, - 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x63, 0x73, - 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0xb6, 0x03, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x63, 0x73, - 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x73, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, - 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, - 0x6f, 0x72, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, - 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x22, 0x9e, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, - 0x64, 0x22, 0xfa, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x52, 0x65, 0x71, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xd0, - 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x26, 0x0a, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x52, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, - 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, - 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, - 0x64, 0x22, 0xe4, 0x01, 0x0a, 0x09, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, - 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, - 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, - 0x07, 0x76, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x76, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x65, 0x63, - 0x73, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0xbb, 0x01, 0x0a, 0x0a, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, - 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x65, 0x63, - 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x65, 0x63, 0x73, 0x2e, - 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x65, 0x63, 0x73, - 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x39, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x22, 0x32, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, - 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x65, - 0x63, 0x73, 0x2e, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x05, - 0x65, 0x63, 0x73, 0x65, 0x73, 0x22, 0x0c, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, - 0x52, 0x65, 0x71, 0x22, 0xdb, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x6c, - 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, - 0x65, 0x22, 0xc3, 0x01, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, - 0x65, 0x63, 0x73, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, - 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x64, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x49, - 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x63, - 0x73, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, - 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x06, 0x69, 0x6d, 0x61, - 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x65, 0x63, 0x73, 0x2e, - 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2a, 0x49, 0x0a, - 0x0d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x07, - 0x0a, 0x03, 0x61, 0x6c, 0x69, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x74, 0x65, 0x6e, 0x63, 0x65, - 0x6e, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x68, 0x75, 0x61, 0x77, 0x65, 0x69, 0x10, 0x02, - 0x12, 0x07, 0x0a, 0x03, 0x6b, 0x38, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x68, 0x61, 0x72, - 0x76, 0x65, 0x73, 0x74, 0x65, 0x72, 0x10, 0x04, 0x2a, 0x3a, 0x0a, 0x12, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, - 0x0a, 0x0e, 0x50, 0x61, 0x79, 0x42, 0x79, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, - 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x61, 0x79, 0x42, 0x79, 0x54, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x63, 0x10, 0x01, 0x2a, 0x2e, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x10, 0x00, 0x12, 0x08, 0x0a, - 0x04, 0x73, 0x74, 0x6f, 0x70, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x10, 0x02, 0x32, 0xec, 0x03, 0x0a, 0x0a, 0x45, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x70, 0x6c, 0x65, 0x45, 0x63, 0x73, 0x12, 0x19, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, - 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x32, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x12, 0x11, 0x2e, 0x65, - 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, - 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, - 0x12, 0x11, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, - 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x45, 0x63, 0x73, 0x12, 0x11, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, 0x0d, 0x4c, - 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x12, 0x2e, 0x65, - 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, - 0x1a, 0x13, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, - 0x12, 0x0c, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0d, - 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, - 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x41, 0x6c, 0x6c, 0x12, 0x0f, 0x2e, 0x65, 0x63, - 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x65, - 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x09, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x63, 0x73, 0x12, 0x0e, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, 0x0d, 0x4c, 0x69, 0x73, - 0x74, 0x45, 0x63, 0x73, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x12, 0x12, 0x2e, 0x65, 0x63, 0x73, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x13, - 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x42, 0x08, 0x5a, 0x06, 0x2f, 0x65, 0x63, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_idl_ecs_proto_rawDescOnce sync.Once - file_idl_ecs_proto_rawDescData = file_idl_ecs_proto_rawDesc -) - -func file_idl_ecs_proto_rawDescGZIP() []byte { - file_idl_ecs_proto_rawDescOnce.Do(func() { - file_idl_ecs_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_ecs_proto_rawDescData) - }) - return file_idl_ecs_proto_rawDescData -} - -var file_idl_ecs_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_idl_ecs_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_idl_ecs_proto_goTypes = []interface{}{ - (CloudProvider)(0), // 0: ecs.CloudProvider - (InternetChargeType)(0), // 1: ecs.InternetChargeType - (ActionType)(0), // 2: ecs.ActionType - (*EcsInstance)(nil), // 3: ecs.EcsInstance - (*CreateEcsMultipleReq)(nil), // 4: ecs.CreateEcsMultipleReq - (*CreateEcsMultipleResp)(nil), // 5: ecs.CreateEcsMultipleResp - (*CreateEcsReq)(nil), // 6: ecs.CreateEcsReq - (*SystemDisk)(nil), // 7: ecs.SystemDisk - (*CreateEcsResp)(nil), // 8: ecs.CreateEcsResp - (*DeleteEcsReq)(nil), // 9: ecs.DeleteEcsReq - (*DeleteEcsResp)(nil), // 10: ecs.DeleteEcsResp - (*UpdateEcsReq)(nil), // 11: ecs.UpdateEcsReq - (*UpdateEcsResp)(nil), // 12: ecs.UpdateEcsResp - (*ListDetailReq)(nil), // 13: ecs.ListDetailReq - (*ListDetailResp)(nil), // 14: ecs.ListDetailResp - (*ActionReq)(nil), // 15: ecs.ActionReq - (*ActionResp)(nil), // 16: ecs.ActionResp - (*ListReq)(nil), // 17: ecs.ListReq - (*ListResp)(nil), // 18: ecs.ListResp - (*ListAllReq)(nil), // 19: ecs.ListAllReq - (*ListImagesReq)(nil), // 20: ecs.ListImagesReq - (*Image)(nil), // 21: ecs.Image - (*ListImagesResp)(nil), // 22: ecs.ListImagesResp -} -var file_idl_ecs_proto_depIdxs = []int32{ - 0, // 0: ecs.EcsInstance.provider:type_name -> ecs.CloudProvider - 6, // 1: ecs.CreateEcsMultipleReq.createEcsReqs:type_name -> ecs.CreateEcsReq - 0, // 2: ecs.CreateEcsReq.provider:type_name -> ecs.CloudProvider - 7, // 3: ecs.CreateEcsReq.system_disk:type_name -> ecs.SystemDisk - 1, // 4: ecs.CreateEcsReq.internet_charge_type:type_name -> ecs.InternetChargeType - 0, // 5: ecs.CreateEcsResp.provider:type_name -> ecs.CloudProvider - 0, // 6: ecs.DeleteEcsReq.provider:type_name -> ecs.CloudProvider - 0, // 7: ecs.DeleteEcsResp.provider:type_name -> ecs.CloudProvider - 0, // 8: ecs.UpdateEcsReq.provider:type_name -> ecs.CloudProvider - 0, // 9: ecs.UpdateEcsResp.provider:type_name -> ecs.CloudProvider - 0, // 10: ecs.ListDetailReq.provider:type_name -> ecs.CloudProvider - 3, // 11: ecs.ListDetailResp.ecses:type_name -> ecs.EcsInstance - 0, // 12: ecs.ActionReq.provider:type_name -> ecs.CloudProvider - 2, // 13: ecs.ActionReq.action_type:type_name -> ecs.ActionType - 0, // 14: ecs.ActionResp.provider:type_name -> ecs.CloudProvider - 3, // 15: ecs.ActionResp.ecses:type_name -> ecs.EcsInstance - 0, // 16: ecs.ListReq.provider:type_name -> ecs.CloudProvider - 3, // 17: ecs.ListResp.ecses:type_name -> ecs.EcsInstance - 0, // 18: ecs.ListImagesReq.provider:type_name -> ecs.CloudProvider - 0, // 19: ecs.Image.provider:type_name -> ecs.CloudProvider - 0, // 20: ecs.ListImagesResp.provider:type_name -> ecs.CloudProvider - 21, // 21: ecs.ListImagesResp.images:type_name -> ecs.Image - 4, // 22: ecs.EcsService.CreateMultipleEcs:input_type -> ecs.CreateEcsMultipleReq - 6, // 23: ecs.EcsService.CreateEcs:input_type -> ecs.CreateEcsReq - 9, // 24: ecs.EcsService.DeleteEcs:input_type -> ecs.DeleteEcsReq - 11, // 25: ecs.EcsService.UpdateEcs:input_type -> ecs.UpdateEcsReq - 13, // 26: ecs.EcsService.ListEcsDetail:input_type -> ecs.ListDetailReq - 17, // 27: ecs.EcsService.ListEcs:input_type -> ecs.ListReq - 19, // 28: ecs.EcsService.ListEcsAll:input_type -> ecs.ListAllReq - 15, // 29: ecs.EcsService.ActionEcs:input_type -> ecs.ActionReq - 20, // 30: ecs.EcsService.ListEcsImages:input_type -> ecs.ListImagesReq - 5, // 31: ecs.EcsService.CreateMultipleEcs:output_type -> ecs.CreateEcsMultipleResp - 8, // 32: ecs.EcsService.CreateEcs:output_type -> ecs.CreateEcsResp - 10, // 33: ecs.EcsService.DeleteEcs:output_type -> ecs.DeleteEcsResp - 12, // 34: ecs.EcsService.UpdateEcs:output_type -> ecs.UpdateEcsResp - 14, // 35: ecs.EcsService.ListEcsDetail:output_type -> ecs.ListDetailResp - 18, // 36: ecs.EcsService.ListEcs:output_type -> ecs.ListResp - 18, // 37: ecs.EcsService.ListEcsAll:output_type -> ecs.ListResp - 16, // 38: ecs.EcsService.ActionEcs:output_type -> ecs.ActionResp - 22, // 39: ecs.EcsService.ListEcsImages:output_type -> ecs.ListImagesResp - 31, // [31:40] is the sub-list for method output_type - 22, // [22:31] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name -} - -func init() { file_idl_ecs_proto_init() } -func file_idl_ecs_proto_init() { - if File_idl_ecs_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_idl_ecs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EcsInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateEcsMultipleReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateEcsMultipleResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateEcsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateEcsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteEcsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteEcsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateEcsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateEcsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDetailReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDetailResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAllReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListImagesReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_ecs_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListImagesResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_idl_ecs_proto_rawDesc, - NumEnums: 3, - NumMessages: 20, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_idl_ecs_proto_goTypes, - DependencyIndexes: file_idl_ecs_proto_depIdxs, - EnumInfos: file_idl_ecs_proto_enumTypes, - MessageInfos: file_idl_ecs_proto_msgTypes, - }.Build() - File_idl_ecs_proto = out.File - file_idl_ecs_proto_rawDesc = nil - file_idl_ecs_proto_goTypes = nil - file_idl_ecs_proto_depIdxs = nil -} diff --git a/adaptor/pcm_vm/gen/idl/ecs.pb.gw.go b/adaptor/pcm_vm/gen/idl/ecs.pb.gw.go deleted file mode 100644 index d430673a7..000000000 --- a/adaptor/pcm_vm/gen/idl/ecs.pb.gw.go +++ /dev/null @@ -1,841 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: idl/ecs.proto - -/* -Package ecspb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package ecspb - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_EcsService_CreateMultipleEcs_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateEcsMultipleReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateMultipleEcs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_EcsService_CreateMultipleEcs_0(ctx context.Context, marshaler runtime.Marshaler, server EcsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateEcsMultipleReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateMultipleEcs(ctx, &protoReq) - return msg, metadata, err - -} - -func request_EcsService_CreateEcs_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateEcsReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateEcs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_EcsService_CreateEcs_0(ctx context.Context, marshaler runtime.Marshaler, server EcsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateEcsReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateEcs(ctx, &protoReq) - return msg, metadata, err - -} - -func request_EcsService_DeleteEcs_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteEcsReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DeleteEcs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_EcsService_DeleteEcs_0(ctx context.Context, marshaler runtime.Marshaler, server EcsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteEcsReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DeleteEcs(ctx, &protoReq) - return msg, metadata, err - -} - -func request_EcsService_UpdateEcs_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateEcsReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.UpdateEcs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_EcsService_UpdateEcs_0(ctx context.Context, marshaler runtime.Marshaler, server EcsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateEcsReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.UpdateEcs(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_EcsService_ListEcsDetail_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_EcsService_ListEcsDetail_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListDetailReq - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EcsService_ListEcsDetail_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListEcsDetail(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_EcsService_ListEcsDetail_0(ctx context.Context, marshaler runtime.Marshaler, server EcsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListDetailReq - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EcsService_ListEcsDetail_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListEcsDetail(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_EcsService_ListEcs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_EcsService_ListEcs_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListReq - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EcsService_ListEcs_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListEcs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_EcsService_ListEcs_0(ctx context.Context, marshaler runtime.Marshaler, server EcsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListReq - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EcsService_ListEcs_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListEcs(ctx, &protoReq) - return msg, metadata, err - -} - -func request_EcsService_ListEcsAll_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListAllReq - var metadata runtime.ServerMetadata - - msg, err := client.ListEcsAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_EcsService_ListEcsAll_0(ctx context.Context, marshaler runtime.Marshaler, server EcsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListAllReq - var metadata runtime.ServerMetadata - - msg, err := server.ListEcsAll(ctx, &protoReq) - return msg, metadata, err - -} - -func request_EcsService_ActionEcs_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ActionReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ActionEcs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_EcsService_ActionEcs_0(ctx context.Context, marshaler runtime.Marshaler, server EcsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ActionReq - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ActionEcs(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_EcsService_ListEcsImages_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_EcsService_ListEcsImages_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListImagesReq - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EcsService_ListEcsImages_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListEcsImages(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_EcsService_ListEcsImages_0(ctx context.Context, marshaler runtime.Marshaler, server EcsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListImagesReq - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EcsService_ListEcsImages_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListEcsImages(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterEcsServiceHandlerServer registers the http handlers for service EcsService to "mux". -// UnaryRPC :call EcsServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEcsServiceHandlerFromEndpoint instead. -func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EcsServiceServer) error { - - mux.Handle("POST", pattern_EcsService_CreateMultipleEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ecs.EcsService/CreateMultipleEcs", runtime.WithHTTPPathPattern("/apis/ecs/createMultiple")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_EcsService_CreateMultipleEcs_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_CreateMultipleEcs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_EcsService_CreateEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ecs.EcsService/CreateEcs", runtime.WithHTTPPathPattern("/apis/ecs/create")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_EcsService_CreateEcs_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_CreateEcs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_EcsService_DeleteEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ecs.EcsService/DeleteEcs", runtime.WithHTTPPathPattern("/apis/ecs/delete")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_EcsService_DeleteEcs_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_DeleteEcs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_EcsService_UpdateEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ecs.EcsService/UpdateEcs", runtime.WithHTTPPathPattern("/apis/ecs/update")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_EcsService_UpdateEcs_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_UpdateEcs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_EcsService_ListEcsDetail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ecs.EcsService/ListEcsDetail", runtime.WithHTTPPathPattern("/apis/ecs/detail")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_EcsService_ListEcsDetail_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_ListEcsDetail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_EcsService_ListEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ecs.EcsService/ListEcs", runtime.WithHTTPPathPattern("/apis/ecs")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_EcsService_ListEcs_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_ListEcs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_EcsService_ListEcsAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ecs.EcsService/ListEcsAll", runtime.WithHTTPPathPattern("/apis/ecs/all")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_EcsService_ListEcsAll_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_ListEcsAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_EcsService_ActionEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ecs.EcsService/ActionEcs", runtime.WithHTTPPathPattern("/apis/ecs/action")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_EcsService_ActionEcs_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_ActionEcs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_EcsService_ListEcsImages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ecs.EcsService/ListEcsImages", runtime.WithHTTPPathPattern("/apis/ecs/listImages")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_EcsService_ListEcsImages_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_ListEcsImages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterEcsServiceHandlerFromEndpoint is same as RegisterEcsServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterEcsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterEcsServiceHandler(ctx, mux, conn) -} - -// RegisterEcsServiceHandler registers the http handlers for service EcsService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterEcsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterEcsServiceHandlerClient(ctx, mux, NewEcsServiceClient(conn)) -} - -// RegisterEcsServiceHandlerClient registers the http handlers for service EcsService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EcsServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EcsServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "EcsServiceClient" to call the correct interceptors. -func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EcsServiceClient) error { - - mux.Handle("POST", pattern_EcsService_CreateMultipleEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ecs.EcsService/CreateMultipleEcs", runtime.WithHTTPPathPattern("/apis/ecs/createMultiple")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_EcsService_CreateMultipleEcs_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_CreateMultipleEcs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_EcsService_CreateEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ecs.EcsService/CreateEcs", runtime.WithHTTPPathPattern("/apis/ecs/create")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_EcsService_CreateEcs_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_CreateEcs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_EcsService_DeleteEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ecs.EcsService/DeleteEcs", runtime.WithHTTPPathPattern("/apis/ecs/delete")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_EcsService_DeleteEcs_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_DeleteEcs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_EcsService_UpdateEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ecs.EcsService/UpdateEcs", runtime.WithHTTPPathPattern("/apis/ecs/update")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_EcsService_UpdateEcs_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_UpdateEcs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_EcsService_ListEcsDetail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ecs.EcsService/ListEcsDetail", runtime.WithHTTPPathPattern("/apis/ecs/detail")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_EcsService_ListEcsDetail_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_ListEcsDetail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_EcsService_ListEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ecs.EcsService/ListEcs", runtime.WithHTTPPathPattern("/apis/ecs")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_EcsService_ListEcs_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_ListEcs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_EcsService_ListEcsAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ecs.EcsService/ListEcsAll", runtime.WithHTTPPathPattern("/apis/ecs/all")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_EcsService_ListEcsAll_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_ListEcsAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_EcsService_ActionEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ecs.EcsService/ActionEcs", runtime.WithHTTPPathPattern("/apis/ecs/action")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_EcsService_ActionEcs_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_ActionEcs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_EcsService_ListEcsImages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ecs.EcsService/ListEcsImages", runtime.WithHTTPPathPattern("/apis/ecs/listImages")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_EcsService_ListEcsImages_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_EcsService_ListEcsImages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_EcsService_CreateMultipleEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "createMultiple"}, "")) - - pattern_EcsService_CreateEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "create"}, "")) - - pattern_EcsService_DeleteEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "delete"}, "")) - - pattern_EcsService_UpdateEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "update"}, "")) - - pattern_EcsService_ListEcsDetail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "detail"}, "")) - - pattern_EcsService_ListEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"apis", "ecs"}, "")) - - pattern_EcsService_ListEcsAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "all"}, "")) - - pattern_EcsService_ActionEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "action"}, "")) - - pattern_EcsService_ListEcsImages_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "listImages"}, "")) -) - -var ( - forward_EcsService_CreateMultipleEcs_0 = runtime.ForwardResponseMessage - - forward_EcsService_CreateEcs_0 = runtime.ForwardResponseMessage - - forward_EcsService_DeleteEcs_0 = runtime.ForwardResponseMessage - - forward_EcsService_UpdateEcs_0 = runtime.ForwardResponseMessage - - forward_EcsService_ListEcsDetail_0 = runtime.ForwardResponseMessage - - forward_EcsService_ListEcs_0 = runtime.ForwardResponseMessage - - forward_EcsService_ListEcsAll_0 = runtime.ForwardResponseMessage - - forward_EcsService_ActionEcs_0 = runtime.ForwardResponseMessage - - forward_EcsService_ListEcsImages_0 = runtime.ForwardResponseMessage -) diff --git a/adaptor/pcm_vm/gen/idl/ecs_grpc.pb.go b/adaptor/pcm_vm/gen/idl/ecs_grpc.pb.go deleted file mode 100644 index eab3f8583..000000000 --- a/adaptor/pcm_vm/gen/idl/ecs_grpc.pb.go +++ /dev/null @@ -1,411 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: idl/ecs.proto - -package ecspb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// EcsServiceClient is the client API for EcsService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type EcsServiceClient interface { - // 创建多家云ECS - CreateMultipleEcs(ctx context.Context, in *CreateEcsMultipleReq, opts ...grpc.CallOption) (*CreateEcsMultipleResp, error) - // 创建ECS - CreateEcs(ctx context.Context, in *CreateEcsReq, opts ...grpc.CallOption) (*CreateEcsResp, error) - // 删除ECS - DeleteEcs(ctx context.Context, in *DeleteEcsReq, opts ...grpc.CallOption) (*DeleteEcsResp, error) - // 修改ECS - UpdateEcs(ctx context.Context, in *UpdateEcsReq, opts ...grpc.CallOption) (*UpdateEcsResp, error) - // 查询ECS明细 - 支持云类型、区域、账户、分页等过滤条件 - ListEcsDetail(ctx context.Context, in *ListDetailReq, opts ...grpc.CallOption) (*ListDetailResp, error) - // 查询ECS全量 - 根据云类型 - ListEcs(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) - // 查询所有云的ECS - ListEcsAll(ctx context.Context, in *ListAllReq, opts ...grpc.CallOption) (*ListResp, error) - // 操作ecs(start-stop-restart) - ActionEcs(ctx context.Context, in *ActionReq, opts ...grpc.CallOption) (*ActionResp, error) - // 查询ecs镜像 - ListEcsImages(ctx context.Context, in *ListImagesReq, opts ...grpc.CallOption) (*ListImagesResp, error) -} - -type ecsServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewEcsServiceClient(cc grpc.ClientConnInterface) EcsServiceClient { - return &ecsServiceClient{cc} -} - -func (c *ecsServiceClient) CreateMultipleEcs(ctx context.Context, in *CreateEcsMultipleReq, opts ...grpc.CallOption) (*CreateEcsMultipleResp, error) { - out := new(CreateEcsMultipleResp) - err := c.cc.Invoke(ctx, "/ecs.EcsService/CreateMultipleEcs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ecsServiceClient) CreateEcs(ctx context.Context, in *CreateEcsReq, opts ...grpc.CallOption) (*CreateEcsResp, error) { - out := new(CreateEcsResp) - err := c.cc.Invoke(ctx, "/ecs.EcsService/CreateEcs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ecsServiceClient) DeleteEcs(ctx context.Context, in *DeleteEcsReq, opts ...grpc.CallOption) (*DeleteEcsResp, error) { - out := new(DeleteEcsResp) - err := c.cc.Invoke(ctx, "/ecs.EcsService/DeleteEcs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ecsServiceClient) UpdateEcs(ctx context.Context, in *UpdateEcsReq, opts ...grpc.CallOption) (*UpdateEcsResp, error) { - out := new(UpdateEcsResp) - err := c.cc.Invoke(ctx, "/ecs.EcsService/UpdateEcs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ecsServiceClient) ListEcsDetail(ctx context.Context, in *ListDetailReq, opts ...grpc.CallOption) (*ListDetailResp, error) { - out := new(ListDetailResp) - err := c.cc.Invoke(ctx, "/ecs.EcsService/ListEcsDetail", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ecsServiceClient) ListEcs(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) { - out := new(ListResp) - err := c.cc.Invoke(ctx, "/ecs.EcsService/ListEcs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ecsServiceClient) ListEcsAll(ctx context.Context, in *ListAllReq, opts ...grpc.CallOption) (*ListResp, error) { - out := new(ListResp) - err := c.cc.Invoke(ctx, "/ecs.EcsService/ListEcsAll", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ecsServiceClient) ActionEcs(ctx context.Context, in *ActionReq, opts ...grpc.CallOption) (*ActionResp, error) { - out := new(ActionResp) - err := c.cc.Invoke(ctx, "/ecs.EcsService/ActionEcs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ecsServiceClient) ListEcsImages(ctx context.Context, in *ListImagesReq, opts ...grpc.CallOption) (*ListImagesResp, error) { - out := new(ListImagesResp) - err := c.cc.Invoke(ctx, "/ecs.EcsService/ListEcsImages", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// EcsServiceServer is the server API for EcsService service. -// All implementations must embed UnimplementedEcsServiceServer -// for forward compatibility -type EcsServiceServer interface { - // 创建多家云ECS - CreateMultipleEcs(context.Context, *CreateEcsMultipleReq) (*CreateEcsMultipleResp, error) - // 创建ECS - CreateEcs(context.Context, *CreateEcsReq) (*CreateEcsResp, error) - // 删除ECS - DeleteEcs(context.Context, *DeleteEcsReq) (*DeleteEcsResp, error) - // 修改ECS - UpdateEcs(context.Context, *UpdateEcsReq) (*UpdateEcsResp, error) - // 查询ECS明细 - 支持云类型、区域、账户、分页等过滤条件 - ListEcsDetail(context.Context, *ListDetailReq) (*ListDetailResp, error) - // 查询ECS全量 - 根据云类型 - ListEcs(context.Context, *ListReq) (*ListResp, error) - // 查询所有云的ECS - ListEcsAll(context.Context, *ListAllReq) (*ListResp, error) - // 操作ecs(start-stop-restart) - ActionEcs(context.Context, *ActionReq) (*ActionResp, error) - // 查询ecs镜像 - ListEcsImages(context.Context, *ListImagesReq) (*ListImagesResp, error) - mustEmbedUnimplementedEcsServiceServer() -} - -// UnimplementedEcsServiceServer must be embedded to have forward compatible implementations. -type UnimplementedEcsServiceServer struct { -} - -func (UnimplementedEcsServiceServer) CreateMultipleEcs(context.Context, *CreateEcsMultipleReq) (*CreateEcsMultipleResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateMultipleEcs not implemented") -} -func (UnimplementedEcsServiceServer) CreateEcs(context.Context, *CreateEcsReq) (*CreateEcsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateEcs not implemented") -} -func (UnimplementedEcsServiceServer) DeleteEcs(context.Context, *DeleteEcsReq) (*DeleteEcsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteEcs not implemented") -} -func (UnimplementedEcsServiceServer) UpdateEcs(context.Context, *UpdateEcsReq) (*UpdateEcsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateEcs not implemented") -} -func (UnimplementedEcsServiceServer) ListEcsDetail(context.Context, *ListDetailReq) (*ListDetailResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListEcsDetail not implemented") -} -func (UnimplementedEcsServiceServer) ListEcs(context.Context, *ListReq) (*ListResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListEcs not implemented") -} -func (UnimplementedEcsServiceServer) ListEcsAll(context.Context, *ListAllReq) (*ListResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListEcsAll not implemented") -} -func (UnimplementedEcsServiceServer) ActionEcs(context.Context, *ActionReq) (*ActionResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ActionEcs not implemented") -} -func (UnimplementedEcsServiceServer) ListEcsImages(context.Context, *ListImagesReq) (*ListImagesResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListEcsImages not implemented") -} -func (UnimplementedEcsServiceServer) mustEmbedUnimplementedEcsServiceServer() {} - -// UnsafeEcsServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to EcsServiceServer will -// result in compilation errors. -type UnsafeEcsServiceServer interface { - mustEmbedUnimplementedEcsServiceServer() -} - -func RegisterEcsServiceServer(s grpc.ServiceRegistrar, srv EcsServiceServer) { - s.RegisterService(&EcsService_ServiceDesc, srv) -} - -func _EcsService_CreateMultipleEcs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateEcsMultipleReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EcsServiceServer).CreateMultipleEcs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ecs.EcsService/CreateMultipleEcs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EcsServiceServer).CreateMultipleEcs(ctx, req.(*CreateEcsMultipleReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _EcsService_CreateEcs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateEcsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EcsServiceServer).CreateEcs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ecs.EcsService/CreateEcs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EcsServiceServer).CreateEcs(ctx, req.(*CreateEcsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _EcsService_DeleteEcs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteEcsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EcsServiceServer).DeleteEcs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ecs.EcsService/DeleteEcs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EcsServiceServer).DeleteEcs(ctx, req.(*DeleteEcsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _EcsService_UpdateEcs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateEcsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EcsServiceServer).UpdateEcs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ecs.EcsService/UpdateEcs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EcsServiceServer).UpdateEcs(ctx, req.(*UpdateEcsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _EcsService_ListEcsDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListDetailReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EcsServiceServer).ListEcsDetail(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ecs.EcsService/ListEcsDetail", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EcsServiceServer).ListEcsDetail(ctx, req.(*ListDetailReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _EcsService_ListEcs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EcsServiceServer).ListEcs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ecs.EcsService/ListEcs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EcsServiceServer).ListEcs(ctx, req.(*ListReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _EcsService_ListEcsAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListAllReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EcsServiceServer).ListEcsAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ecs.EcsService/ListEcsAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EcsServiceServer).ListEcsAll(ctx, req.(*ListAllReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _EcsService_ActionEcs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ActionReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EcsServiceServer).ActionEcs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ecs.EcsService/ActionEcs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EcsServiceServer).ActionEcs(ctx, req.(*ActionReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _EcsService_ListEcsImages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListImagesReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EcsServiceServer).ListEcsImages(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ecs.EcsService/ListEcsImages", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EcsServiceServer).ListEcsImages(ctx, req.(*ListImagesReq)) - } - return interceptor(ctx, in, info, handler) -} - -// EcsService_ServiceDesc is the grpc.ServiceDesc for EcsService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var EcsService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "ecs.EcsService", - HandlerType: (*EcsServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateMultipleEcs", - Handler: _EcsService_CreateMultipleEcs_Handler, - }, - { - MethodName: "CreateEcs", - Handler: _EcsService_CreateEcs_Handler, - }, - { - MethodName: "DeleteEcs", - Handler: _EcsService_DeleteEcs_Handler, - }, - { - MethodName: "UpdateEcs", - Handler: _EcsService_UpdateEcs_Handler, - }, - { - MethodName: "ListEcsDetail", - Handler: _EcsService_ListEcsDetail_Handler, - }, - { - MethodName: "ListEcs", - Handler: _EcsService_ListEcs_Handler, - }, - { - MethodName: "ListEcsAll", - Handler: _EcsService_ListEcsAll_Handler, - }, - { - MethodName: "ActionEcs", - Handler: _EcsService_ActionEcs_Handler, - }, - { - MethodName: "ListEcsImages", - Handler: _EcsService_ListEcsImages_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "idl/ecs.proto", -} diff --git a/adaptor/pcm_vm/gen/openapiv2/idl/ecs.swagger.json b/adaptor/pcm_vm/gen/openapiv2/idl/ecs.swagger.json deleted file mode 100644 index 9b8bed01c..000000000 --- a/adaptor/pcm_vm/gen/openapiv2/idl/ecs.swagger.json +++ /dev/null @@ -1,578 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "idl/ecs.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "EcsService" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "ecsActionResp": { - "type": "object", - "properties": { - "provider": { - "$ref": "#/definitions/ecsCloudProvider" - }, - "accountName": { - "type": "string", - "title": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户" - }, - "ecses": { - "type": "array", - "items": { - "$ref": "#/definitions/ecsEcsInstance" - }, - "title": "Ecs 机器集合" - }, - "finished": { - "type": "boolean", - "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" - }, - "status": { - "type": "string", - "title": "vm状态" - } - } - }, - "ecsActionType": { - "type": "string", - "enum": [ - "start", - "stop", - "restart" - ], - "default": "start", - "description": "- start: 启动\n - stop: 停止\n - restart: 重启", - "title": "虚拟机状态操作" - }, - "ecsCloudProvider": { - "type": "string", - "enum": [ - "ali", - "tencent", - "huawei", - "k8s", - "harvester" - ], - "default": "ali", - "description": "- ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", - "title": "云提供商" - }, - "ecsCreateEcsMultipleResp": { - "type": "object", - "properties": { - "requestId": { - "type": "array", - "items": { - "type": "string" - }, - "title": "请求ID" - }, - "finished": { - "type": "boolean", - "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" - } - }, - "title": "创建多家云ECS返回值" - }, - "ecsCreateEcsReq": { - "type": "object", - "properties": { - "provider": { - "$ref": "#/definitions/ecsCloudProvider" - }, - "accountName": { - "type": "string", - "title": "账号名称" - }, - "regionId": { - "type": "integer", - "format": "int32", - "title": "地域,数据中心" - }, - "imageId": { - "type": "string", - "title": "镜像id" - }, - "instanceChargeType": { - "type": "string", - "title": "实例的付费方式" - }, - "instanceType": { - "type": "string", - "title": "实例的资源规格" - }, - "securityGroupId": { - "type": "string", - "title": "安全组id" - }, - "vSwitchId": { - "type": "string", - "title": "交换机id" - }, - "instanceName": { - "type": "string", - "title": "实例名称" - }, - "description": { - "type": "string", - "title": "实例描述" - }, - "zoneId": { - "type": "string", - "title": "可用区id" - }, - "systemDisk": { - "$ref": "#/definitions/ecsSystemDisk" - }, - "amount": { - "type": "integer", - "format": "int32", - "title": "创建ECS的数量" - }, - "dryRun": { - "type": "string", - "title": "预检此次请求,为true时请求通过,则返回 Request validation has been passed with DryRun flag set" - }, - "category": { - "type": "string", - "title": "数据盘N的云盘种类。取值范围:cloud_efficiency:高效云盘;cloud_ssd:SSD云盘;cloud_essd:ESSD云盘;cloud:普通云盘。" - }, - "internetChargeType": { - "$ref": "#/definitions/ecsInternetChargeType" - }, - "internetMaxBandwidthOut": { - "type": "integer", - "format": "int32", - "title": "公网入带宽最大值,单位为Mbit/s。创建的实例如果参数InternetMaxBandwidthOut的值大于0,则自动为实例分配公网IP。" - }, - "vpcId": { - "type": "string", - "title": "vpc id 华为云必需" - }, - "subnetId": { - "type": "string", - "title": "待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网(subnet)的网络ID,UUID格式。华为云必需" - }, - "namespace": { - "type": "string", - "title": "-------------harvester---------------\n命名空间" - }, - "cpu": { - "type": "integer", - "format": "int32", - "title": "vCpu" - }, - "memory": { - "type": "string", - "title": "memory" - }, - "sshKey": { - "type": "string", - "title": "ssh_key" - }, - "diskName": { - "type": "string", - "title": "diskName" - }, - "diskType": { - "type": "string", - "title": "disk类型 disk,cd-rom" - }, - "diskSize": { - "type": "string", - "title": "卷大小" - }, - "bus": { - "type": "string", - "description": "bus 总线指示要模拟的磁盘设备的类型,支持virtio, sata, scsi." - }, - "networkName": { - "type": "string", - "title": "网络名称" - }, - "networkModel": { - "type": "string", - "description": "network_model 网络模式,支持e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio." - }, - "network": { - "type": "string", - "title": "网络" - }, - "networkType": { - "type": "string", - "title": "网络连接方法,默认bridge" - }, - "osType": { - "type": "string", - "title": "osType //系统类型" - }, - "machineType": { - "type": "string", - "title": "machineType //机器类型 none、q35、pc" - }, - "machineName": { - "type": "string", - "title": "machineName //主机名称,默认为虚拟机名称" - }, - "userDataTemplate": { - "type": "string", - "title": "userDataTemplate //用户数据模板" - }, - "networkDataTemplate": { - "type": "string", - "title": "networkDataTemplate //网络数据模板" - }, - "vmTemplateName": { - "type": "string", - "title": "vmTemplateName //模板名称" - }, - "vmTemplateVersion": { - "type": "string", - "title": "vmTemplateVersion //版本号" - } - }, - "title": "创建ECS入参" - }, - "ecsCreateEcsResp": { - "type": "object", - "properties": { - "provider": { - "$ref": "#/definitions/ecsCloudProvider" - }, - "accountName": { - "type": "string", - "title": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户" - }, - "regionId": { - "type": "integer", - "format": "int32", - "title": "区域Id,参考 tenant.proto 中的各个云的区域" - }, - "requestId": { - "type": "string", - "title": "请求ID" - }, - "orderId": { - "type": "string", - "title": "订单id" - }, - "tradePrice": { - "type": "number", - "format": "float", - "title": "订单成交价" - }, - "instanceIdSets": { - "type": "array", - "items": { - "type": "string" - }, - "title": "实例ID(InstanceIdSet)列表" - }, - "finished": { - "type": "boolean", - "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" - } - }, - "title": "创建ECS返回值" - }, - "ecsDeleteEcsResp": { - "type": "object", - "properties": { - "provider": { - "$ref": "#/definitions/ecsCloudProvider" - }, - "accountName": { - "type": "string", - "title": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户" - }, - "regionId": { - "type": "integer", - "format": "int32", - "title": "区域Id,参考 tenant.proto 中的各个云的区域" - }, - "requestId": { - "type": "string", - "title": "请求ID" - } - }, - "title": "删除ECS返回值" - }, - "ecsEcsInstance": { - "type": "object", - "properties": { - "provider": { - "$ref": "#/definitions/ecsCloudProvider" - }, - "accountName": { - "type": "string", - "title": "账号名称" - }, - "instanceId": { - "type": "string", - "title": "实例id" - }, - "instanceName": { - "type": "string", - "title": "实例名称" - }, - "regionName": { - "type": "string", - "title": "地域,数据中心" - }, - "publicIps": { - "type": "array", - "items": { - "type": "string" - }, - "title": "公网ip" - }, - "instanceType": { - "type": "string", - "title": "实例类型" - }, - "cpu": { - "type": "string", - "title": "vcpu数" - }, - "memory": { - "type": "string", - "title": "内存MB" - }, - "description": { - "type": "string", - "title": "实例描述" - }, - "status": { - "type": "string", - "title": "状态" - }, - "creationTime": { - "type": "string", - "title": "创建时间,ISO8601" - }, - "expireTime": { - "type": "string", - "title": "过期时间" - }, - "innerIps": { - "type": "array", - "items": { - "type": "string" - }, - "title": "内网ip" - }, - "vpcId": { - "type": "string", - "title": "vpc id" - }, - "resourceGroupId": { - "type": "string", - "title": "资源组id" - }, - "instanceChargeType": { - "type": "string", - "title": "收费类型" - }, - "node": { - "type": "string", - "title": "-----------harvester---------\n虚拟机所在的节点" - }, - "namespace": { - "type": "string", - "title": "namespace" - } - }, - "title": "ECS 实例" - }, - "ecsImage": { - "type": "object", - "properties": { - "provider": { - "$ref": "#/definitions/ecsCloudProvider" - }, - "accountName": { - "type": "string", - "title": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户" - }, - "status": { - "type": "string", - "title": "镜像状态" - }, - "displayName": { - "type": "string", - "title": "镜像名称" - }, - "namespace": { - "type": "string", - "title": "命名空间" - }, - "id": { - "type": "string", - "title": "镜像id" - } - } - }, - "ecsInternetChargeType": { - "type": "string", - "enum": [ - "PayByBandwidth", - "PayByTraffic" - ], - "default": "PayByBandwidth", - "description": "- PayByBandwidth: 按固定带宽计费。\n - PayByTraffic: (默认):按使用流量计费", - "title": "网络计费类型" - }, - "ecsListDetailResp": { - "type": "object", - "properties": { - "ecses": { - "type": "array", - "items": { - "$ref": "#/definitions/ecsEcsInstance" - }, - "title": "Ecs 机器集合" - }, - "finished": { - "type": "boolean", - "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" - }, - "pageNumber": { - "type": "integer", - "format": "int32", - "title": "分页相关参数,页码" - }, - "pageSize": { - "type": "integer", - "format": "int32", - "title": "分页相关参数,每页数量" - }, - "nextToken": { - "type": "string", - "title": "分页相关参数,下一页的token" - }, - "requestId": { - "type": "string", - "title": "请求id,出现问题后提供给云厂商,排查问题" - } - }, - "title": "查询ECS返回值" - }, - "ecsListImagesResp": { - "type": "object", - "properties": { - "provider": { - "$ref": "#/definitions/ecsCloudProvider" - }, - "images": { - "type": "array", - "items": { - "$ref": "#/definitions/ecsImage" - }, - "title": "镜像集合" - } - } - }, - "ecsListResp": { - "type": "object", - "properties": { - "ecses": { - "type": "array", - "items": { - "$ref": "#/definitions/ecsEcsInstance" - }, - "title": "Ecs 机器集合" - } - } - }, - "ecsSystemDisk": { - "type": "object", - "properties": { - "size": { - "type": "string", - "title": "系统盘大小,单位为GiB。取值范围:20~500。该参数的取值必须大于或者等于max{20, ImageSize}。默认值:max{40, 参数ImageId对应的镜像大小}" - }, - "category": { - "type": "string", - "title": "系统盘类型。系统盘的云盘种类。取值范围:cloud_efficiency:高效云盘。cloud_ssd:SSD云盘。cloud_essd:ESSD云盘。cloud:普通云盘。" - }, - "diskName": { - "type": "string", - "title": "系统盘名称" - }, - "description": { - "type": "string", - "title": "系统盘描述" - }, - "performanceLevel": { - "type": "string", - "title": "创建ESSD云盘作为系统盘使用时,设置云盘的性能等级。取值范围:PL0:单盘最高随机读写IOPS 1万。PL1(默认):单盘最高随机读写IOPS 5万。PL2:单盘最高随机读写IOPS 10万。PL3:单盘最高随机读写IOPS 100万。" - }, - "autoSnapshotPolicyId": { - "type": "string", - "title": "系统盘采用的自动快照策略ID。" - } - }, - "title": "系统磁盘" - }, - "ecsUpdateEcsResp": { - "type": "object", - "properties": { - "provider": { - "$ref": "#/definitions/ecsCloudProvider" - }, - "accountName": { - "type": "string", - "title": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户" - }, - "regionId": { - "type": "integer", - "format": "int32", - "title": "区域Id,参考 tenant.proto 中的各个云的区域" - }, - "requestId": { - "type": "string", - "title": "请求ID" - } - }, - "title": "更新ECS返回值" - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/adaptor/pcm_vm/idl/ecs.proto b/adaptor/pcm_vm/idl/ecs.proto deleted file mode 100644 index 6875adc77..000000000 --- a/adaptor/pcm_vm/idl/ecs.proto +++ /dev/null @@ -1,445 +0,0 @@ -syntax = "proto3"; -package ecs; - -option go_package = "/ecspb"; - - -// 云提供商 -enum CloudProvider { - // 0 - 阿里云 - ali = 0; - // 1 - 腾讯云 - tencent = 1; - // 2 - 华为云 - huawei = 2; - // 3 - K8S - k8s = 3; - // 3 - Harvester - harvester = 4; -} - -//ECS 实例 -message EcsInstance { - // 云类型 - CloudProvider provider = 1; - // 账号名称 - string account_name = 2; - // 实例id - string instance_id = 3; - // 实例名称 - string instance_name = 4; - // 地域,数据中心 - string region_name = 5; - // 公网ip - repeated string public_ips = 6; - // 实例类型 - string instance_type = 7; - // vcpu数 - string cpu = 8; - // 内存MB - string memory = 9; - // 实例描述 - string description = 10; - // 状态 - string status = 11; - // 创建时间,ISO8601 - string creation_time = 12; - // 过期时间 - string expire_time = 13; - // 内网ip - repeated string inner_ips = 14; - // vpc id - string vpc_id = 15; - // 资源组id - string resource_group_id = 16; - // 收费类型 - string instance_charge_type = 17; - // -----------harvester--------- - //虚拟机所在的节点 - string node = 18; - //namespace - string namespace = 20; -} - -//网络计费类型 -enum InternetChargeType { - //按固定带宽计费。 - PayByBandwidth = 0; - //(默认):按使用流量计费 - PayByTraffic = 1; -} - -//创建多家云ECS入参 -message CreateEcsMultipleReq { - repeated CreateEcsReq createEcsReqs = 1; -} -//创建多家云ECS返回值 -message CreateEcsMultipleResp { - // 请求ID - repeated string request_id = 1; - // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - bool finished = 2; -} - -//创建ECS入参 -message CreateEcsReq { - // 云类型 - CloudProvider provider = 1; - // 账号名称 - string account_name = 2; - // 地域,数据中心 - int32 region_id = 3; - //镜像id - string image_id = 4; - // 实例的付费方式 - string instance_charge_type = 5; - //实例的资源规格 - string instance_type = 6; - // 安全组id - string security_group_id = 7; - //交换机id - string v_switch_id = 8; - //实例名称 - string instance_name = 9; - //实例描述 - string description = 10; - //可用区id - string zone_id = 11; - //系统磁盘 - SystemDisk system_disk = 12; - //创建ECS的数量 - int32 amount = 13; - //预检此次请求,为true时请求通过,则返回 Request validation has been passed with DryRun flag set - string dry_run = 14; - //数据盘N的云盘种类。取值范围:cloud_efficiency:高效云盘;cloud_ssd:SSD云盘;cloud_essd:ESSD云盘;cloud:普通云盘。 - string category = 15; - //网络计费类型。取值范围:PayByBandwidth:按固定带宽计费。PayByTraffic(默认):按使用流量计费 - InternetChargeType internet_charge_type = 16; - //公网入带宽最大值,单位为Mbit/s。创建的实例如果参数InternetMaxBandwidthOut的值大于0,则自动为实例分配公网IP。 - int32 internet_max_bandwidth_out = 17; - // vpc id 华为云必需 - string vpc_id = 18; - //待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网(subnet)的网络ID,UUID格式。华为云必需 - string subnet_id = 19; - //-------------harvester--------------- - //命名空间 - string namespace = 20; - //vCpu - int32 cpu = 21; - //memory - string memory = 22; - //ssh_key - string ssh_key = 23; - //diskName - string disk_name = 24; - //disk类型 disk,cd-rom - string disk_type = 25; - //卷大小 - string disk_size = 26; - //bus 总线指示要模拟的磁盘设备的类型,支持virtio, sata, scsi. - string bus = 27; - //网络名称 - string network_name = 28; - //network_model 网络模式,支持e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio. - string network_model = 29; - //网络 - string network = 30; - //网络连接方法,默认bridge - string network_type = 31; - //osType //系统类型 - string os_type = 32; - //machineType //机器类型 none、q35、pc - string machine_type = 33; - //machineName //主机名称,默认为虚拟机名称 - string machine_name = 34; - //userDataTemplate //用户数据模板 - string user_data_template = 35; - //networkDataTemplate //网络数据模板 - string network_data_template = 36; - //vmTemplateName //模板名称 - string vm_template_name = 37; - //vmTemplateVersion //版本号 - string vm_template_version = 38; -} - -//系统磁盘 -message SystemDisk { - //系统盘大小,单位为GiB。取值范围:20~500。该参数的取值必须大于或者等于max{20, ImageSize}。默认值:max{40, 参数ImageId对应的镜像大小} - string size = 1; - //系统盘类型。系统盘的云盘种类。取值范围:cloud_efficiency:高效云盘。cloud_ssd:SSD云盘。cloud_essd:ESSD云盘。cloud:普通云盘。 - string category = 2; - //系统盘名称 - string disk_name = 3; - //系统盘描述 - string description = 4; - //创建ESSD云盘作为系统盘使用时,设置云盘的性能等级。取值范围:PL0:单盘最高随机读写IOPS 1万。PL1(默认):单盘最高随机读写IOPS 5万。PL2:单盘最高随机读写IOPS 10万。PL3:单盘最高随机读写IOPS 100万。 - string performance_level = 5; - //系统盘采用的自动快照策略ID。 - string auto_snapshot_policy_id = 6; -} - -//创建ECS返回值 -message CreateEcsResp { - // 云名称 - CloudProvider provider = 1; - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - string account_name = 2; - // 区域Id,参考 tenant.proto 中的各个云的区域 - int32 region_id = 3; - // 请求ID - string request_id = 4; - // 订单id - string order_id = 5; - // 订单成交价 - float trade_price = 6; - //实例ID(InstanceIdSet)列表 - repeated string instance_id_sets = 7; - // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - bool finished = 8; -} - -//删除ECS入参 -message DeleteEcsReq { - // 云类型 - CloudProvider provider = 1; - // 账号名称 - string account_name = 2; - // 地域,数据中心 - int32 region_id = 3; - //是否只预检此次请求是否只预检此次请求。true:发送检查请求,不会查询资源状况。检查项包括AccessKey是否有效、RAM用户的授权情况和是否填写了必需参数。如果检查不通过,则返回对应错误。如果检查通过,会返回错误码DRYRUN.SUCCESS。 - //false(默认值):发送正常请求,通过检查后返回2XX HTTP状态码并直接查询资源状况。 - string dry_run = 4; - //Force是否强制释放**运行中**;true:强制释放运行中(Running)的实例。强制释放相当于断电,实例内存以及存储中的临时数据都会被擦除,无法恢复。 - //false(默认值):正常释放实例,此时实例必须处于已停止(Stopped)状态 - string force = 5; - //是否释放已到期的包年包月实例 true,false - string terminate_subscription = 6; - //实例ID数组以”,“分割。列:i-8vb2nlubkow0fxbq2218,i-8vb2nlubkow0fxbq2216 - string instance_ids = 7; - //配置删除云服务器是否删除云服务器绑定的弹性IP。如果选择不删除,则系统仅做解绑定操作,保留弹性IP资源。 - //取值为true或false。默认false;华为云 - string delete_publicip = 8; - //配置删除云服务器是否删除云服务器对应的数据盘,如果选择不删除,则系统仅做卸载操作,保留云硬盘资源。默认为false。 - //取值为true或false。默认false;华为云 - string delete_volume = 9; - //----------------harvester---------------- - //虚拟机名称 - string instance_name = 10; - //namespace - string namespace = 11; - //diskName,以“,” 分割 - string disk_name = 12; -} - -//删除ECS返回值 -message DeleteEcsResp { - // 云名称 - CloudProvider provider = 1; - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - string account_name = 2; - // 区域Id,参考 tenant.proto 中的各个云的区域 - int32 region_id = 3; - // 请求ID - string request_id = 4; -} - -//更新ECS入参 -message UpdateEcsReq { - // 云类型 - CloudProvider provider = 1; - // 账号名称 - string account_name = 2; - // 地域,数据中心 - int32 region_id = 3; - //实例id - string instance_ids = 4; - // 实例状态不能为启动中(Starting)。重启实例后,重置生效,且必须是在ECS控制台重启或者调用API RebootInstance重启,新密码才能生效。在操作系统内部重启不能生效。 - string password = 5; - //操作系统的主机名 - string host_name = 6; - //实例名称 - string instance_name = 7; - //实例描述 - string description = 8; - //实例重新加入的安全组列表,安全组ID不能重复。以”,“分割 - string security_group_ids = 9; - //---------------harvester----------------- - //namespace - string namespace = 10; - //cpu - string cpu = 11; - //memory - string memory = 12; - //修改配置后是否重启 - bool is_restart = 13; -} - -//更新ECS返回值 -message UpdateEcsResp { - // 云名称 - CloudProvider provider = 1; - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - string account_name = 2; - // 区域Id,参考 tenant.proto 中的各个云的区域 - int32 region_id = 3; - // 请求ID - string request_id = 4; -} - -//查询ECS入参 -message ListDetailReq { - // 云名称 - CloudProvider provider = 1; - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - string account_name = 2; - // 区域Id,参考 tenant.proto 中的各个云的区域 - int32 region_id = 3; - // 分页相关参数,页码 - int32 page_number = 4; - // 分页相关参数,每页数量 - int32 page_size = 5; - // 分页相关参数,下一页的token - string next_token = 6; - //--------harvester--------- - //namespace - string namespace = 7; -} - -//查询ECS返回值 -message ListDetailResp { - // Ecs 机器集合 - repeated EcsInstance ecses = 1; - // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - bool finished = 2; - // 分页相关参数,页码 - int32 page_number = 3; - // 分页相关参数,每页数量 - int32 page_size = 4; - // 分页相关参数,下一页的token - string next_token = 5; - // 请求id,出现问题后提供给云厂商,排查问题 - string request_id = 6; -} - -//虚拟机状态操作 -enum ActionType { - //启动 - start = 0; - //停止 - stop = 1; - //重启 - restart = 2; -} - -message ActionReq { - // 云名称 - CloudProvider provider = 1; - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - string account_name = 2; - // 区域Id,参考 tenant.proto 中的各个云的区域 - int32 region_id = 3; - //命名空间 - string namespace = 4; - //虚拟机名称 - string vm_name = 5 ; - //虚拟机操作状态 - ActionType action_type = 6 ; -} - -message ActionResp { - // 云名称 - CloudProvider provider = 1; - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - string account_name = 2; - // Ecs 机器集合 - repeated EcsInstance ecses = 3; - // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - bool finished = 4; - //vm状态 - string status = 5; -} - -message ListReq { - // 云名称 - CloudProvider provider = 1; -} - -message ListResp { - // Ecs 机器集合 - repeated EcsInstance ecses = 1; -} - -message ListAllReq{} - -message ListImagesReq { - // 云名称 - CloudProvider provider = 1; - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - string account_name = 2; - // 区域Id,参考 tenant.proto 中的各个云的区域 - int32 region_id = 3; - //命名空间 - string namespace= 4; - // 分页相关参数,页码 - int32 page_number = 5; - // 分页相关参数,每页数量 - int32 page_size = 6; -} - -message Image { - // 云名称 - CloudProvider provider = 1; - // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 - string account_name = 2; - //镜像状态 - string status = 3 ; - //镜像名称 - string display_name= 4; - //命名空间 - string namespace= 5; - //镜像id - string id= 6; -} - -message ListImagesResp { - // 云名称 - CloudProvider provider = 1; - // 镜像集合 - repeated Image images = 2; -} - - -// ECS类产品接口 -// 阿里云 - ECS -// 腾讯云 - CVM -// 华为云 - ECS -// 亚马逊云 - EC2 -service EcsService { - - // 创建多家云ECS - rpc CreateMultipleEcs(CreateEcsMultipleReq) returns (CreateEcsMultipleResp); - - // 创建ECS - rpc CreateEcs(CreateEcsReq) returns (CreateEcsResp); - - // 删除ECS - rpc DeleteEcs(DeleteEcsReq) returns (DeleteEcsResp); - - // 修改ECS - rpc UpdateEcs(UpdateEcsReq) returns (UpdateEcsResp); - - // 查询ECS明细 - 支持云类型、区域、账户、分页等过滤条件 - rpc ListEcsDetail(ListDetailReq) returns (ListDetailResp); - - // 查询ECS全量 - 根据云类型 - rpc ListEcs(ListReq) returns (ListResp); - - // 查询所有云的ECS - rpc ListEcsAll(ListAllReq) returns (ListResp); - - //操作ecs(start-stop-restart) - rpc ActionEcs(ActionReq) returns (ActionResp); - - //查询ecs镜像 - rpc ListEcsImages(ListImagesReq) returns (ListImagesResp); -} \ No newline at end of file diff --git a/adaptor/pcm_vm/idl/ecs.yaml b/adaptor/pcm_vm/idl/ecs.yaml deleted file mode 100644 index 87fc5e02f..000000000 --- a/adaptor/pcm_vm/idl/ecs.yaml +++ /dev/null @@ -1,28 +0,0 @@ -type: google.api.Service -config_version: 3 - -http: - rules: - - selector: ecs.EcsService.CreateMultipleEcs - post: "/apis/ecs/createMultiple" - body: "*" - - selector: ecs.EcsService.CreateEcs - post: "/apis/ecs/create" - body: "*" - - selector: ecs.EcsService.DeleteEcs - post: "/apis/ecs/delete" - body: "*" - - selector: ecs.EcsService.UpdateEcs - put: "/apis/ecs/update" - body: "*" - - selector: ecs.EcsService.ListEcsDetail - get: "/apis/ecs/detail" - - selector: ecs.EcsService.ListEcs - get: "/apis/ecs" - - selector: ecs.EcsService.ListEcsAll - get: "/apis/ecs/all" - - selector: ecs.EcsService.ActionEcs - post: "/apis/ecs/action" - body: "*" - - selector: ecs.EcsService.ListEcsImages - get: "/apis/ecs/listImages" \ No newline at end of file diff --git a/adaptor/pcm_vm/main.go b/adaptor/pcm_vm/main.go deleted file mode 100644 index 9fa540af6..000000000 --- a/adaptor/pcm_vm/main.go +++ /dev/null @@ -1,56 +0,0 @@ -package main - -import ( - vmpb "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/gen/idl" - vmserver "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/server" - "code.gitlink.org.cn/JCCE/PCM.git/common/config" - "code.gitlink.org.cn/JCCE/PCM.git/common/global" - "code.gitlink.org.cn/JCCE/PCM.git/common/server" - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - "flag" - "github.com/golang/glog" - "github.com/pkg/errors" - "go.uber.org/zap" - "google.golang.org/grpc" - "log" -) - -func main() { - var configFile string - flag.StringVar(&configFile, "conf", "configs/tenanter.yaml", "tenanter.yaml") - flag.Parse() - defer glog.Flush() - - if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { - if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { - glog.Fatalf("LoadCloudConfigsFromFile error %+v", err) - } - glog.Warningf("LoadCloudConfigsFromFile empty file path %s", configFile) - } - - // 初始化配置以及数据库 - config.InitConfig() - // 新建一个zap logger实例 - logger, err := zap.NewDevelopment() - if err != nil { - log.Fatalf("cannot create logger: %v", err) - } - if err != nil { - logger.Fatal("cannot open private key", zap.Error(err)) - } - if err != nil { - logger.Fatal("cannot read private key", zap.Error(err)) - } - if err != nil { - logger.Fatal("cannot parse private key", zap.Error(err)) - } - // logger.Sugar().Fatal 直接可以少几行判错的代码 - logger.Sugar().Fatal(server.RunGRPCServer(&server.GRPCConfig{ - Name: "pcm_vm", - Addr: global.S.VmInfo.Address, - RegisterFunc: func(g *grpc.Server) { - vmpb.RegisterEcsServiceServer(g, &vmserver.Server{}) - }, - Logger: logger, - })) -} diff --git a/adaptor/pcm_vm/server/ecs.go b/adaptor/pcm_vm/server/ecs.go deleted file mode 100644 index b7f7c8b92..000000000 --- a/adaptor/pcm_vm/server/ecs.go +++ /dev/null @@ -1,103 +0,0 @@ -package server - -import ( - "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/gen/idl" - "context" - "github.com/golang/glog" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -type Server struct { - ecspb.UnimplementedEcsServiceServer -} - -// CreateMultipleEcs return create cloudy ecs -func (s *Server) CreateMultipleEcs(ctx context.Context, reqs *ecspb.CreateEcsMultipleReq) (*ecspb.CreateEcsMultipleResp, error) { - resp, err := CreateMultipleEcs(ctx, reqs) - if err != nil { - glog.Errorf("ListEcsDetail error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// CreateEcs return create ecs -func (s *Server) CreateEcs(ctx context.Context, req *ecspb.CreateEcsReq) (*ecspb.CreateEcsResp, error) { - resp, err := CreateEcs(ctx, req) - if err != nil { - glog.Errorf("ListEcsDetail error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// DeleteEcs return Delete ecs -func (s *Server) DeleteEcs(ctx context.Context, req *ecspb.DeleteEcsReq) (*ecspb.DeleteEcsResp, error) { - resp, err := DeleteEcs(ctx, req) - if err != nil { - glog.Errorf("ListEcsDetail error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// UpdateEcs return Update ecs -func (s *Server) UpdateEcs(ctx context.Context, req *ecspb.UpdateEcsReq) (*ecspb.UpdateEcsResp, error) { - resp, err := UpdateEcs(ctx, req) - if err != nil { - glog.Errorf("ListEcsDetail error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// ListEcsDetail return ecs detail -func (s *Server) ListEcsDetail(ctx context.Context, req *ecspb.ListDetailReq) (*ecspb.ListDetailResp, error) { - resp, err := ListDetail(ctx, req) - if err != nil { - glog.Errorf("ListEcsDetail error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// ListEcs return ecs list -func (s *Server) ListEcs(ctx context.Context, req *ecspb.ListReq) (*ecspb.ListResp, error) { - resp, err := List(ctx, req) - if err != nil { - glog.Errorf("ListEcs error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// ListEcsAll return all ecs -func (s *Server) ListEcsAll(ctx context.Context, req *ecspb.ListAllReq) (*ecspb.ListResp, error) { - resp, err := ListAll(ctx) - if err != nil { - glog.Errorf("ListEcsAll error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// ActionEcs return ecs action -func (s *Server) ActionEcs(ctx context.Context, req *ecspb.ActionReq) (*ecspb.ActionResp, error) { - resp, err := ActionEcs(ctx, req) - if err != nil { - glog.Errorf("ActionEcs error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - -// ListEcsImages return ecs image list -func (s *Server) ListEcsImages(ctx context.Context, req *ecspb.ListImagesReq) (*ecspb.ListImagesResp, error) { - resp, err := ListImages(ctx, req) - if err != nil { - glog.Errorf("ListImages error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} diff --git a/adaptor/pcm_vm/server/ecsImpl.go b/adaptor/pcm_vm/server/ecsImpl.go deleted file mode 100644 index 507b8a5c3..000000000 --- a/adaptor/pcm_vm/server/ecsImpl.go +++ /dev/null @@ -1,264 +0,0 @@ -package server - -import ( - pbecs "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/gen/idl" - ecser "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/service" - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl" - "context" - "sync" - - "github.com/golang/glog" - "github.com/pkg/errors" -) - -// CreateMultipleEcs 创建多云ECS -func CreateMultipleEcs(ctx context.Context, reqs *pbecs.CreateEcsMultipleReq) (*pbecs.CreateEcsMultipleResp, error) { - var ( - wg sync.WaitGroup - requestIds = make([]string, 0) - ) - wg.Add(len(reqs.GetCreateEcsReqs())) - c := make(chan string, len(reqs.GetCreateEcsReqs())) - for _, k := range reqs.GetCreateEcsReqs() { - k := k - go func() { - defer wg.Done() - resp, err := CreateEcs(ctx, k) - if err != nil { - glog.Errorf(k.Provider.String()+"CreateEcs error: %v", err) - c <- k.Provider.String() - return - } - c <- resp.GetRequestId() - }() - } - go func() { - defer close(c) - wg.Wait() - }() - for v := range c { - requestIds = append(requestIds, v) - } - isFinished := false - if len(requestIds) > 0 { - isFinished = true - } - return &pbecs.CreateEcsMultipleResp{ - RequestId: requestIds, - Finished: isFinished, - }, nil -} - -func CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error) { - var ( - ecs ecser.Ecser - ) - tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider)) - region, err := tenanter.NewRegion(pbtenant.CloudProvider(req.Provider), req.RegionId) - if err != nil { - return nil, errors.Wrap(err, "get tenanters failed") - } - for _, tenanter := range tenanters { - if req.AccountName == "" || tenanter.AccountName() == req.AccountName { - if ecs, err = ecser.NewEcsClient(req.Provider, region, tenanter); err != nil { - return nil, errors.WithMessage(err, "NewEcsClient error") - } - break - } - } - return ecs.CreateEcs(ctx, req) -} - -func DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (*pbecs.DeleteEcsResp, error) { - var ( - ecs ecser.Ecser - ) - tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider)) - region, err := tenanter.NewRegion(pbtenant.CloudProvider(req.Provider), req.RegionId) - if err != nil { - return nil, errors.Wrap(err, "get tenanters failed") - } - for _, tenanter := range tenanters { - if req.AccountName == "" || tenanter.AccountName() == req.AccountName { - if ecs, err = ecser.NewEcsClient(req.Provider, region, tenanter); err != nil { - return nil, errors.WithMessage(err, "NewEcsClient error") - } - break - } - } - return ecs.DeleteEcs(ctx, req) -} - -func UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (*pbecs.UpdateEcsResp, error) { - var ( - ecs ecser.Ecser - ) - tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider)) - region, err := tenanter.NewRegion(pbtenant.CloudProvider(req.Provider), req.RegionId) - if err != nil { - return nil, errors.Wrap(err, "get tenanters failed") - } - for _, tenanter := range tenanters { - if req.AccountName == "" || tenanter.AccountName() == req.AccountName { - if ecs, err = ecser.NewEcsClient(req.Provider, region, tenanter); err != nil { - return nil, errors.WithMessage(err, "NewEcsClient error") - } - break - } - } - return ecs.UpdateEcs(ctx, req) -} - -// ListDetail returns the detail of ecs instances -func ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error) { - var ( - ecs ecser.Ecser - ) - - tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider)) - if err != nil { - return nil, errors.WithMessage(err, "getTenanters error") - } - - region, err := tenanter.NewRegion(pbtenant.CloudProvider(req.Provider), req.RegionId) - if err != nil { - return nil, errors.WithMessagef(err, "provider %v regionId %v", req.Provider, req.RegionId) - } - - for _, tenanter := range tenanters { - if req.AccountName == "" || tenanter.AccountName() == req.AccountName { - if ecs, err = ecser.NewEcsClient(req.Provider, region, tenanter); err != nil { - return nil, errors.WithMessage(err, "NewEcsClient error") - } - break - } - } - - return ecs.ListDetail(ctx, req) -} - -// List returns the list of ecs instances -func List(ctx context.Context, req *pbecs.ListReq) (*pbecs.ListResp, error) { - var ( - wg sync.WaitGroup - mutex sync.Mutex - ecses []*pbecs.EcsInstance - ) - - tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider)) - if err != nil { - return nil, errors.WithMessage(err, "getTenanters error") - } - - regions := tenanter.GetAllRegionIds(pbtenant.CloudProvider(req.Provider)) - - wg.Add(len(tenanters) * len(regions)) - for _, t := range tenanters { - for _, region := range regions { - go func(tenant tenanter.Tenanter, region tenanter.Region) { - defer wg.Done() - ecs, err := ecser.NewEcsClient(req.Provider, region, tenant) - if err != nil { - glog.Errorf("New Ecs Client error %v", err) - return - } - - request := &pbecs.ListDetailReq{ - Provider: req.Provider, - AccountName: tenant.AccountName(), - RegionId: region.GetId(), - PageNumber: 1, - PageSize: 100, - NextToken: "", - } - for { - resp, err := ecs.ListDetail(ctx, request) - if err != nil { - glog.Errorf("ListDetail error %v", err) - return - } - mutex.Lock() - ecses = append(ecses, resp.Ecses...) - mutex.Unlock() - if resp.Finished { - break - } - request.PageNumber, request.PageSize, request.NextToken = resp.PageNumber, resp.PageSize, resp.NextToken - } - }(t, region) - } - } - wg.Wait() - - return &pbecs.ListResp{Ecses: ecses}, nil -} - -// ListAll returns all ecs instances -func ListAll(ctx context.Context) (*pbecs.ListResp, error) { - var ( - wg sync.WaitGroup - mutex sync.Mutex - ecses []*pbecs.EcsInstance - ) - - wg.Add(len(pbecs.CloudProvider_name)) - for k := range pbecs.CloudProvider_name { - go func(provider int32) { - defer wg.Done() - - resp, err := List(ctx, &pbecs.ListReq{Provider: pbecs.CloudProvider(provider)}) - if err != nil { - glog.Errorf("List error %v", err) - return - } - mutex.Lock() - ecses = append(ecses, resp.Ecses...) - mutex.Unlock() - }(k) - } - - wg.Wait() - - return &pbecs.ListResp{Ecses: ecses}, nil -} - -func ActionEcs(ctx context.Context, req *pbecs.ActionReq) (*pbecs.ActionResp, error) { - var ( - ecs ecser.Ecser - ) - tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider)) - region, err := tenanter.NewRegion(pbtenant.CloudProvider(req.Provider), req.RegionId) - if err != nil { - return nil, errors.Wrap(err, "get tenanters failed") - } - for _, tenanter := range tenanters { - if req.AccountName == "" || tenanter.AccountName() == req.AccountName { - if ecs, err = ecser.NewEcsClient(req.Provider, region, tenanter); err != nil { - return nil, errors.WithMessage(err, "NewEcsClient error") - } - break - } - } - return ecs.ActionEcs(ctx, req) -} - -func ListImages(ctx context.Context, req *pbecs.ListImagesReq) (*pbecs.ListImagesResp, error) { - var ( - ecs ecser.Ecser - ) - tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider)) - region, err := tenanter.NewRegion(pbtenant.CloudProvider(req.Provider), req.RegionId) - if err != nil { - return nil, errors.Wrap(err, "get tenanters failed") - } - for _, tenanter := range tenanters { - if req.AccountName == "" || tenanter.AccountName() == req.AccountName { - if ecs, err = ecser.NewEcsClient(req.Provider, region, tenanter); err != nil { - return nil, errors.WithMessage(err, "NewEcsClient error") - } - break - } - } - return ecs.ListEcsImages(ctx, req) -} diff --git a/adaptor/pcm_vm/server/ecsImpl_test.go b/adaptor/pcm_vm/server/ecsImpl_test.go deleted file mode 100644 index 8f5bf8398..000000000 --- a/adaptor/pcm_vm/server/ecsImpl_test.go +++ /dev/null @@ -1,82 +0,0 @@ -package server - -import ( - pbecs "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/gen/idl" - pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl" - "context" - "testing" -) - -func TestListDetail(t *testing.T) { - type args struct { - req *pbecs.ListDetailReq - } - tests := []struct { - name string - args args - wantErr bool - }{ - {name: "ali", args: args{req: &pbecs.ListDetailReq{Provider: pbecs.CloudProvider_ali, RegionId: int32(pbtenant.AliRegionId_ali_cn_hangzhou), PageNumber: 1, PageSize: 10}}, wantErr: false}, - {name: "tencent", args: args{req: &pbecs.ListDetailReq{Provider: pbecs.CloudProvider_tencent, RegionId: int32(pbtenant.TencentRegionId_tc_ap_beijing), PageNumber: 1, PageSize: 10}}, wantErr: false}, - {name: "aws", args: args{req: &pbecs.ListDetailReq{Provider: pbecs.CloudProvider_huawei, RegionId: int32(pbtenant.HuaweiRegionId_hw_af_south_1), PageNumber: 1, PageSize: 10}}, wantErr: false}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := ListDetail(context.Background(), tt.args.req) - if (err != nil) != tt.wantErr { - t.Errorf("ListDetail() error = %+v, wantErr %v", err, tt.wantErr) - return - } - t.Log(got) - }) - } -} - -func TestList(t *testing.T) { - type args struct { - req *pbecs.ListReq - } - tests := []struct { - name string - args args - wantErr bool - }{ - {name: "ali", args: args{req: &pbecs.ListReq{Provider: pbecs.CloudProvider_ali}}, wantErr: false}, - {name: "tencent", args: args{req: &pbecs.ListReq{Provider: pbecs.CloudProvider_tencent}}, wantErr: false}, - {name: "huawei", args: args{req: &pbecs.ListReq{Provider: pbecs.CloudProvider_huawei}}, wantErr: false}, - {name: "aws", args: args{req: &pbecs.ListReq{Provider: pbecs.CloudProvider_huawei}}, wantErr: false}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := List(context.Background(), tt.args.req) - if (err != nil) != tt.wantErr { - t.Errorf("List() error = %+v, wantErr %v", err, tt.wantErr) - return - } - t.Log(got) - }) - } -} - -func TestListAll(t *testing.T) { - type args struct { - req *pbecs.ListAllReq - } - tests := []struct { - name string - args args - wantErr bool - }{ - {name: "all", args: args{req: &pbecs.ListAllReq{}}, wantErr: false}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := ListAll(context.Background()) - if (err != nil) != tt.wantErr { - t.Errorf("ListAll() error = %+v, wantErr %v", err, tt.wantErr) - return - } - t.Log(got) - }) - } -} diff --git a/adaptor/pcm_vm/server/main_test.go b/adaptor/pcm_vm/server/main_test.go deleted file mode 100644 index a921d6a9e..000000000 --- a/adaptor/pcm_vm/server/main_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package server - -import ( - pbecs "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl" - "os" - "testing" -) - -var ( - aliTenant, tcTenant, hwTenant, k8sTenant []tenanter.Tenanter -) - -func TestMain(m *testing.M) { - err := tenanter.LoadCloudConfigs("../../../tenanter.yaml") - if err != nil { - panic(err) - } - if aliTenant, err = tenanter.GetTenanters(pbtenant.CloudProvider(pbecs.CloudProvider_ali)); err != nil { - panic("get aliTenant failed") - } - if tcTenant, err = tenanter.GetTenanters(pbtenant.CloudProvider(pbecs.CloudProvider_tencent)); err != nil { - panic("get tcTenant failed") - } - if hwTenant, err = tenanter.GetTenanters(pbtenant.CloudProvider(pbecs.CloudProvider_huawei)); err != nil { - panic("get hwTenant failed") - } - if k8sTenant, err = tenanter.GetTenanters(pbtenant.CloudProvider(pbecs.CloudProvider_k8s)); err != nil { - panic("get awsTenant failed") - } - os.Exit(m.Run()) -} diff --git a/adaptor/pcm_vm/service/ali.go b/adaptor/pcm_vm/service/ali.go deleted file mode 100644 index 222ae4ff6..000000000 --- a/adaptor/pcm_vm/service/ali.go +++ /dev/null @@ -1,243 +0,0 @@ -package service - -import ( - pbecs "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/gen/idl" - "context" - "sync" - - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - openapi "github.com/alibabacloud-go/darabonba-openapi/client" - string_ "github.com/alibabacloud-go/darabonba-string/client" - aliecs "github.com/alibabacloud-go/ecs-20140526/v2/client" - util "github.com/alibabacloud-go/tea-utils/service" - "github.com/alibabacloud-go/tea/tea" - "github.com/golang/glog" - "github.com/pkg/errors" -) - -var aliClientMutex sync.Mutex - -type AliEcs struct { - cli *aliecs.Client - region tenanter.Region - tenanter tenanter.Tenanter -} - -func newAliEcsClient(region tenanter.Region, tenant tenanter.Tenanter) (Ecser, error) { - var ( - client *aliecs.Client - err error - ) - switch t := tenant.(type) { - case *tenanter.AccessKeyTenant: - // 阿里云的sdk有一个 map 的并发问题,go test 加上-race 能检测出来,所以这里加一个锁 - aliClientMutex.Lock() - config := &openapi.Config{} - AccessKeyId := t.GetId() - AccessKeySecret := t.GetSecret() - RegionId := region.GetName() - config.AccessKeyId = &AccessKeyId - config.AccessKeySecret = &AccessKeySecret - config.RegionId = &RegionId - client, err = aliecs.NewClient(config) - aliClientMutex.Unlock() - default: - return nil, errors.New("unsupported tenant type") - } - - if err != nil { - return nil, errors.Wrap(err, "init ali ecs client error") - } - - return &AliEcs{ - cli: client, - region: region, - tenanter: tenant, - }, nil -} -func (ecs *AliEcs) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error) { - RegionId := ecs.region.GetName() - ImageId := req.GetImageId() - InstanceType := req.GetInstanceType() - SecurityGroupId := req.GetSecurityGroupId() - InstanceName := req.GetInstanceName() - Description := req.GetDescription() - ZoneId := req.GetZoneId() - VSwitchId := req.GetVSwitchId() - Amount := req.GetAmount() - DryRun := req.GetDryRun() - Category := req.GetCategory() - InstanceChargeType := req.GetInstanceChargeType() - request := &aliecs.RunInstancesRequest{ - RegionId: &RegionId, - InstanceType: &InstanceType, - ImageId: &ImageId, - SecurityGroupId: &SecurityGroupId, - InstanceName: &InstanceName, - Description: &Description, - ZoneId: &ZoneId, - VSwitchId: &VSwitchId, - Amount: &Amount, - DryRun: util.EqualString(&DryRun, tea.String("true")), - SystemDisk: &aliecs.RunInstancesRequestSystemDisk{ - Category: &Category, - }, - InstanceChargeType: &InstanceChargeType, - } - // 创建并运行实例 - resp, err := ecs.cli.RunInstances(request) - if err != nil { - return nil, errors.Wrap(err, "Ali Create ECS error") - } - isFinished := false - - if len(resp.Body.InstanceIdSets.InstanceIdSet) > 0 { - isFinished = true - } - glog.Infof("--------------------阿里ECS实例创建成功--------------------") - glog.Infof(*util.ToJSONString(util.ToMap(resp))) - requestId := *resp.Body.RequestId - //订单ID。该参数只有创建包年包月ECS实例(请求参数InstanceChargeType=PrePaid)时有返回值。 - OrderId := "" - if req.InstanceChargeType == "PrePaid" { - OrderId = *resp.Body.OrderId - } - TradePrice := float32(0) - if resp.Body.TradePrice != nil { - TradePrice = *resp.Body.TradePrice - } - InstanceIds := make([]string, 0) - for _, v := range resp.Body.InstanceIdSets.InstanceIdSet { - InstanceIds = append(InstanceIds, *v) - } - return &pbecs.CreateEcsResp{ - OrderId: OrderId, - TradePrice: TradePrice, - RequestId: "Ali ECS RequestId: " + requestId, - InstanceIdSets: InstanceIds, - Finished: isFinished, - }, nil -} - -func (ecs *AliEcs) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (*pbecs.DeleteEcsResp, error) { - RegionId := ecs.region.GetName() - InstanceIds := req.GetInstanceIds() - DryRun := req.GetDryRun() - Force := req.GetForce() - TerminateSubscription := req.GetTerminateSubscription() - deleteReq := &aliecs.DeleteInstancesRequest{ - RegionId: &RegionId, - InstanceId: string_.Split(&InstanceIds, tea.String(","), tea.Int(-1)), - Force: util.EqualString(&Force, tea.String("true")), - DryRun: util.EqualString(&DryRun, tea.String("true")), - TerminateSubscription: util.EqualString(&TerminateSubscription, tea.String("true")), - } - resp, err := ecs.cli.DeleteInstances(deleteReq) - if err != nil { - return nil, errors.Wrap(err, "Ali Delete ECS error") - } - glog.Infof("--------------------阿里ECS实例释放成功--------------------") - glog.Infof(*util.ToJSONString(util.ToMap(resp))) - return &pbecs.DeleteEcsResp{ - RequestId: *resp.Body.RequestId, - AccountName: req.AccountName, - RegionId: req.RegionId, - }, nil -} - -func (ecs *AliEcs) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (*pbecs.UpdateEcsResp, error) { - Password := req.GetPassword() - HostName := req.GetHostName() - InstanceName := req.GetInstanceName() - Description := req.GetDescription() - InstanceId := req.GetInstanceIds() - UpdateReq := &aliecs.ModifyInstanceAttributeRequest{} - if req.GetInstanceIds() == "" { - return nil, errors.New("InstanceId is empty") - } - UpdateReq.InstanceId = &InstanceId - if Password != "" { - UpdateReq.Password = &Password - } - if HostName != "" { - UpdateReq.HostName = &HostName - } - if InstanceName != "" { - UpdateReq.InstanceName = &InstanceName - } - if Description != "" { - UpdateReq.Description = &Description - } - resp, err := ecs.cli.ModifyInstanceAttribute(UpdateReq) - if err != nil { - return nil, errors.Wrap(err, "Ali Update ECS error") - } - glog.Infof("--------------------阿里ECS实例修改成功--------------------") - glog.Infof(*util.ToJSONString(util.ToMap(resp))) - return &pbecs.UpdateEcsResp{ - RequestId: *resp.Body.RequestId, - }, nil -} - -func (ecs *AliEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error) { - request := &aliecs.DescribeInstancesRequest{} - request.PageNumber = &req.PageNumber - request.PageSize = &req.PageSize - request.NextToken = &req.NextToken - request.RegionId = ecs.cli.RegionId - resp, err := ecs.cli.DescribeInstances(request) - if err != nil { - return nil, errors.Wrap(err, "Ali ListDetail error") - } - var ecses = make([]*pbecs.EcsInstance, len(resp.Body.Instances.Instance)) - for k, v := range resp.Body.Instances.Instance { - publicIps := make([]string, 0) - for _, vv := range v.PublicIpAddress.IpAddress { - publicIps = append(publicIps, *vv) - } - InnerIps := make([]string, 0) - for _, vv := range v.VpcAttributes.PrivateIpAddress.IpAddress { - InnerIps = append(InnerIps, *vv) - } - ecses[k] = &pbecs.EcsInstance{ - Provider: pbecs.CloudProvider_ali, - AccountName: ecs.tenanter.AccountName(), - InstanceId: *v.InstanceId, - InstanceName: *v.InstanceName, - RegionName: ecs.region.GetName(), - PublicIps: publicIps, - InstanceType: *v.InstanceType, - Cpu: string(*v.Cpu), - Memory: string(*v.Memory), - Description: *v.Description, - Status: *v.Status, - CreationTime: *v.CreationTime, - ExpireTime: *v.ExpiredTime, - InnerIps: InnerIps, - VpcId: *v.VpcAttributes.VpcId, - ResourceGroupId: *v.ResourceGroupId, - InstanceChargeType: *v.InstanceChargeType, - } - } - isFinished := false - if len(ecses) < int(req.PageSize) { - isFinished = true - } - - return &pbecs.ListDetailResp{ - Ecses: ecses, - Finished: isFinished, - PageNumber: req.PageNumber + 1, - PageSize: req.PageSize, - NextToken: *resp.Body.NextToken, - RequestId: *resp.Body.RequestId, - }, nil -} - -func (ecs *AliEcs) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) { - return nil, nil -} - -func (ecs *AliEcs) ListEcsImages(ctx context.Context, req *pbecs.ListImagesReq) (resp *pbecs.ListImagesResp, err error) { - return nil, nil -} diff --git a/adaptor/pcm_vm/service/aws.go b/adaptor/pcm_vm/service/aws.go deleted file mode 100644 index 2c55c3a32..000000000 --- a/adaptor/pcm_vm/service/aws.go +++ /dev/null @@ -1,98 +0,0 @@ -package service - -//TODO aws -// -//import ( -// "context" -// -// "github.com/aws/aws-sdk-go-v2/config" -// "github.com/aws/aws-sdk-go-v2/credentials" -// awsec2 "github.com/aws/aws-sdk-go-v2/service/ec2" -// "github.com/pkg/errors" -// -// "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" -// -// "code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbecs" -// "code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant" -//) -// -//type AwsEcs struct { -// cli *awsec2.Client -// region tenanter.Region -// tenanter tenanter.Tenanter -//} -// -//func newAwsEcsClient(region tenanter.Region, tenant tenanter.Tenanter) (Ecser, error) { -// var ( -// client *awsec2.Client -// err error -// ) -// -// switch t := tenant.(type) { -// case *tenanter.AccessKeyTenant: -// cfg, err := config.LoadDefaultConfig(context.TODO(), -// config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(t.GetId(), t.GetSecret(), "")), -// config.WithRegion(region.GetName()), -// ) -// if err != nil { -// return nil, errors.Wrap(err, "LoadDefaultConfig aws ecs client error") -// } -// client = awsec2.NewFromConfig(cfg) -// default: -// } -// -// if err != nil { -// return nil, errors.Wrap(err, "init aws ec2 client error") -// } -// return &AwsEcs{ -// cli: client, -// region: region, -// tenanter: tenant, -// }, nil -//} -// -//func (ecs *AwsEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error) { -// request := new(awsec2.DescribeInstancesInput) -// request.MaxResults = req.PageSize -// request.NextToken = &req.NextToken -// -// resp, err := ecs.cli.DescribeInstances(ctx, request) -// if err != nil { -// return nil, errors.Wrap(err, "Aws ListDetail error") -// } -// -// var ecses []*pbecs.EcsInstance -// for _, v := range resp.Reservations { -// for _, v2 := range v.Instances { -// ecses = append(ecses, &pbecs.EcsInstance{ -// Provider: pbtenant.CloudProvider_aws, -// AccountName: ecs.tenanter.AccountName(), -// InstanceId: *v2.InstanceId, -// InstanceName: "", -// RegionName: ecs.region.GetName(), -// PublicIps: []string{*v2.PublicIpAddress}, -// InstanceType: string(v2.InstanceType), -// Cpu: v2.CpuOptions.CoreCount, -// Memory: 0, -// Description: "", -// Status: string(v2.State.Name), -// CreationTime: "", -// ExpireTime: "", -// }) -// } -// -// } -// -// if resp.NextToken != nil { -// return &pbecs.ListDetailResp{ -// Ecses: ecses, -// Finished: false, -// NextToken: *resp.NextToken, -// }, nil -// } -// return &pbecs.ListDetailResp{ -// Ecses: ecses, -// Finished: true, -// NextToken: "", -// }, nil -//} diff --git a/adaptor/pcm_vm/service/ecser.go b/adaptor/pcm_vm/service/ecser.go deleted file mode 100644 index adaa3d202..000000000 --- a/adaptor/pcm_vm/service/ecser.go +++ /dev/null @@ -1,48 +0,0 @@ -package service - -import ( - pbecs "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/gen/idl" - "context" - - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - "github.com/golang/glog" - "github.com/pkg/errors" -) - -var ( - ErrEcsListNotSupported = errors.New("cloud not supported ecs list") - ErrEcserPanic = errors.New("ecs init panic") -) - -type Ecser interface { - CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (resp *pbecs.CreateEcsResp, err error) //创建ecs - DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (resp *pbecs.DeleteEcsResp, err error) //批量删除ecs - UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (resp *pbecs.UpdateEcsResp, err error) //修改ecs - ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (resp *pbecs.ListDetailResp, err error) //查询ecs详情 - ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) //操作ecs - ListEcsImages(ctx context.Context, req *pbecs.ListImagesReq) (resp *pbecs.ListImagesResp, err error) //查询镜像列表 -} - -func NewEcsClient(provider pbecs.CloudProvider, region tenanter.Region, tenant tenanter.Tenanter) (ecser Ecser, err error) { - // 部分sdk会在内部panic - defer func() { - if err1 := recover(); err1 != nil { - glog.Errorf("NewEcsClient panic %v", err1) - err = errors.WithMessagef(ErrEcserPanic, "%v", err1) - } - }() - - switch provider { - case pbecs.CloudProvider_ali: - return newAliEcsClient(region, tenant) - case pbecs.CloudProvider_tencent: - return newTencentCvmClient(region, tenant) - case pbecs.CloudProvider_huawei: - return newHuaweiEcsClient(region, tenant) - case pbecs.CloudProvider_harvester: - return newHarvesterClient(tenant) - } - - err = errors.WithMessagef(ErrEcsListNotSupported, "cloud provider %v region %v", provider, region) - return -} diff --git a/adaptor/pcm_vm/service/ecser_test.go b/adaptor/pcm_vm/service/ecser_test.go deleted file mode 100644 index 3f2d46b43..000000000 --- a/adaptor/pcm_vm/service/ecser_test.go +++ /dev/null @@ -1,62 +0,0 @@ -package service - -import ( - pbecs "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl" - "context" - "testing" -) - -func TestEcser_ListDetail(t *testing.T) { - region, _ := tenanter.NewRegion(pbtenant.CloudProvider_ali, int32(pbtenant.AliRegionId_ali_cn_hangzhou)) - ali, _ := NewEcsClient(pbecs.CloudProvider(pbtenant.CloudProvider_ali), region, aliTenant[0]) - aliFailed, _ := NewEcsClient(pbecs.CloudProvider(pbtenant.CloudProvider_ali), region, tenanter.NewTenantWithAccessKey("empty", "", "", "", "")) - - region, _ = tenanter.NewRegion(pbtenant.CloudProvider_tencent, int32(pbtenant.TencentRegionId_tc_ap_beijing)) - tc, _ := NewEcsClient(pbecs.CloudProvider(pbtenant.CloudProvider_tencent), region, tcTenant[0]) - tcFailed, _ := NewEcsClient(pbecs.CloudProvider(pbtenant.CloudProvider_tencent), region, tenanter.NewTenantWithAccessKey("empty", "", "", "", "")) - - region, _ = tenanter.NewRegion(pbtenant.CloudProvider_huawei, int32(pbtenant.HuaweiRegionId_hw_cn_southwest_2)) - hw, _ := NewEcsClient(pbecs.CloudProvider(pbtenant.CloudProvider_huawei), region, hwTenant[0]) - // hwFailed, _ := newHuaweiEcsClient(int32(pbtenant.HuaweiRegionId_hw_cn_north_1), tenanter.NewTenantWithAccessKey("empty", "", "", "")) - - type args struct { - req *pbecs.ListDetailReq - } - tests := []struct { - name string - fields Ecser - args args - wantErr bool - }{ - {name: "ali wrong cli", fields: aliFailed, args: args{&pbecs.ListDetailReq{PageNumber: 1, PageSize: 1}}, wantErr: true}, - {name: "ali wrong page number", fields: ali, args: args{&pbecs.ListDetailReq{PageNumber: 0, PageSize: 1}}, wantErr: true}, - {name: "ali wrong page size", fields: ali, args: args{&pbecs.ListDetailReq{PageNumber: 1, PageSize: 0}}, wantErr: true}, - {name: "ali right cli", fields: ali, args: args{&pbecs.ListDetailReq{PageNumber: 1, PageSize: 10}}, wantErr: false}, - - {name: "tc wrong cli", fields: tcFailed, args: args{&pbecs.ListDetailReq{PageNumber: 1, PageSize: 1}}, wantErr: true}, - {name: "tc wrong page number", fields: tc, args: args{&pbecs.ListDetailReq{PageNumber: 0, PageSize: 1}}, wantErr: true}, - {name: "tc wrong page size", fields: tc, args: args{&pbecs.ListDetailReq{PageNumber: 1, PageSize: 0}}, wantErr: true}, - {name: "tc right cli", fields: tc, args: args{&pbecs.ListDetailReq{PageNumber: 1, PageSize: 10}}, wantErr: false}, - - // {name: "hw wrong cli", fields: hwFailed, args: args{pageNumber: 1, pageSize: 1}, wantErr: true}, - {name: "hw right cli", fields: hw, args: args{&pbecs.ListDetailReq{PageNumber: 1, PageSize: 10}}, wantErr: false}, - - // {name: "right cli", fields: google, args: args{pageNumber: 1, pageSize: 10}, wantErr: false}, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - resp, err := tt.fields.ListDetail(context.Background(), tt.args.req) - if (err != nil) != tt.wantErr { - t.Errorf("ListDetail() error = %+v, wantErr %v", err, tt.wantErr) - return - } - t.Logf("%+v", err) - if err == nil { - t.Log(resp) - } - }) - } -} diff --git a/adaptor/pcm_vm/service/google.go b/adaptor/pcm_vm/service/google.go deleted file mode 100644 index b0d5724d1..000000000 --- a/adaptor/pcm_vm/service/google.go +++ /dev/null @@ -1,111 +0,0 @@ -package service - -// -// import ( -// "context" -// "fmt" -// -// "github.com/cloud-fitter/cloud-fitter/gen/idl/pbecs" -// "github.com/cloud-fitter/cloud-fitter/internal/tenanter" -// "github.com/pkg/errors" -// "google.golang.org/api/compute/v1" -// "google.golang.org/api/option" -// ) -// -// // Google当前存在2个问题: -// // 1. 权限的最佳实践 -// // 2. 国内无法直接访问google认证的接口 -// type GoogleEcs struct { -// cli *compute.Service -// } -// -// func NewGoogleEcsClient(tenant tenanter.Tenanter) (Ecser, error) { -// var client *compute.Service -// -// // rName, err := tenanter.GetAwsRegionName(regionId) -// // if err != nil { -// // return nil, err -// // } -// -// client, err := compute.NewService(context.Background(), option.WithCredentialsFile("/Users/didi/Study/cloud-fitter/google_auth.json")) -// if err != nil { -// return nil, errors.WithMessage(err, "new compute service error") -// } -// -// // // Project ID for this request. -// // project := "my-project" // TODO: Update placeholder value. -// // -// // // The name of the zone for this request. -// // zone := "my-zone" // TODO: Update placeholder value. -// // -// // req := computeService.Instances.ListDetail(project, zone) -// // if err := req.Pages(ctx, func(page *compute.InstanceList) error { -// // for _, instance := range page.Items { -// // // TODO: Change code below to process each `instance` resource: -// // fmt.Printf("%#v\n", instance) -// // } -// // return nil -// // }); err != nil { -// // log.Fatal(err) -// // } -// -// // switch t := tenant.(type) { -// // case *tenanter.AccessKeyTenant: -// // auth := basic.NewCredentialsBuilder().WithAk(t.GetId()).WithSk(t.GetSecret()).Build() -// // hcClient := hwecs.EcsClientBuilder().WithRegion(region.ValueOf(rName)).WithCredential(auth).Build() -// // client = hwecs.NewEcsClient(hcClient) -// // default: -// // } -// -// if err != nil { -// return nil, errors.Wrap(err, "init google ecs client error") -// } -// return &GoogleEcs{cli: client}, nil -// } -// -// // func (ecs *GoogleEcs) ECSStatistic() (*pbecs.ECSStatisticRespList, error) { -// // return nil, nil -// // } -// -// func (ecs *GoogleEcs) ListDetail(pageNumber, pageSize int) (*pbecs.ListResp, error) { -// // req := new(model.ListServersDetailsRequest) -// // offset := int32((pageNumber - 1) * pageSize) -// // req.Offset = &offset -// // limit := int32(pageSize) -// // req.Limit = &limit -// // -// // resp, err := ecs.cli.ListServersDetails(req) -// // if err != nil { -// // return nil, errors.Wrap(err, "Google ListDetail error") -// // } -// -// // Project ID for this request. -// project := "focused-stacker-311609" // TODO: Update placeholder value. -// -// // The name of the zone for this request. -// zone := "asia-east2-a" // TODO: Update placeholder value. -// -// req := ecs.cli.Instances.ListDetail(project, zone) -// var ecses []*pbecs.EcsInstance -// if err := req.Pages(context.Background(), func(page *compute.InstanceList) error { -// for _, instance := range page.Items { -// ecses = append(ecses, &pbecs.EcsInstance{ -// InstanceId: fmt.Sprint(instance.Id), -// InstanceName: instance.AccountName, -// RegionId: "", -// ZoneId: "", -// PublicIps: nil, -// Status: "", -// CreationTime: "", -// Description: "", -// }) -// } -// return nil -// }); err != nil { -// return nil, err -// } -// -// return &pbecs.ListResp{ -// Ecses: ecses, -// }, nil -// } diff --git a/adaptor/pcm_vm/service/harvester.go b/adaptor/pcm_vm/service/harvester.go deleted file mode 100644 index c666fe1f0..000000000 --- a/adaptor/pcm_vm/service/harvester.go +++ /dev/null @@ -1,595 +0,0 @@ -package service - -import ( - pbecs "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl" - "context" - "fmt" - "github.com/harvester/harvester/pkg/apis/harvesterhci.io/v1beta1" - harvClient "github.com/harvester/harvester/pkg/generated/clientset/versioned" - "github.com/longhorn/longhorn-manager/util" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - k8s "k8s.io/client-go/kubernetes" - kubirtv1 "kubevirt.io/client-go/api/v1" - "strconv" - "strings" - "time" -) - -const ( - prefix = "harvesterhci.io" - vmAnnotationPVC = prefix + "/volumeClaimTemplates" - vmAnnotationNetworkIps = "network.harvesterhci.io/ips" - defaultCloudInitUserData = "#cloud-config\npackage_update: true\npackages:\n - qemu-guest-agent\nruncmd:\n - - systemctl\n - enable\n - '--now'\n - qemu-guest-agent\n" -) - -type Config struct { - Host string - Token string - Port int -} - -type HarVMer struct { - k8sCli *k8s.Clientset - harvCli *harvClient.Clientset - region tenanter.Region - tenanter tenanter.Tenanter -} - -func newHarvesterClient(tenant tenanter.Tenanter) (Ecser, error) { - var ( - k8sclient *k8s.Clientset - harvesterClient *harvClient.Clientset - err error - ) - switch t := tenant.(type) { - case *tenanter.AccessKeyTenant: - k8sclient, err = GetKubernetesClient(t.GetUrl(), t.GetToken()) - if err != nil { - return nil, err - } - harvesterClient, err = GetHarvesterClient(t.GetUrl(), t.GetToken()) - if err != nil { - return nil, err - } - default: - - } - if err != nil { - return nil, errors.Wrap(err, "init harvester client error") - } - return &HarVMer{ - k8sCli: k8sclient, - harvCli: harvesterClient, - region: nil, - tenanter: tenant, - }, nil -} - -func (h *HarVMer) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (resp *pbecs.CreateEcsResp, err error) { - var ( - vmTemplate *kubirtv1.VirtualMachineInstanceTemplateSpec - vmImage *v1beta1.VirtualMachineImage - ) - if req.ImageId != "" { - vmImage, err = h.harvCli.HarvesterhciV1beta1().VirtualMachineImages(req.GetNamespace()).Get(context.TODO(), req.ImageId, k8smetav1.GetOptions{}) - if err != nil { - return nil, errors.Wrap(err, "get pcm_vm image error") - } - } else { - return nil, errors.Wrap(err, "Image ID given does not exist!") - } - storageClassName := vmImage.Status.StorageClassName - vmNameBase := req.InstanceName - - vmLabels := map[string]string{ - prefix + "/creator": "harvester", - } - vmiLabels := vmLabels - _amount := req.Amount - if _amount == 0 { - return nil, fmt.Errorf("VM count provided is 0, no VM will be created") - } - - repAmount := 0 - InstanceIds := make([]string, 0) - for i := 1; i <= int(_amount); i++ { - var ( - vmName string - secretRandomID string - ) - randomID := util.RandomID() - if _amount > 1 { - vmName = vmNameBase + "-" + fmt.Sprint(i) - secretRandomID = vmNameBase + "-" + randomID - } else { - vmName = vmNameBase - secretRandomID = vmNameBase + "-" + randomID - } - - vmiLabels[prefix+"/vmName"] = vmName - vmiLabels[prefix+"/vmNamePrefix"] = vmNameBase - diskRandomID := util.RandomID() - pvcName := vmName + "-disk-0-" + diskRandomID - pvcAnnotation := "[{\"metadata\":{\"name\":\"" + pvcName + "\",\"annotations\":{\"harvesterhci.io/imageId\":\"" + req.GetNamespace() + "/" + req.GetImageId() + "\"}},\"spec\":{\"accessModes\":[\"ReadWriteMany\"],\"resources\":{\"requests\":{\"storage\":\"" + req.GetDiskSize() + "\"}},\"volumeMode\":\"Block\",\"storageClassName\":\"" + storageClassName + "\"}}]" - - vmTemplate, err = buildVMTemplate(int(req.GetCpu()), req.GetMemory(), req.GetSshKey(), h.harvCli, pvcName, vmiLabels, vmNameBase, secretRandomID) - if err != nil { - return nil, errors.Wrap(err, "") - } - vm := &kubirtv1.VirtualMachine{ - ObjectMeta: k8smetav1.ObjectMeta{ - Name: vmName, - Namespace: req.GetNamespace(), - Annotations: map[string]string{ - vmAnnotationPVC: pvcAnnotation, - vmAnnotationNetworkIps: "[]", - }, - Labels: vmLabels, - }, - Spec: kubirtv1.VirtualMachineSpec{ - Running: NewTrue(), - Template: vmTemplate, - }, - } - resp, err1 := h.harvCli.KubevirtV1().VirtualMachines(req.GetNamespace()).Create(context.TODO(), vm, k8smetav1.CreateOptions{}) - if err1 != nil { - return nil, errors.Wrap(err, "VM create failed") - } - - var sshKey *v1beta1.KeyPair - cloudInitSSHSection := "" - if req.GetSshKey() != "" { - sshArr := strings.Split(req.GetSshKey(), "/") - if len(sshArr) != 2 { - return nil, errors.New("sshKeyName should be in format namespace/name") - } - sshKey, err = h.harvCli.HarvesterhciV1beta1().KeyPairs(sshArr[0]).Get(context.TODO(), sshArr[1], k8smetav1.GetOptions{}) - if err != nil { - return nil, errors.Wrap(err, "error during getting keypair from Harvester") - } - cloudInitSSHSection = "\nssh_authorized_keys:\n - >-\n" + sshKey.Spec.PublicKey + "\n" - logrus.Debugf("SSH Key Name %s given does exist!", req.GetSshKey()) - } - if req.UserDataTemplate == "" { - req.UserDataTemplate = defaultCloudInitUserData - } - // Create the secret for the VM - if _, secreterr := createCloudInitDataFromSecret(h.k8sCli, vmName, resp.ObjectMeta.UID, secretRandomID, req.Namespace, req.UserDataTemplate+cloudInitSSHSection, req.NetworkDataTemplate); secreterr != nil { - logrus.Errorf("Create secret failed, %s", secreterr) - return nil, errors.Wrap(secreterr, "Create cloud init data from secret failed") - } - InstanceIds = append(InstanceIds, string(resp.UID)) - repAmount++ - } - isFinished := false - if int32(repAmount) == req.Amount { - isFinished = true - } - return &pbecs.CreateEcsResp{ - Provider: pbecs.CloudProvider_harvester, - AccountName: h.tenanter.AccountName(), - InstanceIdSets: InstanceIds, - Finished: isFinished, - }, nil -} - -// buildVMTemplate creates a *kubirtv1.VirtualMachineInstanceTemplateSpec from the CLI Flags and some computed values -func buildVMTemplate(vCpu int, memory, sshKeyName string, c *harvClient.Clientset, - pvcName string, vmiLabels map[string]string, vmName string, secretName string) (vmTemplate *kubirtv1.VirtualMachineInstanceTemplateSpec, err error) { - vmTemplate = nil - _memory := resource.MustParse(memory) - if sshKeyName != "" { - sshArr := strings.Split(sshKeyName, "/") - if len(sshArr) != 2 { - return nil, errors.New("sshKeyName should be in format namespace/name") - } - _, keyerr := c.HarvesterhciV1beta1().KeyPairs(sshArr[0]).Get(context.TODO(), sshArr[1], k8smetav1.GetOptions{}) - if keyerr != nil { - return nil, errors.Wrap(keyerr, "error during getting keypair from Harvester") - } - logrus.Debugf("SSH Key Name %s given does exist!", sshKeyName) - } - logrus.Debug("CloudInit: ") - vmTemplate = &kubirtv1.VirtualMachineInstanceTemplateSpec{ - ObjectMeta: k8smetav1.ObjectMeta{ - Annotations: vmiAnnotations(pvcName, sshKeyName), - Labels: vmiLabels, - }, - Spec: kubirtv1.VirtualMachineInstanceSpec{ - Hostname: vmName, - Networks: []kubirtv1.Network{ - { - Name: "default", - NetworkSource: kubirtv1.NetworkSource{ - Multus: &kubirtv1.MultusNetwork{ - NetworkName: "default/service-network", - }, - }, - }, - }, - Volumes: []kubirtv1.Volume{ - { - Name: "disk-0", - VolumeSource: kubirtv1.VolumeSource{ - PersistentVolumeClaim: &kubirtv1.PersistentVolumeClaimVolumeSource{ - PersistentVolumeClaimVolumeSource: v1.PersistentVolumeClaimVolumeSource{ - ClaimName: pvcName, - }, - }, - }, - }, - { - Name: "cloudinitdisk", - VolumeSource: kubirtv1.VolumeSource{ - CloudInitNoCloud: &kubirtv1.CloudInitNoCloudSource{ - UserDataSecretRef: &v1.LocalObjectReference{Name: secretName}, - NetworkDataSecretRef: &v1.LocalObjectReference{Name: secretName}, - }, - }, - }, - }, - Domain: kubirtv1.DomainSpec{ - CPU: &kubirtv1.CPU{ - Cores: uint32(vCpu), - Sockets: uint32(1), - Threads: uint32(1), - }, - Memory: &kubirtv1.Memory{ - Guest: &_memory, - }, - Devices: kubirtv1.Devices{ - Inputs: []kubirtv1.Input{ - { - Bus: "usb", - Type: "tablet", - Name: "tablet", - }, - }, - Interfaces: []kubirtv1.Interface{ - { - Name: "default", - Model: "virtio", - InterfaceBindingMethod: kubirtv1.DefaultBridgeNetworkInterface().InterfaceBindingMethod, - }, - }, - Disks: []kubirtv1.Disk{ - { - BootOrder: PointerToUint(1), - Name: "disk-0", - DiskDevice: kubirtv1.DiskDevice{ - Disk: &kubirtv1.DiskTarget{ - Bus: "virtio", - }, - }, - }, - { - Name: "cloudinitdisk", - DiskDevice: kubirtv1.DiskDevice{ - Disk: &kubirtv1.DiskTarget{ - Bus: "virtio", - }, - }, - }, - }, - }, - Resources: kubirtv1.ResourceRequirements{ - Limits: v1.ResourceList{ - "cpu": resource.MustParse(strconv.Itoa(vCpu)), - "memory": resource.MustParse(memory), - }, - Requests: v1.ResourceList{ - "memory": resource.MustParse(memory), - }, - }, - }, - Affinity: &v1.Affinity{ - PodAntiAffinity: &v1.PodAntiAffinity{ - PreferredDuringSchedulingIgnoredDuringExecution: []v1.WeightedPodAffinityTerm{ - { - Weight: int32(1), - PodAffinityTerm: v1.PodAffinityTerm{ - TopologyKey: "kubernetes.io/hostname", - LabelSelector: &k8smetav1.LabelSelector{ - MatchLabels: map[string]string{ - prefix + "/vmNamePrefix": vmName, - }, - }, - }, - }, - }, - }, - }, - }, - } - return -} - -// vmiAnnotations generates a map of strings to be injected as annotations from a PVC name and an SSK Keyname -func vmiAnnotations(pvcName string, sshKeyName string) map[string]string { - sshKey := "[]" - if sshKeyName != "" { - sshKey = "[\"" + sshKeyName + "\"]" - } - return map[string]string{ - prefix + "/diskNames": "[\"" + pvcName + "\"]", - prefix + "/sshNames": sshKey, - } -} - -// CreateCloudInitDataFromSecret creates a cloud-init configmap from a secret -func createCloudInitDataFromSecret(c *k8s.Clientset, vmName string, uid types.UID, secretName, namespace, userData, networkData string) (secret *v1.Secret, err error) { - toCreate := &v1.Secret{ - TypeMeta: k8smetav1.TypeMeta{ - Kind: "Secret", - APIVersion: "v1", - }, - ObjectMeta: k8smetav1.ObjectMeta{ - Name: secretName, - Namespace: namespace, - Labels: map[string]string{ - prefix + "/cloud-init-template": "harvester", - }, - OwnerReferences: []k8smetav1.OwnerReference{ - { - APIVersion: "kubevirt.io/v1", - Kind: "VirtualMachine", - Name: vmName, - UID: uid, - }, - }, - }, - Type: "secret", - Data: map[string][]byte{ - "userdata": []byte(userData), - "networkdata": []byte(networkData), - }, - } - resp, err := c.CoreV1().Secrets(namespace).Create(context.TODO(), toCreate, k8smetav1.CreateOptions{}) - if err != nil { - return nil, errors.Wrap(err, "error during getting cloud-init secret") - } - return resp, nil -} - -func (h *HarVMer) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (resp *pbecs.DeleteEcsResp, err error) { - if req.Namespace == "" { - return nil, errors.New("namespace is required") - } - vm, err := h.harvCli.KubevirtV1().VirtualMachines(req.GetNamespace()).Get(context.TODO(), req.GetInstanceName(), k8smetav1.GetOptions{}) - if err != nil { - return nil, errors.Wrap(err, "VM does not exist") - } - err = h.harvCli.KubevirtV1().VirtualMachines(req.GetNamespace()).Delete(context.TODO(), req.GetInstanceName(), k8smetav1.DeleteOptions{}) - if err != nil { - logrus.Errorf("delete pcm_vm error: %v", err) - return nil, errors.Wrap(err, "VM could not be deleted successfully: %w") - } - //delete pcm_vm disk - if req.DiskName != "" { - for _, delName := range strings.Split(req.DiskName, ",") { - for _, disk := range vm.Spec.Template.Spec.Volumes { - if disk.Name == delName { - ClaimName := disk.VolumeSource.PersistentVolumeClaim.ClaimName - err1 := h.k8sCli.CoreV1().PersistentVolumeClaims(req.GetNamespace()).Delete(context.TODO(), ClaimName, k8smetav1.DeleteOptions{}) - if err1 != nil { - logrus.Errorf("delete pvc failed,err:%v", err1) - return nil, errors.Wrap(err, "VM disk not be deleted successfully") - } - } - } - } - } - return &pbecs.DeleteEcsResp{ - Provider: pbecs.CloudProvider_harvester, - AccountName: h.tenanter.AccountName(), - }, nil -} - -func (h *HarVMer) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (resp *pbecs.UpdateEcsResp, err error) { - //查询删除的vm - vm, err := h.harvCli.KubevirtV1().VirtualMachines(req.GetNamespace()).Get(context.TODO(), req.GetInstanceName(), k8smetav1.GetOptions{}) - if err != nil { - return nil, errors.Wrap(err, "VM does not exist") - } - if req.Cpu != "" && req.Memory != "" { - vm.Spec.Template.Spec.Domain.Resources = kubirtv1.ResourceRequirements{ - Limits: v1.ResourceList{ - "cpu": resource.MustParse(req.Cpu), - "memory": resource.MustParse(req.Memory), - }, - } - } - vm.ObjectMeta.Annotations["field.cattle.io/description"] = req.Description - if req.Cpu != "" { - j, err := strconv.ParseUint(req.Cpu, 10, 32) - if err != nil { - return nil, errors.Wrap(err, "cpu is not a number") - } - vm.Spec.Template.Spec.Domain.CPU = &kubirtv1.CPU{ - Cores: uint32(j), - Sockets: uint32(1), - Threads: uint32(1), - } - } - if req.Memory != "" { - _memory := resource.MustParse(req.Memory) - vm.Spec.Template.Spec.Domain.Memory = &kubirtv1.Memory{ - Guest: &_memory, - } - } - if err != nil { - return nil, errors.Wrap(err, "Harvester client connection failed") - } - //update - _, err = h.harvCli.KubevirtV1().VirtualMachines(req.GetNamespace()).Update(context.TODO(), vm, k8smetav1.UpdateOptions{}) - if err != nil { - return nil, errors.Wrap(err, "VM update failed") - } - if req.IsRestart { - //重启 - err = restartVmByName(h.harvCli, req.GetNamespace(), req.GetInstanceName()) - if err != nil { - return nil, errors.Wrap(err, "VM restart failed") - } - } - return &pbecs.UpdateEcsResp{ - Provider: pbecs.CloudProvider_harvester, - AccountName: h.tenanter.AccountName(), - }, nil -} - -func (h *HarVMer) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (resp *pbecs.ListDetailResp, err error) { - vmList, err := h.harvCli.KubevirtV1().VirtualMachines(req.GetNamespace()).List(context.TODO(), k8smetav1.ListOptions{}) - if err != nil { - return nil, errors.Wrap(err, "VM list failed") - } - vmiList, err := h.harvCli.KubevirtV1().VirtualMachineInstances(req.GetNamespace()).List(context.TODO(), k8smetav1.ListOptions{}) - if err != nil { - return nil, errors.Wrap(err, "VMI list failed") - } - vmiMap := map[string]kubirtv1.VirtualMachineInstance{} - for _, vmi := range vmiList.Items { - vmiMap[vmi.Name] = vmi - } - var ecses = make([]*pbecs.EcsInstance, len(vmList.Items)) - for k, vm := range vmList.Items { - running := *vm.Spec.Running - var state string - if running { - state = "Running" - } else { - state = "Not Running" - } - IP := make([]string, 0) - if vmiMap[vm.Name].Status.Interfaces == nil { - IP = append(IP, "") - } else { - IP = append(IP, vmiMap[vm.Name].Status.Interfaces[0].IP) - } - ecses[k] = &pbecs.EcsInstance{ - Provider: pbecs.CloudProvider_harvester, - AccountName: h.tenanter.AccountName(), - Status: state, - InstanceName: vm.Name, - Node: vmiMap[vm.Name].Status.NodeName, - Cpu: vm.Spec.Template.Spec.Domain.Resources.Limits.Cpu().String(), - Memory: vm.Spec.Template.Spec.Domain.Resources.Limits.Memory().String(), - PublicIps: IP, - CreationTime: vm.CreationTimestamp.String(), - Description: vm.ObjectMeta.Annotations["field.cattle.io/description"], - Namespace: vm.Namespace, - } - } - isFinished := false - if len(ecses) > 0 { - isFinished = true - } - return &pbecs.ListDetailResp{ - Ecses: ecses, - Finished: isFinished, - }, nil -} - -func (h *HarVMer) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) { - status := "" - switch req.GetActionType() { - case pbecs.ActionType_start: - err := startVmByName(h.harvCli, req.GetNamespace(), req.GetVmName()) - if err != nil { - return nil, err - } - status = "Running" - case pbecs.ActionType_stop: - err := stopVmByName(h.harvCli, req.GetNamespace(), req.GetVmName()) - if err != nil { - return nil, err - } - status = "Off" - case pbecs.ActionType_restart: - err := restartVmByName(h.harvCli, req.GetNamespace(), req.GetVmName()) - if err != nil { - return nil, err - } - status = "Running" - } - return &pbecs.ActionResp{ - Provider: pbecs.CloudProvider_harvester, - AccountName: h.tenanter.AccountName(), - Status: status, - }, nil -} - -// startVmByName starts a VM by first issuing a GET using the VM name, then updating the resulting VM object -func startVmByName(c *harvClient.Clientset, namespace, vmName string) error { - vm, err := c.KubevirtV1().VirtualMachines(namespace).Get(context.TODO(), vmName, k8smetav1.GetOptions{}) - if err != nil { - return errors.Wrap(err, "VM not found") - } - *vm.Spec.Running = true - _, err = c.KubevirtV1().VirtualMachines(namespace).Update(context.TODO(), vm, k8smetav1.UpdateOptions{}) - if err != nil { - return errors.Wrap(err, "VM start failed") - } - return nil -} - -// stopVmByName will stop a VM by first finding it by its name and then call stopBMbyRef function -func stopVmByName(c *harvClient.Clientset, namespace, vmName string) error { - vm, err := c.KubevirtV1().VirtualMachines(namespace).Get(context.TODO(), vmName, k8smetav1.GetOptions{}) - if err != nil { - return errors.Wrap(err, "VM not found") - } - *vm.Spec.Running = false - _, err = c.KubevirtV1().VirtualMachines(namespace).Update(context.TODO(), vm, k8smetav1.UpdateOptions{}) - if err != nil { - return errors.Wrap(err, "VM stop failed") - } - return nil -} - -// restartVMbyName will restart a VM by first finding it by its name and then call restartVMbyRef function -func restartVmByName(c *harvClient.Clientset, namespace, vmName string) error { - vm, err := c.KubevirtV1().VirtualMachines(namespace).Get(context.TODO(), vmName, k8smetav1.GetOptions{}) - if err != nil { - return errors.Wrap(err, "VM not found") - } - err = stopVmByName(c, namespace, vm.Name) - if err != nil { - return errors.Wrap(err, "VM stop failed") - } - select { - case <-time.Tick(1 * time.Second): - return startVmByName(c, namespace, vm.Name) - } -} - -func (h *HarVMer) ListEcsImages(ctx context.Context, req *pbecs.ListImagesReq) (resp *pbecs.ListImagesResp, err error) { - //harvester查询默认命名空间 - namespace := "default" - images, err := h.harvCli.HarvesterhciV1beta1().VirtualMachineImages(namespace).List(ctx, k8smetav1.ListOptions{}) - if err != nil { - return nil, err - } - imageList := make([]*pbecs.Image, 0) - for _, im := range images.Items { - image := pbecs.Image{ - Provider: pbecs.CloudProvider(pbtenant.CloudProvider_harvester), - Id: im.Name, - DisplayName: im.Spec.DisplayName, - Namespace: im.Namespace, - } - imageList = append(imageList, &image) - } - - return &pbecs.ListImagesResp{ - Provider: pbecs.CloudProvider(pbtenant.CloudProvider_harvester), - Images: imageList, - }, nil -} diff --git a/adaptor/pcm_vm/service/harvester_util.go b/adaptor/pcm_vm/service/harvester_util.go deleted file mode 100644 index 2883d4361..000000000 --- a/adaptor/pcm_vm/service/harvester_util.go +++ /dev/null @@ -1,444 +0,0 @@ -package service - -import ( - "bytes" - "crypto/x509" - "encoding/json" - "encoding/pem" - "fmt" - harvclient "github.com/harvester/harvester/pkg/generated/clientset/versioned" - "io/ioutil" - k8s "k8s.io/client-go/kubernetes" - "k8s.io/client-go/rest" - "math/rand" - "os" - "path/filepath" - "regexp" - "strings" - "sync" - "time" - - "github.com/docker/docker/pkg/namesgenerator" - "github.com/pkg/errors" - "github.com/rancher/cli/cliclient" - "github.com/rancher/cli/config" - "github.com/rancher/norman/clientbase" - ntypes "github.com/rancher/norman/types" - "github.com/sirupsen/logrus" - "github.com/urfave/cli" - regen "github.com/zach-klippenstein/goregen" - k8sv1 "k8s.io/api/core/v1" -) - -const ( - letters = "abcdefghijklmnopqrstuvwxyz0123456789" - cfgFile = "cli2.json" -) - -var ( - // ManagementResourceTypes lists the types we use the management client for - ManagementResourceTypes = []string{"user", "node", "project"} - // ProjectResourceTypes lists the types we use the user client for - ProjectResourceTypes = []string{"secret", "namespacedSecret", "workload"} - // ClusterResourceTypes lists the types we use the project client for - ClusterResourceTypes = []string{"persistentVolume", "storageClass", "namespace"} - clientMutex = &sync.Mutex{} -) - -type MemberData struct { - Name string - MemberType string - AccessType string -} - -type RoleTemplate struct { - ID string - Name string - Description string -} - -type RoleTemplateBinding struct { - ID string - User string - Role string - Created string -} - -func loadAndVerifyCert(path string) (string, error) { - caCert, err := ioutil.ReadFile(path) - if err != nil { - return "", err - } - return verifyCert(caCert) -} - -func verifyCert(caCert []byte) (string, error) { - // replace the escaped version of the line break - caCert = bytes.Replace(caCert, []byte(`\n`), []byte("\n"), -1) - - block, _ := pem.Decode(caCert) - - if nil == block { - return "", errors.New("No cert was found") - } - - parsedCert, err := x509.ParseCertificate(block.Bytes) - if err != nil { - return "", err - } - - if !parsedCert.IsCA { - return "", errors.New("CACerts is not valid") - } - return string(caCert), nil -} - -func loadConfig(ctx *cli.Context) (config.Config, error) { - // path will always be set by the global flag default - path := ctx.GlobalString("config") - path = filepath.Join(path, cfgFile) - - cf := config.Config{ - Path: path, - Servers: make(map[string]*config.ServerConfig), - } - - content, err := ioutil.ReadFile(path) - if os.IsNotExist(err) { - return cf, nil - } else if err != nil { - return cf, err - } - - err = json.Unmarshal(content, &cf) - cf.Path = path - - return cf, err -} - -func lookupConfig(ctx *cli.Context) (*config.ServerConfig, error) { - cf, err := loadConfig(ctx) - if err != nil { - return nil, err - } - - cs := cf.FocusedServer() - if cs == nil { - return nil, errors.New("no configuration found, run `login`") - } - - return cs, nil -} - -func GetClient(ctx *cli.Context) (*cliclient.MasterClient, error) { - cf, err := lookupConfig(ctx) - if err != nil { - return nil, err - } - - mc, err := cliclient.NewMasterClient(cf) - if err != nil { - return nil, err - } - - return mc, nil -} - -// GetResourceType maps an incoming resource type to a valid one from the schema -func GetResourceType(c *cliclient.MasterClient, resource string) (string, error) { - if c.ManagementClient != nil { - for key := range c.ManagementClient.APIBaseClient.Types { - if strings.EqualFold(key, resource) { - return key, nil - } - } - } - if c.ProjectClient != nil { - for key := range c.ProjectClient.APIBaseClient.Types { - if strings.EqualFold(key, resource) { - return key, nil - } - } - } - if c.ClusterClient != nil { - for key := range c.ClusterClient.APIBaseClient.Types { - if strings.EqualFold(key, resource) { - return key, nil - } - } - } - return "", fmt.Errorf("unknown resource type: %s", resource) -} - -func Lookup(c *cliclient.MasterClient, name string, types ...string) (*ntypes.Resource, error) { - var byName *ntypes.Resource - - for _, schemaType := range types { - rt, err := GetResourceType(c, schemaType) - if err != nil { - logrus.Debugf("Error GetResourceType: %v", err) - return nil, err - } - var schemaClient clientbase.APIBaseClientInterface - // the schemaType dictates which client we need to use - if c.ManagementClient != nil { - if _, ok := c.ManagementClient.APIBaseClient.Types[rt]; ok { - schemaClient = c.ManagementClient - } - } - if c.ProjectClient != nil { - if _, ok := c.ProjectClient.APIBaseClient.Types[rt]; ok { - schemaClient = c.ProjectClient - } - } - if c.ClusterClient != nil { - if _, ok := c.ClusterClient.APIBaseClient.Types[rt]; ok { - schemaClient = c.ClusterClient - } - } - - // Attempt to get the resource by ID - var resource ntypes.Resource - - if err := schemaClient.ByID(schemaType, name, &resource); !clientbase.IsNotFound(err) && err != nil { - logrus.Debugf("Error schemaClient.ByID: %v", err) - return nil, err - } else if err == nil && resource.ID == name { - return &resource, nil - } - - // Resource was not found assuming the ID, check if it's the name of a resource - var collection ntypes.ResourceCollection - - listOpts := &ntypes.ListOpts{ - Filters: map[string]interface{}{ - "name": name, - "removed_null": 1, - }, - } - - if err := schemaClient.List(schemaType, listOpts, &collection); !clientbase.IsNotFound(err) && err != nil { - logrus.Debugf("Error schemaClient.List: %v", err) - return nil, err - } - - if len(collection.Data) > 1 { - ids := []string{} - for _, data := range collection.Data { - ids = append(ids, data.ID) - } - return nil, fmt.Errorf("multiple resources of type %s found for name %s: %v", schemaType, name, ids) - } - - // No matches for this schemaType, try the next one - if len(collection.Data) == 0 { - continue - } - - if byName != nil { - return nil, fmt.Errorf("multiple resources named %s: %s:%s, %s:%s", name, collection.Data[0].Type, - collection.Data[0].ID, byName.Type, byName.ID) - } - - byName = &collection.Data[0] - - } - - if byName == nil { - return nil, fmt.Errorf("not found: %s", name) - } - - return byName, nil -} - -func RandomName() string { - return strings.Replace(namesgenerator.GetRandomName(0), "_", "-", -1) -} - -// RandomLetters returns a string with random letters of length n -func RandomLetters(n int) string { - rand.Seed(time.Now().UnixNano()) - b := make([]byte, n) - for i := range b { - b[i] = letters[rand.Intn(len(letters))] - } - return string(b) -} - -func appendTabDelim(buf *bytes.Buffer, value string) { - if buf.Len() == 0 { - buf.WriteString(value) - } else { - buf.WriteString("\t") - buf.WriteString(value) - } -} - -func SimpleFormat(values [][]string) (string, string) { - headerBuffer := bytes.Buffer{} - valueBuffer := bytes.Buffer{} - for _, v := range values { - appendTabDelim(&headerBuffer, v[0]) - if strings.Contains(v[1], "{{") { - appendTabDelim(&valueBuffer, v[1]) - } else { - appendTabDelim(&valueBuffer, "{{."+v[1]+"}}") - } - } - - headerBuffer.WriteString("\n") - valueBuffer.WriteString("\n") - - return headerBuffer.String(), valueBuffer.String() -} - -func defaultAction(fn func(ctx *cli.Context) error) func(ctx *cli.Context) error { - return func(ctx *cli.Context) error { - if ctx.Bool("help") { - err := cli.ShowAppHelp(ctx) - if err != nil { - logrus.Info("Issue encountered during executing help command") - } - return nil - } - return fn(ctx) - } -} - -func SplitOnColon(s string) []string { - return strings.Split(s, ":") -} - -func parseClusterAndProjectID(id string) (string, string, error) { - // Validate id - // Examples: - // c-qmpbm:p-mm62v - // c-qmpbm:project-mm62v - // See https://github.com/rancher/rancher/issues/14400 - if match, _ := regexp.MatchString("((local)|(c-[[:alnum:]]{5})):(p|project)-[[:alnum:]]{5}", id); match { - parts := SplitOnColon(id) - return parts[0], parts[1], nil - } - return "", "", fmt.Errorf("unable to extract clusterid and projectid from [%s]", id) -} - -// getClusterNames maps user ID to name and defaults to ID if name is blank -func getClusterNames(ctx *cli.Context, c *cliclient.MasterClient) (map[string]string, error) { - clusterNames := make(map[string]string) - clusterCollection, err := c.ManagementClient.Cluster.List(defaultListOpts(ctx)) - if err != nil { - return clusterNames, err - } - - for _, cluster := range clusterCollection.Data { - if cluster.Name == "" { - clusterNames[cluster.ID] = cluster.ID - } else { - clusterNames[cluster.ID] = cluster.Name - } - } - return clusterNames, nil -} - -func baseListOpts() *ntypes.ListOpts { - return &ntypes.ListOpts{ - Filters: map[string]interface{}{ - "limit": -1, - "all": true, - }, - } -} - -func defaultListOpts(ctx *cli.Context) *ntypes.ListOpts { - listOpts := baseListOpts() - if ctx != nil && !ctx.Bool("all") { - listOpts.Filters["removed_null"] = "1" - listOpts.Filters["state_ne"] = []string{ - "inactive", - "stopped", - "removing", - } - delete(listOpts.Filters, "all") - } - if ctx != nil && ctx.Bool("system") { - delete(listOpts.Filters, "system") - } else { - listOpts.Filters["system"] = "false" - } - return listOpts -} - -// NewTrue returns a pointer to true -func NewTrue() *bool { - b := true - return &b -} - -// RandomID returns a random string used as an ID internally in Harvester. -func RandomID() string { - res, err := regen.Generate("[a-z]{3}[0-9][a-z]") - if err != nil { - fmt.Println("Random function was not successful!") - return "" - } - return res -} - -// GetHarvesterClient creates a Client for Harvester from Config input -func GetHarvesterClient(host string, token string) (*harvclient.Clientset, error) { - clientConfig := &rest.Config{ - Host: host, - BearerToken: token, - TLSClientConfig: rest.TLSClientConfig{ - Insecure: true, - }, - } - clientConfig.Host = host - clientMutex.Lock() - forConfig, err := harvclient.NewForConfig(clientConfig) - clientMutex.Unlock() - if err != nil { - return nil, err - } - return forConfig, nil -} - -// GetKubernetesClient creates a Client for Kubernetes from Config input -func GetKubernetesClient(host string, token string) (*k8s.Clientset, error) { - clientConfig := &rest.Config{ - Host: fmt.Sprintf("%s:%d", host, 6443), - BearerToken: token, - TLSClientConfig: rest.TLSClientConfig{ - Insecure: true, - }, - } - - clientConfig.Host = host - clientMutex.Lock() - k8sCli, err := k8s.NewForConfig(clientConfig) - clientMutex.Unlock() - if err != nil { - return nil, err - } - return k8sCli, nil -} - -func MustPVCTemplatesToString(pvcs []k8sv1.PersistentVolumeClaim) string { - result, err := PVCTemplatesToString(pvcs) - if err != nil { - panic(err) - } - return result -} - -func PVCTemplatesToString(pvcs []k8sv1.PersistentVolumeClaim) (string, error) { - b, err := json.Marshal(pvcs) - if err != nil { - return "", err - } - return string(b), nil -} - -func PointerToUint(i uint) *uint { - return &i -} diff --git a/adaptor/pcm_vm/service/huawei.go b/adaptor/pcm_vm/service/huawei.go deleted file mode 100644 index 65fdb30fc..000000000 --- a/adaptor/pcm_vm/service/huawei.go +++ /dev/null @@ -1,270 +0,0 @@ -package service - -import ( - pbecs "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/gen/idl" - "context" - "strconv" - - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - string_ "github.com/alibabacloud-go/darabonba-string/client" - util "github.com/alibabacloud-go/tea-utils/service" - "github.com/alibabacloud-go/tea/tea" - "github.com/golang/glog" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - hwecs "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ecs/v2" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ecs/v2/model" - hwregion "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ecs/v2/region" - hwiam "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/iam/v3" - iammodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/iam/v3/model" - iamregion "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/iam/v3/region" - "github.com/pkg/errors" -) - -type HuaweiEcs struct { - cli *hwecs.EcsClient - region tenanter.Region - tenanter tenanter.Tenanter -} - -func newHuaweiEcsClient(region tenanter.Region, tenant tenanter.Tenanter) (Ecser, error) { - var ( - client *hwecs.EcsClient - err error - ) - - switch t := tenant.(type) { - case *tenanter.AccessKeyTenant: - auth := basic.NewCredentialsBuilder().WithAk(t.GetId()).WithSk(t.GetSecret()).Build() - rName := region.GetName() - cli := hwiam.IamClientBuilder().WithRegion(iamregion.ValueOf(rName)).WithCredential(auth).Build() - c := hwiam.NewIamClient(cli) - request := new(iammodel.KeystoneListProjectsRequest) - request.Name = &rName - r, err := c.KeystoneListProjects(request) - if err != nil || len(*r.Projects) == 0 { - return nil, errors.Wrapf(err, "Huawei KeystoneListProjects regionName %s", rName) - } - projectId := (*r.Projects)[0].Id - - auth = basic.NewCredentialsBuilder().WithAk(t.GetId()).WithSk(t.GetSecret()).WithProjectId(projectId).Build() - hcClient := hwecs.EcsClientBuilder().WithRegion(hwregion.ValueOf(rName)).WithCredential(auth).Build() - client = hwecs.NewEcsClient(hcClient) - default: - } - - if err != nil { - return nil, errors.Wrap(err, "init huawei ecs client error") - } - return &HuaweiEcs{ - cli: client, - region: region, - tenanter: tenant, - }, nil -} - -func (ecs *HuaweiEcs) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error) { - subnetIds := string_.Split(&req.SubnetId, tea.String(","), tea.Int(-1)) - Nics := make([]model.PrePaidServerNic, 0) - for _, nic := range subnetIds { - Nics = append(Nics, model.PrePaidServerNic{ - SubnetId: *nic, - }) - } - Volumetype := &model.PrePaidServerRootVolume{} - switch req.SystemDisk.Category { - case "SATA": - Volumetype.Volumetype = model.GetPrePaidServerRootVolumeVolumetypeEnum().SATA - case "SAS": - Volumetype.Volumetype = model.GetPrePaidServerRootVolumeVolumetypeEnum().SAS - case "SSD": - Volumetype.Volumetype = model.GetPrePaidServerRootVolumeVolumetypeEnum().SSD - case "GPSSD": - Volumetype.Volumetype = model.GetPrePaidServerRootVolumeVolumetypeEnum().GPSSD - case "co-p1": - Volumetype.Volumetype = model.GetPrePaidServerRootVolumeVolumetypeEnum().CO_P1 - case "uh-l1": - Volumetype.Volumetype = model.GetPrePaidServerRootVolumeVolumetypeEnum().UH_L1 - case "ESSD": - Volumetype.Volumetype = model.GetPrePaidServerRootVolumeVolumetypeEnum().ESSD - } - - PrePaidServerExtendParam := &model.PrePaidServerExtendParam{} - prePaid := model.GetPrePaidServerExtendParamChargingModeEnum().PRE_PAID - if req.InstanceChargeType == "PrePaid" { - PrePaidServerExtendParam.ChargingMode = &prePaid - } - request := &model.CreateServersRequest{ - Body: &model.CreateServersRequestBody{ - DryRun: util.EqualString(&req.DryRun, tea.String("true")), - Server: &model.PrePaidServer{ - ImageRef: req.GetImageId(), - FlavorRef: req.InstanceType, - Name: req.InstanceName, - Vpcid: req.VpcId, - Nics: Nics, - RootVolume: Volumetype, - Count: &req.Amount, - Extendparam: PrePaidServerExtendParam, - }, - }} - resp, err := ecs.cli.CreateServers(request) - if err != nil { - return nil, errors.Wrap(err, "Huawei create ecs error") - } - glog.Infof("--------------------华为ECS实例创建成功--------------------") - glog.Infof(resp.String()) - isFinished := false - if len(*resp.ServerIds) > 0 { - isFinished = true - } - //订单ID。该参数只有创建包年包月ECS实例(请求参数InstanceChargeType=PrePaid)时有返回值。 - OrderId := "" - if req.InstanceChargeType == "PrePaid" { - OrderId = *resp.OrderId - } - InstanceIds := make([]string, 0) - for _, v := range *resp.ServerIds { - InstanceIds = append(InstanceIds, v) - } - return &pbecs.CreateEcsResp{ - OrderId: OrderId, - RequestId: "Huawei ECS RequestId: " + *resp.JobId, - InstanceIdSets: InstanceIds, - Finished: isFinished, - }, nil -} - -func (ecs *HuaweiEcs) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (*pbecs.DeleteEcsResp, error) { - if req.GetInstanceIds() == "" { - return nil, errors.New("InstanceId is empty") - } - deleteReq := &model.DeleteServersRequest{} - InstanceIds := string_.Split(&req.InstanceIds, tea.String(","), tea.Int(-1)) - Servers := make([]model.ServerId, 0) - for _, v := range InstanceIds { - Servers = append(Servers, model.ServerId{ - Id: *v, - }) - } - deleteReq.Body = &model.DeleteServersRequestBody{ - DeletePublicip: util.EqualString(&req.DeletePublicip, tea.String("true")), - DeleteVolume: util.EqualString(&req.DeleteVolume, tea.String("true")), - Servers: Servers, - } - resp, err := ecs.cli.DeleteServers(deleteReq) - if err != nil { - return nil, errors.Wrap(err, "Huawei Delete ECS error") - } - glog.Infof("--------------------华为ECS实例删除成功--------------------") - glog.Infof(resp.String()) - return &pbecs.DeleteEcsResp{ - RequestId: *resp.JobId, - }, nil -} - -func (ecs *HuaweiEcs) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (*pbecs.UpdateEcsResp, error) { - HostName := req.GetHostName() - InstanceName := req.GetInstanceName() - Description := req.GetDescription() - UpdateReq := &model.UpdateServerRequest{} - if req.GetInstanceIds() == "" { - return nil, errors.New("InstanceId is empty") - } - Server := &model.UpdateServerOption{} - UpdateReq.ServerId = req.GetInstanceIds() - if HostName != "" { - Server.Hostname = &HostName - } - if InstanceName != "" { - Server.Name = &InstanceName - } - if Description != "" { - Server.Description = &Description - } - UpdateReq.Body = &model.UpdateServerRequestBody{ - Server: Server, - } - resp, err := ecs.cli.UpdateServer(UpdateReq) - if err != nil { - return nil, errors.Wrap(err, "Huawei Update ECS error") - } - glog.Infof("--------------------华为ECS实例修改成功--------------------") - glog.Infof(resp.String()) - return &pbecs.UpdateEcsResp{ - RequestId: resp.Server.Id, - }, nil -} - -func (ecs *HuaweiEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error) { - request := new(model.ListServersDetailsRequest) - offset := (req.PageNumber - 1) * req.PageSize - request.Offset = &offset - limit := req.PageSize - request.Limit = &limit - - resp, err := ecs.cli.ListServersDetails(request) - if err != nil { - return nil, errors.Wrap(err, "Huawei ListDetail error") - } - - servers := *resp.Servers - var ecses = make([]*pbecs.EcsInstance, len(servers)) - for k, v := range servers { - vCpu, err := strconv.ParseInt(v.Flavor.Vcpus, 10, 32) - vMemory, err := strconv.ParseInt(v.Flavor.Vcpus, 10, 32) - if err != nil { - return nil, errors.Wrap(err, "Huawei ListDetail error") - } - PublicIps := make([]string, 0) - InnerIps := make([]string, 0) - for s := range v.Addresses { - for _, a := range v.Addresses[s] { - // 判断是内网ip还是公网ip - if *a.OSEXTIPStype == model.GetServerAddressOSEXTIPStypeEnum().FIXED { - InnerIps = append(InnerIps, a.Addr) - } else { - PublicIps = append(PublicIps, a.Addr) - } - } - } - ecses[k] = &pbecs.EcsInstance{ - Provider: pbecs.CloudProvider_huawei, - AccountName: ecs.tenanter.AccountName(), - InstanceId: v.Id, - InstanceName: v.Name, - RegionName: ecs.region.GetName(), - InstanceType: v.Flavor.Name, - PublicIps: PublicIps, - InnerIps: InnerIps, - Cpu: strconv.FormatInt(vCpu, 10), - Memory: strconv.FormatInt(vMemory, 10), - Description: *v.Description, - Status: v.Status, - CreationTime: v.Created, - ExpireTime: v.OSSRVUSGterminatedAt, - InstanceChargeType: v.Metadata["charging_mode"], - } - } - - isFinished := false - if len(ecses) < int(req.PageSize) { - isFinished = true - } - - return &pbecs.ListDetailResp{ - Ecses: ecses, - Finished: isFinished, - NextToken: "", - PageNumber: req.PageNumber + 1, - PageSize: req.PageSize, - RequestId: "", - }, nil -} - -func (ecs *HuaweiEcs) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) { - return nil, nil -} - -func (ecs *HuaweiEcs) ListEcsImages(ctx context.Context, req *pbecs.ListImagesReq) (resp *pbecs.ListImagesResp, err error) { - return nil, nil -} diff --git a/adaptor/pcm_vm/service/main_test.go b/adaptor/pcm_vm/service/main_test.go deleted file mode 100644 index 02f5ccf9d..000000000 --- a/adaptor/pcm_vm/service/main_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package service - -import ( - pbecs "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/gen/idl" - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl" - "os" - "testing" -) - -var ( - aliTenant, tcTenant, hwTenant, awsTenant []tenanter.Tenanter -) - -func TestMain(m *testing.M) { - err := tenanter.LoadCloudConfigs("../../../tenanter.yaml") - if err != nil { - panic(err) - } - if aliTenant, err = tenanter.GetTenanters(pbtenant.CloudProvider(pbecs.CloudProvider_ali)); err != nil { - panic("get aliTenant failed") - } - if tcTenant, err = tenanter.GetTenanters(pbtenant.CloudProvider(pbecs.CloudProvider_tencent)); err != nil { - panic("get tcTenant failed") - } - if hwTenant, err = tenanter.GetTenanters(pbtenant.CloudProvider(pbecs.CloudProvider_huawei)); err != nil { - panic("get hwTenant failed") - } - os.Exit(m.Run()) -} diff --git a/adaptor/pcm_vm/service/tencent.go b/adaptor/pcm_vm/service/tencent.go deleted file mode 100644 index 498316d36..000000000 --- a/adaptor/pcm_vm/service/tencent.go +++ /dev/null @@ -1,194 +0,0 @@ -package service - -import ( - pbecs "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/gen/idl" - "context" - "strconv" - - "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" - string_ "github.com/alibabacloud-go/darabonba-string/client" - util "github.com/alibabacloud-go/tea-utils/service" - "github.com/alibabacloud-go/tea/tea" - "github.com/golang/glog" - "github.com/pkg/errors" - "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" - "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" - cvm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312" -) - -type TencentCvm struct { - cli *cvm.Client - region tenanter.Region - tenanter tenanter.Tenanter -} - -func newTencentCvmClient(region tenanter.Region, tenant tenanter.Tenanter) (Ecser, error) { - var ( - client *cvm.Client - err error - ) - - switch t := tenant.(type) { - case *tenanter.AccessKeyTenant: - client, err = cvm.NewClient(common.NewCredential(t.GetId(), t.GetSecret()), region.GetName(), profile.NewClientProfile()) - default: - } - - if err != nil { - return nil, errors.Wrap(err, "init tencent cvm client error") - } - return &TencentCvm{ - cli: client, - region: region, - tenanter: tenant, - }, nil -} - -func (ecs *TencentCvm) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error) { - ImageId := req.GetImageId() - InstanceType := req.GetInstanceType() - InstanceName := req.GetInstanceName() - Amount := int64(req.GetAmount()) - DryRun := req.GetDryRun() - InstanceChargeType := req.GetInstanceChargeType() - ZoneId := req.GetZoneId() - request := cvm.NewRunInstancesRequest() - request.ImageId = &ImageId - request.InstanceType = &InstanceType - request.InstanceName = &InstanceName - request.DryRun = util.EqualString(&DryRun, tea.String("true")) - request.InstanceChargeType = &InstanceChargeType - request.InstanceCount = &Amount - request.Placement = &cvm.Placement{ - Zone: &ZoneId, - } - resp, err := ecs.cli.RunInstances(request) - if err != nil { - return nil, errors.Wrap(err, "Tencent Create ECS error") - } - InstanceIds := make([]string, 0) - for _, v := range resp.Response.InstanceIdSet { - InstanceIds = append(InstanceIds, *v) - } - isFinished := false - if len(resp.Response.InstanceIdSet) > 0 { - isFinished = true - } - glog.Infof("--------------------腾讯ECS实例创建成功--------------------") - glog.Infof(*util.ToJSONString(util.ToMap(resp))) - return &pbecs.CreateEcsResp{ - RequestId: "Tencent ECS RequestId: " + *resp.Response.RequestId, - InstanceIdSets: InstanceIds, - Finished: isFinished, - }, nil -} - -func (ecs *TencentCvm) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (*pbecs.DeleteEcsResp, error) { - idStr := req.GetInstanceIds() - InstanceIds := string_.Split(&idStr, tea.String(","), tea.Int(-1)) - //腾讯云支持批量操作,每次请求批量实例的上限为100 - if len(InstanceIds) > 100 { - return nil, errors.New("Tencent Delete ECS error InstanceIds > 100") - } - deleteReq := cvm.NewTerminateInstancesRequest() - deleteReq.InstanceIds = InstanceIds - resp, err := ecs.cli.TerminateInstances(deleteReq) - if err != nil { - return nil, errors.Wrap(err, "Tencent Delete ECS error") - } - glog.Infof("--------------------腾讯ECS实例释放成功--------------------") - glog.Infof(*util.ToJSONString(util.ToMap(resp))) - return &pbecs.DeleteEcsResp{ - Provider: req.Provider, - RequestId: *resp.Response.RequestId, - AccountName: req.AccountName, - RegionId: req.RegionId, - }, nil -} - -func (ecs *TencentCvm) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (*pbecs.UpdateEcsResp, error) { - InstanceName := req.GetInstanceName() - InstanceId := req.GetInstanceIds() - UpdateReq := cvm.NewModifyInstancesAttributeRequest() - if req.GetInstanceIds() == "" { - return nil, errors.New("InstanceId is empty") - } - UpdateReq.InstanceIds = string_.Split(&InstanceId, tea.String(","), tea.Int(-1)) - if InstanceName != "" { - UpdateReq.InstanceName = &InstanceName - } - resp, err := ecs.cli.ModifyInstancesAttribute(UpdateReq) - if err != nil { - return nil, errors.Wrap(err, "Tencent Update ECS error") - } - glog.Infof("--------------------腾讯ECS实例修改成功--------------------") - glog.Infof(*util.ToJSONString(util.ToMap(resp))) - return &pbecs.UpdateEcsResp{ - RequestId: *resp.Response.RequestId, - }, nil -} - -func (ecs *TencentCvm) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error) { - request := cvm.NewDescribeInstancesRequest() - request.Offset = common.Int64Ptr(int64((req.PageNumber - 1) * req.PageSize)) - request.Limit = common.Int64Ptr(int64(req.PageSize)) - resp, err := ecs.cli.DescribeInstances(request) - if err != nil { - return nil, errors.Wrap(err, "Tencent ListDetail error") - } - - var ecses = make([]*pbecs.EcsInstance, len(resp.Response.InstanceSet)) - for k, v := range resp.Response.InstanceSet { - ExpiredTime := "" - if v.ExpiredTime != nil { - ExpiredTime = *v.ExpiredTime - } - ecses[k] = &pbecs.EcsInstance{ - Provider: pbecs.CloudProvider_tencent, - AccountName: ecs.tenanter.AccountName(), - InstanceId: *v.InstanceId, - InstanceName: *v.InstanceName, - RegionName: ecs.region.GetName(), - PublicIps: make([]string, len(v.PublicIpAddresses)), - InstanceType: *v.InstanceType, - Cpu: strconv.FormatInt(*v.CPU, 10), - Memory: strconv.FormatInt(*v.Memory, 10), - Description: "", - Status: *v.InstanceState, - CreationTime: *v.CreatedTime, - ExpireTime: ExpiredTime, - InnerIps: make([]string, len(v.PrivateIpAddresses)), - VpcId: *v.VirtualPrivateCloud.VpcId, - ResourceGroupId: "", - InstanceChargeType: *v.InstanceChargeType, - } - for k1, v1 := range v.PublicIpAddresses { - ecses[k].PublicIps[k1] = *v1 - } - for k1, v1 := range v.PrivateIpAddresses { - ecses[k].InnerIps[k1] = *v1 - } - } - - isFinished := false - if len(ecses) < int(req.PageSize) { - isFinished = true - } - - return &pbecs.ListDetailResp{ - Ecses: ecses, - Finished: isFinished, - NextToken: "", - PageNumber: req.PageNumber + 1, - PageSize: req.PageSize, - RequestId: *resp.Response.RequestId, - }, nil -} - -func (ecs *TencentCvm) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) { - return nil, nil -} - -func (ecs *TencentCvm) ListEcsImages(ctx context.Context, req *pbecs.ListImagesReq) (resp *pbecs.ListImagesResp, err error) { - return nil, nil -} diff --git a/adaptor/slurm/slurmCore/api/etc/slurmcore-api.yaml b/adaptor/slurm/slurmCore/api/etc/slurmcore-api.yaml new file mode 100644 index 000000000..bbcc5838a --- /dev/null +++ b/adaptor/slurm/slurmCore/api/etc/slurmcore-api.yaml @@ -0,0 +1,15 @@ +Name: slurmcore-api +Host: 0.0.0.0 +Port: 8899 + +#rpc +ShuguangRpcConf: + Endpoints: + - 127.0.0.1:2001 + NonBlock: true + +#rpc +TianheRpcConf: + Endpoints: + - 127.0.0.1:2002 + NonBlock: true \ No newline at end of file diff --git a/adaptor/slurm/slurmCore/api/internal/config/config.go b/adaptor/slurm/slurmCore/api/internal/config/config.go new file mode 100644 index 000000000..b014955bf --- /dev/null +++ b/adaptor/slurm/slurmCore/api/internal/config/config.go @@ -0,0 +1,13 @@ +package config + +import ( + "github.com/zeromicro/go-zero/rest" + "github.com/zeromicro/go-zero/zrpc" +) + +type Config struct { + rest.RestConf + + ShuguangRpcConf zrpc.RpcClientConf + TianheRpcConf zrpc.RpcClientConf +} diff --git a/adaptor/slurm/slurmCore/api/internal/handler/listhistoryjobhandler.go b/adaptor/slurm/slurmCore/api/internal/handler/listhistoryjobhandler.go new file mode 100644 index 000000000..e10217a2a --- /dev/null +++ b/adaptor/slurm/slurmCore/api/internal/handler/listhistoryjobhandler.go @@ -0,0 +1,28 @@ +package handler + +import ( + "net/http" + + "PCM/adaptor/slurm/slurmCore/api/internal/logic" + "PCM/adaptor/slurm/slurmCore/api/internal/svc" + "PCM/adaptor/slurm/slurmCore/api/internal/types" + "github.com/zeromicro/go-zero/rest/httpx" +) + +func listHistoryJobHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + var req types.ListHistoryJobReq + if err := httpx.Parse(r, &req); err != nil { + httpx.ErrorCtx(r.Context(), w, err) + return + } + + l := logic.NewListHistoryJobLogic(r.Context(), svcCtx) + resp, err := l.ListHistoryJob(&req) + if err != nil { + httpx.ErrorCtx(r.Context(), w, err) + } else { + httpx.OkJsonCtx(r.Context(), w, resp) + } + } +} diff --git a/adaptor/slurm/slurmCore/api/internal/handler/routes.go b/adaptor/slurm/slurmCore/api/internal/handler/routes.go new file mode 100644 index 000000000..2baab76f6 --- /dev/null +++ b/adaptor/slurm/slurmCore/api/internal/handler/routes.go @@ -0,0 +1,22 @@ +// Code generated by goctl. DO NOT EDIT. +package handler + +import ( + "net/http" + + "PCM/adaptor/slurm/slurmCore/api/internal/svc" + + "github.com/zeromicro/go-zero/rest" +) + +func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { + server.AddRoutes( + []rest.Route{ + { + Method: http.MethodGet, + Path: "/listHistoryJob", + Handler: listHistoryJobHandler(serverCtx), + }, + }, + ) +} diff --git a/adaptor/slurm/slurmCore/api/internal/logic/listhistoryjoblogic.go b/adaptor/slurm/slurmCore/api/internal/logic/listhistoryjoblogic.go new file mode 100644 index 000000000..bada1621e --- /dev/null +++ b/adaptor/slurm/slurmCore/api/internal/logic/listhistoryjoblogic.go @@ -0,0 +1,59 @@ +package logic + +import ( + "PCM/adaptor/slurm/slurmTianhe/rpc/slurmTianhe" + "PCM/common/tool" + "PCM/common/xerr" + "context" + "github.com/jinzhu/copier" + "github.com/pkg/errors" + + "PCM/adaptor/slurm/slurmCore/api/internal/svc" + "PCM/adaptor/slurm/slurmCore/api/internal/types" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ListHistoryJobLogic struct { + logx.Logger + ctx context.Context + svcCtx *svc.ServiceContext +} + +func NewListHistoryJobLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListHistoryJobLogic { + return &ListHistoryJobLogic{ + Logger: logx.WithContext(ctx), + ctx: ctx, + svcCtx: svcCtx, + } +} + +func (l *ListHistoryJobLogic) ListHistoryJob(req *types.ListHistoryJobReq) (resp *types.ListHistoryJobResp, err error) { + + //shuguangReq := &slurmShuguang.ListHistoryJobReq{} + //err = copier.CopyWithOption(shuguangReq, req, copier.Option{Converters: tool.Converters}) + //listHistoryJobResp, err := l.svcCtx.ShuguangRpc.ListHistoryJob(l.ctx, shuguangReq) + + tianheReq := &slurmTianhe.ListHistoryJobReq{} + err = copier.CopyWithOption(tianheReq, req, copier.Option{Converters: tool.Converters}) + listHistoryJobResp, err := l.svcCtx.TianheRpc.ListHistoryJob(l.ctx, tianheReq) + + if err != nil { + return nil, errors.Wrapf(xerr.NewErrMsg("Failed to get db job list"), "Failed to get db job list err : %v ,req:%+v", err, req) + } + resp = &types.ListHistoryJobResp{} + for i := 0; i < len(listHistoryJobResp.HistoryJobs); i++ { + historyJob := types.HistoryJob{} + resp.HistoryJobs = append(resp.HistoryJobs, historyJob) + } + + err = copier.CopyWithOption(&resp, &listHistoryJobResp, copier.Option{Converters: tool.Converters}) + if err != nil { + return nil, err + } + for i := range resp.HistoryJobs { + resp.HistoryJobs[i].SlurmVersion = "tianhe" + } + + return resp, nil +} diff --git a/adaptor/slurm/slurmCore/api/internal/svc/serviceContext.go b/adaptor/slurm/slurmCore/api/internal/svc/serviceContext.go new file mode 100644 index 000000000..675bff84b --- /dev/null +++ b/adaptor/slurm/slurmCore/api/internal/svc/serviceContext.go @@ -0,0 +1,24 @@ +package svc + +import ( + "PCM/adaptor/slurm/slurmCore/api/internal/config" + "PCM/adaptor/slurm/slurmShuguang/rpc/slurmshuguangclient" + "PCM/adaptor/slurm/slurmTianhe/rpc/slurmtianheclient" + "github.com/zeromicro/go-zero/zrpc" +) + +type ServiceContext struct { + Config config.Config + + ShuguangRpc slurmshuguangclient.SlurmShuguang + TianheRpc slurmtianheclient.SlurmTianhe +} + +func NewServiceContext(c config.Config) *ServiceContext { + return &ServiceContext{ + Config: c, + + ShuguangRpc: slurmshuguangclient.NewSlurmShuguang(zrpc.MustNewClient(c.ShuguangRpcConf)), + TianheRpc: slurmtianheclient.NewSlurmTianhe(zrpc.MustNewClient(c.TianheRpcConf)), + } +} diff --git a/adaptor/slurm/slurmCore/api/internal/types/types.go b/adaptor/slurm/slurmCore/api/internal/types/types.go new file mode 100644 index 000000000..83991f3ed --- /dev/null +++ b/adaptor/slurm/slurmCore/api/internal/types/types.go @@ -0,0 +1,82 @@ +// Code generated by goctl. DO NOT EDIT. +package types + +type Domain struct { + DomainName string `json:"domainName"` + SoftStack string `json:"softStack"` + SlurmNum int32 `json:"slurmNum"` + InterfaceCount int32 `json:"interfaceCount"` + RunningJobs int32 `json:"runningJobs"` +} + +type DomainSummary struct { + DomainCount int32 `json:"domainCount"` + SoftStackCount int32 `json:"softStackCount"` +} + +type HistoryJob struct { + SlurmVersion string `json:"slurmVersion"` + AllocCPU uint32 `json:"allocCPU"` + AllocNodes uint32 `json:"allocNodes"` //Nodect 分配的节点数 in shuguang + Account string `json:"account"` + AssocId uint32 `json:"assocId"` + BlockId string `json:"blockId"` + Cluster string `json:"cluster"` + DerivedEc uint32 `json:"derivedEc"` + DerivedEs string `json:"derivedEs"` + Elapsed uint32 `json:"elapsed"` + Eligible int64 `json:"eligible"` + End int64 `json:"end"` //JobEndTime 作业结束时间 in shuguang + ExitCode uint32 `json:"exitCode"` //JobExitStatus 作业退出码 in shuguang + Gid uint32 `json:"gid"` + JobId uint32 `json:"jobId"` //JobId in shuguang + JobName string `json:"jobName"` //JobName in shuguang + Lft uint32 `json:"lft"` + Partition string `json:"partition"` //Queue 队列名 in shuguang + Nodes string `json:"nodes"` //JobExecHost 作业执行节点 in shuguang + Priority uint32 `json:"priority"` + Qosid uint32 `json:"qosid"` + ReqCpus uint32 `json:"reqCpus"` + ReqMem uint32 `json:"reqMem"` + Requid uint32 `json:"requid"` + Resvid uint32 `json:"resvid"` + ShowFull uint32 `json:"showFull"` + Start int64 `json:"start"` //JobStartTime 作业启动时间 in shuguang + State uint32 `json:"state"` //JobState 作业状态 in shuguang + Submit int64 `json:"submit"` + Suspended uint32 `json:"suspended"` + SysCpuSec uint32 `json:"sysCpuSec"` + SysCpuUsec uint32 `json:"sysCpuUsec"` + Timelimit uint32 `json:"timelimit"` + TotCpuSec uint32 `json:"totCpuSec"` + TotCpuUsec uint32 `json:"totCpuUsec"` + TrackSteps uint32 `json:"trackSteps"` + Uid uint32 `json:"uid"` + User string `json:"user"` //UserName 用户名 in shuguang + UserCpuSec uint32 `json:"userCpuSec"` + UserCpuUsec uint32 `json:"userCpuUsec"` + Wckey string `json:"wckey"` + Wckeyid uint32 `json:"wckeyid"` + WorkDir string `json:"workDir"` //Workdir 工作空间 in shuguang + AcctTime string `json:"acctTime"` // 记账时间 + AppType string `json:"appType"` // 作业应用类型 + JobQueueTime string `json:"jobQueueTime"` //作业入队列时间 + JobWalltimeUsed string `json:"jobWalltimeUsed"` //作业实际使用的Walltime,单位为秒 + JobManagerId int `json:"jobmanagerId"` //区域id +} + +type ListHistoryJobReq struct { + StartTime string `json:"start_time"` + EndTime string `json:"end_time"` + TimeType string `json:"time_type"` + Start int32 `json:"start"` + Limit int32 `json:"limit"` + IsQueryByQueueTime int32 `json:"is_query_by_queue_time"` +} + +type ListHistoryJobResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + RecordCount int32 `json:"record_count"` + HistoryJobs []HistoryJob `json:"history_jobs"` +} diff --git a/adaptor/slurm/slurmCore/api/slurmCore.api b/adaptor/slurm/slurmCore/api/slurmCore.api new file mode 100644 index 000000000..851703a4a --- /dev/null +++ b/adaptor/slurm/slurmCore/api/slurmCore.api @@ -0,0 +1,96 @@ +syntax = "v1" + +info( + title: "slurm core" + desc: "slurm core端微服务" + author: "zhouqj" + email: "450705171@qq.com" +) + +type Domain { + DomainName string `json:"domainName"` + SoftStack string `json:"softStack"` + SlurmNum int32 `json:"slurmNum"` + InterfaceCount int32 `json:"interfaceCount"` + RunningJobs int32 `json:"runningJobs"` +} + +type DomainSummary { + DomainCount int32 `json:"domainCount"` + SoftStackCount int32 `json:"softStackCount"` +} + +type HistoryJob { + SlurmVersion string `json:"slurmVersion"` + AllocCPU uint32 `json:"allocCPU"` + AllocNodes uint32 `json:"allocNodes"` //Nodect 分配的节点数 in shuguang + Account string `json:"account"` + AssocId uint32 `json:"assocId"` + BlockId string `json:"blockId"` + Cluster string `json:"cluster"` + DerivedEc uint32 `json:"derivedEc"` + DerivedEs string `json:"derivedEs"` + Elapsed uint32 `json:"elapsed"` + Eligible int64 `json:"eligible"` + End int64 `json:"end"` //JobEndTime 作业结束时间 in shuguang + ExitCode uint32 `json:"exitCode"` //JobExitStatus 作业退出码 in shuguang + Gid uint32 `json:"gid"` + JobId uint32 `json:"jobId"` //JobId in shuguang + JobName string `json:"jobName"` //JobName in shuguang + Lft uint32 `json:"lft"` + Partition string `json:"partition"` //Queue 队列名 in shuguang + Nodes string `json:"nodes"` //JobExecHost 作业执行节点 in shuguang + Priority uint32 `json:"priority"` + Qosid uint32 `json:"qosid"` + ReqCpus uint32 `json:"reqCpus"` + ReqMem uint32 `json:"reqMem"` + Requid uint32 `json:"requid"` + Resvid uint32 `json:"resvid"` + ShowFull uint32 `json:"showFull"` + Start int64 `json:"start"` //JobStartTime 作业启动时间 in shuguang + State uint32 `json:"state"` //JobState 作业状态 in shuguang + Submit int64 `json:"submit"` + Suspended uint32 `json:"suspended"` + SysCpuSec uint32 `json:"sysCpuSec"` + SysCpuUsec uint32 `json:"sysCpuUsec"` + Timelimit uint32 `json:"timelimit"` + TotCpuSec uint32 `json:"totCpuSec"` + TotCpuUsec uint32 `json:"totCpuUsec"` + TrackSteps uint32 `json:"trackSteps"` + Uid uint32 `json:"uid"` + User string `json:"user"` //UserName 用户名 in shuguang + UserCpuSec uint32 `json:"userCpuSec"` + UserCpuUsec uint32 `json:"userCpuUsec"` + Wckey string `json:"wckey"` + Wckeyid uint32 `json:"wckeyid"` + WorkDir string `json:"workDir"` //Workdir 工作空间 in shuguang + /****************parmas from shuguang********************/ + AcctTime string `json:"acctTime"` // 记账时间 + AppType string `json:"appType"` // 作业应用类型 + JobQueueTime string `json:"jobQueueTime"` //作业入队列时间 + JobWalltimeUsed string `json:"jobWalltimeUsed"` //作业实际使用的Walltime,单位为秒 + JobManagerId int `json:"jobmanagerId"` //区域id + /****************parmas from shuguang********************/ +} + +type ( + listHistoryJobReq { + StartTime string `json:"start_time"` + EndTime string `json:"end_time"` + TimeType string `json:"time_type"` + Start int32 `json:"start"` + Limit int32 `json:"limit"` + IsQueryByQueueTime int32 `json:"is_query_by_queue_time"` + } + listHistoryJobResp { + Code int32 `json:"code"` + Msg string `json:"msg"` + RecordCount int32 `json:"record_count"` + HistoryJobs []HistoryJob `json:"history_jobs"` + } +) + +service slurmcore-api { + @handler listHistoryJobHandler + get /listHistoryJob (listHistoryJobReq) returns (listHistoryJobResp) +} \ No newline at end of file diff --git a/adaptor/slurm/slurmCore/api/slurmcore.go b/adaptor/slurm/slurmCore/api/slurmcore.go new file mode 100644 index 000000000..f779330b4 --- /dev/null +++ b/adaptor/slurm/slurmCore/api/slurmcore.go @@ -0,0 +1,31 @@ +package main + +import ( + "flag" + "fmt" + + "PCM/adaptor/slurm/slurmCore/api/internal/config" + "PCM/adaptor/slurm/slurmCore/api/internal/handler" + "PCM/adaptor/slurm/slurmCore/api/internal/svc" + + "github.com/zeromicro/go-zero/core/conf" + "github.com/zeromicro/go-zero/rest" +) + +var configFile = flag.String("f", "etc/slurmcore-api.yaml", "the config file") + +func main() { + flag.Parse() + + var c config.Config + conf.MustLoad(*configFile, &c) + + server := rest.MustNewServer(c.RestConf) + defer server.Stop() + + ctx := svc.NewServiceContext(c) + handler.RegisterHandlers(server, ctx) + + fmt.Printf("Starting server at %s:%d...\n", c.Host, c.Port) + server.Start() +} diff --git a/adaptor/slurm/slurmShuguang/rpc/etc/slurmshuguang.yaml b/adaptor/slurm/slurmShuguang/rpc/etc/slurmshuguang.yaml new file mode 100644 index 000000000..42291918c --- /dev/null +++ b/adaptor/slurm/slurmShuguang/rpc/etc/slurmshuguang.yaml @@ -0,0 +1,10 @@ +Name: slurmshuguang.rpc +ListenOn: 0.0.0.0:2001 + +ClusterUrl: "https://api01.hpccube.com:65106/hpc/openapi/v2/cluster" +TokenUrl: "https://api01.hpccube.com:65102/ac/openapi/v2/tokens" +StateUrl: "https://api01.hpccube.com:65102/ac/openapi/v2/tokens/state" +User: "zhijiang" +Password: "111111a" +OrgId: "313ae32df03bc116255e6808949fcf57" +Layout: "2006-01-02 15:04:05" diff --git a/adaptor/slurm/slurmShuguang/rpc/internal/config/config.go b/adaptor/slurm/slurmShuguang/rpc/internal/config/config.go new file mode 100644 index 000000000..bc0e99680 --- /dev/null +++ b/adaptor/slurm/slurmShuguang/rpc/internal/config/config.go @@ -0,0 +1,8 @@ +package config + +import "github.com/zeromicro/go-zero/zrpc" + +type Config struct { + zrpc.RpcServerConf + ShuguangConf +} diff --git a/adaptor/slurm/slurmShuguang/rpc/internal/config/shuguangConfig.go b/adaptor/slurm/slurmShuguang/rpc/internal/config/shuguangConfig.go new file mode 100644 index 000000000..46b20eaf5 --- /dev/null +++ b/adaptor/slurm/slurmShuguang/rpc/internal/config/shuguangConfig.go @@ -0,0 +1,12 @@ +package config + +// ShuguangConf Shuguang 相关URL配置 +type ShuguangConf struct { + ClusterUrl string `json:"ClusterUrl"` + TokenUrl string `json:"TokenUrl"` + StateUrl string `json:"StateUrl"` + User string `json:"User"` + Password string `json:"Password"` + OrgId string `json:"OrgId"` + Layout string `json:"Layout"` +} diff --git a/adaptor/slurm/slurmShuguang/rpc/internal/logic/listhistoryjoblogic.go b/adaptor/slurm/slurmShuguang/rpc/internal/logic/listhistoryjoblogic.go new file mode 100644 index 000000000..eff9bdf11 --- /dev/null +++ b/adaptor/slurm/slurmShuguang/rpc/internal/logic/listhistoryjoblogic.go @@ -0,0 +1,135 @@ +package logic + +import ( + "PCM/adaptor/slurm/slurmShuguang/rpc/internal/util" + "context" + "io" + "log" + "net/http" + "net/url" + "strconv" + "time" + + "PCM/adaptor/slurm/slurmShuguang/rpc/internal/svc" + "PCM/adaptor/slurm/slurmShuguang/rpc/slurmShuguang" + "github.com/bitly/go-simplejson" + "github.com/zeromicro/go-zero/core/logx" +) + +type ListHistoryJobLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewListHistoryJobLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListHistoryJobLogic { + return &ListHistoryJobLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// ListHistoryJob list all jobs from slurmdb +func (l *ListHistoryJobLogic) ListHistoryJob(in *slurmShuguang.ListHistoryJobReq) (*slurmShuguang.ListHistoryJobResp, error) { + + //tokenUrl := l.svcCtx.Config.TokenUrl + //stateUrl = l.svcCtx.Config.StateUrl + //clusterUrl = l.svcCtx.Config.ClusterUrl + var resp slurmShuguang.ListHistoryJobResp + jobHistoryUrl := "hpc/openapi/v2/historyjobs?" + + ClusterId := util.GetClusterId() + Gtoken := util.GetToken() + c := http.Client{Timeout: time.Duration(3) * time.Second} + + params := url.Values{} + params.Add("strClusterNameList", strconv.FormatInt(int64(ClusterId), 10)) + params.Add("startTime", in.StartTime) + params.Add("endTime", in.EndTime) + params.Add("timeType", in.TimeType) //"CUSTOM" + params.Add("start", strconv.FormatInt(int64(in.Start), 10)) + params.Add("limit", strconv.FormatInt(int64(in.Limit), 10)) + params.Add("isQueryByQueueTime", "true") //曙光参数配置问题 + params.Add("strUser", l.svcCtx.Config.ShuguangConf.User) + + reqUrl, err := http.NewRequest("GET", "https://api01.hpccube.com:65106/"+jobHistoryUrl+params.Encode(), nil) + + if err != nil { + log.Fatal(err) + } + + var token string + if util.GetTokenState(Gtoken) { + token = Gtoken + } else { + token = util.GetToken() + Gtoken = token + } + + reqUrl.Header.Add("token", token) + + respUrl, err := c.Do(reqUrl) + + if err != nil { + log.Fatal(err) + } + + body, err := io.ReadAll(respUrl.Body) + + jsonResult, err := simplejson.NewJson(body) + jsonData := jsonResult.Get("data") + jobHistoryList := jsonResult.Get("data").Get("list") + rows, err := jobHistoryList.Array() + if err != nil { + log.Fatal(err) + } + defer func(Body io.ReadCloser) { + err := Body.Close() + if err != nil { + + } + }(respUrl.Body) + + var historyJobs []*slurmShuguang.HistoryJob + + for index := range rows { + jobShuguang := jobHistoryList.GetIndex(index) + var job slurmShuguang.HistoryJob + + job.JobId, _ = strconv.ParseInt(jobShuguang.Get("jobId").MustString(), 10, 8) + job.JobName = jobShuguang.Get("jobName").MustString() + job.Workdir = jobShuguang.Get("workdir").MustString() + job.Queue = jobShuguang.Get("queue").MustString() + job.JobExecHost = jobShuguang.Get("jobExecHost").MustString() + job.JobExitStatus = int32(jobShuguang.Get("jobExitStatus").MustInt()) + job.UserName = jobShuguang.Get("userName").MustString() + job.AcctTime = jobShuguang.Get("accTime").MustString() + job.AppType = jobShuguang.Get("appType").MustString() + job.JobQueueTime = jobShuguang.Get("jobQueueTime").MustString() + job.JobWalltimeUsed = jobShuguang.Get("jobWalltimeUsed").MustString() + job.JobManagerId = jobShuguang.Get("jobmanagerId").MustInt64() + job.JobState = jobShuguang.Get("jobState").MustString() + job.NodeCt = int32(jobShuguang.Get("nodect").MustInt64()) + + startTime, err := time.Parse(l.svcCtx.Config.ShuguangConf.Layout, jobShuguang.Get("jobStartTime").MustString()) + if err == nil { + job.JobStartTime = startTime.String() + } + endTime, err := time.Parse(l.svcCtx.Config.ShuguangConf.Layout, jobShuguang.Get("jobEndTime").MustString()) + if err == nil { + job.JobEndTime = endTime.String() + } + historyJobs = append(historyJobs, &job) + + } + + if jsonResult.Get("code").MustInt() == 0 { + resp.Code = uint32(200) + } + resp.Msg = jsonResult.Get("msg").MustString() + resp.RecordCount = uint32(jsonData.Get("total").MustInt()) + resp.HistoryJobs = historyJobs + + return &resp, nil +} diff --git a/adaptor/slurm/slurmShuguang/rpc/internal/server/slurmshuguangserver.go b/adaptor/slurm/slurmShuguang/rpc/internal/server/slurmshuguangserver.go new file mode 100644 index 000000000..d2301704e --- /dev/null +++ b/adaptor/slurm/slurmShuguang/rpc/internal/server/slurmshuguangserver.go @@ -0,0 +1,29 @@ +// Code generated by goctl. DO NOT EDIT. +// Source: slurmShuguang.proto + +package server + +import ( + "context" + + "PCM/adaptor/slurm/slurmShuguang/rpc/internal/logic" + "PCM/adaptor/slurm/slurmShuguang/rpc/internal/svc" + "PCM/adaptor/slurm/slurmShuguang/rpc/slurmShuguang" +) + +type SlurmShuguangServer struct { + svcCtx *svc.ServiceContext + slurmShuguang.UnimplementedSlurmShuguangServer +} + +func NewSlurmShuguangServer(svcCtx *svc.ServiceContext) *SlurmShuguangServer { + return &SlurmShuguangServer{ + svcCtx: svcCtx, + } +} + +// ListHistoryJob list all jobs from slurmdb +func (s *SlurmShuguangServer) ListHistoryJob(ctx context.Context, in *slurmShuguang.ListHistoryJobReq) (*slurmShuguang.ListHistoryJobResp, error) { + l := logic.NewListHistoryJobLogic(ctx, s.svcCtx) + return l.ListHistoryJob(in) +} diff --git a/adaptor/slurm/slurmShuguang/rpc/internal/svc/servicecontext.go b/adaptor/slurm/slurmShuguang/rpc/internal/svc/servicecontext.go new file mode 100644 index 000000000..9f4afa7e6 --- /dev/null +++ b/adaptor/slurm/slurmShuguang/rpc/internal/svc/servicecontext.go @@ -0,0 +1,13 @@ +package svc + +import "PCM/adaptor/slurm/slurmShuguang/rpc/internal/config" + +type ServiceContext struct { + Config config.Config +} + +func NewServiceContext(c config.Config) *ServiceContext { + return &ServiceContext{ + Config: c, + } +} diff --git a/adaptor/slurm/slurmShuguang/rpc/internal/util/shuguangAuth.go b/adaptor/slurm/slurmShuguang/rpc/internal/util/shuguangAuth.go new file mode 100644 index 000000000..787faaecb --- /dev/null +++ b/adaptor/slurm/slurmShuguang/rpc/internal/util/shuguangAuth.go @@ -0,0 +1,207 @@ +package util + +import ( + "PCM/adaptor/slurm/slurmShuguang/rpc/internal/config" + "PCM/adaptor/slurm/slurmShuguang/rpc/internal/svc" + "encoding/json" + "flag" + "github.com/zeromicro/go-zero/core/conf" + "io" + "log" + "net/http" + "time" +) + +// +//const ( +// authenticateUrl = "https://api01.hpccube.com:65102/" +// HpcUrls = "https://api01.hpccube.com:65106/" +// user = "zhijiang" +// password = "111111a" +// orgId = "313ae32df03bc116255e6808949fcf57" +// layout = "2006-01-02 15:04:05" +//) + +var ( + StatesMapShuguang = map[string]uint32{ + "statR": 0, + "statQ": 1, + "statH": 2, + "statS": 3, + "statE": 4, + "statC": 5, + "statW": 6, + "statX": 7, + } + Gtoken = GetToken() + ClusterId = GetClusterId() +) + +type cluster struct { + Msg string `json:"msg"` + Code string `json:"code"` + Data []clusterInfo `json:"data"` +} + +type clusterInfo struct { + JobManagerType string `json:"JobManagerType"` + JobManagerAddr string `json:"JobManagerAddr"` + Id int `json:"id"` + Text string `json:"text"` + JobManagerPort string `json:"JobManagerPort"` +} + +type stateToken struct { + Msg string `json:"msg"` + Code string `json:"code"` + Data string `json:"data"` +} + +type resultToken struct { + Msg string `json:"msg"` + Code string `json:"code"` + Data []dataToken `json:"data"` +} + +type dataToken struct { + ClusterName string `json:"clusterName"` + ClusterId string `json:"clusterId"` + Token string `json:"token"` +} + +var configFile = flag.String("flll", "etc/slurmshuguang.yaml", "the config file") + +func GetClusterId() int { + httpClient := http.Client{Timeout: time.Duration(3) * time.Second} + var cf config.Config + conf.MustLoad(*configFile, &cf) + ctx := svc.NewServiceContext(cf) + + req, err := http.NewRequest("GET", ctx.Config.ShuguangConf.ClusterUrl, nil) + + if err != nil { + log.Fatal(err) + } + + var token string + if GetTokenState(Gtoken) { + token = Gtoken + } else { + token = GetToken() + Gtoken = token + } + + req.Header.Add("token", token) + resp, err := httpClient.Do(req) + if err != nil { + log.Fatal(err) + } + body, err := io.ReadAll(resp.Body) + var res cluster + err = json.Unmarshal(body, &res) + if err != nil { + log.Panicln(err) + } + defer func(Body io.ReadCloser) { + err := Body.Close() + if err != nil { + + } + }(resp.Body) + var id int + for _, datum := range res.Data { + if datum.JobManagerType == "SLURM" { + id = datum.Id + } + } + return id +} + +func GetToken() string { + httpClient := http.Client{Timeout: time.Duration(3) * time.Second} + var cf config.Config + conf.MustLoad(*configFile, &cf) + ctx := svc.NewServiceContext(cf) + + req, err := http.NewRequest("POST", ctx.Config.ShuguangConf.TokenUrl, nil) + if err != nil { + log.Fatal(err) + } + req.Header.Add("user", ctx.Config.ShuguangConf.User) + req.Header.Add("password", ctx.Config.ShuguangConf.Password) + req.Header.Add("orgId", ctx.Config.ShuguangConf.OrgId) + + resp, err := httpClient.Do(req) + if err != nil { + log.Fatal(err) + } + + body, err := io.ReadAll(resp.Body) + var rd resultToken + + err = json.Unmarshal(body, &rd) + if err != nil { + log.Panicln(err) + } + defer func(Body io.ReadCloser) { + err := Body.Close() + if err != nil { + + } + }(resp.Body) + for _, datum := range rd.Data { + if datum.ClusterId == "0" { + return datum.Token + } + } + return "" +} + +func GetTokenState(token string) bool { + httpClient := http.Client{Timeout: time.Duration(3) * time.Second} + var cf config.Config + conf.MustLoad(*configFile, &cf) + ctx := svc.NewServiceContext(cf) + + req, err := http.NewRequest("GET", ctx.Config.ShuguangConf.StateUrl, nil) + if err != nil { + log.Fatal(err) + } + req.Header.Add("token", token) + resp, err := httpClient.Do(req) + var res stateToken + if err != nil { + log.Fatal(err) + } + body, err := io.ReadAll(resp.Body) + err = json.Unmarshal(body, &res) + if err != nil { + log.Panicln(err) + } + defer func(Body io.ReadCloser) { + err := Body.Close() + if err != nil { + + } + }(resp.Body) + if res.Code == "0" { + return true + } else if res.Code == "10008" { + return false + } else { + log.Panicln(res.Msg) + } + + return false +} + +func GetTimeDurationString(startTime string, endTime string) string { + var cf config.Config + conf.MustLoad(*configFile, &cf) + ctx := svc.NewServiceContext(cf) + + end, _ := time.Parse(ctx.Config.ShuguangConf.Layout, endTime) + start, _ := time.Parse(ctx.Config.ShuguangConf.Layout, startTime) + difference := end.Sub(start) + return difference.Truncate(time.Second).String() +} diff --git a/adaptor/slurm/slurmShuguang/rpc/pb/slurmShuguang.proto b/adaptor/slurm/slurmShuguang/rpc/pb/slurmShuguang.proto new file mode 100644 index 000000000..2af03fc0b --- /dev/null +++ b/adaptor/slurm/slurmShuguang/rpc/pb/slurmShuguang.proto @@ -0,0 +1,51 @@ +syntax = "proto3"; + +package slurmShuguang; +option go_package = "/slurmShuguang"; + + +/******************Job(DB) Start*************************/ +message historyJob{ + string acct_time = 1; // @gotags: copier:"AcctTime" + string app_type = 2; // @gotags: copier:"AppType" + string job_end_time = 3; // @gotags: copier:"End" + string job_exec_host = 4; // @gotags: copier:"Nodes" + int32 job_exit_status = 5; // @gotags: copier:"ExitCode" + int64 job_id = 6; // @gotags: copier:"JobId" + string job_name = 7; // @gotags: copier:"JobName" + string job_queue_time = 8; // @gotags: copier:"JobQueueTime" + string job_start_time = 9; // @gotags: copier:"Start" + string job_state = 10; // @gotags: copier:"State" + string job_walltime_used = 11; // @gotags: copier:"JobWalltimeUsed" + int64 job_manager_id = 12; // @gotags: copier:"JobManagerId" + int32 node_ct = 13; // @gotags: copier:"AllocNodes" + string queue = 14; // @gotags: copier:"Partition" + string user_name = 15; // @gotags: copier:"User" + string workdir = 16; // @gotags: copier:"WorkDir" +} + +message ListHistoryJobReq{ + string startTime = 1;// @gotags: copier:"StartTime" + string endTime = 2;// @gotags: copier:"EndTime" + string timeType = 3;// @gotags: copier:"TimeType" + int32 start = 4;// @gotags: copier:"Start" + int32 limit = 5;// @gotags: copier:"Limit" + int32 isQueryByQueueTime = 6;// @gotags: copier:"IsQueryByQueueTime" +} + +message ListHistoryJobResp{ + uint32 code = 1; // @gotags: copier:"Code" + string msg = 2; // @gotags: copier:"Msg" + uint32 record_count = 3; // @gotags: copier:"RecordCount" + repeated historyJob history_jobs = 4; // @gotags: copier:"HistoryJobs" +} +/******************Job(DB) End*************************/ + + +// Slurm Services for Shuguang Branch +service SlurmShuguang { + + //ListHistoryJob list all jobs from slurmdb + rpc ListHistoryJob(ListHistoryJobReq) returns (ListHistoryJobResp); + +} \ No newline at end of file diff --git a/adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang.pb.go b/adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang.pb.go new file mode 100644 index 000000000..9c43224a9 --- /dev/null +++ b/adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang.pb.go @@ -0,0 +1,510 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.19.4 +// source: slurmShuguang.proto + +package slurmShuguang + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// *****************Job(DB) Start************************ +type HistoryJob struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AcctTime string `protobuf:"bytes,1,opt,name=acct_time,json=acctTime,proto3" json:"acct_time,omitempty" copier:"AcctTime"` // @gotags: copier:"AcctTime" + AppType string `protobuf:"bytes,2,opt,name=app_type,json=appType,proto3" json:"app_type,omitempty" copier:"AppType"` // @gotags: copier:"AppType" + JobEndTime string `protobuf:"bytes,3,opt,name=job_end_time,json=jobEndTime,proto3" json:"job_end_time,omitempty" copier:"End"` // @gotags: copier:"End" + JobExecHost string `protobuf:"bytes,4,opt,name=job_exec_host,json=jobExecHost,proto3" json:"job_exec_host,omitempty" copier:"Nodes"` // @gotags: copier:"Nodes" + JobExitStatus int32 `protobuf:"varint,5,opt,name=job_exit_status,json=jobExitStatus,proto3" json:"job_exit_status,omitempty" copier:"ExitCode"` // @gotags: copier:"ExitCode" + JobId int64 `protobuf:"varint,6,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty" copier:"JobId"` // @gotags: copier:"JobId" + JobName string `protobuf:"bytes,7,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty" copier:"JobName"` // @gotags: copier:"JobName" + JobQueueTime string `protobuf:"bytes,8,opt,name=job_queue_time,json=jobQueueTime,proto3" json:"job_queue_time,omitempty" copier:"JobQueueTime"` // @gotags: copier:"JobQueueTime" + JobStartTime string `protobuf:"bytes,9,opt,name=job_start_time,json=jobStartTime,proto3" json:"job_start_time,omitempty" copier:"Start"` // @gotags: copier:"Start" + JobState string `protobuf:"bytes,10,opt,name=job_state,json=jobState,proto3" json:"job_state,omitempty" copier:"State"` // @gotags: copier:"State" + JobWalltimeUsed string `protobuf:"bytes,11,opt,name=job_walltime_used,json=jobWalltimeUsed,proto3" json:"job_walltime_used,omitempty" copier:"JobWalltimeUsed"` // @gotags: copier:"JobWalltimeUsed" + JobManagerId int64 `protobuf:"varint,12,opt,name=job_manager_id,json=jobManagerId,proto3" json:"job_manager_id,omitempty" copier:"JobManagerId"` // @gotags: copier:"JobManagerId" + NodeCt int32 `protobuf:"varint,13,opt,name=node_ct,json=nodeCt,proto3" json:"node_ct,omitempty" copier:"AllocNodes"` // @gotags: copier:"AllocNodes" + Queue string `protobuf:"bytes,14,opt,name=queue,proto3" json:"queue,omitempty" copier:"Partition"` // @gotags: copier:"Partition" + UserName string `protobuf:"bytes,15,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty" copier:"User"` // @gotags: copier:"User" + Workdir string `protobuf:"bytes,16,opt,name=workdir,proto3" json:"workdir,omitempty" copier:"WorkDir"` // @gotags: copier:"WorkDir" +} + +func (x *HistoryJob) Reset() { + *x = HistoryJob{} + if protoimpl.UnsafeEnabled { + mi := &file_slurmShuguang_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HistoryJob) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HistoryJob) ProtoMessage() {} + +func (x *HistoryJob) ProtoReflect() protoreflect.Message { + mi := &file_slurmShuguang_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HistoryJob.ProtoReflect.Descriptor instead. +func (*HistoryJob) Descriptor() ([]byte, []int) { + return file_slurmShuguang_proto_rawDescGZIP(), []int{0} +} + +func (x *HistoryJob) GetAcctTime() string { + if x != nil { + return x.AcctTime + } + return "" +} + +func (x *HistoryJob) GetAppType() string { + if x != nil { + return x.AppType + } + return "" +} + +func (x *HistoryJob) GetJobEndTime() string { + if x != nil { + return x.JobEndTime + } + return "" +} + +func (x *HistoryJob) GetJobExecHost() string { + if x != nil { + return x.JobExecHost + } + return "" +} + +func (x *HistoryJob) GetJobExitStatus() int32 { + if x != nil { + return x.JobExitStatus + } + return 0 +} + +func (x *HistoryJob) GetJobId() int64 { + if x != nil { + return x.JobId + } + return 0 +} + +func (x *HistoryJob) GetJobName() string { + if x != nil { + return x.JobName + } + return "" +} + +func (x *HistoryJob) GetJobQueueTime() string { + if x != nil { + return x.JobQueueTime + } + return "" +} + +func (x *HistoryJob) GetJobStartTime() string { + if x != nil { + return x.JobStartTime + } + return "" +} + +func (x *HistoryJob) GetJobState() string { + if x != nil { + return x.JobState + } + return "" +} + +func (x *HistoryJob) GetJobWalltimeUsed() string { + if x != nil { + return x.JobWalltimeUsed + } + return "" +} + +func (x *HistoryJob) GetJobManagerId() int64 { + if x != nil { + return x.JobManagerId + } + return 0 +} + +func (x *HistoryJob) GetNodeCt() int32 { + if x != nil { + return x.NodeCt + } + return 0 +} + +func (x *HistoryJob) GetQueue() string { + if x != nil { + return x.Queue + } + return "" +} + +func (x *HistoryJob) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +func (x *HistoryJob) GetWorkdir() string { + if x != nil { + return x.Workdir + } + return "" +} + +type ListHistoryJobReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StartTime string `protobuf:"bytes,1,opt,name=startTime,proto3" json:"startTime,omitempty" copier:"StartTime"` // @gotags: copier:"StartTime" + EndTime string `protobuf:"bytes,2,opt,name=endTime,proto3" json:"endTime,omitempty" copier:"EndTime"` // @gotags: copier:"EndTime" + TimeType string `protobuf:"bytes,3,opt,name=timeType,proto3" json:"timeType,omitempty" copier:"TimeType"` // @gotags: copier:"TimeType" + Start int32 `protobuf:"varint,4,opt,name=start,proto3" json:"start,omitempty" copier:"Start"` // @gotags: copier:"Start" + Limit int32 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty" copier:"Limit"` // @gotags: copier:"Limit" + IsQueryByQueueTime int32 `protobuf:"varint,6,opt,name=isQueryByQueueTime,proto3" json:"isQueryByQueueTime,omitempty" copier:"IsQueryByQueueTime"` // @gotags: copier:"IsQueryByQueueTime" +} + +func (x *ListHistoryJobReq) Reset() { + *x = ListHistoryJobReq{} + if protoimpl.UnsafeEnabled { + mi := &file_slurmShuguang_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListHistoryJobReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListHistoryJobReq) ProtoMessage() {} + +func (x *ListHistoryJobReq) ProtoReflect() protoreflect.Message { + mi := &file_slurmShuguang_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListHistoryJobReq.ProtoReflect.Descriptor instead. +func (*ListHistoryJobReq) Descriptor() ([]byte, []int) { + return file_slurmShuguang_proto_rawDescGZIP(), []int{1} +} + +func (x *ListHistoryJobReq) GetStartTime() string { + if x != nil { + return x.StartTime + } + return "" +} + +func (x *ListHistoryJobReq) GetEndTime() string { + if x != nil { + return x.EndTime + } + return "" +} + +func (x *ListHistoryJobReq) GetTimeType() string { + if x != nil { + return x.TimeType + } + return "" +} + +func (x *ListHistoryJobReq) GetStart() int32 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *ListHistoryJobReq) GetLimit() int32 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *ListHistoryJobReq) GetIsQueryByQueueTime() int32 { + if x != nil { + return x.IsQueryByQueueTime + } + return 0 +} + +type ListHistoryJobResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty" copier:"Code"` // @gotags: copier:"Code" + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty" copier:"Msg"` // @gotags: copier:"Msg" + RecordCount uint32 `protobuf:"varint,3,opt,name=record_count,json=recordCount,proto3" json:"record_count,omitempty" copier:"RecordCount"` // @gotags: copier:"RecordCount" + HistoryJobs []*HistoryJob `protobuf:"bytes,4,rep,name=history_jobs,json=historyJobs,proto3" json:"history_jobs,omitempty" copier:"HistoryJobs"` // @gotags: copier:"HistoryJobs" +} + +func (x *ListHistoryJobResp) Reset() { + *x = ListHistoryJobResp{} + if protoimpl.UnsafeEnabled { + mi := &file_slurmShuguang_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListHistoryJobResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListHistoryJobResp) ProtoMessage() {} + +func (x *ListHistoryJobResp) ProtoReflect() protoreflect.Message { + mi := &file_slurmShuguang_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListHistoryJobResp.ProtoReflect.Descriptor instead. +func (*ListHistoryJobResp) Descriptor() ([]byte, []int) { + return file_slurmShuguang_proto_rawDescGZIP(), []int{2} +} + +func (x *ListHistoryJobResp) GetCode() uint32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *ListHistoryJobResp) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *ListHistoryJobResp) GetRecordCount() uint32 { + if x != nil { + return x.RecordCount + } + return 0 +} + +func (x *ListHistoryJobResp) GetHistoryJobs() []*HistoryJob { + if x != nil { + return x.HistoryJobs + } + return nil +} + +var File_slurmShuguang_proto protoreflect.FileDescriptor + +var file_slurmShuguang_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, + 0x75, 0x61, 0x6e, 0x67, 0x22, 0x85, 0x04, 0x0a, 0x0a, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x4a, 0x6f, 0x62, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x6a, + 0x6f, 0x62, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x6a, 0x6f, 0x62, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, + 0x0d, 0x6a, 0x6f, 0x62, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x6f, 0x62, 0x45, 0x78, 0x65, 0x63, 0x48, 0x6f, 0x73, + 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6a, 0x6f, 0x62, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6a, 0x6f, 0x62, 0x45, + 0x78, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, + 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6a, + 0x6f, 0x62, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6a, 0x6f, 0x62, 0x51, 0x75, 0x65, 0x75, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6a, 0x6f, 0x62, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6a, 0x6f, 0x62, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x6f, 0x62, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6a, 0x6f, 0x62, 0x5f, 0x77, 0x61, 0x6c, 0x6c, + 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x6a, 0x6f, 0x62, 0x57, 0x61, 0x6c, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x73, 0x65, 0x64, + 0x12, 0x24, 0x0a, 0x0e, 0x6a, 0x6f, 0x62, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6a, 0x6f, 0x62, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, + 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x71, 0x75, 0x65, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x64, 0x69, 0x72, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x64, 0x69, 0x72, 0x22, 0xc3, 0x01, 0x0a, + 0x11, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, + 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x69, + 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x69, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x51, + 0x75, 0x65, 0x75, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, + 0x69, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x51, 0x75, 0x65, 0x75, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, + 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6a, 0x6f, + 0x62, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x53, 0x68, 0x75, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x2e, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x4a, 0x6f, 0x62, 0x52, 0x0b, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x73, + 0x32, 0x66, 0x0a, 0x0d, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, 0x75, 0x61, 0x6e, + 0x67, 0x12, 0x55, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x4a, 0x6f, 0x62, 0x12, 0x20, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, 0x75, + 0x61, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, + 0x6f, 0x62, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x68, 0x75, + 0x67, 0x75, 0x61, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x42, 0x10, 0x5a, 0x0e, 0x2f, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_slurmShuguang_proto_rawDescOnce sync.Once + file_slurmShuguang_proto_rawDescData = file_slurmShuguang_proto_rawDesc +) + +func file_slurmShuguang_proto_rawDescGZIP() []byte { + file_slurmShuguang_proto_rawDescOnce.Do(func() { + file_slurmShuguang_proto_rawDescData = protoimpl.X.CompressGZIP(file_slurmShuguang_proto_rawDescData) + }) + return file_slurmShuguang_proto_rawDescData +} + +var file_slurmShuguang_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_slurmShuguang_proto_goTypes = []interface{}{ + (*HistoryJob)(nil), // 0: slurmShuguang.historyJob + (*ListHistoryJobReq)(nil), // 1: slurmShuguang.ListHistoryJobReq + (*ListHistoryJobResp)(nil), // 2: slurmShuguang.ListHistoryJobResp +} +var file_slurmShuguang_proto_depIdxs = []int32{ + 0, // 0: slurmShuguang.ListHistoryJobResp.history_jobs:type_name -> slurmShuguang.historyJob + 1, // 1: slurmShuguang.SlurmShuguang.ListHistoryJob:input_type -> slurmShuguang.ListHistoryJobReq + 2, // 2: slurmShuguang.SlurmShuguang.ListHistoryJob:output_type -> slurmShuguang.ListHistoryJobResp + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_slurmShuguang_proto_init() } +func file_slurmShuguang_proto_init() { + if File_slurmShuguang_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_slurmShuguang_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HistoryJob); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_slurmShuguang_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListHistoryJobReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_slurmShuguang_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListHistoryJobResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_slurmShuguang_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_slurmShuguang_proto_goTypes, + DependencyIndexes: file_slurmShuguang_proto_depIdxs, + MessageInfos: file_slurmShuguang_proto_msgTypes, + }.Build() + File_slurmShuguang_proto = out.File + file_slurmShuguang_proto_rawDesc = nil + file_slurmShuguang_proto_goTypes = nil + file_slurmShuguang_proto_depIdxs = nil +} diff --git a/adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang_grpc.pb.go b/adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang_grpc.pb.go new file mode 100644 index 000000000..d96abb8e0 --- /dev/null +++ b/adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.4 +// source: slurmShuguang.proto + +package slurmShuguang + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// SlurmShuguangClient is the client API for SlurmShuguang service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SlurmShuguangClient interface { + // ListHistoryJob list all jobs from slurmdb + ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) +} + +type slurmShuguangClient struct { + cc grpc.ClientConnInterface +} + +func NewSlurmShuguangClient(cc grpc.ClientConnInterface) SlurmShuguangClient { + return &slurmShuguangClient{cc} +} + +func (c *slurmShuguangClient) ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) { + out := new(ListHistoryJobResp) + err := c.cc.Invoke(ctx, "/slurmShuguang.SlurmShuguang/ListHistoryJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SlurmShuguangServer is the server API for SlurmShuguang service. +// All implementations must embed UnimplementedSlurmShuguangServer +// for forward compatibility +type SlurmShuguangServer interface { + // ListHistoryJob list all jobs from slurmdb + ListHistoryJob(context.Context, *ListHistoryJobReq) (*ListHistoryJobResp, error) + mustEmbedUnimplementedSlurmShuguangServer() +} + +// UnimplementedSlurmShuguangServer must be embedded to have forward compatible implementations. +type UnimplementedSlurmShuguangServer struct { +} + +func (UnimplementedSlurmShuguangServer) ListHistoryJob(context.Context, *ListHistoryJobReq) (*ListHistoryJobResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListHistoryJob not implemented") +} +func (UnimplementedSlurmShuguangServer) mustEmbedUnimplementedSlurmShuguangServer() {} + +// UnsafeSlurmShuguangServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SlurmShuguangServer will +// result in compilation errors. +type UnsafeSlurmShuguangServer interface { + mustEmbedUnimplementedSlurmShuguangServer() +} + +func RegisterSlurmShuguangServer(s grpc.ServiceRegistrar, srv SlurmShuguangServer) { + s.RegisterService(&SlurmShuguang_ServiceDesc, srv) +} + +func _SlurmShuguang_ListHistoryJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListHistoryJobReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SlurmShuguangServer).ListHistoryJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slurmShuguang.SlurmShuguang/ListHistoryJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SlurmShuguangServer).ListHistoryJob(ctx, req.(*ListHistoryJobReq)) + } + return interceptor(ctx, in, info, handler) +} + +// SlurmShuguang_ServiceDesc is the grpc.ServiceDesc for SlurmShuguang service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SlurmShuguang_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "slurmShuguang.SlurmShuguang", + HandlerType: (*SlurmShuguangServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListHistoryJob", + Handler: _SlurmShuguang_ListHistoryJob_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "slurmShuguang.proto", +} diff --git a/adaptor/slurm/slurmShuguang/rpc/slurmshuguang.go b/adaptor/slurm/slurmShuguang/rpc/slurmshuguang.go new file mode 100644 index 000000000..d5e3cda4d --- /dev/null +++ b/adaptor/slurm/slurmShuguang/rpc/slurmshuguang.go @@ -0,0 +1,39 @@ +package main + +import ( + "flag" + "fmt" + + "PCM/adaptor/slurm/slurmShuguang/rpc/internal/config" + "PCM/adaptor/slurm/slurmShuguang/rpc/internal/server" + "PCM/adaptor/slurm/slurmShuguang/rpc/internal/svc" + "PCM/adaptor/slurm/slurmShuguang/rpc/slurmShuguang" + + "github.com/zeromicro/go-zero/core/conf" + "github.com/zeromicro/go-zero/core/service" + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" +) + +var configFile = flag.String("f", "etc/slurmshuguang.yaml", "the config file") + +func main() { + flag.Parse() + + var c config.Config + conf.MustLoad(*configFile, &c) + ctx := svc.NewServiceContext(c) + + s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) { + slurmShuguang.RegisterSlurmShuguangServer(grpcServer, server.NewSlurmShuguangServer(ctx)) + + if c.Mode == service.DevMode || c.Mode == service.TestMode { + reflection.Register(grpcServer) + } + }) + defer s.Stop() + + fmt.Printf("Starting rpc server at %s...\n", c.ListenOn) + s.Start() +} diff --git a/adaptor/slurm/slurmShuguang/rpc/slurmshuguangclient/slurmshuguang.go b/adaptor/slurm/slurmShuguang/rpc/slurmshuguangclient/slurmshuguang.go new file mode 100644 index 000000000..8569a277f --- /dev/null +++ b/adaptor/slurm/slurmShuguang/rpc/slurmshuguangclient/slurmshuguang.go @@ -0,0 +1,40 @@ +// Code generated by goctl. DO NOT EDIT. +// Source: slurmShuguang.proto + +package slurmshuguangclient + +import ( + "context" + + "PCM/adaptor/slurm/slurmShuguang/rpc/slurmShuguang" + + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" +) + +type ( + HistoryJob = slurmShuguang.HistoryJob + ListHistoryJobReq = slurmShuguang.ListHistoryJobReq + ListHistoryJobResp = slurmShuguang.ListHistoryJobResp + + SlurmShuguang interface { + // ListHistoryJob list all jobs from slurmdb + ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) + } + + defaultSlurmShuguang struct { + cli zrpc.Client + } +) + +func NewSlurmShuguang(cli zrpc.Client) SlurmShuguang { + return &defaultSlurmShuguang{ + cli: cli, + } +} + +// ListHistoryJob list all jobs from slurmdb +func (m *defaultSlurmShuguang) ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) { + client := slurmShuguang.NewSlurmShuguangClient(m.cli.Conn()) + return client.ListHistoryJob(ctx, in, opts...) +} diff --git a/adaptor/slurm/slurmTianhe/rpc/etc/slurmtianhe.yaml b/adaptor/slurm/slurmTianhe/rpc/etc/slurmtianhe.yaml new file mode 100644 index 000000000..96b2fa078 --- /dev/null +++ b/adaptor/slurm/slurmTianhe/rpc/etc/slurmtianhe.yaml @@ -0,0 +1,3 @@ +Name: slurmtianhe.rpc +ListenOn: 0.0.0.0:2002 + diff --git a/adaptor/slurm/slurmTianhe/rpc/internal/config/config.go b/adaptor/slurm/slurmTianhe/rpc/internal/config/config.go new file mode 100644 index 000000000..c1f85b99a --- /dev/null +++ b/adaptor/slurm/slurmTianhe/rpc/internal/config/config.go @@ -0,0 +1,7 @@ +package config + +import "github.com/zeromicro/go-zero/zrpc" + +type Config struct { + zrpc.RpcServerConf +} diff --git a/adaptor/slurm/slurmTianhe/rpc/internal/logic/listhistoryjoblogic.go b/adaptor/slurm/slurmTianhe/rpc/internal/logic/listhistoryjoblogic.go new file mode 100644 index 000000000..8f1eaab97 --- /dev/null +++ b/adaptor/slurm/slurmTianhe/rpc/internal/logic/listhistoryjoblogic.go @@ -0,0 +1,155 @@ +package logic + +/* +#cgo LDFLAGS: -lslurmdb + +#include +#include +#include +#include +#include +#include +#include +#include + +slurmdb_job_rec_t *get_all_slurmdb_job() { + + slurmdb_job_cond_t *job_cond = NULL; + void *conn = slurmdb_connection_get(); + + List joblist = slurmdb_jobs_get(conn, job_cond); + + uint16_t listsize = slurm_list_count(joblist); + //qosinfo.record_count = size; + slurmdb_job_rec_t *jobarray = malloc(listsize * sizeof(slurmdb_job_rec_t)); + + ListIterator itr = slurm_list_iterator_create(joblist); + + slurmdb_job_rec_t *rec = NULL; + int i = 0; + while ((rec = slurm_list_next(itr))) { + jobarray[i] = *rec; + i++; + } + slurmdb_connection_close(&conn); + slurm_list_destroy(joblist); + //int arraysize = sizeof(jobarray); + //printf("%d\n", arraysize); + return jobarray; +} + +slurmdb_job_rec_t *job_from_array(slurmdb_job_rec_t *job_rec_array, int i) { + return (slurmdb_job_rec_t *) &(job_rec_array[i]); +} + +slurmdb_job_rec_t *job_from_array_by_id(slurmdb_job_rec_t *job_rec_array, int job_id) { + int i; + int arraysize = sizeof(job_rec_array); + for (i=0; i slurmTianhe.historyJob + 1, // 1: slurmTianhe.slurmTianhe.ListHistoryJob:input_type -> slurmTianhe.ListHistoryJobReq + 2, // 2: slurmTianhe.slurmTianhe.ListHistoryJob:output_type -> slurmTianhe.ListHistoryJobResp + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_slurmTianhe_proto_init() } +func file_slurmTianhe_proto_init() { + if File_slurmTianhe_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_slurmTianhe_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HistoryJob); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_slurmTianhe_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListHistoryJobReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_slurmTianhe_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListHistoryJobResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_slurmTianhe_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_slurmTianhe_proto_goTypes, + DependencyIndexes: file_slurmTianhe_proto_depIdxs, + MessageInfos: file_slurmTianhe_proto_msgTypes, + }.Build() + File_slurmTianhe_proto = out.File + file_slurmTianhe_proto_rawDesc = nil + file_slurmTianhe_proto_goTypes = nil + file_slurmTianhe_proto_depIdxs = nil +} diff --git a/adaptor/slurm/slurmTianhe/rpc/slurmTianhe/slurmTianhe_grpc.pb.go b/adaptor/slurm/slurmTianhe/rpc/slurmTianhe/slurmTianhe_grpc.pb.go new file mode 100644 index 000000000..2d7d2b827 --- /dev/null +++ b/adaptor/slurm/slurmTianhe/rpc/slurmTianhe/slurmTianhe_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.21.8 +// source: slurmTianhe.proto + +package slurmTianhe + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// SlurmTianheClient is the client API for SlurmTianhe service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SlurmTianheClient interface { + // ListHistoryJob list all jobs from slurmdb + ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) +} + +type slurmTianheClient struct { + cc grpc.ClientConnInterface +} + +func NewSlurmTianheClient(cc grpc.ClientConnInterface) SlurmTianheClient { + return &slurmTianheClient{cc} +} + +func (c *slurmTianheClient) ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) { + out := new(ListHistoryJobResp) + err := c.cc.Invoke(ctx, "/slurmTianhe.slurmTianhe/ListHistoryJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SlurmTianheServer is the server API for SlurmTianhe service. +// All implementations must embed UnimplementedSlurmTianheServer +// for forward compatibility +type SlurmTianheServer interface { + // ListHistoryJob list all jobs from slurmdb + ListHistoryJob(context.Context, *ListHistoryJobReq) (*ListHistoryJobResp, error) + mustEmbedUnimplementedSlurmTianheServer() +} + +// UnimplementedSlurmTianheServer must be embedded to have forward compatible implementations. +type UnimplementedSlurmTianheServer struct { +} + +func (UnimplementedSlurmTianheServer) ListHistoryJob(context.Context, *ListHistoryJobReq) (*ListHistoryJobResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListHistoryJob not implemented") +} +func (UnimplementedSlurmTianheServer) mustEmbedUnimplementedSlurmTianheServer() {} + +// UnsafeSlurmTianheServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SlurmTianheServer will +// result in compilation errors. +type UnsafeSlurmTianheServer interface { + mustEmbedUnimplementedSlurmTianheServer() +} + +func RegisterSlurmTianheServer(s grpc.ServiceRegistrar, srv SlurmTianheServer) { + s.RegisterService(&SlurmTianhe_ServiceDesc, srv) +} + +func _SlurmTianhe_ListHistoryJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListHistoryJobReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SlurmTianheServer).ListHistoryJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slurmTianhe.slurmTianhe/ListHistoryJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SlurmTianheServer).ListHistoryJob(ctx, req.(*ListHistoryJobReq)) + } + return interceptor(ctx, in, info, handler) +} + +// SlurmTianhe_ServiceDesc is the grpc.ServiceDesc for SlurmTianhe service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SlurmTianhe_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "slurmTianhe.slurmTianhe", + HandlerType: (*SlurmTianheServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListHistoryJob", + Handler: _SlurmTianhe_ListHistoryJob_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "slurmTianhe.proto", +} diff --git a/adaptor/slurm/slurmTianhe/rpc/slurmtianhe.go b/adaptor/slurm/slurmTianhe/rpc/slurmtianhe.go new file mode 100644 index 000000000..ee855ebb0 --- /dev/null +++ b/adaptor/slurm/slurmTianhe/rpc/slurmtianhe.go @@ -0,0 +1,39 @@ +package main + +import ( + "flag" + "fmt" + + "PCM/adaptor/slurm/slurmTianhe/rpc/internal/config" + "PCM/adaptor/slurm/slurmTianhe/rpc/internal/server" + "PCM/adaptor/slurm/slurmTianhe/rpc/internal/svc" + "PCM/adaptor/slurm/slurmTianhe/rpc/slurmTianhe" + + "github.com/zeromicro/go-zero/core/conf" + "github.com/zeromicro/go-zero/core/service" + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" +) + +var configFile = flag.String("f", "etc/slurmtianhe.yaml", "the config file") + +func main() { + flag.Parse() + + var c config.Config + conf.MustLoad(*configFile, &c) + ctx := svc.NewServiceContext(c) + + s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) { + slurmTianhe.RegisterSlurmTianheServer(grpcServer, server.NewSlurmTianheServer(ctx)) + + if c.Mode == service.DevMode || c.Mode == service.TestMode { + reflection.Register(grpcServer) + } + }) + defer s.Stop() + + fmt.Printf("Starting rpc server at %s...\n", c.ListenOn) + s.Start() +} diff --git a/adaptor/slurm/slurmTianhe/rpc/slurmtianheclient/slurmtianhe.go b/adaptor/slurm/slurmTianhe/rpc/slurmtianheclient/slurmtianhe.go new file mode 100644 index 000000000..39bea8a5b --- /dev/null +++ b/adaptor/slurm/slurmTianhe/rpc/slurmtianheclient/slurmtianhe.go @@ -0,0 +1,40 @@ +// Code generated by goctl. DO NOT EDIT. +// Source: slurmTianhe.proto + +package slurmtianheclient + +import ( + "context" + + "PCM/adaptor/slurm/slurmTianhe/rpc/slurmTianhe" + + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" +) + +type ( + HistoryJob = slurmTianhe.HistoryJob + ListHistoryJobReq = slurmTianhe.ListHistoryJobReq + ListHistoryJobResp = slurmTianhe.ListHistoryJobResp + + SlurmTianhe interface { + // ListHistoryJob list all jobs from slurmdb + ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) + } + + defaultSlurmTianhe struct { + cli zrpc.Client + } +) + +func NewSlurmTianhe(cli zrpc.Client) SlurmTianhe { + return &defaultSlurmTianhe{ + cli: cli, + } +} + +// ListHistoryJob list all jobs from slurmdb +func (m *defaultSlurmTianhe) ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) { + client := slurmTianhe.NewSlurmTianheClient(m.cli.Conn()) + return client.ListHistoryJob(ctx, in, opts...) +} diff --git a/common/config/init.go b/common/config/init.go deleted file mode 100644 index 6877d413b..000000000 --- a/common/config/init.go +++ /dev/null @@ -1,34 +0,0 @@ -package config - -import ( - "code.gitlink.org.cn/JCCE/PCM.git/common/global" - "code.gitlink.org.cn/JCCE/PCM.git/common/model" - "github.com/fsnotify/fsnotify" - "github.com/spf13/viper" - "log" -) - -func InitConfig() { - // 实例化viper - v := viper.New() - //文件的路径如何设置 - v.SetConfigFile("configs/pcm.yaml") - err := v.ReadInConfig() - if err != nil { - log.Println(err) - } - serverConfig := model.ServerConfig{} - //给serverConfig初始值 - err = v.Unmarshal(&serverConfig) - if err != nil { - log.Println(err) - } - // 传递给全局变量 - global.S = serverConfig - - //热重载配置 - v.OnConfigChange(func(e fsnotify.Event) { - log.Printf("config file:%s Op:%s\n", e.Name, e.Op) - }) - v.WatchConfig() -} diff --git a/common/global/globalVar.go b/common/global/globalVar.go deleted file mode 100644 index d80b26f13..000000000 --- a/common/global/globalVar.go +++ /dev/null @@ -1,10 +0,0 @@ -package global - -import ( - "code.gitlink.org.cn/JCCE/PCM.git/common/model" -) - -// S 全局变量 -var ( - S model.ServerConfig -) diff --git a/common/model/config.go b/common/model/config.go deleted file mode 100644 index ca61bcd26..000000000 --- a/common/model/config.go +++ /dev/null @@ -1,86 +0,0 @@ -package model - -type ServerConfig struct { - Name string `mapstructure:"name"` - GormInfo GormConfig `mapstructure:"gorm"` - RedisInfo RedisConfig `mapstructure:"redis"` - GatewayInfo GatewayConfig `mapstructure:"gateway"` - SlurmInfo SlurmConfig `mapstructure:"slurm"` - PodInfo PodConfig `mapstructure:"pod"` - VmInfo VmConfig `mapstructure:"vm"` - AliInfo AliConfig `mapstructure:"ali"` - TencentInfo TencentConfig `mapstructure:"tencent"` - HuaweiInfo HuaweiConfig `mapstructure:"huawei"` - K8sInfo K8sConfig `mapstructure:"k8s"` -} - -type GormConfig struct { - Host string `mapstructure:"host"` - Port int `mapstructure:"port"` - Name string `mapstructure:"name"` - Password string `mapstructure:"password"` - DBName string `mapstructure:"dbName"` -} - -type RedisConfig struct { - Host string `mapstructure:"host"` - Port int `mapstructure:"port"` - Password string `mapstructure:"password"` - DB int `mapstructure:"db"` -} - -type GatewayConfig struct { - Address string `mapstructure:"addr"` -} - -type SlurmConfig struct { - Address string `mapstructure:"addr"` -} - -type PodConfig struct { - Address string `mapstructure:"addr"` -} - -type VmConfig struct { - Address string `mapstructure:"addr"` -} - -type WebSocketConfig struct { - Address string `mapstructure:"addr"` - Username string `mapstructure:"name"` -} - -type AliConfig struct { - provider string `mapstructure:"provider"` - name string `mapstructure:"name"` - accessid string `mapstructure:"accessid"` - accesssecret string `mapstructure:"accesssecret"` -} - -type TencentConfig struct { - provider string `mapstructure:"provider"` - name string `mapstructure:"name"` - accessid string `mapstructure:"accessid"` - accesssecret string `mapstructure:"accesssecret"` -} - -type HuaweiConfig struct { - provider string `mapstructure:"provider"` - name string `mapstructure:"name"` - accessid string `mapstructure:"accessid"` - accesssecret string `mapstructure:"accesssecret"` -} - -type K8sConfig struct { - provider string `mapstructure:"provider"` - name string `mapstructure:"name"` - url string `mapstructure:"url"` - token string `mapstructure:"token"` -} - -type HarvesterConfig struct { - provider string `mapstructure:"provider"` - name string `mapstructure:"name"` - url string `mapstructure:"url"` - token string `mapstructure:"token"` -} diff --git a/common/result/httpResult.go b/common/result/httpResult.go new file mode 100644 index 000000000..1532a327f --- /dev/null +++ b/common/result/httpResult.go @@ -0,0 +1,85 @@ +package result + +import ( + "fmt" + "net/http" + + "PCM/common/xerr" + + "github.com/pkg/errors" + "github.com/zeromicro/go-zero/core/logx" + "github.com/zeromicro/go-zero/rest/httpx" + "google.golang.org/grpc/status" +) + +// http返回 +func HttpResult(r *http.Request, w http.ResponseWriter, resp interface{}, err error) { + + if err == nil { + //成功返回 + r := Success(resp) + httpx.WriteJson(w, http.StatusOK, r) + } else { + //错误返回 + errcode := xerr.SERVER_COMMON_ERROR + errmsg := "服务器开小差啦,稍后再来试一试" + + causeErr := errors.Cause(err) // err类型 + if e, ok := causeErr.(*xerr.CodeError); ok { //自定义错误类型 + //自定义CodeError + errcode = e.GetErrCode() + errmsg = e.GetErrMsg() + } else { + if gstatus, ok := status.FromError(causeErr); ok { // grpc err错误 + grpcCode := uint32(gstatus.Code()) + if xerr.IsCodeErr(grpcCode) { //区分自定义错误跟系统底层、db等错误,底层、db错误不能返回给前端 + errcode = grpcCode + errmsg = gstatus.Message() + } + } + } + + logx.WithContext(r.Context()).Errorf("【API-ERR】 : %+v ", err) + + httpx.WriteJson(w, http.StatusBadRequest, Error(errcode, errmsg)) + } +} + +// 授权的http方法 +func AuthHttpResult(r *http.Request, w http.ResponseWriter, resp interface{}, err error) { + + if err == nil { + //成功返回 + r := Success(resp) + httpx.WriteJson(w, http.StatusOK, r) + } else { + //错误返回 + errcode := xerr.SERVER_COMMON_ERROR + errmsg := "服务器开小差啦,稍后再来试一试" + + causeErr := errors.Cause(err) // err类型 + if e, ok := causeErr.(*xerr.CodeError); ok { //自定义错误类型 + //自定义CodeError + errcode = e.GetErrCode() + errmsg = e.GetErrMsg() + } else { + if gstatus, ok := status.FromError(causeErr); ok { // grpc err错误 + grpcCode := uint32(gstatus.Code()) + if xerr.IsCodeErr(grpcCode) { //区分自定义错误跟系统底层、db等错误,底层、db错误不能返回给前端 + errcode = grpcCode + errmsg = gstatus.Message() + } + } + } + + logx.WithContext(r.Context()).Errorf("【GATEWAY-ERR】 : %+v ", err) + + httpx.WriteJson(w, http.StatusUnauthorized, Error(errcode, errmsg)) + } +} + +// http 参数错误返回 +func ParamErrorResult(r *http.Request, w http.ResponseWriter, err error) { + errMsg := fmt.Sprintf("%s ,%s", xerr.MapErrMsg(xerr.REUQEST_PARAM_ERROR), err.Error()) + httpx.WriteJson(w, http.StatusBadRequest, Error(xerr.REUQEST_PARAM_ERROR, errMsg)) +} diff --git a/common/result/jobResult.go b/common/result/jobResult.go new file mode 100644 index 000000000..af9f35fbc --- /dev/null +++ b/common/result/jobResult.go @@ -0,0 +1,44 @@ +package result + +import ( + "context" + + "PCM/common/xerr" + + "github.com/pkg/errors" + "github.com/zeromicro/go-zero/core/logx" + "google.golang.org/grpc/status" +) + +// job返回 +func JobResult(ctx context.Context, resp interface{}, err error) { + if err == nil { + // 成功返回 ,只有dev环境下才会打印info,线上不显示 + if resp != nil { + logx.Infof("resp: %+v", resp) + } + return + } else { + errCode := xerr.SERVER_COMMON_ERROR + errMsg := "服务器开小差啦,稍后再来试一试" + + // 错误返回 + causeErr := errors.Cause(err) // err类型 + if e, ok := causeErr.(*xerr.CodeError); ok { // 自定义错误类型 + // 自定义CodeError + errCode = e.GetErrCode() + errMsg = e.GetErrMsg() + } else { + if gstatus, ok := status.FromError(causeErr); ok { // grpc err错误 + grpcCode := uint32(gstatus.Code()) + if xerr.IsCodeErr(grpcCode) { // 区分自定义错误跟系统底层、db等错误,底层、db错误不能返回给前端 + errCode = grpcCode + errMsg = gstatus.Message() + } + } + } + + logx.WithContext(ctx).Errorf("【JOB-ERR】 : %+v ,errCode:%d , errMsg:%s ", err, errCode, errMsg) + return + } +} diff --git a/common/result/responseBean.go b/common/result/responseBean.go new file mode 100644 index 000000000..d29e1e0eb --- /dev/null +++ b/common/result/responseBean.go @@ -0,0 +1,21 @@ +package result + +type ResponseSuccessBean struct { + Code uint32 `json:"code"` + Msg string `json:"msg"` + Data interface{} `json:"data"` +} +type NullJson struct{} + +func Success(data interface{}) *ResponseSuccessBean { + return &ResponseSuccessBean{200, "OK", data} +} + +type ResponseErrorBean struct { + Code uint32 `json:"code"` + Msg string `json:"msg"` +} + +func Error(errCode uint32, errMsg string) *ResponseErrorBean { + return &ResponseErrorBean{errCode, errMsg} +} diff --git a/common/server/grpc.go b/common/server/grpc.go deleted file mode 100644 index fb6dddcb2..000000000 --- a/common/server/grpc.go +++ /dev/null @@ -1,34 +0,0 @@ -package server - -import ( - "net" - - "go.uber.org/zap" - "google.golang.org/grpc" -) - -// GRPCConfig 定义一个gRPC服务 -type GRPCConfig struct { - Name string - Addr string - AuthPublicKeyFile string - RegisterFunc func(*grpc.Server) - Logger *zap.Logger -} - -// RunGRPCServer 运行一个gRPC服务 -func RunGRPCServer(c *GRPCConfig) error { - nameField := zap.String("name", c.Name) - lis, err := net.Listen("tcp", c.Addr) - if err != nil { - c.Logger.Fatal("cannot listen", nameField, zap.Error(err)) - } - - var opts []grpc.ServerOption - - s := grpc.NewServer(opts...) - c.RegisterFunc(s) - - c.Logger.Info("server started", nameField, zap.String("addr", c.Addr)) - return s.Serve(lis) -} diff --git a/common/ssh/ssh_util.go b/common/ssh/ssh_util.go deleted file mode 100644 index 98c5dc886..000000000 --- a/common/ssh/ssh_util.go +++ /dev/null @@ -1,70 +0,0 @@ -package ssh - -import ( - "fmt" - gossh "golang.org/x/crypto/ssh" - "io" - "log" - "net" - "os/exec" -) - -// Cli 连接信息 -type Cli struct { - User string - Pwd string - Addr string - Client *gossh.Client - Session *gossh.Session - LastResult string -} - -// Connect 连接对象 -func (c *Cli) Connect() (*Cli, error) { - config := &gossh.ClientConfig{} - config.SetDefaults() - config.User = c.User - config.Auth = []gossh.AuthMethod{gossh.Password(c.Pwd)} - config.HostKeyCallback = func(hostname string, remote net.Addr, key gossh.PublicKey) error { return nil } - client, err := gossh.Dial("tcp", c.Addr, config) - if nil != err { - return c, err - } - c.Client = client - return c, nil -} - -// Run 执行shell -func (c Cli) Run(shell string) (string, error) { - if c.Client == nil { - if _, err := c.Connect(); err != nil { - return "", err - } - } - session, err := c.Client.NewSession() - if err != nil { - return "", err - } - // 关闭会话 - defer session.Close() - buf, err := session.CombinedOutput(shell) - - c.LastResult = string(buf) - return c.LastResult, err -} - -func ExecCommand(strCommand string) string { - cmd := exec.Command("/bin/bash", "-c", strCommand) - stdout, _ := cmd.StdoutPipe() - errReader, _ := cmd.StderrPipe() - defer stdout.Close() - if err := cmd.Start(); err != nil { - log.Fatal(err) - } - cmdReader := io.MultiReader(stdout, errReader) - outBytes, _ := io.ReadAll(cmdReader) - if err := cmd.Wait(); err != nil { - fmt.Println("err:", err.Error()) - } - return string(outBytes) -} diff --git a/common/tenanter/access_key.go b/common/tenanter/access_key.go deleted file mode 100644 index 0d4226a29..000000000 --- a/common/tenanter/access_key.go +++ /dev/null @@ -1,49 +0,0 @@ -package tenanter - -type AccessKeyTenant struct { - name string - id string - secret string - url string - token string -} - -func NewTenantWithAccessKey(name, accessKeyId, accessKeySecret, url, token string) Tenanter { - return &AccessKeyTenant{ - name: name, - id: accessKeyId, - secret: accessKeySecret, - url: url, - token: token, - } -} - -func (tenant *AccessKeyTenant) AccountName() string { - return tenant.name -} - -func (tenant *AccessKeyTenant) Clone() Tenanter { - return &AccessKeyTenant{ - id: tenant.id, - secret: tenant.secret, - name: tenant.name, - url: tenant.url, - token: tenant.token, - } -} - -func (tenant *AccessKeyTenant) GetId() string { - return tenant.id -} - -func (tenant *AccessKeyTenant) GetSecret() string { - return tenant.secret -} - -func (tenant *AccessKeyTenant) GetUrl() string { - return tenant.url -} - -func (tenant *AccessKeyTenant) GetToken() string { - return tenant.token -} diff --git a/common/tenanter/main_test.go b/common/tenanter/main_test.go deleted file mode 100644 index f70a91b6c..000000000 --- a/common/tenanter/main_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package tenanter - -import ( - pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl" - "os" - "testing" -) - -var ( - aliTenant []Tenanter - tcTenant []Tenanter - hwTenant []Tenanter -) - -func TestMain(m *testing.M) { - err := LoadCloudConfigs("../../tenanter.yaml") - if err != nil { - panic(err) - } - - if aliTenant, err = GetTenanters(pbtenant.CloudProvider_ali); err != nil { - panic("get aliTenant failed") - } - if tcTenant, err = GetTenanters(pbtenant.CloudProvider_tencent); err != nil { - panic("get tcTenantr failed") - } - if hwTenant, err = GetTenanters(pbtenant.CloudProvider_huawei); err != nil { - panic("get hwTenant failed") - } - - os.Exit(m.Run()) -} diff --git a/common/tenanter/region.go b/common/tenanter/region.go deleted file mode 100644 index 1bc2da01b..000000000 --- a/common/tenanter/region.go +++ /dev/null @@ -1,162 +0,0 @@ -package tenanter - -import ( - pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl" - "strings" - - "github.com/pkg/errors" -) - -var ( - ErrNoExistAliRegionId = errors.New("region id not exist in ali") - ErrNoExistTencentRegionId = errors.New("region id not exist in tencent") - ErrNoExistHuaweiRegionId = errors.New("region id not exist in huawei") - ErrNoExistK8SRegionId = errors.New("region id not exist in k8s") -) - -type Region interface { - GetId() int32 - GetName() string -} - -type region struct { - provider pbtenant.CloudProvider - regionId int32 - regionName string -} - -func NewRegion(provider pbtenant.CloudProvider, regionId int32) (Region, error) { - r := ®ion{ - provider: provider, - regionId: regionId, - } - var err error - - switch provider { - case pbtenant.CloudProvider_ali: - r.regionName, err = GetAliRegionName(regionId) - case pbtenant.CloudProvider_tencent: - r.regionName, err = GetTencentRegionName(regionId) - case pbtenant.CloudProvider_huawei: - r.regionName, err = GetHuaweiRegionName(regionId) - //case pbtenant.CloudProvider_aws: - // r.regionName, err = getAwsRegionName(regionId) - } - - return r, err -} - -func (r *region) GetName() string { - return r.regionName -} - -func (r *region) GetId() int32 { - return r.regionId -} - -func GetAllRegionIds(provider pbtenant.CloudProvider) (regions []Region) { - switch provider { - case pbtenant.CloudProvider_ali: - for rId := range pbtenant.AliRegionId_name { - if rId != int32(pbtenant.AliRegionId_ali_all) { - region, _ := NewRegion(provider, rId) - regions = append(regions, region) - } - } - case pbtenant.CloudProvider_tencent: - for rId := range pbtenant.TencentRegionId_name { - if rId != int32(pbtenant.TencentRegionId_tc_all) { - region, _ := NewRegion(provider, rId) - regions = append(regions, region) - } - } - case pbtenant.CloudProvider_huawei: - for rId := range pbtenant.HuaweiRegionId_name { - if rId != int32(pbtenant.HuaweiRegionId_hw_all) { - region, _ := NewRegion(provider, rId) - regions = append(regions, region) - } - } - case pbtenant.CloudProvider_k8s: - for rId := range pbtenant.K8SRegionId_name { - region, _ := NewRegion(provider, rId) - regions = append(regions, region) - } - } - return -} - -// GetAliRegionName prefix ali_ -func GetAliRegionName(regionId int32) (string, error) { - name, ok := pbtenant.AliRegionId_name[regionId] - if !ok || regionId == int32(pbtenant.AliRegionId_ali_all) { - return "", errors.WithMessagef(ErrNoExistAliRegionId, "input region id is %d", regionId) - } - region := strings.ReplaceAll(name, "_", "-") - return region[4:], nil -} - -// GetAliRegionId prefix ali_ -func GetAliRegionId(regionName string) (int32, error) { - regionName = "ali_" + strings.ReplaceAll(regionName, "-", "_") - id, ok := pbtenant.AliRegionId_value[regionName] - if !ok || regionName == "" { - return 0, errors.WithMessagef(ErrNoExistAliRegionId, "input region id is %s", regionName) - } - return id, nil -} - -// GetTencentRegionName prefix tencent -func GetTencentRegionName(regionId int32) (string, error) { - name, ok := pbtenant.TencentRegionId_name[regionId] - if !ok || regionId == int32(pbtenant.TencentRegionId_tc_all) { - return "", errors.WithMessagef(ErrNoExistTencentRegionId, "input region id is %d", regionId) - } - region := strings.ReplaceAll(name, "_", "-") - return region[3:], nil -} - -// GetTencentRegionId prefix tc_ -func GetTencentRegionId(regionName string) (int32, error) { - regionName = "tc_" + strings.ReplaceAll(regionName, "-", "_") - id, ok := pbtenant.TencentRegionId_value[regionName] - if !ok || regionName == "" { - return 0, errors.WithMessagef(ErrNoExistTencentRegionId, "input region id is %s", regionName) - } - return id, nil -} - -// GetHuaweiRegionName prefix huawei -func GetHuaweiRegionName(regionId int32) (string, error) { - name, ok := pbtenant.HuaweiRegionId_name[regionId] - if !ok || regionId == int32(pbtenant.HuaweiRegionId_hw_all) { - return "", errors.WithMessagef(ErrNoExistHuaweiRegionId, "input region id is %d", regionId) - } - region := strings.ReplaceAll(name, "_", "-") - return region[3:], nil -} - -// GetHuaweiRegionId prefix huawei -func GetHuaweiRegionId(regionName string) (int32, error) { - regionName = "hw_" + strings.ReplaceAll(regionName, "-", "_") - id, ok := pbtenant.HuaweiRegionId_value[regionName] - if !ok || regionName == "" { - return 0, errors.WithMessagef(ErrNoExistHuaweiRegionId, "input region id is %s", regionName) - } - return id, nil -} - -// GetK8SRegionName prefix ali_ -func GetK8SRegionName(regionId int32) (string, error) { - name, ok := pbtenant.K8SRegionId_name[regionId] - if !ok || regionId == int32(pbtenant.K8SRegionId_k8s_all) { - return "", errors.WithMessagef(ErrNoExistK8SRegionId, "input region id is %d", regionId) - } - region := strings.ReplaceAll(name, "_", "-") - return region[4:], nil -} - -// GetK8SRegionId prefix ali_ -func GetK8SRegionId(regionName string) (int32, error) { - return 0, nil -} diff --git a/common/tenanter/region_test.go b/common/tenanter/region_test.go deleted file mode 100644 index d21dd06b6..000000000 --- a/common/tenanter/region_test.go +++ /dev/null @@ -1,27 +0,0 @@ -package tenanter - -import ( - pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl" - "testing" -) - -func TestGetAllRegionIds(t *testing.T) { - type args struct { - provider pbtenant.CloudProvider - } - tests := []struct { - name string - args args - }{ - {name: "ali", args: args{provider: pbtenant.CloudProvider_ali}}, - {name: "tencent", args: args{provider: pbtenant.CloudProvider_tencent}}, - {name: "huawei", args: args{provider: pbtenant.CloudProvider_huawei}}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if gotRegions := GetAllRegionIds(tt.args.provider); len(gotRegions) == 0 { - t.Errorf("GetAllRegionIds() = %v, want >0", gotRegions) - } - }) - } -} diff --git a/common/tenanter/tenanter.go b/common/tenanter/tenanter.go deleted file mode 100644 index 7381f894e..000000000 --- a/common/tenanter/tenanter.go +++ /dev/null @@ -1,118 +0,0 @@ -package tenanter - -import ( - pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl" - "encoding/json" - "flag" - "github.com/golang/glog" - "os" - "sync" - - "github.com/go-yaml/yaml" - "github.com/pkg/errors" -) - -const osEnvKey = "CLOUD_FITTER_CONFIGS" - -var ( - ErrLoadTenanterFromFile = errors.New("load tenanter from file failed") - ErrLoadTenanterFromOsEnv = errors.New("load tenanter from os env failed") - ErrLoadTenanterFileEmpty = errors.New("load tenanter from file failed") - ErrNoTenanters = errors.New("no tenanters for the cloud") -) - -type Tenanter interface { - AccountName() string - Clone() Tenanter -} - -var gStore = globalStore{stores: make(map[pbtenant.CloudProvider][]Tenanter)} - -type globalStore struct { - sync.Mutex - stores map[pbtenant.CloudProvider][]Tenanter -} - -func LoadCloudConfigs(configFile string) error { - if err := LoadCloudConfigsFromFile(configFile); errors.Is(err, ErrLoadTenanterFileEmpty) { - return LoadCloudConfigsFromOsEnv() - } - return nil -} - -func LoadCloudConfigsFromFile(configFile string) error { - b, err := os.ReadFile(configFile) - if err != nil { - return ErrLoadTenanterFileEmpty - } - - var configs = new(pbtenant.CloudConfigs) - if err = yaml.Unmarshal(b, configs); err != nil { - return errors.WithMessage(ErrLoadTenanterFromFile, err.Error()) - } - - return load(configs) -} - -func LoadCloudConfigsFromOsEnv() error { - data := os.Getenv(osEnvKey) - var configs = new(pbtenant.CloudConfigs) - if err := json.Unmarshal([]byte(data), configs); err != nil { - return errors.WithMessage(ErrLoadTenanterFromOsEnv, err.Error()) - } - - return load(configs) -} - -func ShowConfigJson() ([]byte, error) { - data := os.Getenv(osEnvKey) - var configs = new(pbtenant.CloudConfigs) - if err := yaml.Unmarshal([]byte(data), configs); err != nil { - return nil, errors.WithMessage(ErrLoadTenanterFromFile, err.Error()) - } - - return json.Marshal(configs) -} - -func load(configs *pbtenant.CloudConfigs) error { - gStore.Lock() - defer gStore.Unlock() - - for _, c := range configs.Configs { - //if c.AccessId != "" && c.AccessSecret != "" { - gStore.stores[c.Provider] = append(gStore.stores[c.Provider], NewTenantWithAccessKey(c.Name, c.AccessId, c.AccessSecret, c.Url, c.Token)) - //} - } - return nil -} - -func GetTenanters(provider pbtenant.CloudProvider) ([]Tenanter, error) { - gStore.Lock() - defer gStore.Unlock() - - if len(gStore.stores[provider]) == 0 { - return nil, errors.WithMessagef(ErrNoTenanters, "cloud is %v", provider) - } - - var tenanters = make([]Tenanter, len(gStore.stores[provider])) - for k := range gStore.stores[provider] { - tenanters[k] = gStore.stores[provider][k].Clone() - } - return tenanters, nil -} - -func GenTenanter(configPath string) { - var configFile string - flag.StringVar(&configFile, "conf", configPath, "tenanter.yaml") - flag.Parse() - defer glog.Flush() - - if err := LoadCloudConfigsFromFile(configFile); err != nil { - if !errors.Is(err, ErrLoadTenanterFileEmpty) { - glog.Fatalf("LoadCloudConfigsFromFile error %+v", err) - } - glog.Warningf("LoadCloudConfigsFromFile empty file path %s", configFile) - } - - glog.Infof("load tenant from file finished") -} diff --git a/common/tenanter/tenanter_test.go b/common/tenanter/tenanter_test.go deleted file mode 100644 index 1c9b35068..000000000 --- a/common/tenanter/tenanter_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package tenanter - -import ( - "testing" -) - -func TestShowConfigJson(t *testing.T) { - type args struct { - } - tests := []struct { - name string - args args - wantErr bool - }{ - {name: "right", args: args{}, wantErr: false}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := ShowConfigJson() - if (err != nil) != tt.wantErr { - t.Errorf("ShowConfigJson() error = %v, wantErr %v", err, tt.wantErr) - return - } - if err == nil { - t.Log(string(got)) - } - }) - } -} diff --git a/common/tool/coinconvert.go b/common/tool/coinconvert.go new file mode 100644 index 000000000..87e479628 --- /dev/null +++ b/common/tool/coinconvert.go @@ -0,0 +1,19 @@ +package tool + +import "github.com/shopspring/decimal" + +var oneHundredDecimal decimal.Decimal = decimal.NewFromInt(100) + +// 分转元 +func Fen2Yuan(fen int64) float64 { + y, _ := decimal.NewFromInt(fen).Div(oneHundredDecimal).Truncate(2).Float64() + return y +} + +// 元转分 +func Yuan2Fen(yuan float64) int64 { + + f, _ := decimal.NewFromFloat(yuan).Mul(oneHundredDecimal).Truncate(0).Float64() + return int64(f) + +} diff --git a/common/tool/copier.go b/common/tool/copier.go new file mode 100644 index 000000000..4dbca7943 --- /dev/null +++ b/common/tool/copier.go @@ -0,0 +1,50 @@ +package tool + +import ( + "github.com/jinzhu/copier" + "github.com/pkg/errors" + "strconv" + "time" +) + +var Converters = []copier.TypeConverter{ + { + SrcType: time.Time{}, + DstType: copier.String, + Fn: func(src interface{}) (interface{}, error) { + s, ok := src.(time.Time) + + if !ok { + return nil, errors.New("src type not matching") + } + + return s.Format(time.RFC3339), nil + }, + }, + { + SrcType: copier.String, + DstType: copier.Int, + Fn: func(src interface{}) (interface{}, error) { + s, ok := src.(string) + + if !ok { + return nil, errors.New("src type not matching") + } + + return strconv.Atoi(s) + }, + }, + { + SrcType: copier.String, + DstType: copier.Bool, + Fn: func(src interface{}) (interface{}, error) { + s, ok := src.(string) + + if !ok { + return nil, errors.New("src type not matching") + } + + return strconv.ParseBool(s) + }, + }, +} diff --git a/common/tool/encryption.go b/common/tool/encryption.go new file mode 100644 index 000000000..b94f562e0 --- /dev/null +++ b/common/tool/encryption.go @@ -0,0 +1,23 @@ +package tool + +import ( + "crypto/md5" + "fmt" + "io" +) + +/** 加密方式 **/ + +func Md5ByString(str string) string { + m := md5.New() + _, err := io.WriteString(m, str) + if err != nil { + panic(err) + } + arr := m.Sum(nil) + return fmt.Sprintf("%x", arr) +} + +func Md5ByBytes(b []byte) string { + return fmt.Sprintf("%x", md5.Sum(b)) +} diff --git a/common/tool/krand.go b/common/tool/krand.go new file mode 100644 index 000000000..fb5b8695f --- /dev/null +++ b/common/tool/krand.go @@ -0,0 +1,28 @@ +package tool + +import ( + "math/rand" + "time" +) + +const ( + KC_RAND_KIND_NUM = 0 // 纯数字 + KC_RAND_KIND_LOWER = 1 // 小写字母 + KC_RAND_KIND_UPPER = 2 // 大写字母 + KC_RAND_KIND_ALL = 3 // 数字、大小写字母 +) + +// 随机字符串 +func Krand(size int, kind int) string { + ikind, kinds, result := kind, [][]int{[]int{10, 48}, []int{26, 97}, []int{26, 65}}, make([]byte, size) + is_all := kind > 2 || kind < 0 + rand.Seed(time.Now().UnixNano()) + for i := 0; i < size; i++ { + if is_all { // random ikind + ikind = rand.Intn(3) + } + scope, base := kinds[ikind][0], kinds[ikind][1] + result[i] = uint8(base + rand.Intn(scope)) + } + return string(result) +} diff --git a/common/tool/krand_test.go b/common/tool/krand_test.go new file mode 100644 index 000000000..c5c0356ce --- /dev/null +++ b/common/tool/krand_test.go @@ -0,0 +1,8 @@ +package tool + +import "testing" + +func TestMd5ByString(t *testing.T) { + s := Md5ByString("AAA") + t.Log(s) +} diff --git a/common/tool/placeholders.go b/common/tool/placeholders.go new file mode 100644 index 000000000..99113cf97 --- /dev/null +++ b/common/tool/placeholders.go @@ -0,0 +1,15 @@ +package tool + +import "strings" + +// 替换 +func InPlaceholders(n int) string { + var b strings.Builder + for i := 0; i < n-1; i++ { + b.WriteString("?,") + } + if n > 0 { + b.WriteString("?") + } + return b.String() +} diff --git a/common/uniqueid/uniqueid.go b/common/uniqueid/uniqueid.go new file mode 100644 index 000000000..ff4c4746c --- /dev/null +++ b/common/uniqueid/uniqueid.go @@ -0,0 +1,23 @@ +package uniqueid + +import ( + "github.com/sony/sonyflake" + "github.com/zeromicro/go-zero/core/logx" +) + +var flake *sonyflake.Sonyflake + +func init() { + flake = sonyflake.NewSonyflake(sonyflake.Settings{}) +} + +func GenId() int64 { + + id, err := flake.NextID() + if err != nil { + logx.Severef("flake NextID failed with %s \n", err) + panic(err) + } + + return int64(id) +} diff --git a/common/xerr/errCode.go b/common/xerr/errCode.go new file mode 100644 index 000000000..46cd2c36b --- /dev/null +++ b/common/xerr/errCode.go @@ -0,0 +1,16 @@ +package xerr + +// 成功返回 +const OK uint32 = 200 + +/**(前3位代表业务,后三位代表具体功能)**/ + +// 全局错误码 +const SERVER_COMMON_ERROR uint32 = 100001 +const REUQEST_PARAM_ERROR uint32 = 100002 +const TOKEN_EXPIRE_ERROR uint32 = 100003 +const TOKEN_GENERATE_ERROR uint32 = 100004 +const DB_ERROR uint32 = 100005 +const DB_UPDATE_AFFECTED_ZERO_ERROR uint32 = 100006 + +//用户模块 diff --git a/common/xerr/errMsg.go b/common/xerr/errMsg.go new file mode 100644 index 000000000..ece91101f --- /dev/null +++ b/common/xerr/errMsg.go @@ -0,0 +1,30 @@ +package xerr + +var message map[uint32]string + +func init() { + message = make(map[uint32]string) + message[OK] = "SUCCESS" + message[SERVER_COMMON_ERROR] = "服务器开小差啦,稍后再来试一试" + message[REUQEST_PARAM_ERROR] = "参数错误" + message[TOKEN_EXPIRE_ERROR] = "token失效,请重新登陆" + message[TOKEN_GENERATE_ERROR] = "生成token失败" + message[DB_ERROR] = "数据库繁忙,请稍后再试" + message[DB_UPDATE_AFFECTED_ZERO_ERROR] = "更新数据影响行数为0" +} + +func MapErrMsg(errcode uint32) string { + if msg, ok := message[errcode]; ok { + return msg + } else { + return "服务器开小差啦,稍后再来试一试" + } +} + +func IsCodeErr(errcode uint32) bool { + if _, ok := message[errcode]; ok { + return true + } else { + return false + } +} diff --git a/common/xerr/errors.go b/common/xerr/errors.go new file mode 100644 index 000000000..c6ecf4bf3 --- /dev/null +++ b/common/xerr/errors.go @@ -0,0 +1,39 @@ +package xerr + +import ( + "fmt" +) + +/** +常用通用固定错误 +*/ + +type CodeError struct { + errCode uint32 + errMsg string +} + +// 返回给前端的错误码 +func (e *CodeError) GetErrCode() uint32 { + return e.errCode +} + +// 返回给前端显示端错误信息 +func (e *CodeError) GetErrMsg() string { + return e.errMsg +} + +func (e *CodeError) Error() string { + return fmt.Sprintf("ErrCode:%d,ErrMsg:%s", e.errCode, e.errMsg) +} + +func NewErrCodeMsg(errCode uint32, errMsg string) *CodeError { + return &CodeError{errCode: errCode, errMsg: errMsg} +} +func NewErrCode(errCode uint32) *CodeError { + return &CodeError{errCode: errCode, errMsg: MapErrMsg(errCode)} +} + +func NewErrMsg(errMsg string) *CodeError { + return &CodeError{errCode: SERVER_COMMON_ERROR, errMsg: errMsg} +} diff --git a/configs/pcm.yaml b/configs/pcm.yaml deleted file mode 100644 index d4fb0470d..000000000 --- a/configs/pcm.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# settings-dev.yaml -name: "PCM" - -gorm: - name: "root" - host: "localhost" - port: 3306 - password: "123456" - dbName: "space" - -redis: - host: "localhost" - port: 6379 - password: "" - DB: 10 - -mongodb: - host: "localhost" - port: 27017 - dbName: "space" - -gateway: - addr: ":8880" - -slurm: - addr: "localhost:8881" - -pod: - addr: "localhost:8882" - -vm: - addr: "localhost:8883" \ No newline at end of file diff --git a/configs/tenanter-template.yaml b/configs/tenanter-template.yaml deleted file mode 100644 index 5e14b9736..000000000 --- a/configs/tenanter-template.yaml +++ /dev/null @@ -1,18 +0,0 @@ -configs: - # provider 0:阿里云 1:腾讯云 2:华为云 - - provider: 0 - name: "ali-PCM" - accessid: "" - accesssecret: "" - - provider: 1 - name: "tencent-PCM" - accessid: "" - accesssecret: "" - - provider: 2 - name: "huawei-PCM" - accessid: "" - accesssecret: "" - - provider: 3 - name: "K8S-PCM" - url: "" - token: "" \ No newline at end of file diff --git a/docs/etc/service/pcm-gateway.service b/docs/etc/service/pcm-gateway.service deleted file mode 100644 index 88e0c1195..000000000 --- a/docs/etc/service/pcm-gateway.service +++ /dev/null @@ -1,19 +0,0 @@ -[Unit] -Description="pcm-gateway" -Documentation=https://www.gitlink.org.cn/JCCE/PCM -After=network.target - -[Service] -Type=simple - -ExecStart=/usr/local/bin/pcm-gateway - -Restart=on-failure -SuccessExitStatus=0 -LimitNOFILE=65536 -StandardOutput=syslog -StandardError=syslog -SyslogIdentifier=pcm-gateway - -[Install] -WantedBy=multi-user.target diff --git a/docs/etc/service/pcm-pod.service b/docs/etc/service/pcm-pod.service deleted file mode 100644 index 33a20a493..000000000 --- a/docs/etc/service/pcm-pod.service +++ /dev/null @@ -1,19 +0,0 @@ -[Unit] -Description="pcm-pod" -Documentation=https://www.gitlink.org.cn/JCCE/PCM -After=network.target - -[Service] -Type=simple - -ExecStart=/usr/local/bin/pcm-pod - -Restart=on-failure -SuccessExitStatus=0 -LimitNOFILE=65536 -StandardOutput=syslog -StandardError=syslog -SyslogIdentifier=pcm-pod - -[Install] -WantedBy=multi-user.target diff --git a/docs/etc/service/pcm-slurm.service b/docs/etc/service/pcm-slurm.service deleted file mode 100644 index 1c12c05a3..000000000 --- a/docs/etc/service/pcm-slurm.service +++ /dev/null @@ -1,19 +0,0 @@ -[Unit] -Description="pcm-slurm" -Documentation=https://www.gitlink.org.cn/JCCE/PCM -After=network.target - -[Service] -Type=simple - -ExecStart=/usr/local/bin/pcm-slurm - -Restart=on-failure -SuccessExitStatus=0 -LimitNOFILE=65536 -StandardOutput=syslog -StandardError=syslog -SyslogIdentifier=pcm-slurm - -[Install] -WantedBy=multi-user.target diff --git a/docs/etc/service/pcm-vm.service b/docs/etc/service/pcm-vm.service deleted file mode 100644 index 03dcfb2e3..000000000 --- a/docs/etc/service/pcm-vm.service +++ /dev/null @@ -1,19 +0,0 @@ -[Unit] -Description="pcm-vm" -Documentation=https://www.gitlink.org.cn/JCCE/PCM -After=network.target - -[Service] -Type=simple - -ExecStart=/usr/local/bin/pcm-vm - -Restart=on-failure -SuccessExitStatus=0 -LimitNOFILE=65536 -StandardOutput=syslog -StandardError=syslog -SyslogIdentifier=pcm-vm - -[Install] -WantedBy=multi-user.target diff --git a/docs/imges/pcm.png b/docs/imges/pcm.png deleted file mode 100644 index cfa3402d9f6341f994958181c901ea56df000214..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 101517 zcmb@ucUV*1wlBOA0tBgfL8^2Gq=P6@14tF52nq^P!~)VmdPxKoP>PBa=_1mUrbv?# zUz#9D7bG-6dM}|QgnTQ2`|N$r-sk!5bMGG-RuX3BnsdxCer1G6V?!PKW1PnT0HD{? z)w~P#~jpQ1t!89C!h{tA0rx07_$N_v|RaYZ`amYhD1r z&_MnNX>rTD1puVCdYbBHe%6ab8b5CH03Nv5t5yS{xZN|akgsli@M~Q@$t+yTEF6c7 zGnmku**CZMvlB!vIzPECqAMVB8A`Lv_k|K* zdw-Jk1s`0}A|j0s9tuF*d*x?TuH?>}jhJFbjJGEO*J?Tyyvr3UjJ@50-GXP{=|p_7 zm1d`-3Ojgc{s24$4lZEh8=c4sucH^HAgmDbn-IL0obvXc>jYU{Fkie!gGy-;b<|)n zaxUB~r_jL0bpLEAQ=~9*<^I@gcQj}t^l(63c*l8EUAH7fnI|?Wk-Z>0uE$}ZDHP_y z{hH6zS)>e(Nk9Bx={93-Z5mWY!skiuGl7Ubx1eK`8qh{v+SxA~B!wrYjqe1l_}rf+VfXBVm^!KM3j%^xoY zLH_3qILqO-RV$yhYX;KlpBw7i-{?Y6i;ueiqq+MuLy7{JV~PthJ2F&()JLCn5^{Kl z5!5acNcP`t$Wre|x!mk!TgaNiX&I)ke?I{hX)p)(@MaiuIM+WL`3-h>OJN9L>uAYL zTx}6(@+MQZRQvpw~juLh3D{>-ejIvlG7)-1}g=xbui%HRwz0) zJ(k2z@p^Zo2K^F3rj|Z#qTCd9>OX!Oa7~je5k6QZ_9#z^!wHLs@Im(`xRy3oe)x8= zjV)%QNLLdjV5x6g&ZWO4?QALFmtH8@KF}`n|^4iA2w^63ZONkrQn(hz)+tb!z(y0uUccf z__|&^f|(bZ;X6a&Y_}|X zE%*+nL?wtkn$xugr}y?L%1~fu{7ZxG{8In<(b7b1xJ3a`_V6QEjvWQDm|yhfA|;?z zn{hT>wNC5Lg#YaRwJ%PY)U?3%3No`dxR;fXJ7++W2#;XPOgas_^OnHA_A=f5}=`a?#*Rz@lARmol=Ej9_^Nws~NBmy{2A~+7IftBKY1yxzM`KXE*_T9cC0{WyD zd2|Fd!VdTRWaxlMMFPZ+5>4F$jyGCsBw_B_L)yA2Nc@HxcSz%I@=*L zfhk)HCbG4Ev~kDi{|wN^zD)}xK-?rC=(YMvzgSk*Ws}LbT$^4_hTX{BkT)#Q5^=R- zkYpW9vFrT(8fw``=~K7PF$`EWTcOA6bY_%21mbis-y}9s z^&|X`C~m;JY9aUeGm~t)9~@+5?J9m_m_wbk=BHe#-qNjiV6kYub&*HKt7*#dsZOI? z)30-@$NI~ybA}T1@0V1Wf5@2=AUco~@IPmadXOQ%Ua~;<^E(9r8ED;(cFLkKf%c|& z6m0?VgqHQe0@Gug-5V->*Z3O45($HjX;QHM^jy@+Al4 zxP&+?I~TBey;iflg3ivU8%2)i3}nmG2P)!ns=AQcgM<6kR=v(iw+v9%%*Hb1*zhfI zF04(WQ!;&A)ST4Qd9Ih!8YFf*d&0s*_IT5m1;YRjrn!?iI;-6Dkf&^oE84ze=hHsR z8s3$P)pJGu)FHX!Xz;IQjQo_rdzeIYY1VH}JN~2&R(GnQQ79h@|5U$FI^%RP?($0F zt;M`@k6yX8nw^ZAtvNk{}xs-cB$3fx{QoWP*$ zbIT`l9;v-3eKVbS>%9i1o|Na0?+xNhEDgioIdj$OBuDSqIfoE+N7ZNFlGHcaZnum4 zho^qXA&m<=P^;q)gn-IYU=xi_fHR2$BG(1b{nQ!&UMCVr3TJrPq!%af-sXi2(S^8i z>|!sB74o-7weLgg{cQD7q|7TYE~?D-z6iI>IgeEm7j97n9u`to+a%Gy;o%R`Peb`c z#)DgE)j05pI<7R|2WupH#l~k{suj=a2Tyv%z|k^%LJuPWzBiS&2)+}zwBSCE+h(Im zM?)+7yP_3~qkh&K-uXSktTvKF`BpJ&Na)f>^%td+<V|aj>#AS zwe#-1-bJ0Yb3LSRb&^ppiEB60^HC)(B&p3Lr!A~m8b=X|r;HbCEZlA|i;=y;Bd6UH zqCR!ZV}U3g|HdGmI{JB;jd4|Ix_Lwabtpc6JyYhz)|vPP>3BkmG=E-(C?lt!Bhs{r z!L$lR$Nay(!M~0`Ira3>H0^*VGbHomK}LY&@hTZ_!zz6{ueZ2KP?kjbefq&GpccFh zBc`qV=mqbef>?`m&a5Xbdf=(SdZ@%d#By5uHBk|q$$5H%61g?3ki zogd>}4rwLB0qxh%Kf<5ICIR!>65r`l>Z9x3%&x;9MsuId$dt>_mG$Wgn#kD&!!~S4 z`|YkK_&Cih-$DH%ibF0o@1Nfw6E=;ApJvu;W=M{`h!bAbjkhb(1isN?#Gqu z8H0nLS4VCP)8L!ruWKRS)vv>(p8})1(od+tGxX&Udg@XnG%{mQra9%8ctD( zjFV~i>>oxi71Qdg7YhRlkNr;|#s{lp@LXdG7f~B?_B^qGiZ({7W>kQXS=`DD3|5e3TcW zXiSdjuXmAr1ON3i#w=YQNe*mP0wibM>L7;Ke=$q5!G#Ka z%or(X-mXYqkXbT|9q~ofoZCW%xpA^k37jeBZ46DOpk9@A!hPjO*+et{azgLxic7NA zD0@TXBpJl&LYm8q-0A0MxRx%{2Ha59MDM9{5JF?GTtuj4IYytc zfwMmfPYPd2l6k_ohxUKf&OAO_<$)J7;(lFUJ}*M_4!nj&YGc?!2HVqt)6`FaUq@6W z8=}w2%qP;1=s)L}O#dQ^yTZjRnHGHfAJ?q;uD^@(PI$MeI8M@jP~}2k%8cS4_iN=w zZ-%P4eH6xUKG%;~4Gwtlp?RjME?sHLdFI8Puo9Vuc~8AKzU3s*enbW1W$8#^AZzae zP@;*}styi(5KuJ2Qgh1R#Pj-k&#J^cH|yNjs1{~hkG1p@Y>lc30z$xl&&$WSnK3V8 z3;v|t$N9WWeNy21xz_ULc)mPLw6x$-TdsuXpCE^NR5mfR?f7PmhM5Xe-$CS-fq@^M zKa6}#qYiFY7rP$eRhxHG8__=Le}BWqh?IzpI5|>FUv{M@2d3w60rnLql_5{yrvY2i zB2CF}W2C2Kg9_v&9FPJ|LEGEgX$7vNCQe;Vq5PSy0_gz(Avs}0_1Wh2e16~gb+K{J z>X-5fJv??fDCg}f`7o1^Q+cO2`?osO~QF?mr5*x%q8FfvXyI?18rpy~l4gw{cI zmp45@0PoItzue--@_f)|)XzND#>L-ZSKN!roiRaJ!u&j9x0u zbm;Jn5>+W>XpH@M*Km3eGU`t=L@3FmVN&#t1sc{k`eW{Az1msO~2w!?q5~A0@81Ne~}ni;jng( z+C5L`MGe?E$W@p}oJkM0PH?I3ZexquKCai?`+Q0HNjIZzgYt(Z>fc^9&V<8kBhFFt z*f}eAug&5LaxezJbjI4g+$%lrP0+j9ji9$1f~j_2v28Ui5kFw?+F_!BD!*C`;^Toh3zl!i!z~Iy%RJu&9v&Y(pdWstx3{|;Su}ra7Uoo#L;9&H0ys4?Xq`3ar`_BcT6sOG8FD%kQxi9l~^VWd>+bYZ<054%_Z(<&IA7Cdw z8dK3lt!*=O+mttcSR-vf(1P&F5X4Q;@+E%R^hF#HMO2l-^wU%I6I7XV4-lqKy0;a=q zgBa{oh*=KSGDGq?9H!YW_T5G5q&Ba)+{4=Sr(QkIw|Px2%FUO*@If0xbA}c~tDL@K zsl11M(q%W4ts1Q5V>*o1y^cdRJqq`yiGDE|%QVkgIy)j5ae_0luY>_jG-=A0vBzeo z_Ck-~xRib@`Z_)md4ACkw)gatFc|YwWHbU+IbH4#tFSKA%o#k*Y<*!tF;>TUfzVf( zqgOA*v>Cln>jsPj{dd z?#l>fKAJuG`}dSwufxH!eh)lOqOd(eY;rELgW8irDbMYkeUsJ;nOYa-W|(nT2zrxO zXj^As{{fA|j4IIw6(Nhqj~7==o3ev2>9ss36+-R1K4JLYCB8OXXUSCZ6<0;pDh*<> zSu$+D4x|+aB{bMNbAiT|W1>wuRuJ0f6WyIbxD$N}2EWL!w%Xzni>_a%)|t(yzc28A zT>+cs*#w2un%$}#gzXn$k!y8h+ZWd?W6oP8pr6OzOeby|vF%bA2*i&ufdFSqauIj@BNvq1?BDwjIx!4|{eC z6>#lEh+6ri7XKLG+qR#Hu41f4D2VQ&PCab-+F@KnVJo*xPYwjA3G(tZUc(;>&#U_8 z@o^jW6$hSv3ZyOT^NKuWh;4QY0I<3#&8te-EW(rQu(Dq4-94IhUvh zcAsyQe{5a{Lt&DT5pj31K1l{5yLBZh3HV7muhjDO+2j7H7eea8GFJ)&U3s%JpHPl( z!@9Hp_T_oKIvv>TiPy*tEMcxQWCOhkN3)N|B33)=P{WfnB_;0WQBKi?TVcV-p!4dV z)A#i7kr_KQt-Pd;d)3P+ZWhU~**AIR4VSq+2%2vlL5=p8$bAFARJCA~(Nv+0Tv2mC ztX=;vgh_YkzZYq*HkEV$ALrZax4cs7UH`(d#1gCtz6<#^ACXG9F|kTQZ_Dt_`hK0y zz6gT)E0nUDd}VYxa9#W)sg`P-jdN2WV7Zfys$MnSRA?x9`HZn^ay>|=tP{%qH+D7i z*~Ylef{cFbTkWp4bARQPE`B~wdhLn&{lST?(CqFLI(+P#I>y>zk;|G9!2Z6y36?SiuH#CkAQ(BcHc$7H%>o4t+D)UO3FufHSkr2VZB{F!<$wE);&mD^8! ziZZZNV7Ftrlp#D3Ya_R*8F`|5i-b{eKG6lc5v@^6S;eFulBZ$P$7uh+0`+a!>R$6> z!C4+m=2re!^?zY|luI*f zFn5$q*pO0vVUH7E@A(S6zZQVQ(&l*(1<;?7!3I;WGRIJUE8d&_+5u1p0W?UJHm>qe zi=3f3?ui;AK9b!DQ-)-LjCfxW#ELIAd%yiVlp)O?mHL2J`sr7K3WSMW+5(pJ>Q!zS zx8NpHwJLUhQ+^Aq6vzcXSfva!WSLSQR+0csQh^v|s0wb2&3H~*`b*zZ)ZCbdG z-@9EMG_TwdQSX!+)AOK+0x|0(}le*FD#u7~?*UtWyQzJ#U?E4HWb z5oPsN%S*xmlHCsmP-?=ishMe?m?)?mXTB*p-n>s;h>cWrDZ7vz7Vh)4oM0XNJce=U z4ZS6GWMk4~MyzRn%+ zPNT)3dyMr}=Eoq_M^t)@8JL_;2kbxlbUVHg#&|3ChK#hDuP91*<%%I+JIM-5U%zC@ zwc3aZ^{GoZ4J`|{())YSSGs$TM+JxFnq8cDC6pE5Pnd6sFEUX z3|YO7q%?drNk7irAaPeZfi*vZ<{2#Ht)@%MCE5p|EYTs=YVin-BAIM#=8}0hHLl~% z`%1Fv;nKASrZ2ukP(F(PmSplDo+?z8l5S_l`~?xmYoRSGmb)Ho+2L0*1}~5r+?Kl^ z0&Y=g)Q)pn3p3zGz4{bj(Ez z_BPgbI_ z!%Il*OvK3Il^o>hN9fwk+z=-lZE%Hbp8`xw_Ys)uf30E=P@b5@9O004;W=T-!U347 z`seo*TFK8}-^Qi`U-1i1-UTL}IKn>cTH0th##Y={+|dA?X$GFIY{zq;G&o#t;wT9| z{@ZIf*O~W{iT{Og9!7IqP1H|@d9;}2$5aMC3kB6Z_Gu>IJ_4`?{5mqY7%{96L&k1i zQuK|@vEX2N;f*e}FtFUrs07&Q~qOD433gd0%IH2z(9m-OI{WcPmO zR_`gLtG4W2IwmgRZxtuDA`b;`li4I7C&=s{Qh@;xo%wHMTaDoWhQzvY)#gqVIBQM8#=S@XU$hcDa}9k3JKjkY-gikj% zTTu2DoA9qzoFy6iquVh<>EO$@O{`sHg#jJ>dE@jxZz80dRix_+(O)cF z|4&qeKR|&lS;y?3Wd_i7h`6{BdD5P`gZec4Z<m;5ZW|7Na8*ixkcFC)lgB^*d%1S%JjuC5%m>LQaU_U=QnkVXT<_e38M{$-O+t3G z&?Nl8ySdn4m&8pthHQ#ro*-6z>jO2PfMNbp7)?l40|7k6pCAUC1n9r&!TbV^#Foy7 zr2C}J=8OnS`Q^14cq`)YB_5&d6{@Wvf6rg?4)7oL*xN0UP4gi9c0#Hz8Q^lt)rrU7 z%pZ?i6fPLmyuw?NhUC4PbH+6zXh}FPEq}D{oL+5YfvU|Uth6&ia&qZM5yQ98lmLl>lB~9v^NFSA2;W^CGiHUy@Gcg3BL^S zzm2JbJxkI=ordN<^QLDZ@isnPDBOaQ3J)Y83Y}r)ueQ06wWK5c_$+Jl$hBBvYA!c! z=C^98Td*Ns8P}H~AK#R}U15UFsZ%6Q&U&lgR=h-roHun?W+H`O3f%RMR42oCZgnC{ z7Jg3c6)2%M^fAKc!C*!78SxinFdV3Ap!ECo(|`T^hnN2c8TdaJHf=)z%wV55XhO=q zk_(tDzx4aA%NYVhA}V910e9kNursVAWRYjB|d)|YrT<>C2+erAAa-p1HJ zbuBAtg*X*hBO;Wh!|y-gj6CW^pfBoni3AdWRkdTlj}(X%Lamkq^MqPj$JF#=+2^L? zko|~SadHoVTTvSegq8LE089f0CcqXd=K ze$*%M8iW@Ew3y=%+xM2%z|$Bukn;LL&I@2B6X4?kFh6jyak&hwA+yB~fo*z7kvwqd z5rWR|@1sr(#If7%4S@Vppok3+*t67!h$F_EqpuD1D~}@pHLxt-!#kk>1Sa4e+6HE< zf&P3FBfvF#)N|2#)EA+FFoIPkf+mn=6q+;-p6TKsLZ%SZqLfm4c_QmC$mRfy)d*($ z`pBaF)7k|E{z~jPw83 z)ZvFNJpyhHpnrkudy%Y86L=7ScFl2?uH%q`6e?Mew^X3^wwhdV=2>_m;NMOUz7}MH{O@L=|>R2LGC&s8YH~5$$f{u2>Pb0UTegqU!u#9~?_S;Z3Y-1Bwt7nD z`|*I8!7Bk3%c8Y5V>-MiR@hEtG8)ktk2StO!*~kHav5&>{Lk`${y%$qs-5gBgK62B zE}Z3kmzzV=5}YS8avsQh=}zfGdd6{nr|-4d8zE}HQRNcQ2CTUqYR}rT5i3GTBLlv@ z8BBZYSP4&3Qh1Z20B%n*osO=*Bo7X<{&x}B6M)NCzPHGf&B3O(iEi0t zaV>klre56jv&fw@hGy3+g6pum8~YzlPBu!=zLW2tYrm6PxnvM!SzK`jC-doyOp3?f zLzFUe=YN*4O+SIuw#EWun9hUZo% zhZs72m^S(i`&(Stnw+=p&c{6_Hc9m6&*OZmqFhAJ$P|oRUNUk^%po?pur+2+Ho7EU zdS!T}xZ>MwXVX`ajw3eU;89A3ollQBA8~43s1^-8r!NX4{Fakd&7u={Y zo#c35iUgi+FJmo#UKmMjs?yu2Slf=iNc*4!>_7kw$pfd>XjqOH z1aQWn6!lMD?>||&hi|ykrJQx7F_@GBRuD|U72YUM*pjIL0NqXFt$bz95A2~v9gh>L z68WJP`C9E~9rpL-PXCQR#ep3==X&6qF+>1MiS6teYf;`P{a+O^VQFQxR>X z8kkOv!pWZPzrf?Xbr601JKRiuf#t(U21Bhlb}h6SKA+2Uwum=p{XF3**%8jm(CDiS z(Tp~S{}zWHI*sCP<1P9s{=ScZdSUeO4qi8^^8?6Jg2WU$eDJZy8>IcRfXd-)jbMJR@sX#xu> zq`QP1(0k~dK|BL>;UEICc0{1%iU0sd00i@m)8)eC#*v}sO9yQn&!dIa`bbK8^<*$b z7T`dGJ10cl9|WIZ>Aty1VL%LBKh)Mi6grnHSYTDm*ak}Lhm8u^88Lqh^}|kv7a@vS z2hc3$02~KcgAEHuZxPHp>}mj4_-GXP`~g6IN_p5TsBMUeO$=CHJ_c!H28jh=&#e!= zbC)e!9#d$!(dUiR{=ozBqXjf6Z-CvB=(qo3MINxkeJ+Jh-0~7I(1Sb+I@rgd`$V0N z-i&FAswnP0`IOQLf!3t`a`g?`i)1&LF4NiX8t`PAW=;R4Pc%EWk-;&aTtL_kCANtYLLxf z@K>#SLXQ1h217bw$xn}P`qtkIw-wNZ;?AL|0y#6-%+u?ULPV&%_+d*u>#$F z_JxaZG=!1g_D-`f>{cT@Z`~O+rz6o51_%JNPk;nAAg_`7EMxn-XEKog&bEGmf-@;R zha}u)Kw1IS;LHQGf2a^2c&`6!3mx#PQ2c34TG^~l^I7iKxW<1&!Gj%%qYawsm;SY8VbQ*n7P|{ zX#-RD;$o9%V-ayqMDB2+m2DBV6E_;NROU)lDg22!-IdH63 zGi8d5agH-X-?M|bE>jthrqZOGf}n#>Bh+XBe9bfb4EIYREer4@5U@wb-Q;}|0NP~a zCW6V+EN^%-$tLRsDKT=|6kfU;I(n|v@8=c;IV^={UE-n=UH<0_{|H8Pd-5i54ltVf zrxLZmz78_xzh{NaY8HbXA!h{$(pr-LSfvI!Kp(9K?@FY~I}aJJ3V}m@SWdIS_(qFysknzj3Sz>OZcC-Zw}x(_T$#aB;Cqo?@i zX3OI5G<+@n)LGEBht)G>ZlSv^MD7^0j6bDf6xQSHz)3q3>u7*_mG72nwpP9Koi=pT zFc%e-S&Hjq5~lPB&f@)U?(TOlUE5Xi>;2is^c9wyh3a2nqE}6hfJNo7IpPT>vZ7xWc=>?ZPTm^2X@X;w~~i4 zsL##J_B1M=-R>~%?YCUNe%U`eq+tDZ%2lP+d7OW))k=8Ky9C~kEmWP1oeEP025ZBs z?@eP?EU%0Xp|Gt40`AgvFF+?}g|mec=ZU-aWwf+?H!p}V?jjt!VA$_#?KP9ne49;s zcx_e5`QD^d1L@>qK%mGIvwGSIQqK03Dc#SH@1)fvORe9f8lKF}!{>VeClD=Kyhiba zjfSB$(;0NWP0ALkVLP!c<6|eJYiy+{z)D%6M0{{BuqcBP=EaBL*pu+Qd4(ODuYH+O&U zS!Jj3uGkg{wz;h&5p#Nd{9&+xNfBuUw`J>#k-^zGDH58t3)|i~U6O%ot-*G(Z--hB zVvUe_94|?!ynS?E_tL*}m6f_`P7m;M=TOY#+~QG2dbT(Y2uM=JkBy#F=S}5|+f8I- zxIEI7BFpF#n-v>hypWc|8xinZjI+ftWj1#{xe;PA`Ah#&Jg+j!wB25JTE0KFYdJjanvRP=~P)2&cn=}z_8E+ox zfn=H#B;8v&TV>O~T%(+GweHso0*C57&fLNYFFwZf>WL7l1(NM2rIRspTsn*PqA|Ua zOG!Ro!OdGP)kvvmTGI)soek{rvaZbdw03Mi_UeAz4-W<5Pb2QFM7oio8C4-wtk{-J zlmF&V$L*x~nV$-Uogt+p`KD6MeVv=ufsHa(gE#GCX>Z`Z$OMxfdK;kpW;wa5GCOpX zjEo#w?(1)yzjCagI&Mh8zN1C7c&SdW_$i5beT9ejZQ9bZjLMs|+)<}XN;wnP-zlu{ zm=ZrueAAfnD7+#^W#u#!WE>OlyPJn-mUcEhzT*2Su~_0eC;E-Q_sr5%-4-@1rYe7| z`af@(sVF-8E-fT|zJ++rGXZXMCoTVmKmwvZ-$N1eTb?hFt`p0{p%BwT19b;dLpO9LU zgYkn`NwX{3V#TD`Dc?8MF->>R1#~&YN^srTezo$P!5man2YHgsov|ATV_1N9?c`ozR_*+*4_j+x6jMJzfjzD zJMTZd`A)em)@-!Xo^3=iShdp4)V~WqQnDUBk#lv*h_NzwHRbI(U&zK4p0NrrKRCs= z1jn_7g*UoIv{f*ESJ-Ws*fyE^A~8WQom!Bpp8VvL0jWodGEM|?&WTL~uD{=5plMhf z3Ev!zwEJ0SsHDyNG*CI7n$gC6=Ish0b4vkJI1zGf3gGSh7+m z%AlC2u$uaEop^%X9T{fLFi+fE+q9oYQg80gZTvuXZe3luJ6LREJ~W8;=#3T5<6U7W zjNKQAihF8&l7)UsJpnPKWrB%uk0@zlufn7LN;3ibv!7}uobo>-#Z5-KZ} zcAn55n@_qvU0TTOI{kIeFe>ORuk-Htrh$j>UG~FTcx4mloVYD zd;Yvs%y2oOLvhlIhqB# zP`)9b27cU!5B{N?0l7=0C=T$8Bd^-aK8y>ffiJT{lEAS^HPYvdD%ikpbm>!5J&}Z> zLjsUK?`sP0zzdf+YfW+hvD!+{U&_0_Q z$C}Y+)UlhO@^VYIS1$q(E*AGN0AQ~%Ck>dvdo;M?L$?955JdoT9Fs!)YPqhnDGCcR zd&hhE0Q5ze#WEQkf~DO8rb}IVj{Qsb-=LBY&an{u&QIHGr>%-BLLh7c#ZCQ}b^<`u zc=`S{`}&(*ZqLFvG=NzIMTtw+jbe`dCpkoL#>ZbUL6|E07<)|{`F8%mJH&Bj;CZG} z(a1USMqCE5Vp5Sjc_HpxZSFPg7d0junlL7_qf1vv+ou$vP{jIgKruMF5$t7QT@I zYxcLLH@ypda%2n$;^(k?lt&zZrTofojAtTy+|o*ZJAg*4G;3Dk>j?+nBVNkHWsDbpiLl~r5hOx*c%P0~>oFkA7n z7foP;Sbss>H;928$Hvbtxvk63?GIP^1aszncCb}-@y88CiCT2KJ$O>5FCzpnuO3`G zIv?jfcCX&kLJP9F_FVV)7<9S)`Kwm>7=~_FJBOs08>+1WfPKEn69KhBPxO)tbN+Ei z+jAyJ%+{?s)8UNyh+aTlSRo*oB4EVs|?7 zCe>oVWAdm*&h7w#u_q+!V;6oG*$~}_EfL(hyK=qb-8|s8*TT!(#2+$abAA* z?7LcmM`dz>!IIb8kM(}dmst3rHG!!r;0Xk6Rj~buirB{KRhyBZE>#rExo|xO+gY`> zv@nXGI%b%4I6o0{MI7s{kBIcKl#ZbbX2zwXv` zDnX_=B`;2#eCA~>sC`rXI2d}fCq%z{qOCLmuVAKN0rX_E6}uZc=qa%01183-XFNv0 zNPOMjt?!(M{R392_WN+~$5!$t>40i+#`%r4ZLc<3aj3fi7$nyU9>M`7c{1|FL_2^w z;Evs3pY)64zpQY%dp5KO)^QuSDgsyjBQt9w7n^?TSmS*0gRQBn4sNQQ3SNlkv7 z06^#NL6I5dt{h(+Q@7OFT5p|Zgas&Gf-cgX?LcuJRuV;>l_>DvFM_w{MP)o zb@!K{@Z$D0hLZGUOM8180b&*EuP)Cx4A&eUO50m_+0enQj88 zQVWB0Am&$eiW}B~F-Y<5z-Rf@(Ne1bN|@elK6v%x@G)Btf*r5*WYg%6XtqG>eV?k5 zw=3sv)T+Ai5~s-BVTdUj>2qF*it8swcOBDKz}`-4MuY%*CHd+Y&36k$dyeU$Ps?l& zx{bAnh;z7=xYgj>I$N-a7B`g7wIEW**SF#Z)1DLMKO#dT%Xj%&U=g;L5y0a!Q7cxN z4<9<$LMAv@?Tj-7?=j4=K}7Q}qt?gzbmMzUn$OXBu+R7mUDp%S^nc@E&#{|j@SDr7 zhA~o+ePqAy+}_%K8_vl#_ic%@?l2hEz2#h#PrRs%hCfZ^)J>9z@i#~+ap-H3QQa?Q zr9Ka<$0Aw?Ti=%GQFv- zGM#v!<;1faCh^eL;FR`w5(m<9_YIg(w;K})AO3>;4v~%-vyJ43vNvyn_jrOCL++i_ zH8KFcFulRL6c;gm9`%Z@a#5i>+rG4b@ZQ>f?B(*fL#IE#Jj?C13S=uHFhj`WM)>O+ zd-V+IVtXo=lgTxtDvL!E9emeq@MDK2Sm?_u3~xz5%bW|ONnd|QibG#MfZK9yxG%Ms z2J669Id&OrXBCas?ci@Rh}kzdN2H^)s%j0?zHkrFzFg1MR;6&g`Luf0CHAL{}t{C3t?Vwm^OQf2M!H{f4`#S zBFM!ufF^RPy(=26nwG#9ozdIyo?H@6@{kalv^J&%DnDq8$+rvJJI5N^$~5Tn>4+Ku zAXIHm2SDtYAazk4rn`oP&>;;t=!}y$8gE7dAr*nFkeYUF*t2G_?+80*{Wk;|yUYcn z?^;#8R8*1)6ocOBxwzT8Tw@6`QTW<~l1vf$083~0a*0X;;BvtxT6i`BDzI|wuWB_r zf2O>EmPuekL%)SWof)wX`0)dmoz=8YD4j+2NzmP3a#X@aU(y#0w98A|T2Z(d{E;?` zu`RYIh9bC5F>5Z}r<%{N?Cyh{&ZS)Lz#$sa&(cDt*?xQbETSBan|aD*l(c=HWHMB5 zT2_m^#MZbkWqaA4?N+i(2#NAtA$#Fk(^)frg(~!KozqW%g;)m4(V#-4>`Q6{CNNGS zG9>^9V`Pz^Z2MYHN3pV9ExUEbZ9JIJ)AF)?Z`pTCa5@tT+zj$1NyEyBN>mYF{JOUj z?eb0vA0bEmIU0Cq-SyiKbWeu4^m-25jUmFFA8oLI~)Savw zectF|A03yZ+b{f^54px#I2`lx zJSOG@)+<}~%klmQ9k7<>9Urq%m$%uqV!%WRwZKZqU-6vqBV${J$4xL}HNF-yQYTGm zfM)Qw<8S#u2s&DNH-${a#%X1BVHS7q(|EtyngZGY9feFfSEk41b%k8RyP%`Y+V=8! zae060o)^pl77eGUBkyt(mX z`Sj(62909V<~r$ZM`R7~P+clE?@SN@0+HXGAS!ve69`%Fu4s+OwGj&T< zC8=8Il9b|OYqiY+YHM%=pYzg)C-}D>zy=_6&#$d>V9sxF) z#}R_+FPC>lF9vvTFenbe5=p8Bdqas1Q{UXWW6~+BOZKk}@$b8_{Xm|M@^u^8{C>Cb z{NE0|Saq@bj~Cd9^@c_virTa;#XWIgQSz{>LCraJcD-8}{Kka-seOIpUAE?5V4B18(iyxF4HSOOkyiHS;3F5ihv^a4n3y7r+>QCvV{~%!T z8ERCAjp`ATG^={w*3XIdYLLTRPZPcSnK6HQm_8r}FIxCh{+Yb$#|_b?g=+PUZJwdP ziwx~c=v2!L58j`$#a_(zueP2`tfA0;Y2StupdTlK0t>e|iLcLZ8)S%a)%o8~suNzO z&;fx;t!9`#^fwE$?Of{v$TgVmnVj6*{QCL~MMcFEKl=OqEpFUc`i=9MrGBjO^oDIW z1A|D^dNad28l2qa&-j6djv;!mzRdDnP9*KiEV#RebGqw@3@^JigRzyT0RW;pvhQ;- z+~X#66$^P02_y}K8a3A>g4VzOtaMw*H+<+q!R zP5aDPR+W#7ZS7VH(cvuEO~t0FRIqJNTJsaCj&u1gt7cb#!0N$A`QLk&G9b<{RE2*Om|w{O@cb9;_z(H4O={;{(6}U#nt)=#;Q1->r={r5!bpDy?_4(IM>v|rSZCzJ?D#<2B6@4T$AN$+|c!7!9X*`88XSEU4t?h z`KU%iuii&N{TNgk7BlHkL_Ji#S_k({wfqhhHZbZ}Lw9)K)w?&rfB?k|R&v)~3rvLj zoK3CPK+fMIp&-RY@G(e(%E)@y?G>6;2g*-*E`b~%8N9NB%M6FFj;@W5rLg!z)jGN; zfu{SQw{C3o11C%nWfZ*8zYyhFZv+jtV#f{UN;2)#9%qSb2Pbk14WXaBrm`mGJ!?&; zTY95Nq+$w4Y+iW?w)5O+GBE5dg;^5r=B)%w- zNuGP@8+x;D8r)W8Osx&a{*;5rMKibVu7wh*o)ZMv``uK@T{y{j&wBE# zhoW>M$W|lR-I6Wes#L@Vc{RAftSx8c+hr=i=lybt_X1t*hlbseM6M)D)9K;W`t{C2 zknWzy7#r>pLq7dWX<22*sxErMx8lZD4Spq#b&n)@`B4dJvoqR0%?E*TlCnJK`7K9k z2s?_#gHl?_c{0Tv6lL%cH$q=ZetO|~5+ed^>MBg%m!e#~&+GM7r%QtyOrI3Z(&;Z6 zq^%{5GpdFYXuxnoF9^*}i(Q2I>9Mm!-GVFWfaLvzbFHSicFru=>6A#%ap(76%;SY` z8rHAaMeR|@?}s49KlXOZKmr=K)km5fjq0bG!R4{DOZ^4mjQIa(`pT#%yYKCLhM}Y- zr9}m#JER5)0}uoeq(h~;BB$XDBEm zMTsj_SR9`7w;@4z8<#RPR;$Pz$%Rhq`}O?@!EFWL9#YwBokO@q23@whK+T6+zUNcm zOZ;Kd6`FbrY9CV|JhOTYv%2dr`C^TUiw*?SLe#~@f+C11^&c~S;yxU zzu<}-kgT{fORJg^jNqbb#Kp(NyRRsCa*x40;v+fp`g}O_Yv!1(J);WWl>BXT5~%yL zsrcYYU#8|0Wj^SkuHvT!96h_-h-(N5r~Mn<{6DCmWN*ZBp@OhN+MvL@0<`AXRgpd5 z*cKzY3VUS%XQ%j1^fo;SLj5ArxY~Nf?Y6Qyiv4D)VUr3<=w`BElQL=xZ-n|-u-Wh9 z^A8oj6b<;R>uo%;Uf5fK%LSe15}tg>YI*X+ygt1eLTIw#PVbS^`xBpAAdewC^5)~a z->+ZRXjJUf-g{)NiRLg1qUfM@Z52?%ceWqf4)oFs68=;G_XPq4&{{ulae^cCjZzh` zbclMbR-B}-ViTD5Z^8dv>B&jrKwdR-Y^Q;}XE)_Q22JB{>s(CUsOVcJe*2q~)XJ zj!&G%Ts;pu2X;C-*gWLM>qV8J&rMH-#>~kK&5-#LIYy>eKktU^Efb?CzGO0~7BZc3 zT(-PfL@2?pIsdF=JQ=&AesE6(?bMc;ev$GGh_sDkc2h=)u`y8(7m5di#1rzU6o6sw zMR8Nj4M}+MXOaUn#KprsQeJvOg~_XW;Hb_`Ovr@sm9qq>?X-G@VUe-+m*C+2I3g6v z%Z3&vR1KEp-M*p^$|yUXC~ZVi&1MtTbyIYiKrGQ*-ZAzfc{1{sEbO5IC+euF^=|10 z73f^*Me9u`A#j;HBV|;+^9v?ts*8K`+m6kAvtEp$jmDDy>@?M}B)?`0tn-{oO5Th8 zq5ssZ>+>M(-UA2**$q8>hCut5^d|)o`A8!#sBXdMIJM>Yhrx~X)Ra5N#d;X!^sn{* zo_l?Wot3X z?^hLzB;lwyGpBL5Tk9n86_IK;orAQR;&K(*CC{fl4)Qp+LMpdbuSW%Dwp*+LPNTZ3 zRBxRQqV`W0LqgK@1VXO|aiIPxp76wT`MXlh^_Z1rJO)Si#V;S*&HcdIm)dSID_`?? zPSaXfRw8P@(*Vcl-cz%f4dPa=M{{q*A|Wm1=JOf+g=HSAKqZE{#~kRu-5cg>hFkvM zzw4#lbNPaRN{!@TSNP%44#t1ap`tOy9hN&!9`J5R0DSX%!~7NVqY* zaeg^)(!@sXzfO*;Ib@xoi|5$ahX2$Ed(sKvFvo|kDhvC6RfB1+>^X|*qnq{x`Ci|6 zh(PleT`oRB$Ei9cOp2e4lO=`5R7ILrQd%k8Qm5MH_!o(L>EYGs1{UV2{123i#30`+ zovtHqm6;b9A{rjC71F%)hO(3N7`~8UOn6#N?P7Fj%v_8KOqol`(1=K;qn#aWgJ-CYV!%W9 z?{|nvV(K{9SRU%W*6E} zf~;z&n5xvXr@PR z5#{E);>GgGY0MiSogRPB%apevmkJ!F~{x`qno+{u z?S;MbD(ymU4kKTBR(Bd5@Y8ORrF&eD)%+^VOxc(@#qHwW1&-ERnIUYE4?b7T@sQ}J zDnbZmceXAt^I;xsmB;mO$Qv86rJbqDFn%_5A*A9K0-@YIOnS(cEj}$hwMV`UCPM8~ zsbYBv2^WuTR{=btrJB$yG5PgUcB7qj%ZC&4~I`-*wo(lVNX358Y)LUA85?@<9 ztPj+`lFN09f5V}^-iH400n+^**WLj=RfzjI?@z(er!SdD>pdzX;{+PyMAWc}Gphnz z=xK*tZ6tKuhW!yy4m5!^@x{^V<2ki|2M5T`YN|pQ`zZ!P!g7vjc)O^f<*SHWxKn&! zuGldSlFypfS!%BOY&X5R9jG~mc|R(0mZXd-?g>Cdf7Ap-D(6QcD3lm>dKLBw^KzyB zkDiU+`s?$cIbtV+ft$q-0vz?7(&@xZ8gJppZx$^Sq!^Y7*YBWaWbfQ03kttZ={V=1 z&Hb;58Qs5fYsV2%RD()4Rsf7e)69~Q_S84+0#i-W58$qP%Y!Y0|*yEvemj2mfEJiGAJ4UA}N?&tBUiX-)Hdu>HtJ2}(DSV*|Bm%lsZ zgPPe@o_+^AOBi~3AeZfADWH^wrPoCWU85pah6;-xA5|V%QNo@lzlhE+i@Xg-@Drkk zS{AwCMyySWhOc*n9x|*`;;9q)wtUT4_Lyq4iXyppXVo^X?Ty8C9!}&PSy;npx*zte zSZAm*r>pX!@Ax(2y{#Mf!DSZg`j;P9so(RFU%Y|CVw{*3|#nDy;UM^r^C>270QhQX|{baZ=|_bq;!`SLN$wTBf`?M9=8+j66g5OtD5< z$m}g4Oc`nmyYinTAcXEF{6rx-NKU!JPT8^N86t@}`_B>mzqJm-@A(+i*ZJ&3i`$*Sb5ubi^M)Gx3ok-3&Re6 zYctnaj)(t@<37DJX$plFE?O&T-p8Mhv2$r{b)VcQ>cmUK>DGe6I$Ee->KK#rfi8+a z+NufryJI6g+pF-+@0p-DM-6qIMR~QiZbu4kYVt*19g~4k z#hOueqL#ATvgZqOZq~1C1^WkoI-Jk8)eJGvTcBkFe9c0O`}@1g9%)SFt?QjVPxtqR z^GSl1mP=66N_JYc&PW+mt_Qly0Egi~o8f&L)Bg1xHeU9WKnMD;7w8}R*k5pR0enCM z_2fZ<^c)pKmNmY7jW0gvoBn!*xQ{5x$&qneumpM+yhy{Y%Ej|!3Pg} zo_m{ahW6bJV$pwwTq`Q~TlAUV6_^N`#l;KKsUcRHqWU+laF}kr$^RP(t=0T=@R_>b zROq4nSx1`>X;M{L1uHD6=f578$kW}s&%wiqdPYQvd1}%5<(j#B6izRch<$I8FkhQt zdK44ZZl%Y8`gq3@ZJnN!Nj9(Qs+8(l->f|AL`87YL+U`eAUh+9dwPz8{&zNkOeUU;k{9F9KX(*AiU+Bz7OR^!}KO+|a zs0IN5LU<)-lS5-l;{1u$wh<J^o-oN;j6P&{X=hnm7e<97}=Cjg-w5}a=mFn6p+*0f1x9iKO!-8^^U06%iv(wI$E$y@kB5Q@k+tl%ZT{=es-#ewd_hOPemHRN6_ zm?-&%lnAeRMypsf+54?4a0XcwL_iQ6`y=U>3XztjvUzO>0wrt|#->y6uguWGeav*y z=b0PMq8gYKHo&E1B>avpJa(;24g{_>5mj@l zE1GZy(sqgSa>WlsrFnKD3#$@?u2*4nTQhlQeSs66-=faity-4%gIPf6mr7`P1z6sihN;Sgb;#2O?|GVE)acIV8fL_`iMx& zgYdnVX+N_e2h#=+5gj0%o&h}H@j$mNDAjjPp<;J*T^T3E(XvMgd+lNyw|Vzk-P6>< zVmpVt85wKdf#`rcIN0Fmu)+w|#*$AM@U=jzQxNJ6z(iMHCLLIZ6DhxFWE1K4RWxLqRT|KGa z(!b#T2mbQ4Lv^CdCNuk}HH?}b_5`X0v%EVu{kpPf+tlA|`KP<~EHbCkYZR$ED&@RQ;jg{c9X6Pr)xCdTSU z8_92Z?wO z&hT})I-@1^wl9pbeWg)iTSe#9M==A%X@>4LGkY~dcmofG1HsPJ3~+R)gv#G{nf8)Z zzIw3;Bqht%vws&3Oxo$zYQ#29<#$EUNv5=m#AX(ygu(tYs3glvK_!ZfAD3unpdZPB zf+rAguW25c56^X9oAhN;G3EbXpRr!zUrc#j!HBj`h@fL`%Ik4<$9xyjCITOua6?JlNUyl#L}iL&=g(@V9@xUz z*XEQ?`RCV`vYDulc)MjK_pL)*g}J=Qw~RjQn)L$FlUTTaakuu=Ky26@d7fTX1ggwv zjRSqK0sm8Bk_n;{2F8XR3I~M0(~J%jK<4a9Lg?BX?|(mBuZgogd}_EJguQE7GeCJ$ zIp6gVhp)CCcd1VDo z3w03#+$~nzV?ZWFA#)!u{+b6}JpPGW@)Y&lN2Sq?@s}KcA3P!qxiYA$Xj-Z;M*scJ z{oQ9>94O#s6?*yh)dNzj&}Ac>&_Fb|TO-7G`)BZYI0U^$xzfUlP0|6E`pi-Rz=2B> zZq!>-%9E12dw%-UXnjeE5we3mUiN{GCp)nYjD>2suBLr4_4T-D9}+1H=%HpQ z28K->3^Ri#y-EsF8P$eMqA6j0aY@ZyY5;H4S@$}s(jNWOGy7mUDXL*L$b#S^?xhl6 zNh#Sw+_%N$@zIy(vhBzZTUorpV@8AOcdSzEM0s4HfI7v z?VyrPv(@yh77H!v@6oTEP2+#{8)ZTrVXE|ZBJY>P#deSOGj?|4eS}a8Z5$}J5%Fas zOP`QHW6?oWDH>JTX=uG}RUhr~{!@{iu{6IEeyJq^bs)RKo9Mu31LDF36}P!l%t+Fu1ogT2zxoTFr^>Q4A)DZeNtra z{2qgl{oBo8xV^n3ry4FsGsTpF4AH4DHm?_7mwb3_b1}(c){{wGud+vxg`)Z0)lO=p z+?$ahZ5o)W(^M`?XTM+C=feJMGnRDzy$4OQ9sQ}_$wb$WCxuDdaXv9pdd~Kvqj>Wtm2`=FGsXd6U838s z1)v19gUpfkX2eq^W0Y`75X{z1n0V^$~Tdc1atSu{0!Twy&RLQ47l4o*B@eq!YJ97AhHzX0%=W zu^OK6i-rTAz4%l{1XHGc0v?oe6E5q|P3r4M7O-9UpnjP2SSn;>SGOa}Qh5S*Z#h@D zUf3fVIj)MqjdccS#Cw)+R4AsNnLfiQ*|Bm6l4;M5ji6KyNKL#fm}yAfL=tD1T5fq* zGY!sdNd)P+a~J6Y^Zz6V^GvYeXxGzZbseH4`uL>A5G+PmZv4R9n$HFa9>_q z$-U;o$VLQj9$pp?qc|1Y$7lUE%fWNzmFscJMe>#R@ylW9-0Ug}*?c`(%exCwtEq50FS z%Uo(WAYR^~dvSVh^;UG?ArsS02*n3KF{gvM?`r>9)m&tGegmF=bR_?rDf#$H9yfp{ zM6Gz^Bpx*1OJo8Rp;bw2w;tiAweJ@2U5Eqy35y5T-@D8t=qNsjoHU8&|8Uqv9{2|B z=*xj#y@o|7`X&gq&(G`e{q&M*&VN>_F=$S#(wMm~Nrv*nsFU>zJ_t5!s2TfofTaI# z$FTA2_7vr$WTn2y-m48KxmvF@DY>e4533-@xaES6b&4OctcFU0_rI7sb;K9Zer)+! zwVXE_-g)XTGzj7+zL4PkSm$;N232o!5FIRmK#>E9ZBOaL{lqoHI~}KUh6YJ~Vw!mf zd8pXcA?O)mr&S`8g@@|NN4w1YX8vfm)9DviVN-c0XUCtcNaZ+DBQu7MV_XJ>+s4Ap zw0rfmi}L+2I)p5^BUJjvm{O-^`e;|?Ecw9q0uC!pZ}5Z&UMG=DlNbs?)kw&%J|T~2r;@_&pU(#pAPxi{|HO>M4-RD7B~_<7{up6asEaz4;iN`PbHfP%Nhvhg%4MM&gu7L8|Z?M9Qh^HV-0r}As-O)8Q@J$T2lciM(5MB1|d(b zMV;+MWrmYuwmMA?^_s>VRGdZvkdH%>xqR?{^q?b~BuiGv^)^USr84X7^f;Kv%d_tO z`{){ivLG|a&sg_{2Zg$K+H0PZ^w>{xf}KlvE{!umI|K1A|1p_n;?Cl*W#~Ljm*YIt zUNNub-u_Cu=5JhWPz@G=or_=a+&;ey@&?G@W06!#Af6*PPlK-H?tcaN>-JOA7#avk z2h#>4Ln0$6piy;`H)^7%%m=x_^pH15 zz$aUUEyJCf0BdkbgMQFfM@6hYyGFuJZYW@s6~FANU}~nM_^tk!U0S8OVa^((YfCLD zpWAOU4~ofpt3c3W4@Lk!_flkG3`CmR%gH~US=OfihtJGMLUVq!hWYD}XO3|uC#6YpD7G04%R=QXYfO(uYu1{F!jKFvsAJ)PxZlK7Sh)IqYpr8e1_oSR+n?1e4`1 zFX$nbSiqXU)-rmC=}qkpW7 z!)x>o!t6|+r6f!LaUhc}{V?_!BoaWsa7p8&{r93k7Oc0%+?UXomc~~veL@bc&m_Jt zsyG3SN^cSfuqPmbts0WEleq*;$9$s?ZQ$EyoGcc~Xl`ol@+0*is|$8IB%_8+VZ%or zrLa>WkA~WbTQ595gj~*jig-!Q__uicrW!8dvU3dcujzhn|bRM|j&Mj^0o~rSt7v$u|x(#!6VUB|00*_?E@@Iu&Ib`wXIe@!| z56(xX&VjbsZASA#t!RLc$?1B$=_Bv`y%^!c>GrIwE)N!L_zcOYVKD#@s7Hi z>Q|}3VPn`*b>(iPEDX7CKwDQnMC4wnpFLk zgBj^##p3Y%(piJA6GVcowIg?}=dfX~b%NaBc!sOv4(E{aP;K%{;2jN^C* zud5@hSL-$OO8RBMYIK)wLm<%#vg6G@%T51=r{o@d9PMV}ZMv_3GnX`O4oEESpD7d9Ch!VH@Z#Dahh&5E_vX3I=&gw=%aSqy;`k1P_p$fRwg!M4=LD$kA)HOA@OlQ%De&R4?dQ~{^Fx=;%b^Axdm@<^MC$KgcMj+FgIyBn*AdMqxT<}&uR8d zeY_nVkUX*IT);}p+*EtNkt}6ZLE#j0P%{^F!7nrY`vIYZ!K5Lh;mV8pi^a1CjM9Eu z3C)AfN=IzTbTpP4;n+Kv^5cabrQu$_sYLi2@}Anymhg?OB(b!i?$pNuSQO~uZ)^oH zmP~y&)W@+YOtj{~ZQgNW0$|WytoZ!Sa^IKQ`jt1q_ z0kX*yH;g93^0o)X%^T=nQQ~#9%d2CazSjDZ;+O-($}8s|cA2AYz?1sc7yIm0 zE{7zFB%fLYsL^ju>Dhhbr6FlzW=|J}eU;D!UdV>G>WxIDZQL)_Q3Nir|GJb|MptqY zgSd5c3U_F@;olTQfModY5)T{=`cD4gA=fb7))Sd@Qk;q`AQ`-IOo)X5s`ksr8E>HH+AkYPu#eAveNLC+fnPY z|5(+1jfIuh)WAZ37nZzwj8veZ2^m>AzD^LF?QNgu*bZgca9lieyF+x0EU5!%R0t)r$U%0ue0{~}@28KQB8x0@@9 zAO1v7Z>YRqetids?eACqHMqh7A!wQJ5!|2$2H?_aHxZUJs4+^}YdL@LNg{1$fuH+? zR+OB40J+ZNQifT1fB!nPBXj10cjk{SqrJO#7O>E05F_$2&@yu{TE!2hHMXI5fE5!SJ{5GPtQ#|dMWHlaj5=CM~P+7#gjHva{3!_tsUmv!qMX1AvnZPaXj<1p5@+44&7 zhfV|~S6fz`KF@EF-ODKli&Sr4WLhXHkZEUD9iml>jHumctSPgY~?<+wU4X_V1G~enkUb+L_F4h^!egPF2z)=xUd`Hd|0)* z|84Ki9F?!4y^<)fE0V@@K^A!GQEn8D#|xq@CkbkJbOk}SiVUk>Hw9nKdml#k`V2;S z`u@<1t?1M$slqO>w+A|(-^<;UBnbD(Kb3MK_FlOVyj+LS21EU4_;f7yiQ{9WtU!Oj!O7rChza-^$9rNZNdCSQi$HY958CSB? z1JgnLj`hk=D|*Gu_H)`pf9+s1&zir(i9Aey8XgYaXj`vqdCS zw2WEF(v%k+p?yE%it@o2@?NGpAfa^N{0Jo$Pyq6^<~@iTe?h#61B#tya%xb-!^86= z4tdAa)k~dG10u3qp~->tH0pxQuO+guCpcVThsL%KN2|&t*feqcS*!&@ zW1Z#Gp=D0RVfWB~eyN-iyefNp%HD1Whhm9K&y$LXoF5tug^N=WT<*mhpoEmx2J!pR zKHZdIUvM+Ie-d2cxDGP;(ummYJ4S6~h2eL2pAJnpuso6BJ8P(V$N2fqqOpLz+ODDfk_4%> zT0}vC=p5q+m`ya_Ag_{K5F@x_gZu5AQr7=HH@WaEA`fPV5HO%ITjh zq5q8iGK6=GmKG)yjx0l4d_Nz&(V>1s6AFR;}FdN`a3^H%{m7Y~kvElMsIP3!KuuKKkyeg3J z%t`cNt?<(&SBO60tyxle@F|GxzAN2{Kpztpm;FeI3jU21B(`K(KNXy4)A6^zp*wjo z{Dh+A{!v_s)A6i+w%w4o_?%qr^B-}G^TczJFOrvQJ;;a=!&cp;0i0Q!9E|G$PvBVv zkN%6YPy_BcRzW9>1B`zMVSQZ5w(meF{LT2Y@cb5+<~OI+%p%?T7>_rc%8(A);tf#l ziAAJjjX4pbiT@)pG#Ts)Pz3>jAe-fIOMc>3^t8~HtlUe!etHEtkB>9nIO?+t3X`1P z`Z%UZKK#)UQoaJB48+xJQBl#om(&VfU6rCtM$G|wj05Ab!5+CD^iE5%VV{_ngrxm6 z)9Pz`VCf5Ur%djK43jo(*Uf*nc3-ETTXF)08sC>oZ#4bUVcv6Tqz|~2B=bFlmVV7K z7@%TC3}xa9*-?pa%6N2sn7H&HW!pP#7o6nRg{PB-i-#Q7uy#cQgy67H(532Jie>Mw!I8oia8!L8g%wSDkX2%t?Ckl$ z6E=tQ=gl+-bZ@;T!z68du4RJL8V72NCHTp`Fd-A?8%eyBJzSG6X2?ZL^4jS5P-&X0 zLiR3?*mv{=P`k}Jw`ZhsxZ$t)2~okIp(6iKr(Y^I3P#DTeL8ihhHdK-ji>6m8&G<=mMLgj0DqszCs&s}((n^r!P zX5%rVS@&YRtlVeD^VVY)*hZ^m@7d*TZ^vQ-xno>AtVz zGKksi3T7KN&W-%axVq;gazV=uM<(~vQo?rr@i4iQ^{Nt(MB*`6j0e(vJMOqMX5=EF znSN_livt?jUxMF)w_VEviu8ugPjaxm&bxd-Z`TT3gKvXjnjy0?vKa&qa?`3 z6hIIT<}`7UG?PH(v`%H#{qhHlO^@*k37=TF0^aa{IULDkG6G~nXVrl> z0~LB_m)qHuQ5mRqIu_yqaWB3S!#|*rob)*xLm^ZF+OG(hnBw5&& z{E1OYiY08ag~hpR`t*K1_q~sbJ2%QlpP*h~|X5ew)Y}cgA}gA}Bo) z^iU}IrgF`4qB&wZo@HwX8DSaOQO_mjX?U;r>BmPL)u*^P+Znk}%xMX5OY#<%rC`WN{+z`BW&-k@8S zawLE@2-9;`zcTrks`S8I5KG&&ZkN9joz?VFsxYB;{pR;7NWbQdv{oM)x*-kUXkUfR z`9`N$(h|ag@pcgeny0AxV}-ob&C$hpF0BfTI;7l`pt9}@ z-=;mR(9-M%(d&H*vOb+&&c`S) zObVY$7xU{6H4+TDCvTsF zC$eFdQguqQ>ZmKAWhcmYS$ABOf>Zw?2h_&e!}jV5^cZha=o~h+VvY%`+@kIV@4;pB-`BzbIrF>eMyCxnG{*f~LF-uVSlhP6uQr5!;w~o& z_BbIn2@=X3;(;R`(-WHcFNmTk^`3-EcReo2SH?4z-O>3|Aa83QUC>7OA*;y7G4LfX ze6B!-^ce%@icsuslQsT7Dq(|rAasG@({iYlTqvh}yu9WHiDdqrz1wgza&M8)Y69+q zC}~pbeP)TC>s(YBomXjje82T>;nn=DdpPa7PWQ)=dUBHBm&osUKuNI&0qlcH+suD1 z;%@`?^%WDk8pV-D{>ba_3R2B$z?!u%?gLzKwmw3wR9R#czRrHdJMGbx zaEE7cT#+kLcfvu2uJYHBTk9Z(<^MNDY2RlX+~PW%_y^m1j30O-=49>_ZB}!f8mcy^ zw;x8@(fr1iu}HSRhh?t_>OAAJjtj&7Ac1DflfvY=&L#2}p(LCu@EyA+7Xm0Z@PZdO z>1}ouhA_g(J!U4UHA-BM((`Q1Z`k{Li8h`L8YJ_~r=H!>c#$$w;=D3TFzbU;qL6G% ze0H?86vx~plFc}aode#O7u&k_@BHl+IBOfLtAhI|Xt*+bnN2?FzwKUn1=RVd{TpsC z{t{D;W@tQ`wW^-YdPe${>!{9rTXN^)yAmhfOqR1Hp103=;m=7xJlYrFD6`kHrkWdF zj~i&>RRZUrki9h2HVUS=6qk`xA@L!%Q30!O<_UH|n=1=nOLUeE6ZtxOQ)?q3U8|ms z7XWdZ^KD6iI`B1C2M&x+5pX+PQRVs4@D<2G5c=fVX;s?j;B`kH3~K?h#Y*chk!T)7Q9X5cr4g6OEkM(rSbDECKHq~YihEJ>g zLP@9#sn-S;UYUKisTo z6i=S1nL|igniF*mSUpRb3AYzI4Plgj**aU&EwJ*jDMpiQ=x*xFMxlRY&mUZYLM7Nc zg0DxXFb!R>+gb>ON6k}^5|whH_bh>z_lY`mPQFmHjs<&ecf6IrK;0qJiua_nrChml z+xEZYA9H@^phiE??9(Z%`68)N`Xt}zpN7Y{8|tgAe@mFM*0NM20sstUaVoHZ5M^Vn}faKGCwa3#PAj`D>-tqnsVK%!!x}1x;){<+-gIDyj8s zcHe-V3O=Ws+9WWVIZvFQ$?B}BSTY*nkqK-HOiq*w5avw1?{AaU)J-?k8Ic;xc>ttEFzjWmY;XO{x(X1zo!OCy4W^A+6JP&de1?-)&1n?)b zCV=9(rDd9MubwhZH}TLKTg3%L@GZ`pv;{P9RfjbnKPJ2L*0pzc*=ug@B?>pu;5A@E zh=g3-OnjkiUBp}x)c&H1138IySk=w^52O>B|9g9+yV~QJX+8PPEoBt_M#ds1Un3V% z4?p0CCl>eW05On=pM8TB(&whiX!m)gfLv#-lt1obw5zwB4V*BNdnA`Gr@~92sk5lY zRG?VlFa~AKHW$T&m_@dVS9t2gjj`s%6n^vk-ci$jP?dAH21L zR}dG4(q173XI8TNX*HWO1Ai-Z^%=j6@>n`di^?4{o@!P#; zF2d=}@bN3!Lh%_t865Nw-fnwV$qe1E=Yra3&O4I(gy~@4Ew5jCe$7OB+YE4$K?f4z z>5UfOtmx7%K~qpdjqd2G;vRPL&%AtS0RkcJ8bLb70^h!tkuB@e4!`=&=t2qte{=`x zKCw=a3ZiU3)H)bQ6w#?x2N}lLF#XNMJ@oT=BZ7Vr(5q@N`E}yTNKwv5!?gms7n%JA z=B0&qDxdrqPrrwtoGkhCQy=lP5%{MzJ8!^Gj__Kn0lWoy-}z<&BU0K~$aQ%Z%Jom^ zymX0e@oP+Tss#hmlC->m@YHWNAkW`)3O2zj!%F!Q3rom>D)3<4N#l z{1>_9q`K#TjeE1?Bd!gXGeV6`xRf0l#h5bhe4-NZgegQ)LMo+b^x665A<0H|aPZ z0{A714g^wGe=4{LC||cxhyH;`$s~1Ag_9HNuTEPcBf?Qi;gC!pB5YY8k_$QAz6wzx z8DirmIt0T}-nJSIeAEPsS*tq)$OFvXaOe>wa*^sfkh#^kJ7tvw+A--i9!Ui(Vqp`f zgF)F`Z-N_7letz_>ue_0C#yP`Gh%r4bYA#z75U}9vMo8dpXkr!%szFdC;LdVsr22~ zy2m4z$Y^;2Q}}sZ$@#srwepgojt-lz?RGN0@8qwO`id7%#Es!ZO)HLYe6p|(mAX$7 z+l9Fwc_pB)&WMh&At32uGu~;{8`A1c&gKe>MNvimh(e@P-{kVDqtx{sYT+3ly)+ zZi9eL4!~PkEfsxJLHWAis688kZ^!|TJ~?np`ibTr!dQm&r1l$uYSm(dxEWeNsOcyH z&6fg0hVQ41s>hmHhu?EJW@nA#u#E`Xs;6cajZ*)(7r=+B zneY_gfKXgG^KErOf*s{G?~6{ciQryCP2fl@}G+Yg_bHJtwBYo@7@e{39hd|$e zOI47%XI`5KaljNb+UCg;z1#+4T=Bb0y}Fr!l!1IY3)C@SsI_830oF?7A;RoA2cU}A zJ5wY?-bl*w^DQSqUUb{tQoQ;ED6T!CzAz>VUfM|xiW{>cD~$~qi+`5{M-NF_sL`e+ zI!%wES3h1KdO`s~C#Iy2_`9|VgVdoOg-v0YP!Q3>v)UYnTX3Q8|Fc7%12YEaP@VnD^8>$VQ|h6=#1Nf2g4-rm$3X?(p&|tKvK#P41UK}ONE_@e zAbo-w{KF@#FNFRdWp5o6^&7tb?$QVdh)N0w3P?9dBdN5cfTYqPA`QzD0+OQADczxT zH%d21!%893`xws8lu)hJqJOR!fJOybNBHsuVzFo7iKYBFa8v^yu z(c&qhrNy8iaHQehDctL7II?M3IdO%^pMWh)*#f3_{)e-`c9$Q#a!Qv>O`g9lXNYd* zVUkwBLDF!zY1{SQV)qU35sYzDx|deCQ4y_kzmS*^<1zcuCn3yccvmBO zp?^nV?j%--^ayUGwxq3OL6qVOMZv5xZ~!qz;-#nF-?V<}i9rw9=&$wSj}$od$7>T3 zY?KNRGRbP!UUrg;ST6pbsy$koV*8D z-kt~g!31`rP51&rUEu@BiE`8D4WHy!e6=K%>qSaLXLcqnQpDy((hs$Bnb%W-NG&fG z&y!S}Y~2Tb3x#-D#dKedD5xMDUY8oUx&GSGoY{#y-aXJj74@eOn{DNJ2MbourF^aU zK9E9;L0{+{C+Pb1tV#2H$ILMKr_IGLY`12-*}_8?@;MLKlrU2xYV71w?#ODIdMm&nHoWR)tlz11e9?e@=TNeatxHzfMoAO$&VJ{=Jn(lt!8M+J38B z7A?8nP11e8TMzs}TPmk>uGU$zXAKg z_KY>fAZwg`;BE4#je+FkL85hT!#PIdna;;P^H-a=xwGb;{EH1kQ5&mYGk>H_PekRz zu6K@TH2Vg{bNnW!6SkUc`^CACgODhr7=>gGb$hQ8fgL_6LM;zNTfK~;s$*NCQhS|q z@tTQku^L@buDS|W6wlOz;KQisX^Clbi5$J4(nCEF>OfF~E`|ZB6kIvS{wbJo#c#&f zMuV8%myF$d74pdfU1GKFtWhb=x8Pl|>@?wz6*ahB+2c%Lnt_V|yUX-RDRB#Ilc0iW9mURVm2(pmflx&sC&7 z()z}xL4pcxxx;{g`2$a#;zqM&16FpYkC4hLy8VWGQWBMJy>qUKxNw|v{)K^y8RTFa zU(4j)JmF446#{dXI(PJBK+Jg`c<28D8Q~%>s9w8p_~ET{ph}#KCX~rxmjp=HM$p+dxC6xRBW*JF-1SmrpuCPtFtqBg) zVgT_QTJ;r;EC0_GY59g+y{--auv^AFa2bFFAJPMQW=1id zAeZ?3(QP#`kVJVJ^n&-m$qZ5nr%q<6&NV`cQXCPA8mTOD|53WrS7K>F!l80z8+7S8wi9z~;yg-hsS=;sbP~5Lh zqm#Y@40B||v#Kk&_bCCZ?$A*u2FS^yZ-6WknG~3>cKslQW|2C0;VNd*Qe^gYZ}ZNz zOwNexaDaxlc~370eqLV6C@pp(M7qgBywV0}?5uWHB;GWR>v-_i_y-QoEO~5w?co(D zp&8^>K*N+Eph6kq!rHFqePgFfC{bU}wO<+UE-C0g6pwN-O3IG2!P$uouK{xGlMgD> z9E~grY7lnZnx}4RCDn1#XR;!kFB?(^-|uznD_8E)wR7ZoflWh3 z|L|PE@1yBcc3i#DEXhtcqAlf2O8GkbZKZYtp{e5cy^B@7_6P%Ms*NAYbnQXnuAQ7n*Put(yViNh9%oRl5dN3@*` zJ(>5hj2S0RZ3D|4J#M>u{GOcfl!3?Xla!sjJ(yO(!uqg=*+#bb{XS(GxGYjw+$od2 zDWJ`4iDQ`!?=a!cSR#i~Y~X^&`B5`d88>^>3dD%fpw*mTv}{^G=*P9zJnN|!hGP4y z;O3RTA79r|&pUEwUVJRSiw~!WC#UWhHA9lsG2kQLn7)KU=mX&uq2P2jJt1kk-OT_` z0G+utg;g2>V>MtYgv@tK(ucouRE9*8=ZE8)NDdEre{pPl40$r0*R=c9SG%-o=Y!qA zv_i`@H@T*X)c@8n?%LWQceBem90VK2gZ3qiBZ)-2WD%xHj% zR=DBqGCr4lpt0iVqiz(OPxJO43i;}TY|Pd%VEFy-+pI46puo_V4`Q-O{tbY6x$+F9 z2idTWM@j$tYOLe`dDFYG6cu4IQl@&bJW!gR zyDg5miivwt4Cg(gr(FJto$;u?Y*d1(K+Vg`Y-(N8k?_tC!EK0|KJv^cZkvswRa7YR( z@k71R(LWP=ySizEwM&bGkZ8@7@-g`p1C+lcW{E;fH}Atn)wO&!2P1UR$k(ZXi%+(4 zD+jdRnzd;tcN7eHb&)@4fEI&QA^U|ruFlrG`_-=8x6-81=(BvZ@iE$s;&`wiO&7Mg zmI*UjUn@-`v5YRc7_NWWp|uk6u={Sg`K*-hK*y9}8S7P=83+UbWLLtEeYQNFJ{u|Hd zZm2u0`5Gv_+4iy5$+7vLg6kbc&iOEZsy408e*21BEvP1Zj)=2JzO*h@bLl2xCf*h1 z+xTnn@gVQ8=3Mt&O@G!2FoNc;QYqt|4;47Ee1kH@9a1FHd|uBFmc336W?f)uBG;zH z3GdNOX#zZBtD7fH-rGHu!pw8F|DvOZ0k3-=iI-+c){T_QcU(k#6SPx-dD z-lMrtfWvd7DLKERPY1#bH_?(;=mK=}@eyQf@T;J`-BrWLppd#G-3;!Wc|lq;Y{Ix= z_2)^1%Cd9)(I13pPMS@3#d*O@N$p_Dpk>pMnPct+C31`DQr~&&S*gHIeCkl-r}^Bv zIj`cKaHrx8guiq*|F*tpjD&erlZsp+@JjZ}UWAJXpWje`Nd_hB%jK7#p? zZV6Wp^C@RB^Lc3F$qXiYdCMK5F*2CXOz4x(f6y66Rem0ItdSQ}#f#^Q8@&%qi=fu0 zSS@7fo=yR_A|QJ4S0o5Q3`bk0`RMQ(sKI60gi#gtZKF}Y4I}@qjBGH@CkEg?lLiOA zSDzP1KKuTwK5tS}RofNQ@%94(0@yJg{htO8_yW;We2sI`2)d15{n#7Rf82bGXvp6F zA_(yLph_zgQ&4&RZX@s^aTK(o(+jN~$~%^sVzWnwYhOmUy|)Rtcua8^HAm8+LX<2D z|DDy4=AmL<7=P1Xq#!*o6U?!1RBJblg!`cEr+bLeGRlAlwqSxoYK+4h;k;4=@KG+Z zb_1P&0+^l1YbnFGs`q}sh3FM-j?4v_5}O;#qv$5{s^mgXuL|Qa+);a_lbY_g3`uty zFMi@_K(-z}RG*!Ug|dMB!4-waHy#d43UugTGm^E~XC?UXTGgq4T6g0{TAP`Q`@X#% zd5Ch$f_@WhvlZx{twq1n>G(1W^j!I?Q%}I@IBVj_=Y#ba+ahkS(4WEdrOQy4ywVjaaocm~O z4gO%!(dYwBsCm*%T@lT_?uQd+tzbMNJpI*r9bs(>j>#-QUrcX&&x!+DMhJ^5sh5nL z>EyZi4TCHlID?#lUmOjwM^aka?Fy%0o^8+t(TLJCA#&43A3c3SZL$#(xpO z1k*KaZgd`-yE}5*p3uc;da^!Jc+z6etnc8f#wiw@&=zDHH>q~A12eUQH`wY(ZW0tLwKpUZ!y0l9yk@%9Mk9bL)~W?%*6n-Sh(3&7Q)! zua~gXg?XH#N>n&rU_Ow48tzgVMAyYe=#k|CH!HAhZ#sZ^NnJ=|;%GqdYvCp?E*qwt7DFI{nNyc^Oi(ZYW~)xUiMDB6+q z3ShF_<4I6zvvf7$cuKmsy+1p`f%_Q;b6ByoHu)P5v|V~};I#qPyG>K~8Z|<3wTl!% z8}G-$>@T>We3>M)($8@kob;sv7oOiH%kDzGC%-v!Oq=;u~fD1`7)hJ!ryW19M|{FXHD2<6?2d-cS=GbGUu{IWsWinzM>QadKAk zi<=uJwt!{Om{wRwZcyuVSl=|Bo1mB6)i`I*LDII!V8D>ep{(~enMuAZWVQ$)Kj(QU z$rXWJ5iNAkqgc(uOSb<;BhuarV+v8o96QI*d1fOye}&)PCP-hWAh&5Z^EoKk(U=N| zBId;%u6Z~>?cWeU*9+Odw(gAHsQ<9D%5XfVmwrth_Cbz@oZ?XDjW3^uuSc6tak}bO zKcw{=EkyYG!Ko#H)RlbbZXc(D`@Nlmic^?Ekl z_<&-i#4kPk!`lj9O53Q?c9x+u+G#BY_)l@w9arDda$-GN+|)xzdxileBlKo1m=%9p z{lPCccm;?pOHMJ{NSeK`BE4CorXZdLMn|}Au%eB)eD39AdkQ2kclu)Ir#^7bMPp)- z@b3^i-fA%%p`qaJBTKin(&>ujPB9154SGExjuK|WxEc#@2C1&f$EEo*hg5OL(>0(w z7kfX%R`}Nxt{6hpXXk^I4_(L}4G-lWEF+;9PrWZ5($`krR2w$oIHi~i4AjScm!Cnp zIw=Fh=qWW;B>v~ePCuLtAr?>WtZ{@vR$2$XKQ_EgzcJq-8Weamrph<)AVjdhXny-* zHj=Na!ZZw@vqLx)Vo?zFwydUwW=w)V;1T>k-6L4}7Iz>$jOl8#?-XT>D3MKC*m&O@ zt~2^v&a105N*yn@qJtu$?$Sc_aNgNoOUs)`fkp-I#=$_e8q#O-akw*XkZn)Cu9^SL zf?v)2Ly|fv`(aWKND#^{*wNV5eV|MnE&JsrJjey zQRxp-Z6(x_xsuZICTzwlfjLC!Wa6F@{HDbvUok5S5zLCuej(x38?01EWAbT(lsqfl z#33&5f20f;m~CftX|1RWIm$rC%LxV|RgPb$rv}MK**a2^lmt@hw=f=#ZO!ox3zK^<6&B9D2!?%~8H`n`k z&>Wwj(D1R%fStZ;8|odLTzXloL0q#I8vkj0AUcHj5sG4T)c+uZiqYcqgwdmw!%i=YN;!2$$P%sqU##q zQ2X0`0l9z`8?AZ;J(Q)G&icHM=Z@$ndP%}P&iC_X@nV#PhkiA`v84zzN!|8d8J~2& zBKZ0Dm(r`A;CfL9c2Ms;DlENJw1%FTbfAULfzCnH|46H8@7L2{lr{u0aT>AbR6{kH?o=}CS~dvl_lo$=Fv z_tEI00R0XM?Fchf*3PvlEv{8PHQ?+^#~B{HD%xO*#j?B3d+EK`2OjP}pos|H+?JA) z=l{c=%ezlDin!b1mnZJ6%bqeib;o8Y7;-n9jF1etEh-d}6}ygXOy zAYV~XG3Sj+nn%PrJaw5{woqA#dYzm@H(~Vkyq~!{Z?n%O_co_7>q7C)TFaj&)9>u` zR(-XEo?Q&gzuO#$=o>!T(;7`Aj#5vWphK8>|Mk@qWjQU}BzX()p@xaEM{+Qwqxegj zg59xuJA76?He9n=lTmtUORt^2s?YIkj8)n?OPM^3SpZ%3oFLK!W3I@J)}vJr4!=h` zy0eVCBXjUL>Js?!U;31S;vS(n>Gjo!^!S%9pz>a6z21VK$4?|DWmIpQ*OkKpPi(sH zmWpbg^9Af$PCXe&JMCDLyLLICj0{1fZ`O69rB~EmyG9wj?Tt@Ak2fL_(qQ$?vP?9R zw0oerZEjibWt0rSov-XAg^9V{{w|1!JQ^T7*l{$^+Rl~cr z06_O8>7qQO6NvDNw02GtO@%2Fr>1?GBse@XMu@z0c|FaeJvr^{2vbf=-E=Ogbjffm zb}im87qXe07UYSG>Z}bF%h;eJUn?sREltVAvpFs}3;%_%&}p7P+O9NI(KXP%52(SH zp?y-NvU52})uljt(GJs2x%O?T3_53sI^UX1ygo;wF(Yv!2@Y!}TsI~YPg1h!jA`6l zikHxS=&%AADZZFVbkrGo867Tmy?2H#6xpj3EPic^IP`u-+x=q7OdeDK$zZt)&x?ml zTJAlswrY6L^6mDlURLkqM^ml^jK!A=UH!KvjuAfS9Iz#|wGH)mwp=|_aW-iIJ{Jd_DAN}|x zM%E4b%OA>tOnKQI10uA#`!qSZ(RTJEZtJa{ZJuNI^Cg`%uEC(3@@QA18s!;@nI+1Z zX1d0~nwqD>)$K1qneNQ|{RSPr#IR8s_Tu2pNh=#LUTr@%>|xyUONl%cmAgspm^rs|jG&5#g2$x#AH($EV3nSH(27ep^%N(Qe;>6~I`dTiDQ2o9IIA*xVZ@WJ0_m6h zo%!CV)8lq}q3p?=`){|gwtmAJ?)GBhbV2PoMHYUMX*@lxRlG=8oHuSb>3jw2dCj$AGfI7dRJ|WfM;BN7Z zt_oW-DCde|yo~Q4T1BN72Fq>qb;YGP3}hGB5EbWt#w#c<3~QrpNk5DNh3CpXV3qvaDrRjs zC4Z@1*WVS$Z@`J|3jtmV^>Z&`i8v!xcTFjh3rD@uV@)2&zNe(Gr*)gig!^8zH6ds} z1>!z1oy70P(t{~0C_}=u3)$NjmNH3jo~348FrIJCn7Y82d>ExhP9FCZr|o2*VmZwp z@KHX*c-N5s?}Y+pdnpj6@F+mzR!gnEuCApcPY-3tD3JTyJiGKpA^5$WWG%!E^6$)6 zIf-5{!iEJ_EA2^~ASJ4tFEkc6A1!0_g_+kWUIm??1ShT}33<*`fF*jR8(3>Q?0$m~ z7Csj{39keR6GwQ%O@+#Hj|aLdc{bbbwcJI|UU_&hy}8jg7aYBFY1m-NIY}w7y4s)g zcC$2$kIq-5`AjOOmfMC-By+mpT((m4NyuRFp;P>u?eqHIs{vz3-;fLuv@-vWjG9a0 z^xcbwq3-GOpNXnz)^1g;^~*mu?U%DO);@lkiprlIOy^NCFZ_|U_GH9vfPhTJ9C2Ab z(pQ(x|J&m`AD)*eGw6K$0$p)pwTP$x<6Kwwz;5(*U6LSDV`OS+;NMoUPE+JSEEtyN zPC71-Eie=Fo#cXO;B+xC{k}X3!rOly_9qVl7t&SRYhYzGV#Gd8OZhTf5v}lTOJ+_}_4VFa!&il@v$a!XuNZ^B z@0c*tQ7KIw6XUl+S3KIRLuSr}j5s;*Lpq^|QOgXv!@<3s+$z5rRZ$w67)kb~z6BA% zM@In6{@v%bP_l?DwXTQk0@|T6W?_!!IadRcRs3hMQk_5T*6=DLtVr8P4oiVnW1_k$ zyjLtEmJwBC6MRZrD3)>9>^g-abT0^IIse7@3vZA=qb}_zFLU(fiV`hIzmJd9RlCT;KvHPtIFnTopYV z@)y0Tu@&FsW)^rd-Hogt_c?7IPXQLYZ9u2I8^_SN_%VBM{Sp6&K@ z7@=N92a2Uq?CgSnI1Tjkw>mCJIn}S1-U~5D1uyu1oEILFsU!zT@`1IA8o_rF^ij4u z2&PkgnQuPhs**V@3gU-WQLta;G~v0^8yBtD|3lrM8re?s zbXHo>Y0{|C=>Bal5xDf-_kBi-7P>@#?naZLb-|_bMToVW!^H-OlbH)t(M2^AW2fW; zLZC7b>p0Jw-bjP4aSfRNbuvO+%G0jZ!-|*ci_}Z;DvYYDE-7%pA&}Z6{FNFK`={c; zbo03vw6s0s(|a%nNEz(wM0Q}ALph{7t^gLgaxO5H1u&G{fie+6VKK z)T=kfB-SK5o<$dF0?BJmC%Kp_D>P*AXmOBR@x)2xRApd>qi^kApq|*!$OVs5*lS(+ zjk$h0a4QdfGf1K0L*pUt8AbyPkPK7Ue~AXl1P3eIskyAYj}C-%fqw#&ku+d*^iFC~}|i;XJZBsGBSQ=@=C zzL>V?d#1>(nJ|7IW|XwdotqPoqwGF)CP<#TdmDsnHJtC_(rHeP^METu3mV8wbJbzO z-%9t9RRMVK_8Xq+klw_>*C674;z5@2xBf_My)II=pu&erH8y3x9ktPCUJr#FR~$x< zYrSoDtjR6$Z>nqhGrI5#Q97#cPLiipXgdX@Z6*Apb@t+^hlG(XL(U6%>9G?L$Sm*4 z^6wE*m0Uifq+GFl<$WPw>>n%)T&qCs_Zr3ny>In_{}P`Seki(p`5?ilPdL?m0o{mO zw}r-th~W5TxO(k>B=RpW1Jn;ESb9{CB7kk3LCT}dW>4D2O5C={ybGK#N+$p-x_LPQSIjEIh|zfI9c&ke^31Wj#j}5Gpf|fl|#EKviEY{e*DBMusi=d z)gEsZHXqORs{PEmb%P@XMhD8XV74N{rrdG3^u_k12bz1@A^&?2)Sv_GcfzyEL}o?< zusBLm#+#%a&~}Z+cQ9?_{t^5f%c{vUtmKn3 zFQIw$?#RZ?dAx6gad+W#LJ%n94gd(pY5jPbs1&rJHe^j9Ir)cI zw+h6K)CPUb8GS0U{aK^jhPt%XG~PNAiC5DaVTe}@+=n)yzSNg8&J^Uk76ng~Ov`iV z7Fh4ZI&Id!R7>6`bArXy7k80FG6fKl`+A|8|3Hq5E%rM{99bG-4&E37J zE$NnVE9_8A;;6!fESH_#>sZEvph!D0Xv?6g8u!oi4L$#D{B+Y3mPXV7wilz?uhIDI zZTz7R$FT>=Z&rh^5&b;SSmGHjqfFu|JHCmPxSGATQGNF2ik`OAZTa_8C*Rl~nRl50 ztQ;ZtFyQw5PNryV0_6V7)27v>_c^8g%!)IxTS z?^V<~C7(1Qv5M`t(<__n5?SL8-h-?~#H%n!-{lu`4EMBeI5Asimq&$TQ~a^RY7c9S zS8JRuvVj5Ccixl%^0Ow8o8>#AAPZKiRvnB46_72lpm)9pP=Of?npvgLpe>h?;9k zF#RgbB64&!&O8K{RNh-H@H2@J4%v*Ye){WpK+mfgtb|Je3_z?8U5)9@=-Q^kZ{oFq<% z`H#K&S>_st?MEHP1qBc$}}$ z`oS{axjC<2O}E$gApJ$tT1RU8qOPXtO_`+$Ws_JJc1`MG3dxut-Y~C2XgSGstx#IC%}F*Fb; zze6DL09y$XSf1JGjHpt+R|__o7xmI1K0$~)x3i#ZoG;hjM6HXea(EU!8lKR1&7b%* zqxPvg(c1Y~_}Kg8Zn4<5gvLo^;p!X7=-rZ>{%*OXNuANIU8m`@ZFw6C>h$|ybYaGQ z?2wsD+MBO5_WPO>)Q)X5vT&?GJh-sDv|=MO{Lcf1#y4&h7KtHTZ%31rmH*9MGMS6oIFX|-+&yQ>Z6Goo9vbN{;qt=1Y z@d{T1-0|C7>QS_8`1T-k{SC2w5V=%kWrOA)jcX^4X@(Xl;5nI)A)?+NGydiV+5pWb z!s0%{d^noDO_LjJ&2_OL|Kv76O9q0NOKVq7x&f4O%Kmy5iDoAR}j0MPO`1TV<7)Zz zOG_Hq`ZsDP)%BASUjr_osUGMvDOM1EOFX~{*3lOfg{FPkOwCn4E-9HX==HQe

    Y zuCH_BHrh22eOQ+PgC$r^3?vLKx%P;Y;ZuMp@?UJaKyMGRi#JyrH`$bbX2Dj2Z^Gjt zTm*=vh<2GSKz0b7gY9O;Im1-!hM1l@PrBS*PR+UWc}) zpsu4f5cJ`>O#aM|dzbK#3XV7QaQD=|>~AXMkDP+C6iEcNL1hJi=>G# zaC=CgMg^1=2E5D5e_s21X8_YWJQ#*!+gjSf-35*6_5Ms5Ok)VA75E2j)QK@$wWZN(dZKjb@$8A|sQ&z) zaKSvE4^+EV*OY74-%~j!K_bw56UVhj;!U+lv@`Cpu$7&kuAT$&u#LH+3PhhveeTEf zt0!kSX^o)0wm;~#zRHmDkK1KVn$CT5v_~_d(YM~H!4H?t{hq_zzhEB>;h!ey;S|%t z{b{H~!y{Oem_<24K2nhjs zm+#v@DUBlg)jX{`gE;jM7+bM69AUFE-JUty(LX?&hWiqP2MaT`94-eNNOHU|guiF_ zr)ijwnUc(@QjQyVf68fkIaB3;ymR)K2Pz@9;!{}?`8X0kT~kwz#{AARsSRu#E%wPt z?1HcT_zoF{8aAxA7^h_^4#YF&wMz6ZMue2~m0!GoiFO_?72=kD1ez`}jLR!A2c z!4ZBvdLs|tGT34C)b;gug-N%eOvhWRpJA5WZ=J5^V-YwzTtzpP-zA_xZhGZ*9!pqO z^QP&7B!T?mh3(o_cJT>X$Lvi^g>aWXljSB&a_AJ9Kq%Dqf-ztT7kf0~wXsQJ%_s07N(s^UvoT0emtS-3FMs8)L#pYT zVugw04+5jB90Ft9CgbCR6GQVx!)xvW_8nfTa%lyYI-_+uH0@3{dG}X>D-nMlpP-)+ zRi>kx>?_LkBMj7HW^D3wD9{{9`}3pLHp1*D9I!D1n+|V@tzU(`D*83a^U6GPqYOl| zD}A4G8Y`w=$+*=wXkkcwCIQd7>;K}Rx*Fz2!d5o%xmgLb=xC|ZjrAr~(Ua6W9xBEX zQ))6oUmZtFcR!}{lr4Yhupx4B9m_toBUjl6>q+beG6 zz)yW-9D)~{7J;|#S^P(a^ae+o;Fqq8h1x*BGtOF@j9s09-t8S^p-ztt&)w`1#|8jF z{c}RGryc0S1dC1E;vAQ@#gbw@6*U+W;Q>+U=qjkG+;?0Gs7k&^B+1T!&7yEiRCZ2( znjHq{-%lCT?1Okr^5E$u8acVube*uN?^eYx1@P6pFz>u z;s>npeUtd!z?pk&S3NjxNl`EFaQ)>Z#mwp0LZ+UuN$s8_8t-Z(@s!9VTj4bx$dwZX zgjDsL22X7#mRj^Y5p6IUz8fpeeYy{2?h8nsz!0x05DVuG8 z7T9dZ6BUl}!pC)FdrNNV>jI-67d|GP+M!%isRd)Py~_n_fRRK>X>odGT5ZYYZer|z zPBvRZ%kx&-wzBG(x(YeCpT%@TaWIwOVtzBrUPQ9RnMQNf89a|uz=!{PA^cs~-g%Z5Hm~GZWOy`OIJ*o(^Yu5=7(?k-nd4i8xA$ou;HMY<6J$_NB zi2b&pYQ}q}cCwTNj5H7?=N(v!Tf&?GyJNM{ta4G8!;9ioid#c5S>4#_m#EOj2_MaV zR9^FYnK%U+uO@xaWZho?$KE~A;vF$ssdVivMMcP+Cgk#>`kWQC13m)Uqq zQF~4=tvOaOlx}=FE;YTfSiEAF4ISNt+TN-t|5s>#vv2ulG)v+}(dCvlNJ=r!`-bYk zCS+2~nxkMVPdrhTo+{$DIl0Ys(Kc>H*~T9Ei6HXGUx#)#yFUpW4+;|}?5Xb}LVW~W zho+5RtHcmx6nVn+tF(qz*=)i`n6V%o>D=QnY|i(gC%$2@=gG~@6{`jnRBPorRj4iF zjPXG|S}c&?b0*RhCYz8V_{)hy%};^$oLQ^fH+Xz?ZMaJ)65(P}O@5KDj+ipKrIUn( z_%owwoK}sw$_^qaCZn(e;Z|yJd3{DyNoxdB{c*AT8*FVHuWwIV`eEKO?ZG($W=(Ym z@TYn9(OmuqLuUPB~d>Mkj4+56DoY`xcA;#TKfGC-6B2s#|gg+$tK7eWdLZzg?+qh)sl_ubddOg022$_BOD|FUSBHc*4h%X7MraEC`!fTw6+@L45?DQERtNa!ay z$eLkgxZT{`0x6D(vhS6gX>#*=zOMXyY>eUGeG`k7ZV z>%r7c9t|l;Fh{S`jdXkZHx$Gtnw@KNcM2mYd&hNkmEVW`16FYQBNWjBDFi|)a9~SANiv$a=enc z#QbUOS>!tFvdeb&%Wf<<-aACLubk$>1#YiDg07gKHn`&8DvEWZBf-J^^<98(d}i!f zom9*2o|<|msA>cF=1v&kzXRw);+UkIi$KCGG_>O|jEJPesX!ksQv8uw%GP}hX0Z#V z{C>Z+ba(rH13CC14r$Bi1Q$k2d{wxcm`_|+Ju3Cf&YTEZBBhpvaZWPw4yIX@Wf)%i zdZ8E2FM9*KvOHO0E=h^^^VdOwt&PJtEB#e<3Dpsv9!F8sULItT)E^4x8+qJ%zp`Fat}Pt~{bt6Z(gQtY<1xq+Lcz5B&n5$)pDQb{55ttmZk9OmGtTj53c znlvv?=}wf{5U>9oPf;lkfY&>3d;+ii)=?X%Sk!x*-18a$;qojgw%bCkvjuLd40%T5 zTe#C--JV9SM$&lsWZUc9T29}g)+5z14`%w(HkHrmk8EE}>VvW9iWo`)wP8-b$ zvTYlZcrJM~i;qfJ8%?<$-Al_jjjA^y?42NMk@nvbMu^NMli4fqmW42(#c;k4Kh*-m?ip9zT zswYHDf*z<3r0={4?(L?Azp`rEH+JxYT!nLBC}PfEyv-+cRw7YfX|uZiKI2;XfD97k zQF;B1HgIXjgNpdnN0eB`XeQS-*&r30aX9P#*|$^S9a15%lsf6>FLih?Vh?z*~Rw>vX0=R z<%X?$KUPlr15nT=YLi)WBiO0;vum^+4sWWe_i{$`2@y%h5SiG6@{Cn zWPq*={rSPOB{VYppNtZ7tq=P9)=s-ypbSC$;FKuT|7-`q=o(2`RsDGQHnn)#QC`WJwEPD)6vAA4bPAGNM< zLg3HEpgk!>#;2YH?hP3H&mb-3VQ5!KKYfhQTt=U>jANyy(Bg>HP&mfZAe&NDm}k+c z3;47=?aXd}y(nx|;_mR|%m5FAnEe~IJ#RjVsKfx9v`^1EumF*Xhyrq?$ce=sC|TBb z!>MsirOf1Nm{9gz^EyVlVMnua9-m}x%~%=h=9D*ki$M>aA9$5&`iZ^nc90~wV7+u9 zgf6D-&c`ZZvFQB!k^OT5-B~2>tl34HD1QMDiIwFIAKoO~?Rljwy?;Xy8GRV+B)KwE%emCD62IQ%j8{TK*D9@s1H zuxGX${pCVfzkz*5$3r5t@MW0Vr$~ePbnH(E2r5i0BjV@P)LxW^w6)wNlUmvyviC$r z=%A9+=#;S06MQbny#*US9Gs4SJ}H1Qmn2OeQ=i(>!-qVVh4TgcT4JnTgVo`w0*9ukD)h zj#69$J3N8N10Np8Z4)QDAUP%HmeaMdw6jG!U+*ra4uSMO2gE8C5&5zW@EdOSNxFoe z2A-rW82qhK(g967f64O>It8>oO%kgbrC*7jYStUNaI28trpeB<_hDcrWbwW(Cm5UO zxz9=Q1`1+A!!!5x>KQQi{m|ZY>4n<9{t+eu6d!r89(X9^l;!F`(slmJpV}j z^lm?g#jSD>I7SX>IXuK-q5bjdHas`jkD+BKey7b2YFqTc%D-i5;zfcZxjY)#rs28T z>6%ehZPj0HtxsaENV@2i(eFp#K@Ne;ku6@g4{q$#Nu&O(sSQcWLL?%lt~Vs@(wjL6 z59!b+rmgy-+U$KN3uglwwbu*$X=w(|U*_%K4IYDnq)ZIZ#xa{ApXGIu#d{f~@XHY+ z+}bdG6@#k1tks{Zy6xpRFEHrHQ(iihHM2Ovfgi)U#f)B#2U>KDp3ujQ_T|3}h!GiG zCED*$AYb{^*T;2mJw#019o{VlB3OSyTKEqDwB|cQOE%kN_`k!YM-)EyBSN3tutxqC z`AqK1@z^_1)a~uula0&?O<#A6Z9|#n>m*UxdU^e$sW_{Zun6pX(7TDHs-va8LvL{x z_>OW@^E1;(a8Snj9=|N?r4oIv)Gk{|Q8Nq0e7nX6pP~ky`a%6xj$Pp^5z0U~e>~&D zX<-$WtHM30Hcz&*H@vYy`N!GyNBh*kuOmbtHfxRqJ1{j->kp2sMpgAZZgS~Q8RPrg zbU#TBzS2Pxi#hcS{utv;$?;&;(vo}srWCRNP0W|2GUQx3aH;u+{NHi?PrQb=)8ljK z{nQ*b1d^xv49_38MkW0qhtl6|we8UAeskmPQ^#80eL&LHbY3aXj`1e=MiNWMIeSF8 z6)YnT&FXcwAd#w(-{KrHPm_?bwK1@o*^`hFRc%mczMg5@m#hq6^~%Y=%6#y_^gXWl zc}ga~>msG+VP=y*2d;YBb5q?5iYo&woV!713+E1vJXdUL557yHi>Xk~9)FF`8Uv7% zsUkMBX)l`3ET|s{ZwZ|6{F6&ZJvp3Xbk_167GU}Su-|lkw2%=B@}Nr(TdzSoZ_<{X z8R^`;$9JKwxTmJ1=@p-F`L(@ltlDSxeof-*&CmQ&xz2d#t%Q6ffw7&+<`MgB8h z{G|kdkI(NWCD=R{?vwai5lL`ycVelpQ`M=U9ek*-iY+gtQJcw^3+^bEtCg5aq$O-k z%HeY73TfVKoW#@AbfxK!zAhg9;5v1w{|G=5d;>Y5`=229IWS*Kti-MKn77==+s-}v zu$QU;L>@tnD^DOSrme?f@hLRGi#cB6J2WkM)7Kmo$K-Wr`MJ0KeZk|H47JK;5Plle z2bTF>Xhv*3ZZm`NX)HORhu&?{^z>4^zBw`}g9Y_2wX1;m*tYo!)tDj_&H&jTfr6S==nyo&WK9mSD4J@exVCHAG54>`ThruBS}Zr$OC?+$ zeb#G6OZpZDU3W8|KEHk<8u63J(Le37%EM5ufr`W#AP})QX+|+H&8}(4(i?a@Emf%| z{IqbyZ=x{5c&)z;8o7*!XF$VUd{Jt+<%BJ3`1IWY!^8n}F03Ep{O06$4NkFYUgV~{ zzYpz+ZlD26ev}_noS!53bdHQI2*6;^XP|Ae5FrZxPOfj(^ex;urmrBNh4I}O3ompx z3N6_|Z*);gX6$-G^@RPNzV_ZLnYX)N86s6Q2jjnsMG=BHO*_XVP(2L-^J?TtJkb^4 zq5OGPgp48vYu0W+aK+LTel=PcHEN6=;Gra@5Aj`cBOXb+?t-Dd zHrFb=bF@N9esX<()oe=B*?f-FKwY?UOQF554+wItGy}Fe)o-Ojq}zDHAP4ZgtH|NK zTws0gstfR{w*KX*?r3@vG`J}A33B58@=@84WFGa^RMd16>&v}6SebZ3^OjLrLkeM@ zjs2o0noYPnrNiO}0tX%owv_f6H7pB)7$$V%AGl5^N{2J1N^3de0i*hCZ{`*g2GVoE zm4Qdx-hny{p*1PG>tGq)tmu+@f}K-^j-GcYpiaqrp(%>V=9Oz+-Om;F1S4zvo}Uvi z^Q->Ic4RVte@O4{uzoeu8^8^TL;dEuxwdzpW9YL#mT4|9_HRp3?1&_43j7os|%3v(2xTCxl6ptNx}gCTp?GMQ2Pwb>2K+c==5Z-oOZUyL!_O5B-u{ zV96YfJ8B*;IE9=EUly22ULpRc@`c z-~H-JOvC_3LdqI3$~ffw{uHV<{qvI{l# zM+0r_xZHdR%q`jYtp|$>XE*0cF+A<02D(S?DzY9<`El4c3)3^Kv&E^$3J}PF3^aof zeUyFIccia?%JhtJ4k^c`n3of(vorr(+vUMnnLV|=19{ikK76*M*db@&x06kN{`Y>D zGlzux=N1L_r8yBZo_Pw$9Wl;BgQ45z5t{8w7Q@xSBDfu{AY!Z}FQ>7QVL@A(%{cG- zeU15Zbk!->kc;7D0{wR7b=IiwmtEzx;S^Poxs>1L*`w#(=c8YhC*J7fFpu)30{-=F zbS#-@ru9<`_UQ`tKV>SR6@9sn<71yEGGS}x&?_>qC}QD9)8pNt$A=S(Jr`5Nh@+QY z{NipXhG(=)wEz8T&qp<-K+{ESy!b+PY5r%eM5^Z6YnQ@XmCay?yEA3#MJ`0k{yc=Ktw$~_#@CeD64u1+?2QRr**>owp7{^=3v4{$t|%cyRK}3=57McIMP)3{M5^ysI#|uU3`0}H#L>o*2_>YvlpJ8BQRxyTl@gFn>FyAurAxYD===En|L(eL-TUIcW-;q| zp0m&1`xE<|J~y`PGk@P3TFU^o+ezQq#owo{=GjTvv+%{go!bXhUo}2?3EO9TY3BMt zQtMq!E^2s~50k^T9xH!oH~i+jK#9;0OY~bAN!?BEC?zIsn>?d;luiu<_f=FKlj7_R z(;V{F3ZQUlloS;>5O4Xzl_g#tim9P}|G1&~*Z%OKdpjOIWU?1r%sDxhwqi6rxj0mk zBl+H7&d|mtKSaKk230PO11(=gHEowGKu+$JPrGTD<3Ggb9Z6bd!Y-Z{R7gXXe*2L0 z)iFCZ+{0n_gGZU*yzCh_#qp<~-$oiOI7*v356%BN!SQ9rYqp42^jH18X%pE>Y&1WH z81RW-B@G#Md>0~24OaDuaqLD%TtM*-_CUR#6<4{E;_*f}5LO6|7W%bQE-*r0tK6D1 zE9V1w@Y;5#R0|tXf8n`&>kB>>3RvsjFtx%OH1rE!raKQlk?(u2i=PTS`Qfi`sIzD& zFGBt7P1{qfc#3I4MwZ?pkstgTs!|N-MRsNhmFEbM5gI-l$VWwUQx2z-hTwVl$vELy?MqY z>NH23zo)oK{|w#O{!UDv&jEEIKw=_1y3lcA^bBb@)?Q8iN1xp7cLZXS6~9q=jU1uo ziveFJGgr6ncZzRSAg(ZXDy_B{PKHULW|z1ylSc|Gp9XI47EGjZny)F}%6bxd!TsCc z5axI7I~E0L-{lki+;hw6;N9c`&llOfvnJ?Ak%LptV43P5sn-$c#nyPJaEK5t%L6p; zOyx^78MF=F^7Oz!=F2!JajD|QeLSvBDB&$OjOB9442v6H+N@mR7=bk1#Vbd5*~XCK zyjyapKT=&V)2P4~ktm1D_cdRq)qJm2@s`WQdaN$i@$_pQ+vDywf%F7RdHjLM$L`9s zi93=7LcCjAo%&80{G*?oK5c%uRhkuGoOKYJO_*shXBsk>%Wqk!-9koKzZEVaj#l>8 z{q-USbXHv&B|-J{K;nMO(Z`=>$D(Rvu1vJ@)#{)-ykKpRA@_H6P(aLJL^+Rk zuSsqRt&z+`1z?Mqri7N`=kFAX&WNg^x7c_b*38RIPpu2bCc(qMJfixj^y5)3M+yrV8crCl3hk(X{-sMb zTXn!*^%)iUf}KO~@U!t&NkU81?Hepq&TZh2B61T+PjC}*j8s>Q zOmD81auSZtb6xv9So8(oQvjA}DA_WGjHvms)09oCpg35X13G3WAT78TOcd5W;`WvBeSJ6uhJI>J z5}ydSKePNB;qzuaoHZ#OodABqG;WX9tc1A?)_f~cs|m7=*4=W0J>`DT1% z^w~SVoc-xNhLdIn^q$P2@h=WE-S;?9B?Dq0sXvP!HgYD3GSjBib9_ZGTgaDr!cef* zt(jF&-}io{TXUR%eo4SzPgV909<~&5ORRh32=nf{MyV*o8=Q7(;zgPQ)7^e+GqZJp z3OxN!w%yl!1J1#_88;AzKi(iZT*kLd%8Nbxvr7VkLZIKn z*TiIC6gTJymWgkhaTgG(aXb7&f>0dI28QUdCkb*cWMbP2s;}@1WJ@>SLGifqnkS~oO+02jT;zh0B725Gf7Ix-1 zqnOSXtKJ&#kFMX(@80J1XWwvE7N7IWxG-^@cml<0KS#xZVEPc6hex@i!xV4J&KBm= zOCOM~gRq-Gs#sP|q-9!=pyYu1I5|CvFf za1&mP!O>F>xUPLJ&-pfLh%(eHBtU~&BdYj~CL*v*6-hNvV)hnIOg}`#*kLpZJe%(N9a?bmsy0NZn4nJ=8_{Z-{+pVq{9SX z5|h*AJq9eD?0P@CFRfwRg~nrNJ^4m?as%&G4UW|+Xth!LZtLr_3Y+ay7m{c$iJ3~t z$W(muQ@9}$oADRRDOP+gDw3BQQ(fPR7Mdt`uchoYgMpe`?w?Hyiq@a?;B3~pz4%pq zW^plbb77H?pjZYdG40zyhG&gS7>e-i(^TfM+nc*1`@BVy2EAQ;H$u!V|uY!Tr;$)M@XF)LXlzX}G%s6yxvO6-?E$gtKqvaBdn-+$AKH0haARJ1HFT;Cj z{I|8dJluyuk~3W!jptwFSu3#8O95-4^jcw`{;q~MqAIE@`Zwrh&Q5*K74(eXN_dP& z9uh-J7L(73Cf&Hvj#Jk}pS&-0fKv;VhDAQB)jiIAQssgysT22y$-xNsS*+n_=K#W0Ot4 zaQEwr%i@pMxeXF!Yq-h>-&X>Q7w;f&XC$A7=VdcgnHcGufpV z#?rkr5snLzxvnUmeM`OUAJYK_@Ix3vqd~eqBOLjP4KGy*aUcNxXpQ`QT9Nau$EukM zw%C(wy-ldliW2+u@NKl2`1^gZL!S1~!)@8Xs~x{m=(i$Ahp=&SRt@-Y?PEwxYOQ_E zC=e8MK51i79xz#0%M)Od2%JRFuL3y8MOAH1j(1ExnQ|zf7q=By#!7}ht;C(`U272*_S`}7ln#`SPb35VJYS< z&fjM#F+nf3rp0ZfMT&oPJGaKH(!_LSglnVq)IjiZQc@+f3k}UMoJE)e?R9V3-H~VM z$ep3cNTvu{6wD@D^Stj+VnA z-;t^FmWKUjNuZk2J@2*i9|0EKa29bjIT&eRD9uJAABX6NE$RZ!1|ZdP|J%c7bKpRA zNN`qzA|Xncfp{VG}P&5Prk{v5yVw5tf~p#RVb&^1RsZnKwYxtPx%mvQLnN7 zqE+gnZku_!RzJY<02^C*fFV~r=o24o|N5y7eI+m8~<&zvHe`F_$9|0=Q}+P!=*Jv`u$3XUisVs++F>KVTw%iz#{= zO+WmD9)^Bj>zKQ6h$>VE84qufhg8}AE{g>vgs!RfY^EfdydT#8YVRA*2^hiPEMBFt zph)FXGZSoz03<;UX7JUCA#G*wmn@3rVf!6_<6?mKb-jgd9{H919jZ!F82VH8ti7(Ozj!_>_)NHO29dC2n zBW5|6K!%~S5=;lUZW8PtgzP#n{R6+#XGy6d}RY0`>cqwgN4&hA>j=@O5Nak#rNh(he!t1cBcyb^E>&=#Ou9iDQyzmA)wK>m7u+wQd{ueHEXnR0BQb5f+S~?LeKw zkUBbMy0;-fr4jdjOPD@0hI4nD==0)w!e@`>;DrgB9(~pghPnv_@%K4ZJs9sM4rq-?YBq7J9o)pS<)~d&jWH;R5J&I6+FFo*}HD4RV(AEJ1J}Ha%>_ z5Nbp`DtYrjzcCl@egEgIH53`&`8cx9n%bY<6S1Un{d~RxCtZ*}r0>bFyu3Pgg4mgY zw=(XVxGE=IT8f6y(~tWpZbdJq0UXKsNhMgpoTiUt?0MTbvi2b~tG(W||AI%ashSv{ z9m?YRZ!(e2r_a&ZLvv_GmR^!|LHim&r*KYFph@%XBItYnuiRq?rQe zhHr_A<|_%_(|to88?sU?F@O3zIe{=MtlF=g^j}tjSOosJS7P46O?kE!5}q7c|C)Xu zK$CVs_bzPG4IQT$`!OCAoM27bNyvt*4+NH+V}9WBD)!M>OS9 z0NvVUtN`o)%y(`9WBCsp0PNE8!7h1Abih6AU`{mOFi}<$F;B?{fUv>x3nLf{kmO=R z12c$SdJ5!3yhEWrNgzC7!Czoj5ET!&|& zmewQw+^Fv641dovaI`dXx!lLxUZ(vLdR34m66=g9vdJ$F>pSB)2~$LRrx%&#N2$at zDns-QJNrc)@M5XHoLT6e9T`nr5F;6U0zED;_w#$&pYezCw_*i5zoL`^ba&4m8oJ) z@)X|1nftVtPWb#sFW)Uly=66-g?^Y0*sx&Wy>t7_1wMkca)JMT=>*sr7;<=UhjBAy zj%|do>73PsE59K&7xIs`ITQfXolz>>_qPb9V{GC$dr>NaFsY{qMx9-X2 zaLl@dGVYsf?zz$0F~XwPdZD=FZ-^BZ&@o}oXv?eV-D<_NUx-$C(7#<6wroe(`#3tO zq;f*hyTtDgAK|0ttyAwF312$N`)6UWY5tm|%Ynq$jt|g-Mco>rNm#3NPdNcU1|9kX zwU7d!RA9w|a7ma3cs0=%Io+l8)fp0VSL|*L8+dmIQbY$*LK&7?SGR*=_6e*2^%i)6 zm05KMDOfS-aJ$>u&P&`4Kkzh>#SN(4Y;cpN*ps0TWOfr$>I=;=gf=l2?Qw3$*xp7|iX>vQRrJdULBW9A2*0ao~c{Q-=H0R)#=}WN5B4if-a-pm9UQkq+%b zCGC4{J%qeGng2+SWxFUdT+sPPP+xUDbablHbL^{M`@|eq{_0G`RecP*Ui>#QMK3JX6qmj)Ol5wErmb(vTR5cpvcb zn=FwWsSvL>eW?( zULQaI?|Y)B7||#QDQ!%@EI7FGOb*>VGuBrPwHUg1tlw=>tQ`gZhisZLZR-C(VS+c8 zanX7dm~pos;|bgqW8PBz4z~+$Hx8x=`h3F;X&F?{6yWcIqifNCH-F=v+?0?FFwM0`U!L=yP02b8BCF9kyf)DneETkLI;)TKC= zp1QppfCzV*tbY5az?i>`0jXTM|5BzpipIUSjMb7FY06AFQFh%bJb*`FoIFF9B+H}( zXfQ%GoK_t9f>dWe6VY zgT?EMV+mWpNPM4!KKiUJLpTqeycqDuBX+Rup|#&VOwEEM*4=Wau0w7{>J2CSwm(^` zH2_!$%3b{HR{qn2?k=yM`-`4@J}Fp=2BS|PBQpVsK)k|=wLyWW3>DTI(iNi%(l6kM zYd`9>X?MO`s^jLmYR`ASsY~`1AmN_jHgYf^M~E!=gFLgZR4rko-lfpw|3f>mfo%+? zJM8a#_sp*{9-2rNY?CVWNP##41rxCjl&|T3uABNV70OAJJRY`09nO(DNHD#Gn}%SZ z!UEverbV_B2SiVABk&H`ux$9rr<2j2p~6bHEB5}Ri>i{hWgfS&R;)K>))k;pX8-5i zIerwE?arSm=`9E4u9wZ*uJdDNOGnisSeDUUokyiS46<|vnW~`6krk3*mC#t;!acd*`+5p2>sWo`T)tWSN7t4V5d%8Q0j&y(Z`8$#| z@HUrZ&?kJ@h@>#~P5$G2j${GwdJ~7_U7`rA2dx-X=N0S#*GOAq;;Ncy{pd zh^ar64EG8;n~*3uwlY{ov~P@CR~} zSwBgV=--t>Yk!O7sG}_*jV(P1>J0xPr&YTFMrk;ewk zfR!VbJMN5LWM*Fl=Kcb1UniEQgUCS5ce_5rt_>&tV*Z(frLO-G;Ve3?Kw`DmP&izx zg7!SIXyXR`hY&>qu`i9a!p3${U;|CO#=sMzXS9(!?4+{bYeNXs_Cw1{ESby`g>PZ; zYT(0Ce740x=bG6&moA>oF2Z``?@cWFu{8W9Z-H^oB%K=VQvSnrTxtFfeISC1ZdrGc ze1{+kFmGgEj|Tczs5%8QL+8rN`==O;)LrW{)P);7b9Fe=GfMK|y_@^ZpP=)Vv$O*j zuw412XIDZ*SSM@(ihrsDCh@B&Bd01ed7Cbl6b}`jlBNT}(Q-A94^j?ff^4KeEK4lE zZ+eXr>-a8wH^vg|+l8q}0YKavAzae9LRqku33FKU{A^d+VWR@^#cRcx=DSIx8K9|a z-OuwcILIje5u9-whL8C^PI>S!)ErTA^n2d988uO{(0t=6^;?1gD-MV%v16rxEzd zb@9x)zQU&CQ~Vzi_0NPn+^I&Q51?o2F(59WeRDV{gtV0P~k zN;-;?!oTzOPB14I4@=IVyJZv?*P=KZhMAmD?y!dRNO;W2}SkF zv+n9=x)G|akU(Ih!`v-pQLr_cTy^wnOaVaUj^C6Bg55}ZFTp)8!WsK48WrMsS`jQL zNHDi;W42GE(Lgo&{zyM~l<4W@CTkAvi|kGT+z~Z`aH!YSpC`xIfbbdt&3D2+RPUq= z2!hsj1L^AN&=1I`#rnWzN3~y`a2#U|xnc7Ouu2BA_Q`QfpHvsC0DM(i$5!9qV9I zffD>!F}a)J#aNq2faPk|#jmB?_&IO`|G^RI*>8e)ccfR(BEtYA!^|YNWM3P!PL80W zGeN3>)*duLP48_SKVH%FOr?6WsltVV;Qiu2ILQy2a+CP&28JQ@A=%612zIG|PK{Et zZDM*Di-%*6@=L#!LJiIo79+@kNb$>xl()J|QJmn{$;9E(ddrR#M@~tgP`HrA^5^O5 zM_h$+^>>hR@t7lrT|>MrH;~W%JzQ96Tw<7>I{Jv;ZtbZuM2Xlj>?xET{8__{lK1Y( ztl3r8Qza;sq()X|ZCc`Pz&S`nWj5<1d#pKBk?FK$-ubl@fwkGngbMpFqp#hQT~!Dd zL&!_|&!N;BB@aUuh*nFZtDzjjx2ql6lyTm2yjQD)2h0J7pD37u0*-PtFdIVYCq>%3 zx^e}#*iFV0Sgh^$St0;*g*y|exaQ9NDxY5cmNAwmjuR}qm5SE%E9=*=_`dB2+82#d z*lwxhpTWsZ*fh4$&CVgH%*o=LBS>z4*!M>Jgxi1KKX%~Mw!QhH;LW=r$~+o9?-ax= z0uEd(>f0+c)3)_SsOP*h{VP^=gI?@!=OVQaVHQKPLUG<_@jeqTM*`2U%dem|%@0?C zph!h2oB?7$AfUajVXkQ-Stt}y2YtT(;?>A_S4RCQJhjwXY*m7p6N{&q)X#(`Fg>?G9CiAB-?iGZ3CwM(cBwjwcCN8^cz{zAza zV9_LjM(}3k${6puf9I-%4=8132*lnOm^+kAZ4AMsah5Z{w#GfkRf-@^4Jr7x+d`Pc z?UT8+O6GM#3FO;q(Vf+{Hu>S%R_q_=jsh4$2)Iblo1!Q?4hLC_066X8I0na4f z0g-KsNju%hzI_eM#NT?@)RH~!Mgyb)U(y`F$3xbYzHI7tucLI&vVw*sXX|iH#qEL{ zLx&mKwMQ6o$D$OZ2dApALZoh1Ez+l%V*Q@{xg&NKI`vfN^7|JsmcGHv`>E*j&njlt zyRWAFtVr+8`+%hE_sUmh&D{k!Dl=aTEbrHRY>VYzS$Dw?D8{!;B=&WuCJ!@9 z&5j&@J3K%Tsqff-7(cmp|3O4o>HZ(m-ywTnRyLVUg!{{6BTv|0bY&L39T>20irhfB z4lsWz?HZf1&Pf)HZc}BPka)9nO6q#iFnsd3EqWUx(J(FC;ZGhrDP~m}x%-yH=v4d7 z6GShkH15ZJ2`Rh{XO%(e3x;q9QrGf6mQr(vXgm^E|C;U}hpF9HhpJtV1nVf?eH*+f zT^rx8SYg_foM)&Sy83;pj_LLGfAV1~bjg9lSeJcY^u}04ZdKrEHnStM^<+4sd6V}p z>H4G26Rztk)=`qGk7Yhz8>8yIh*i>2#MX-O;>7;MCq@}Ro#v<;F`gQ~_hXA~DUHW! zga|7z(Fd|J3-*y4)fh(77s&fot`0#A7XBmeH%u#4-&ga9xkP82pKA=a-FnKl_-5pd zRUn$4DAAv!hD+9T_`TbF!#pyoEIDr?_whX9&6AwNp2-t-hx5#nqE}z7BacdDF6vmZ z^*^TUZM#X6#7;)-8;~WJ*viP-pEMu=D+sxa>Q|!6S)snN+E^{i_d-YRUW(H8dc?=m zerCV#Uv<3MsOXv}Q1LygP}!*N4S1HJsoX zZiMJRLIoj?Loq~i90!fDo-}`aRo7#GXeJ*_bszDXclnc51#xLh1V~Yd_Mcp>6MKL8 zWo_H=cCTxk|5zA0z9ptCl>>CcN|)j0wIX8SorEP&any1Nmm)m4eck;xY6s{%VnI9# ztlaPxH8xvmrS~_G)SFTYpW;Vt^Uh4@^#6QeLGN!pro6t=ol%XsPmtsULcOx^zeXQm zG)okHv+)ax&Gx>`E~# zu0?n4KtZ>ex8j9BTKbcxqsmRswDk9X(+&%hd9p=@xYe&@pNt*bIg@;?pt&dXug5?q z{fYVcQ}XZMzrstaSgZ)vkaY}b-b)-9ix94jLJsq>#S#Z7 z$?sSoqnF!O5`^2~f_njnsPH*FQUjSwAXX-JN5sd7pK%{D`FTnu5Wh}IQ-Wj;2(&=X z>b9mKJ7Thc6Crq>AuZ%|O>9xS+BFXy&~VCj4gPW=xAK1BdYu-tFnVPJ0)2E#?n z;q44UKz=W|cP~4r%=>6LcBBt)dXO^B+4bp0KS?F-bvVmhT*3}@wK<(m|BQz8xU%+6u&aB@)VyJJlQxQ@)C4_fJ+Oq8 zHbV_5HtABr00|x|1={o0A{|Ql99#y-)8z8N({wzT@rzysO?S-j(qR;D8{doc)-Mh(c720Fony#mPYeLMR8v%6d#;?hrd zyHmOm1(P*D*@+PMoew@JPYNN?c+=Yx06kA;YG?4p9iX>;Zq%-;@&)5in1uDIZ60^) z@bVoXc&XfHNGu3WO;eexASY)g)|v}00^u3Pk(XzVJg4B-Eq@I|`g;QwCMd%{r2r`5 zSNdA;%q%hSdMv1dxA4{S>o^kG*a)EA-{V&YC3O9WYW5s13Ve3Ra4B)O+ShIDtrc;X zH%kGydrp^ZFisV0;Nbx4qH6U)25M9M`k1;f z@f7NRY*aPCjGh$7m;I~KnNkvweOLm`0Li-${w3*+b(~fKltSqY5Xa#t`Hwt!odesh zpR}B_Aql4>acsJcjKSBMT4s2iKqvJOBbpuS#^tQtWB5>FyR)YaGN5}2y(RM431{o$ z-_An*9K&yUvK)n_oS5z)1ONBWti5O4A5zz!5AR+^9634GR&jR-%Ei8syXn;Qv~T~B z9^TptPtEMA`8O>9_@R+NA4p-s=+M|Go?9b$Iq}#kn@FJi=5N6xKSoVC!Z?xe;uZBE7 z^ncaJ6Nz6P5gO=jT_J1&K; z>Yu!UM(v1$Zlc*pXE)q%+9&NqS=r>`DC-T(2{+Ju#gZP@xuw2 zUL6tcxAJeJW5-2uaVmy=zy!0WKa@MS>`v^w{7{KF@#v(+zfIw<7h`o=T20q^KAC6} zD(SR_Y=H>#p+);_MchG4>yUKTY{S!x-AHBJ1l96u-nhazZ5$jXl zp_zOTYw3 z1MQ2bJkRGu2m`|N?`10(OaFB{_rcAUEau0lHIb@c*^;w=MbhB<7!^8V`9-q_zW=t- zmIv>3Bhkj9s`ZL*-b51UBJ9r@Fa#0li)?Ltj;-2Lw_(c5kk6X*C#JzkPB`yEfonE!b0)8i-MiI@RrRm>G~%M#b3^=q!Qd!QOZp&PIi$m zPPYFptgrsIQ{5?Ao=E@ug6iq(Qvr{oBf!D7%?N&83+;iUNkiwf)iuHCqfw9wfb6!w z@dl{e33TXJN2hw#?x-K&&YioJ2!H8nHS`p%cX4XK<24#}(}BP7kM(HY%dG2s{=PVy z2750mm+Od^Q-=Dp(AQt)^8mQpRwyH0e0YrmOl-mg=)82Xju{|+!g38}b_hV2`(B#r7o!*2H!#i@%oI~Zp z|NOZAmxO>H7qNDyx*!GC35y@=38Ocg-JBKnNo7ctoW1&VY82Hhbh^#KJCr8X9gbGw zj9t*x(#&RxP}8nVkFmIlSJsMOS;dQ~#^#8aG;TnNsaK}+z0%UGZdBTasaH2UXaG8i zI3DN;)Z#xy`zQr!ieEETn2}(u7|W%APC${BOAFLYX<1roqVc_Y6uv!qI;8{7bIT5% zouTfooD7iSJu7G`&QgfJ7{}plP4LFuTx0>i?&?#+s#jJ-CSx&de*&^rAkakA+7vfd zY03iB>DuxSbxetKWoyYdh_=>sPrID^Uv9>`qZfrs8%=t>*P!baA*PCuyVd^0gJBct zO@q6-nwdl6=lea2T>PzYbdSuq%z7AfB(Ao|MiZphL?2>)hGeh&uypzMnm5_~gKtDd z>Vi)>hi*u$!Tvxa57-mm`cHyc#?Q$woQ7yd4^L>$butu^#2f<0e(w7 z*My;~G{_;()xqA zL^4of6MHPlZH1pkC@FIuya@B@|Vz`kE z>*37X_k45O0f(b=GcJYP9LDupKtymU89{7>|0^v3T@%M-4tOACxzshJ6EA9;TagWU zOXi9aV#nBOz1==VeiQ3j`br@(Nl+I!_5@*b&ViAIGEibPMWBQ5%-x~KT}fCr5tO^+ zEZ)=JKS}&=w(}N~n|+=}nD{JlJiL3c2D`rPdYI3W=drNz`$444UK$21FaecNyp+R!F2LgJxrrKCgUa@vt z;z6aiocG)dKAmy*|CPDD2^F?ei-_cV8}*%*Iyt)kHR=B=8N7Rwg^dCUT%&8Knp)DD z|4$tW_py*zs)iz-MJr|ZU;O`;lFTw^jeTNLmw!vuV-If;uG%0za|3T3!vLE2Z~~|> z*#^t8pzeB_c1m^tyWLA}*TFp2;dj41KQ>v`0y$=ZnB?xXa8II#=^p7OCz`@sj%Kot zn8pB7kAqSZ&5fDUQUYgLTTFbE`t?ZMyh}AN$-&#HRzlPnxUvFM_>kh2$V$y&!>Y7c z&q~%0%Qb1*$*>;{;lqc7e~g4zg3f=GdCSYb__+Z5;iM=Wldq?$0INWx40_SM?LEWuG--+3bS-=y0mpzk_#oVu6xC)p!Uo^!8 zFb7^=^)?q?`}UuM<(sru-4pluFZ^dse95C~2utl1C;$2`Ec7a9B=4L2EZMxJ>LzNO z@S4dv)RQc>y`bFosUp;0GsG!6?6Jh-E;ig?F=3vq2wj*uvwq^25oZ}4PQGgIqw|x? zEzO+q%=$;$nnC^QVNvgm2k}p7`(%~HSJEV|4gnKI{?ZwbYzcpKJ(6)@h0sUMi_SkU zE8md?8=lD#VUL$>GMG&@8VkXCaQ;gXaF%m2Jxvf0{w9EVt2uB#DBRpHDr`r}m)?KZ zo_i_p`HL3rW_KJ}8^#B27V1S$#Qs~o&PXUrXM~kv4%sJ(zN9?gRHFGP8 z)?8&`)#L{S?eH&F{ingTlNG_E06E_x;q>5Ur?znZi8=s|V!e_;%VKV~&!JBsMFKI) zntjE5LK#4!=DjtX9(E*!9cZoOA5Oea1RS$^9&_#{#HCHfu})d28!Mm#1Dl|@v-Ms- zdJ1@c_C*1OBN^bPS~mC80fj{QR}zTdq>>X&mG_V1j|cG+T*&qds*(P<-oOoqV)EPl z4CWqOL4`fAkZ`cEH{E8J(MH%|^difSj97N8%1#ku@Wd_e+N0q|HgJUBs|OK{8#s^t z{jMzdwe?h5#ka>+Lv7p6X9wc%3z&N2xkbM4g*;6?z}#OTLPvai0F~UJ@d-13m-3>v=0*<3O#)$mSIGq)6)@&N%z{!}hUqzXzY2l{ zSY@{EgHNwiwVm2SG|33%M5E+X4v@0`k2}yha?fBtIYHhb#m!`qfQ1T3{~v)$el6d0 zi3PY^Ql2+X|E~ITQ*K-Ih7?wsSeYYGP}DE`Qrov z(kMcbuhI!)dai9JSZ180vl&J&sWeDFYl94IP=H!>757ma#5&Cac8VNoZ_U*a|6N{= zFfXnvp5FsrJNMv14Kg)6TUt&PU-X(yG+c5LNuf~ihG>BWFznvB#IMyrM|uoKK7`?c zz>?1s$3{lfh!fM!Pu$P~@6TY1x>Pe+TQ57rL0;i~cL4nOZg%-V?>9j5Dgr`A;8#D0 zjjIM9AV~SW93LOx`&p^kddcqRU{skHZ2pS;fDvU~Fk~x%s93rXW#z;J0ke0OcUDu8 zroe164D~+YZfg(;@J~y-`7&l5I?IZmN;IhRy?2!ziPG5~G%>I|$^g;T5&9hVaDW)? z*$|5Ceg}rc2lBI@{w*aidRvjDubg2;ay-P1X3f4HyOC%-z_Sv5^V;VtPE*B3xo?xE z+?8*_fnm*UWbguch;Dd^lkb;0Z7 z|D2U022I?MP#>8#ChFuI98tGq|Ay3k4$j%t&!g(kdM(s;6#2!>li%-HbGPh_>=h@n z^aq_`n~sfy4vsP%Fzt;zUxu*&0>4d~g=V_A z>eyl?wcxIp2B~i}yiyTP6nWD60h&oN222-~B%G}?;>$KzrZyS^Er6U8^6vhim?p@u zU#{i^noFe?8?Zws%Q7Gr`uCcBa->i;B(O3=Q~%1&g{y~ z4)z>3FqktMgmTB{X=?u=LJ30y-KX6LsExQjBxge^)8sUnreul9$F98~W879u8W+;p9{Dl_LN(kodAB`wXa>Bv{4RBcP5EOOOLXG$ z_j|YiXc2hI3I-G_Wa@ubq7+@E@7x=JtlE@s^7~M5&FrGQzyb#D>lp{87`*jzQQUmX zZjHruJYF8udQTgE;^7-9GgVhas)0U+eRF9Ifri^gx3YlS29YnR0z>^&=JtH1jxIJ# z6&)$IoAI>$&XlL-hPEqHr?7|pt4aC7Ry{--NU!I>B5q8dp(7)J+gJb$lss|3sp{`0 zD<=p}&wQZt@Gkzb8TXpBXhT?^4DYGAE(sZpmR#_!@Aqx$MFkn9j(59PJ~AL{gcRt) zvI{%aimw354Iuz9&O>vx!wg2gfa2+roEZz^%MpLEWam8_g6~sh0c-JqO%bl)kRdD; zXacsT-Psry7<Qw@k1qK$oe0kuwgtvPdO#pa`bp`6KBKyOCJ`Dn3 zkXEpq6ZE5=yTaFyfKi?k#i5~Z+RetGz$t@r2IFw8lTi${qQ#TiZe1Ia^3i3aV|uJ5 z&L!4WVz{2d93Q}RxRI(%VdA-maTN-50V60#kHQMj!TdATyU+#@l)sM6u*?Gxw;@#=N^EX};iS{g-(tlrVh|Haf-#zhrv z@y-l`l%z;WcS<)5NOuS*h;&OyNXO71-5{-$ib@GccMAweO1E@3yp8w1``#zNpg%n4 z?7i0d*9vwuaI6scGmWkOxcp{iKaPN>uBMzFYTZxqcsc9tWifJqLoxsO36S_%ictYj zi2@uLK*)bE6PCY!mJ+L-t$@5f?z6*?qdD& zf3@lyO)eL8cdET7KDpc!@~cfvR}&6OlN%)s?1H~nR49sB_sa7Mlzbtt4v{c66WjX~ zXN$!9u_BCVvZx)WnH0f)ZBKuS{n+lD*0Q|19^+>IVICcZz>#@*LopCiQZ?I162Mc! z6q8}_)#mqa#S{6&Me|qAC2h5Ze3#6NKyL7l;63|wf+2^l>GOP>+7RvY+~%+_o(cUT zS_U2ZCi&y;acz+>vW?U8o)CN?S_7>qI^FhfI4|CSl`rlwIc>26_ZNNNH*zl9N_u}A z;V0-?lN#nv{;J;K`emc>v2EE`nU1asdZ*1ABJcUUCdS`+vE2Cn#5w$4R^dy^zJG0%sH|5jLVd|wHW>~cE01e7HUh?$x9*^V zv3iF7Sg~nW^x(4ZSPuw68-*~bx(DAKZS@ZFiQ7sfWPe{8zKqNk1;+JPkzkx zqCe0p6Op|@-U6iH{t78@>elZVIkuc2L7)yE4F??CAb0(#pYWl7ZtqAps!%G*sB}Qv zN3&yv2%0_#NO*s}CC@fE?7SSKK;KH$hYsiF<36*Yzh)(G^)5 zT^u!qaRM%d49oZ=^B&Y&=Zjp z(}8iw>Cr;hcZ)OFBN>od+U%b*g!+UwJF$3a4DGuf#pgnI6J&3+9>ffPv>a&&&#> z&)^s$BPe6LqGwZ+sc_+1@D#yQtmi9V{n}7 z!K5Ubd-(qF0UT*a5Z4!e44n^=JcCm^9?qSW;tEhU{JcriQULzH1W$n?ANt;lV7^fbnCBrh3d!odKW8~nnN-)EBQ$mdeI-zEXi8l6|wu+$s%W7t( z9BJiS!un?qEuAjf4*akr!lZnj2+U;*^vxu6N{iygS-HGTTyr`gQg@mnDsg!|#x74) zK&xg*-BTgl5xM@(u*q@tSZO@FKF{&v@_15xUQ-YzN{9OxPPw0~@P)^NeL3>A)7SNc zoc5F!{%6cLGY?FxI}RVLSVtFz=X7kAt$ZKXyMp*l49W9!7=2t1bJ%$27OVS)wQi?H zeeXicXZHt<5Zw&%5tM#070uFE^d_6|cJF|M{MEwJWPm^WqstPPxGw36{6l=Dw{(i?i+tH`r8=5NDulU_ zHq4R}^HJ>g2chrMbp{%lzvD0RZcek7*7jDKwy`vT$eE2qnh22L@6XU2l#` zK6Xk2fQyP^77vhR0g+fnm8a5DT+=g1O zmau&sGiwKSu|x`OS*HpO5bc+dZeO@^`0H^W?FAW(=ADKVyKFp5n(1=w&*Aqo8oE^W z8?&y4IrkSPDESE55Kwd9-EEF+K(WFFE;ogBj~G2TyOc*l{cYrz>($9Qv#G^csi#vL zq!vnI&^gtfV8Oi^#a(3T~n9F(K=AT?01=y|iv z|C$r@M1>*7mX|2bo+iX<1ytBeD6Env{J6cMwLV2>8RHgOoN7 z9PvrCS4;?NQ%lne^q6&4yQD7R8j-yOKukrR%N~qDd zugPh{83lQKv%jVAw`Kp0{LH0u_W* z1~%mWJ_B&Mx$k{5flGosQ_he2F)xeocjn?}%eL0m%uk*@=~IVM2YwQp=zK^8u0076 zLGyp|N|zpj`2{l|z^;R_m+_zG!!;GUmLDNo1HALwBPYG@%h%9JIH?2^uOuF0X&tDN zC^g;xq<*}7(#~C_{HE38y2E2a=(WlLcXTQ_SppzKD0A037#H=H<=d7jn!Sv?;0K+a zE_5Gas>pXCa-AHlrPM3B5+ImDY4@?uK!!)1%wihvjVb%qxdA1?JON^4*+nY63a+4X z6$dF$#lMRF+BVnl!+GDoX%gE=#6#NC4<^I>@$XkYpAGTdLlyXF%BR?esP*o+-x&|D zn5yQQzGUa`={G_~#~`FeIP+Zu$o`SLu?#o_+KGr$=&;$qMh-It}wS2~qsCf6x^ zAm#hvEa2mSG7051i1$D-H(8N`#kGAZNq`7ogda%mvnN2-96woMyMWoqZ68CcT>idB z=Gfv~`tleA1^r!~)#f?Ac`s*}*Z>Dg+6ody2ExUJEMaH4J-IN)mRxB+ZZbQA;h7P@ zn@h}os0@K-qIJ!biY2G)bm9PnB`mr`4eAq4TMRz(A4rQp6tLuQhYdgOO|xLh$-dRQ zAF;)oeZ0;dTCeWb9~_ek2*o;-d`3S7r1Z}tL1Yrkv12vCol4Coc4iDwZ=^=qBC?sB>JKP$8Sm0s2F45Zl9DX+t0u0fy z#*@WPdBGT%*wHe3K_l)cb{Ke&6_c00!$gP6K<*R34!>T&J)*)+t*Bb(=?zh| zTYCoYv1t1icY_Q9kw*R)%=$hu|Aph*d#soFLs|{`#eYW1GIvYlx8om3{*YLug0w-& zy9~%kI}et^mJYf4|1zWj7%Ae+Po^#7aDoHc6Om;GMb9Ku1~MKnMad!B!5-C zDREfyjG|ihlzD7djQ#4{wvc6k#6^cSqXxiu8YCtNXRS~N)nPmC)K zW@DV5eMNc2TB_!VMwnwA8d}c7+!aemX_}#1U7vqnNl)}xqqGc8=2aZ+WgXY~>O0dh zTW3LDJUp&4OxY2mu{^Uk=CPx!uFaaALxOXvMn+|0&6_+*Mp4#^b#j<4!*8 zWr{P?VJ-R_CIu$vFmjY$r3^e^Hpf0vAq^ZX+M50lo2_^FL%PN1g#6KB<$AlU~0%tZ4TKTf&zwB}&)Z>McigfJ-(Cs^HN zb@k9J^+5qtFDG_J2W=gCs%mRcV}wlHY=r3Bgf`U%vz&8Wj<=+AqM~Q%qJ74l4HzDO zn-(}z>PWHW;2662Rui4V5DoSFv#ih{1`V%9l(%Ewf`&`i1>tpA-BI`2C?4XqmcB-_ zn(IB)67hSzCBr}&E2=CYZNio^tqskxb8Dg;Yt;VP_FHZy>v$*-(@zz?wAojR$c}AU zO(q^fDX|{>^(|Dc+@pwlQ3)0|Qn})Gzox#oO^goiar=zQ@NV>{NHe|sEgC}j>t!XJ zdgXTZ{`o!K;Ia*d(7binpHAB+y+Q#yPwEy2$M<-{%`hCgG9mL_j8SefMwM`#&WrcLYKA?+c5PNzD}(d*I@a&*Oj*2VoCX&!VEg(<8~qvZ4mS!^vM*q~W@h zh%6%xty0mG5Qi8Ov*zT5dVCnhU_dAXa1sT_WloiNSB{1QDsu{coF5Gb%j-#jI0cAT z^$##C0eGe6F`8sS4$DuV9$i$ked+dXjlMbHjgj%&dRds=YL`K!b}n|`{xO%BIK0Cg zRii9jl!)(d((bZMK!ed%?C*!YwL(PnV9ziP7S<23I8 zVCN_Nd_qcdC``NgeXyAt|bvex`u!m&mY=lESS*6Y1ZSak5|-tJcVlO{_F#7 z6V4bVWk)@~h6a9U$^#3HC<`{D%SXDAy{`M6{G|)sb)^>tJnWa`VwcZIk`JUj+^ou>~y>>Ad2hoSnq#NYeV~7q=IM)5nqHDTHG)sY8>3$qIqmJghDrJ%tgr4sWUOdMi#R~1 z^&~*TIO{Iqcm%ox$dG(;<9Zv>(9gz~V>){gRwpe8_PSS_Zp_yh1zO^UIRz$u~$&U_DnUicF8Xgs={>dK-+^1kl-aT?%)2{X5U@Gh4nV{X0+hsL&_a5rUw&J zmqT?IkfE!onUcVa&T6<{DT)M?tMk|i(YvbUu zZC6Uxw?jUFyo`0OhNG9N1GadXH5}YP{v(B|0zx1_lqBR`0s-@< zN55xJ`1$B7Ly8O(k%EJJ@@vZ9T($N|bVO?) z3Y`tlX`{m-Wl7DG#2m8WGQ=hWW&F8uxd3iY0hUAnyO-+0NTlc?S{E5gd9HB^NF5Tg z^da;Dz7Mf)>vh!gWoybg6_8d+5k!(5b4u=^4(}BqSnuHBvd;9)6vdH#_i>9X7lyyE z)CfloE)%j|^!pFdj_Ujg@GWwzDCgw=6Qpb)E!Qx;cU?NaSa*E|!bU9r`ISAq*?TvY zt=k^AU`Ojb2NKIPVV_=~OKQ5(U{pnnJ&eJ0vay0v!UeXjO*O;4l zEC)cd^;i!k)*j3L^s7ySILk~tTBIEXf+AMNQ(^N^QFE6x+rs<$wDkIhJKqd*KkXny z9pb*1?yuwPq_WZt`m3PMwoa2Md2;ndkDff5f9+PguauM%K=`S^H9_@8t+_*A^YD)7 z4+fz#aIOFQ`M-tZ@!kxW5xoz*4KRCTiYZORT02v?t?*vsw$d{VLKr* z1yZ4`ejlJ^4wS<$u0)ID<{0IDJyacH;@?XQ5}q5<(TDl9*5^niD@tU{$ggA*`Wkk< z>bkETm2t0YK*Qppr{T77Rdu00tEs*_}%`dg1?jV|!4REvhz2;<1jU-BSs; zhY&86h$8Y5hrrl`2=VDrpl>BSw~rd9bW8bR^+JKg3!HhYYkzivYPj|G^GjCRp0^B= zJq6(s1W0nap`P&V@%!KQd&|jKmVl>8X!eb|w3+OaH=Jv101-R-H*jXCBbhvW{7-1K z8f^p`ag&`V^{7~$Cv{pLr9X9yhis*tqo-Ll!mQ6FbMmed13A|+R-!MKt>b!!AH$se z;bdsr1R!LWqRnDy905JRO+Uim3P1I8@prB>IuBul-tQQQ`w`FV%1Mfb!RFYB!~e_k z1GddGVa0rq#}=YP7U|Qdl46;cl*}zNW%*ohtXo+yB@2GmqsrWHh-aNV-WGNyhVX>X za7^IDL)2>u$UK87YC>&Rosk$dKY~4VZx-6ZhJIPIqvaN$9P(-$B$}+}S{zoA&j)@| zcciz)i0h7Oq`2{g0p-UFowOMu*1HFE{9TcX9%)WSQ{Ptc;CBp^H{=_6Ek+LKPQYN( zm%K8by;BD9*KZWQOsvv@hTRanrdOJJu(&uS8Jx4uLdw>e9)`j+myS8gSt-9I8UkkRZ zc{$R;gTCbRh1m(`edDSnjrv4c5MnC8h?ZxPwaZM$zA7j8qxGA{fsVz>m8;3QA|yvh z81v2P-ivryB&$TU!kRPERkY3M2?F|3g*>5#+DiI#0j+4awVKUgjj;Dy6x*Pnp3hPn zVg>t49=>*oum>Ftfw48$N!#O8$uThp09DHT_xrX-(OR|3BVT>b&@9F}`GEJ2VDtJY zZIr4+aLc8SK(-@>LgA&)HsTyLuEiHRL;%I0>?)xs$Bdh9;ZrJVL_c~I#|a?|Bf*V! z^y~5Ze|3HDhW4f0%7~{w{@vj7^gBEbuww88I2SqetB8!@^-RO5)r)d@7)iw?v&uQY zWq;TQIcq#rsbAT2hFu_IPR~urs&Hk3Xsn2f@>iS)23|<5p&w59K{go%m!qy2`@8Lf zLwS?qXxq?zhm;$*CH5PKn(-_Jj|F3Nhx-x=SjAuZ;~}TH-lq3H4eVQ>q|4wbKsa+C zRP&cTsxY7(^3==@{Sp$fizA6y@i(j&b%+Y(w=fe>2wIo$(M!Qpj6R3$>pxHS{1Mpj zMjD7oqCtsz6%S_TmRWi~j^Qd~CL|o&CJXWNuZye!#ZyH3O=1WVql=pkwpc0s#u@`T z?qOXY+pR(zV&#a#S1yhXyr^rL!0k zImB}=ze2XjWs$;ilE3GInwre32w_#P*rVm^J>&bVo({@RcsRP7-_x9`L;hiLMF@=? zLY-Fur|Z0Lxrf|9bSy^5e+%tfz@NtEoNIgN)i?ir|3cK;zO}}5VFKz%g)t^c_SRDG zrqW<{`ExHlbs~*KG#Oa^-1`$9nLFo`=?3RVKfw*~4J`qB8e!qzx zVSL{(?hM2$t_)TBKvdf#)!;PTEeHrHo{Dr~)7duA~7fz;b48PitPF3k&B!sTQ1!wYhBS{L)#? zACJ;05I9|(u+r>iO{kCYG}E2|$St& zqgQ4mwLqiOBddKC0g)7vdiT?6^V;CGOO$_!#yNsjqVTc&JQ3W*($mTxMF@usSNI-% zSBTo3c4|ghhFN%*6O`(I^y!hMV1pkx$XZ7~0__VY*`e?}$!*R&>VoeE9V*~4TtYw)X_u4xr30rg zXO}A-CCDCuz{}{VpZ}WiLtWi@87AK*&RzW3F}NjL%|cwsf4Be5(mhSUahrC;G9c49 zlG^TO+&t;2_s;aa9FXo{qyAOVpBEdoziR!6Xl0lsyDWv5CeqbcZwakrkiV+_P=&ZN z+GI4#rs+QgI$ypV$N_(W2aqE0V#Q86=9!p~eTzt?UwVLC45m(iMC&X5lE=ps`?=>G z2Wd5x)V=2;#fZK>QAw6to3=ADC@G={xjaqxbw~bU$?o!n|Z#P-e&4!c)eO#hx0C`e!9#Ag5wOgZ7av!!aY z(d+uuSUBEX<=DBd!c|84SJ~Re1&|%8U5C;xznB71_0@7+NV+>{Qx`=nJ4CFYBH%g$ zwSGfsd!LS}m5xOP_QMR;plEUFd|44Ar7H`^dUou^R>$cLa`{@2pD%;~!FC+w59gHl z9=BBO12ptGkd&eCv|ZjyBloxvAcn?IyEaWK#{ZN93nJYjD21bjbB5*l=)}#VmKt)e zbk1Zer<10$jT~jz@M*&GKZUt6(5Ybyet1m}uq~V~JXYK38;vHb>b;GxgdsVT#6YIS z{_;&Ro7^Pv8`WXz7_gFqx>#X`+c=I3vw(7L2}Jes{aQ{s)E}c3NugBU2)vpP4p)hb zE9GHKm#Ph;Ca$3b6F_GZ1K}t1FkN~uOxi^{w#GI-0^8F!DuC1mNwv&~K~2dg>e53v zSs?2}!ZDT*%$*f#YFnPxX(y;0`GV5m3o+!ojsJv>S%m`R1N-ry)Mwv>i7Ji`@3hvg z*nm&zOKk%7Z+{&67%g;kS=#eS95%RE?^&ONd8FwindLZSd|I{*Mq=7+Tb0=zKi;d;4&#E7hSCqy* z1No=cJ!MoZhYoobP&}+xslCBWJ>1k(L1H*iGEQN>|M&;PI6o&V0ZpmgKjY0@7t4=2 z+1#?sW~5Pv5fK6?@6=wf3NJB`1a{VqsF_t$&t zl%e!J&j%|cYwYE|Yb)q9>LLtkCbgELa{rBdp@-87gdj#W9Usb;l#w9rL82%lIi z=h&LjN>@it8}as9Zi^-(6)=djgG#5%Q+E{1_9qxkjJ&Z4-CcvGXa-15va3Ft+n(Ey zBFT9eD3dSa^#mdZPtT2vD=zZm@WbKjq}kkkzZ@XXd>t?(kBdRGoC4LjJ@By3Xci88 z6IKNuT1?VrhdQUgxl-@pojIUHyk&&4myjz%9NB^G86A`6%KOiSVRfUvy#)oP#H~PK z?K84lHNoKCirtr~j<&?~sxSr2rWF#2*>-o+TAuUiyryIaa0Zbh<4nE|`0K$<+XR{5 zGn8NlQGyg9t8J?u-4wW028snDJM_qp`R{PWb_G{W1cxnjIUm|)9w@hb#S;yO%KF=} zza@@ci&SdwYPg8&6E$Yu-(&rLL2j+xE@9oA&)2 zDaB+nG2O=YVxy=1(}YBrtzH2!p5$G@OK(ZdlDUc6S541-?hkpAEeQ-7fe(X#7$B^O z2TCzes($gnmP@IPoFznp05P8Uni}4{1h|PX@;GSV@SwGtl! zP^6?8q3`ojNIIUOesz5mmt>;EB%2X3cR}kzmb@Bjs=dP<%QB~(!ZMWtQ|ql#WF=9m zQT0p(CawXn>i2UdeXiff`z+he=qZTjYqn~6g)b1w}O>iVEhiT{gtfoIq0 zUVlbpG51MjT|deH+q*!E33tTX4f@E6}uOZuZYZ#b3{NF zzs81xAr0Ih3XsBfGFq0bEfYdqQA{HoV{!#0o(K=2j<#M@Dz^~%=Z7H+)M-P4{UO#Ft4YK?KKt27drUb3pOStUt7kHd&R!^Hs}qo-l8-n`4R>C|8`opAHukzzR+6wTgAl?ljp=8k&z_TguwTtNX3I&WCTK4!CAtG;+kwXM zb-isXvkeAI?-P2c8s7}k_WDEP-mehK8jtN5d&ZJ3y3eT3l zn>Iocv7{HUT)|??=|87C% zBc<}ZV$o!`drvdDImQT(H!8Emq=Wb@i5{AdHF{RuA8bgt{htt7XyB21|Hpi5k6P&o%n-T zrIYm}{DeggiZCYP9|vliX9kkC4~6xb$2mT6<2Jmly|0@pRgPZc;@{#TmRJ!x|I6%a zv#b@-#Ch?6R_Di6!wHvse797iBmT*S=ameSd+m|%@U;g>x0c*kJF9-J~ z;>Kul$)_+}0^{dj>ZD_VGh=i~nGY-h7{5*ZR>Y4_;?G(ZN!=!h zVVvRV*6%PJ^_}m-*1c&Jj;e9-4y)(a6>6RRp9ddl|C>*e%_KQ#k!-712CbGO=?T$Y zg{}6>znmdIGWq%*TQ1o1UKY1MC$Z0{IO2Yj$$RXh@;*!bmdVWScEhD~GOa~W@!qpo zkhA9GX_+&%wnCo+f7-}wmgUc0_U{85_kqQw-)1mP^{3mcO(_0Ztcdg>h3N6(%Tcno z%wNl{KAJyi7vufO6q4+@U-bQod)`w!bnLVbuMchXSZLk7CgROUPM9zny)yhi)3QU) zyW%}>za!0~v7Wwu0_vH?O8D!OZ;HsR$VV8GbNZDd!T(Wd>BDM3$9(rTi6+ayGQ4ti zK(Tu1_FMgDa=|knMlxw@L_3xFn-&5sn)Zo3wM9;n&nMfoP<=+Gmmk&JkAm?r?$puY zSPwBI_v-kli!`ruX8mRz1hY9WB*S@XADXZ zi^^ABxbD<jyn!`(S5kI<6=d6tHgF6)9e8QA zOT}@+kiG)p(tV-y-mjR!hG85J)mFp9dR8lL1kMTBJ{ThKGG&_2zI^U={t>9!b&+2FAz@rC zH1F{1#fvwySpnmFODf8y32X@HAM=d`v%>pSBGahVOU!LDhP++KkxD9wE_Bv8R}KXh zca(D|wd~0%^R`iavlO)2%$Yy|v+eE^ckO_(CB9|321HVvkT9gHc^^0rOZ3E3DNhDe{Boqca^>7 zHL8Ff6D$Qx>4h#uL?v6CU})f?R)JJ;C+9sY4C?-iAGD7hKU&)364yn)v;PRGG6VmW zdd(mbN&I%$gBNo16SLTdE4A;Vyh?~b&WjJu{`YeIy`Xn>WQfx3c1VfeTIj(Gg0Xsc zX+3p1A|MM#8C*JkY9Jp7j6&4m$d^peSJJ0|0@_`WHv=2p`0EGG(K&m7FS}@{3o6`Q zhrp{VjH^O7#}r%$VD&*?@CHj32|e?M^l5(X9hyCDT{jC+xzr1%o`d}L0!EWvmB$_@ z>SGW-wIbJdslH*PlXN(ut_xA}V>DX^ezkmUI^ zWx-$Tug!-9r=XN@nMcCUZa&uaijbA%ZU@v8juYb)4EnH+KcRxlyes}n*TRV*Nlgnj z0rsZSaz2miS%C~TZQh73v;NmmC#soeiIA6hg8faTkx;4YM>X z=rlE#Dw*AuRMM_H90GT_A5No(?vczCiB)|gBh-L*Y0u;4e=kNbG`DtzQAKU=(Z|VT zl}mVW-NN7}uAJB9myDycGfQtj2)egqr$`kyYjobQiOx6Jeq-B2ub(?a@u=Ip} zQ9gug{Cvc=_ohMeZ4)&#B?x^_8uSy^^yp>q=HSc6UNSJahdZQ808PpKb!78HbX6D} z7r?+&!-_CG5j3mkgx1r1zddV!Y3eN3UL_HNK?`Ed?G(POe*>2zx*iJPef|aooXi(Z zK0D~$4Xvy6h8Qv-5;-$2^}Bpd=EQTp9?o3;Jwdf5kIiX+XI~wBFK>DD;W|d_BbGk8 zyKsElx9$H90DYL*_#^w?*9f|dyX`!De8bqp4U=Z>NXS3y&3nM)?t!v~UAqBdOxJ*&JW%dYf%2#!vqRvLzfyV)P{HhdH3;=?1!{ez4w0 zU%8v0^sau3FW0CLmTKoavrJe>*}^leOerT7{j>c^KSTxR{2P@U)Z*;P?DyABTkiY# zg4e`LG#E>7ZgY27N8cQ^{ds?(*Hb9O0bMS8nyCO*I)F<%>rNFhNectJ$MWJGCQ^Uu z`yG$g9&l7`4b1%I0CJ`-5k?Kh$PLx4}1Ue-E#S!@# zATsI&n=IKSWpkbChh7(_AmD>ByyH?8zs5nNtk;mkyjgZ2T2`}}#Z^5)?q)lLWdxn-z7zYbdSHBm|L2Kp7CAiOfdmolvRSQL{?=Uf zywa^bJR}L2c4K-7kXQJ{^sZK!={JI>e>%8HBcS+zNV(iohmE!_FMU31sKtI^Wo2@Z z9Z%_n`st$Sak4jM%t;fBVUgr8_Eem6h0eimh8jPrJTa(L=&-8c{^B*_1BKnvx+)89 zmj*+%&F0eP>z9B_N=dgBC4Rr^6zFzp4 zpQ}xk;OCMsp>J9uUo$YlXBq{!-pO$T>3L88&}sm24KO_yZ$I1pk`qafj9Z9c5%S8* z$XXiBoWSoQn0n{ve1gxr#Z0PuP2?hyrZC{6;r@WrMD>L+A!HN*=@(jxlT!>Jcwp2~cMyT&d5SQR7ep2vk zXiI@+xXK*z<7DFNqgnej{d!E4iVvkV8d&n8+_(7KO5Eta@y~O;X)qIc1&s+t?C6`9 zsm1*G(BpqFvm?kudOX<=g)mXvC4Nr7thw(yvAP`8P`ak}K*f}*VI(!rdyg)heWr7F z`19H6!N}f1!{-UV2lq83P7PaXgU-ko_ZOu-qLzeL$eXr(Bz}^kTPoe1rm}i!5DxO@ z*d3z>II6qvgYmX-$QiEIHXyiox}i-nSh!gu=RIcZh0LkrbN@dw=erOhhsIF z4X+g^G^`5vx6Yg9d7V;H+G#PdzeKPYu;wSi@3dfpDZzPpcDz28`n2EO=i?E0uc zvbi~u5{TmQg+2FxlOl24|9m1{g8LAU65&VS60K-m*CfcMpI0$x(1H^PY&Bbev72Ag zOM4;H;Zp`xGkL+rx{)}7J>-4Mqk^c1s(uhO9?)Jj3TQ0QT*r<$qjr6OfyBH-?ZxFc z*2jLi@Ad*Vzd!2xuA#a&^^bgkf5KFR)H32Y!q?;)cbBh)@MK0@>KO`E%h`t~SNcE3 zOZm=3$f<-e8j6?IO)if~aANkV3g2&!s{jY)8=A;g?!h~tk_Kqi8KpVFMl~d{o|B7thiVP{CPH-tj)N?^;Rc}R%U;5S2BOlkNH8#Q#8ld7*N{fnwil=cl*ObgQ_fXw{I6(zxvB2K`6 zjV|9DiD_5Q2AdIk8y_|Liaw!nQ8u@zZnwO#K%EnF3q^m*xJuRe^^%G7hamRD2`Ymn zv#D0;6b$y0tjiJ022=LohGEx=RVpEPY480Xs-* z60|;I=|6Ma33*J8RiTF703)W%O}I5?s?bf#{DWK6>A*#hYeO{B^R2}WWpt^=wA1k@ z#|DO!xhoERk-$u{XOBUBf_P~Z+f{6gSlQWX#%iQM;pw0pxnFU;fR7oH;JCtDKrtd; zbkyCe-1n$VD?~ZeDkDM5ovX*)0V=Yk(ZR@u44QDxxU34u`pTXXhuUY4Q=rWf&KVr zsfii?%Za9R3C`aP>~<4jO{$KBQVkC^Jn)kH8oii1CAte7lO=zi1E+H`ZE^gC<#@bb zZ0eri2fizg>iOL%&aa7w6IVaww(ZAWn6Xa>toTT=F-1SWMv zXykb7-Q0VGqek+vCG~Dr7kX0@=MG91PDCPvB=!%o<2-i48Tms#h)YOX=|u4?E(Jv_ zv*Xeoudooe&FSe5)%)QFl8&Wn&7PE`ivfE(VF+8~Tws2FhVPFAh>vjdV%zk@nmvg> z@=fR0_on_2X_Y^4k=O@1u}fH|-R98nAPu9`#eNN7gkv>n}U5M zlCsN}GaW_yG~Th z=1>cDVlJQjv=oh$oQGQ4yHATA64O29`20m15ZJ>^Sjw@vjV=&`ko&`XF9)tMSR0l( zn>{&fu5W`pPaUzQvgU^-9}CU#&)d?{DwO|8fkcRR?Kj$H4wk+5?RhmU6PjbjbOj<# zD7;PPe=#2=XfkOER`JY|vz zQg&^>;L*#*N}x_kkHlsRf#VU~dn@5#BO{`K{Gjt)!zGXZcm+~?eWxMwtWk8Y8S2*KMC2`kh`OvA?oerr#0j4Dq7}Ufs5!Usb4od>rw2I46NNUB*DF7+&PfE zDXFu5+lLzUe%OSga+;I3U?(-}MSB%O3x@4WQ&mqbV>|u)L!fy00;3(L9l2Q!--D)* zq{YMi`ZfKuT}my~F$m4Pu`hFiiohMGuVlRu@@w}={cH*Q z`#Ly6dOX5!PG{oYwcKZ{Jf1C~6hB`5jA4>FYODZYb+~>O<{4wyje~&~Fl@E#-p|Uc zv+00o6TFR)e9GBkghS1C0ye%3I!B;vesp{8#0o1>)rNanrR$89eqN+$D}F!?LR7r^ zOb`hWsn!pgRq7J<rMMf__6v(R^+r5e~=pT_{^PR$s;f<5M8-^NZa21(81# z-p2V~*}=k%?lpydFcPNw$Aq+5yjWC7iSuiW7``MIbprEgWmL+K_ZKJLr9~U6Lcjfo zLfu6p^XiM>@91_boM{Q2TJvljrJXMI!IT=kBsg~*!fQ6eC2$L&>_1(a>!lEY&Cl$l zPRm60Cy-^ZnYIL(EqjXrvYv7_*r0r_Z|+uPvLHLh^9&PPY7aR zv-)Gngl7n+_o7pwE3+bmg=$15qs`-SQnkX*auGTG%BZ(2xX-37C5F}5d$V3>WTs$( zX-FJM0~G6)c`>MilZ>XSzA*p0mE^3M#W!BWw5t( zO*m!vTB2)=m-FtAX9g~l1)DDHsVlo!f}@>f=pQ&(PXF(IZ|i1m@1BjF%RQ56U6mPX zWH-tau((u!xerYJ%a6elit}!zeT+Cp`mG1e_fB!!M~!dWGVT&PzMjOko*IFmDv<#Y zz8NN$=VOGClt3pXhI2gDw&VMIXsC#pjqVRrRx~pAwK}Q$ry^E58a8^#Y-6yaq4P_o z&&xN=txJP;VcUcA`(wvxG5gX5L$Ve<1i8t7zXfjVE0&)yM2yn=1x%Ofcof$b z&14LpMhmkvW^YN#l$B>pjeRuqBeRA9O-vIsT^A>AHw982S0Opo_^q~pn6YTJU+?vr zT@Bt_bpXaZP!-HA=Y}t7^7oV{&}XZI92=k-!rK)l>VvL6@QCruXeE%$zx0Y}lj@Pj zH*@xmQI&#p{AzmeF%EJpSW z7d%FrR|*shQrJ~5A_(Y(RkaY}5EL93191yI$v4y$&1+$wurbXhwUsBM+|~B79c{vl z_w|}ONlN@Y^=1XbfUlk6hnFZ!;^Qk9ozRdWv|cE?yKggycqr&`zJx1m30Gws;Xi#e zJ6J{yZLbKiU*c6gUP5$5!MSFs=$_@!R*HA6R+DkET|A>nOo5E=?fy#N0l-rbc(8m> zfP^&t+ZUq;(~VhJt_)N;gU8)^%u`AC{ZTo&7}T?3T*Rfgi6>(e@Ug*=vp?Q5ONiNs zCAG~6_U|v3Fl2Udxf1zBWjO8@Em7Oc{RoWUx#|8)P|3St`VI>+5oU*`rFG#miwA#{ z0c*>Q&E*y1=U6Qdv7K`xijr}hsZhWUc4b(vnM?rneO>EhEk)3#ffbxU;ViREJA}_SAY2O-EaJB=d#(Eq%}LN z&8gWwXVFd%Y+zZdsbjq zd4K(3r|#rkeZ>&(s&bXME3ffuo5EF%b;10B3oLj{`^ez+g zt4uh5M~&LA$92NpcbkhHTlZZwl7>pF--Cf3c#Ia+l_8mM2vD|dfc)s;u#$g@a_&gZ z!FAq{1{={5uh5L6=jEU-ukX%u4O=TBHFos$TU(ne8Rxf4MZ#)JfUZ1)UK-F}gUbh_5LxnC??9)~vK%W6onOsv6$1p3B zZDhj0n{IrB z5g1Zw7^E8{r5mKBLs~>ql8P5}ui2|-1=LAtx%J@|W`^PF?uGoO!t=zuf# zz4yKM+G}0wdx=6@X@$J}MR8FW?*RYXmb6Ex6(BZk_M2h8QIv!p?RxX0Eh^eE;XJa{ z^NHe~;F(`0@0BDnHzR9L|9=0j%IbEWW5M)J{4>L`5=t8{$INqkM)&ofpUW&q9xd_V z%IxNEUQfHVOfEx)Fbxo`ebP4V-x(Jk3fawGuoZdo_lVrHbEI8J zL2<8)nits7P=Iu;^vaKnb#B*JWFVqIA_KwRQx@|UA$dg5;C)Ivs(L=dS=C7=X|pJMcmo0??uzdv2Xec znu{Q&(DvQ&Si_FNfcHDa?Tj6?kO{Kr8auV+b7?(!Z~VZYZtE#~tRlTne2&g&b2CLa zK_9-FV8$NntQ0Et)r9WDklA`;r_N{348$X@@9gT8pYg*%vw-xI=EW%)h=W!FNLnBs z_pB8-JuZ<{QwEGIyDM`p^UE?IIHE$DZex3{qWNaAf~=ePQLzODUcz<(>v-q&4m&$%I}c$Z{5 z{kgn$2RpqH6A;upPbJR5J{@eu0CNdnq%Xr~u2x zbGwpqy#aSXc9b`Kg<+nuK&aZSZ0w=Zf_32xiltyuuD$0FKL-9V_hd04CYVrki+ZN;0B*=?p}aW`AA$u{y5TI*{1X2Y$KHCpLP3rt0-NNj7mY`;xbXC zDf4Up!g~8J?g!B&t9)JDPZ;&psCFdung;S+Ax@VhzE)nxk*PyUE!Hg}Ob&|+(i~a_H=%JmNIJozC zzBVKc3fOnAdAt)ZX;z)?)wTUKWfH*P_*L{>PcF)9(E?m(hsY=2*FJ=($n!b`oN^g z`(g~=FoVVob;VPSEqqv&UR~~$d|r;pV_jK$7bkqTmSqRV);ejWhR)&@-7!Htwaqpn#REO{h>Nl($k#J|L~Cu zBv{sKpHQKM4q~->T}+=6(ZmkZWe!Chr^-pVd7kgz*dfs90xmDDj*?8pWe-*UX)&!Q z;m_?O+ZJuoV<+6$ZeCgSRR^7l&HCy&4JDbTx9{MkpA}?4L3Y0(2qH={R-)$b-l8v~%Wc-;^42dw2 z)~~fjF_R61Qm9D-k@h2oyFi9IBrV`kR{213_e<2a;<&~)I(hQboQqM)SIsK^r33}( z6mU}-zm_n*kmp+^RA*)jWq3sAZWE*+-YdSPcA~;*8(#&a7FFo~GIT6+CCn;{gMi(7 zrvR~SE-@puak|mju<9Dwf0a|tzI#j}01n+6HG)pF4&fZKmO8%7Tock4Ik0Gr(|+fB=5pa)rfVZ?lJ2z&l&Rl3)0 z;ny?0@_eq>>n)o@-MvFK-s(Q_p43lY!T#L4P2VbmY74HJ*WFA|s}BYHjS6se{M_*l zKp^Gi_%+GQ*|FABR#pBy#)HP`apT`rg)q%m$FK1_X&bpEPbAzaEc%{tXV?fv@!OqG z(32iI+HUe{@Z8;ppc*;?Z(Vs!Qdx+Tn7hI$H&`yZoV&nxU(HMETvo745sA!T+P$GP zGktQD!(FwpMyM(!IpG!pKxA7 ziJksrx2`!&;^(ox=g9q(j}ykThBgc&!{)TrODi-qKuDw#(>yAegXT6ALB-Piz& zSdxXh5-;)F!$RAhg!Nu5laTv8n*0(XX`OUHTAkJE@&_KKpgJjQx(|Y%XYvqAn?cj9r<=jKHl~wZU(O z9OcU;jl^2Bes>j%-DFLJ(`7=+`%v1F6HgL-zy&84q?-;)G4b%Vmgn-VfqQ@ijjokc zL`pHeP#RsCd99gj!0V`nlplDQ?3aCA&@p%96ZvEujmnV{9SlO!A)#IyL~GiLw1Y2b z9mPTL;r<~^sQ{M2fDBLz9fMQEbuYi(@CQB*6+oO^qyXqBUy^`?COS4=AQB}&@bRzA z_uqtl>vOvTWz&uBCsF3<#zDULA;V<+r>NaR5CpBCrx^|Foo;+n;1xyE3ok92VUqzF zd|PBjq=mBcbplii`E)=!pREG-3tV_<1`=mJH7;ZEBvyU>??ZrD>$(cWUH`>H{|_%B z1mM$)9>K6n$z&VWZ)`HgVnwu3>14eRzm!AKL5cZqeN_wC4Ti?rz`ds%|EYH`X?_il zJ!MRV?j*WbgKq&~Q0_nYP?B~&7n!;I*X4=;7p=|v(f1sZpf7^*(qPe$xsUu)pjbPM z#Gxb0|KUJ^jcj{76sW5?ZwA^`3DDjgWc@)(R$hIh1#q~|F#QnVV+e$WP#7GBXj>hq z2m$r*UvT{=-(4AE`p&GQ@H~DR?2D!32r?|x%rw0iwDmIh&m9FgDIkgaEr%W3QY|rS zwI2k1C$=9UV(eo-4lh-iPQ3nawl`pu;`KsLD8Nvp)1Vw>1TK&=z$q}YDJ>p){;3V5 zSd@tan)3s&c&>u+0zHjOV3?yDK+}pY&>tQF zGpDuCc0mq?wqAQ2j^cSaL2|M3P90;zMmo`87 zUvKtF?j$uf%-K4{w?!51Vm-6Hqy9KBE3fDtgB#%uyH^=UDnJ;6nYK6UBWl8RH{J56 z_^sS$JmTU`+;|CNvM5hcf8&Ij@XZA_QK3+&G}Yp*T7sMa7pyEDbPgl+yv||dH;isV zux>0mCy)qrxlPaK-eB+5SN~3`oPV#7|E$6v*S^0hm&=ZaL7qK{H9e#LAAJ4)X2}vK znXn}ZMVvSOpKdJR$?^7s$oQaZg(O0ht}pj@@&oWZ39g)p87>SbFuZC$5MS+e8appX z7@zpHumrU*PNEq89tm2}!U_=J&+_{Cux8_~sMj0V##Yq89PpDqmY=q>1& zF?-|zfxkNN*nGlcA;pqA8&>^8szGxreX&%Xv2DtnuTIEEMGKTq7(=tlNZY5exn@7( zsR=#RT1ANTy-2~4*8?k|qJE|$4ay%KfYd``r>Za&9?*OE|%m`to zKqVo446j;~JMLgbJE{H@gzAt^C*zGQAY{kZ*m4T67!Jxp>@jx?gLW3_GV2+7R=)`NzP4H4`?HI?$^R_*~M1_hU zKa=$i2H7hJZeRsv#flX$w`lbsT4S1RIT4IK(Ga)wK=4>TL|S=;l${S$%<~!$A&{%| zO{E*ToW#nwIq1A!z+Mgc6-FCUMLX;-RzL-ruTGNj^8DXBOsu8SBh-s48?o5cL3(72 zNplm0njtO4>~ODN=&z-Px_lXr0V-^-!?D4(OwU@+^~ro;8DSpbU|Y z@-EYqHY%o8UZpALk##h|kFTB>D&DPp5LLeS)+~WjAI1G&eg-0fewE6{s@=f$M|GY`eshCDRB-%s}a_2 zK$3RX2#&>=fJ8(nt>jlKqMADJwU&%Gy1-b0%5xq>(oHlYLMSD3=k^x;`k1hT=6yI1 zJd3O)ZC-zSYfk&Or!iz5>!m4CS`^TU6xf($NZDn3)h^vWU2;2+c*=%!N}8oW-TO-G z?ZtFW;1fs#NeL^R!w{nX6cAf6J)@7MD|Air>f}_Z-NXeI_h&iBrT@_)EMvOh=GOcYbs%28TL?PM%B3VyzbC5)`p7G3dCFWz zSm<7EAX(BM6*OD7DpX!%(V#~VkumwnrTR?!_s)l4(9zNPrW(8oGoPWpi!HXa2Wo5C z6*^eVM(TB%PwrUN;)}Y}ez!$nbS~n0D~#zgQR`xQ7GvC`UaKHRri-s(oBMdWNJHKOW8*(UvhT4CtDOZ~1n|s4j%wo)WMi^>IkQv8~ zd2Z-G*c3Q={``*PcuAVcJ$;(8><(200jv_EUk?u4#@4D5MZSnK1sTo3La^nq86%+4 zFo>A!AfdJnhx7TktMi9TUFC=4v&6P2GZPaUO3lE8R6p#CQUE>u`Ke_f~S?m?r zOFAIq33udDWjYQQk)MwZMHUiXHqu5=GXpXzEYbZ=i*Dji_$)#5^R%-C<~t&tf#%ni zHTd{ZN)LWPGC9m2Mmt94OI)GM$w3aNaW!$k6W0fPF%EPntl89NiQFKtaZy8S?0kk^Qo@bIUcG1R17StxQWj=BKla+TH*IpM_z2 z*_p?@4>|TE#`{afVPRgRk;h)7EZ@GhE#`dwmNBq0_aamD@uYj_udnBq0W~JN5F;`OT7pwcp z$JOL*hQ`fn?w4Pbui7bJunE>$!6}}AV#gV_BfNDK4)KHje!Wj2K{g%uRzbjZ`|&qs zy};%%m1OraLOH3DwjaZoM6CJ z|B`uG1nqNb6qauibL>Yr+Q|X+xuVJG?Hp0%O6tG0(?*{DUZyyhy5vd^z2Ejj;nqEc z(Y6$Ur)>4k_^$b^;>Q#<`;dv}X3|D>L{a(DMxl}9Py9Pq{mLv(IEZa$4k*6$dzfP5 z0^xp^2htNA?C6=0FStn7?d34~M9O^=%?9eH5irL6aAmt#m~1e(J!;6?vl&J`&i`NXJt zlBoRxo#QXn?*18p9!{Y|TBS{6)=S0l_L<*d*8%U_cUru1Ni;U|uZlgd8IKBOK`9q` zUrpiO=`%f{rHqeuSvRQFkI1v(<}F&$iuT*eoI~6qIia+7xW?xirfBJ*w_Vn(oRLis8 z`f5kSCL%a=x0%+{eH`!pJ#blr!yoW`0THY}=`~sW-+#?)pNrut%h9 zThkd~Y~AKtOF*?Ilio|@2P2k8uDx5 zw^XQmrhKh^hGvLXi_y;*UMJO2vz)gL=W|*kNq1Jaryd_$@Elhr9lPh7aO!#QUE&31 zB^N;$!d>6HCzU%1)*QFEC&_rDomA#KwSG!+YR%j%`&wSogasV1e(w0ZZ=lq=w4poV z;oj+V66g{zd3`$u-}9FUOcPaI;tU}m5upM>*JM@w%H5oKg6e8 zRfFMeC*LrWbs8`Tzm~M&E!*#3uVlY7KeH%lJAp?!#YS2f?W)8_uyd40FyBdb^WRjx zOo`jc{@wzT2*6H?5}6tRsh|sDRp8`nY8bl<6R`&;+p4-SZbqfhy4U(G#IWc6YjH%C zm!7f^aV9ZPi#%oNvwiyL2%mCn?s z^iPgV?-18K6PI^-f|n4GUD@$_|B3O2E%|*>N^PjW3jI{o-Ioo$&kyCzl$-bYoR64` zY&UXeTs#Q_DQg0zy)JCGzkC{%pBprM)q2$o^SXHVw$kt?5jR(b-+CxlBt6kWrpDcxUk(8cC>UK3SQQJFkcJTR{sFWt%gmRtZW<+C}1S@m{H9-=b)gipiy#o zz}Ip~Z%y9JXg%@_ZaJOzsgjPk7TPUF(V!?X4IiWxS^PrfIQdRv+5~CH)KLk=e(yS6 zA%~jW8=3Pvn5!I9pJAR&Qxk;caQN#@uOg1r`*4vTI0%Svo?s(Bs;rGJD!Rir&v(Qj z?(FlcgemTQYH*5TA(UZ%Jqna~s7UHujR3F~QN}^Qy*p%~@dxfPxio$Y*|>ID)u<1* z()S|Bc}RUC%XQ4$W=hYo6=(PhilkR(O0Si*Ssy4cM?BC()Pl5B$4#cA2Heh~dzlci z9u<1~4NDCtYTwPg}s}huWvsx%o9S;^r;-+T%vK0*<@tFAy9y5acvmZp6I@;S{yIxB8#S2-$7c^i3!*FRJ1mnV zRE0Jxf5r!5q{Y}4evp)Jo2Nk8Y35*N$Z>OVi*p}T?djMu+P%>3xMw8LWa-9Ir*+IH z7Jb`X7cLuTG*9(A5n?P2@mOp>v= zCzuyrUiZR~ib0w0eKXkAX}Dv0Sns=N2RM5cxy8)5DY#FzZ(NyT2(scDHS)+<^Jd-^ zA4@vNJ+70bP}cvT_h|bXH1Pz#LDN#++__7EdrN2+KzS1|B!*(1qI&Nni1Q>Y3=N?( zH183`Bor}Yt`^!W_i}XqEBfj|8dZfs?dW*6 zLZj5m2}469QSES+7Asf~-tYA%6h5MqB*Oyw*Su)LE(PC>VoT~#->Ps}Q_7k7qRwx| zzV~@6BAu}7NkDJ4`#X;q2-&gSH{0b`;s>@DXh$nO)V8^C5Fo=U!R)V#hJ4%+?yRlm zj9L}Ld9@niBiKOJD*Rpotq3pP@PTHA{G(mb38D=F9`tkKKrSu~=+XS8tA|XnKVOVB z+#8Wly$k5RJ7CQSW<@TJpmoK$g328=IW$MCM?B+{paTH+km9skFl@1agR2ek54RiLfwM#v(s;BBbJ|N`Ulf^}10x~F z0$TrG^@f%~v8m#*V0z^QRPmI);su13#!om!>Da~C#gyIjR7A5>+b?h1Np>n&bm`kq zRGWYKX_=z#S;3&dS5@-)G_B0h{*ngXx+^eV;&-6i-Al_@YG*)utH%`6YfEB0_ z1GHygn9qxW(V`Evd<~nT|1|+^-HlGq^wNZ*V^=J39sxif5mqy03Rz ze+1Sb2=CH_sXYWRxH1562oTq(?!wAGoZa6icZAL0KU{79eq=8d%3pe1PkfvWyh=~Z zet?Pvvx0JVO-cx7E^)$ZDYTAQh@M14ZqCHFUuHO)yKaWaa@A>mE-6%A7 zjjVC#95UU^>$@EiEcH+&e6)(Jw0Pgu?G$WI$gc#2QP3Y1W{la;U1Gpn)0Z?ESJ}ePRl5W^eS|E7 z07wj1MVQDLsJ<$&%R=zVw*<^D>nKpdO?nA28kPTamgfw0@xPbP04`(XU7uh+lZjyG z$cmyyc7DAuC4T2u$%yfU`lZ@y9z-LF2=ygE7_>(5_VHU#OtsylXOLt4aIDkpf*ELn zA`GQ3n=C<2py(EFNqps)d$yxIMXv7KWm*A)aLXwAb+H)QBGmkS{=RyW>X`IODdu`c zkU|g#;LJN<{itJv4GBNS0xBF3W8W(suU~h9ryp;F$7STej>;F|~jE85hlI$+v zKG)pTm)e1)-<9ll7FZ5D=_x$^#_Pl6C((qHiGq{AqSg^rqm*plR(`)Qg3-zR+ev_~ z#^tbiq2S!X;kmh9iJISFU@&fXOkOb0fe_omrs}(elSsI|*s0k%iOyLuJD2PVbtdhc zzawdh%xF;hWk?p%4{jO7^LcqR*B50QIhf*ddA!{3Y(1Ex9oQC_mXo}*AaESv z;Oy?PB;n7`L0prXPasqH3}{?70FTMt&x4&qhl zV)acj0* zzsK%R4lVDKtmPd2!Ae4^yCw-$M5Fg7DKh;GhwcFdS;+qIwwzZtn0UZAdF(crcS-Fb zGlZU{mJ8Na_Z%kg78`k4_tkCeH%FJk`XN0oHqoV@FVdX9YHnSTHu*?pWhWAW58 za^$k8XYFL(?No~YBf%3;xaH{>O zUMZHY2iZDNP=&@iNvetqo_#7MuD$V@WO|LDz%M={GQ+s>xWP2@Zi#f|5s$&}zJ)E) z>XOx-LfoAJn!-qT(k+>V)jCe=uTfP|?Q@UUNfy_cM=j$$$vGHvW|T;dC5qUGm{Nl? z?I#KMxDzI}$ZFO!-%goqhJl8A3B9X`5NzySER_)c&=tzaMzrGnxY7dm>*k2j)vANE z8IsDc9#)f~l^ny|G$#$q40rk_Pi@AOAC!6mfA*xd?*CS~ zzzb;Qn;iLO{`vI=UE+`*aWn=E>DvTJoy8gdeR}xtyA}!=WsVYk{ zi~yNM?(z6r3qvkiFTTT}NSQf*XHPtDN`kWysFBw!M6kxxa8M3hEkukw$P-t!oG7;8 zus%(Y7~R z?e3a|+*qLjv#%E5@bz~T(_SQpgYP|4vD>DOycahnYfa+^z4A1Fhj&b(-L#|dX=#&s zn?#3g8dZF!?K|MVHvh9m(}2Njm3uAdyWC)Z#hno0yW!l#@{GTBdurrBIEz}X(DmzGt0te%Be&x;w2 z{Fi=pfK6}`YjlZ2Pt}J{)Wa21hJrbbEzX;#*0d>H`11+!ngXZ}e9zuF9@6ezCWZwq zZ74mX)xUJ9CS`pZVA`8oDBQA{Qz(o-{4>&9Pw^S;)MkejYs!^+x2e}B{?#qkH0SGA zgm??JK>x+{W+ot0y;`(?N!PAnGq02l=cFJm_{;cy|}hM`+S7}e%7ceqq@N^fnj z5VID%)8Uudu(~mbHF+kVYgpP)Kb github.com/dgrijalva/jwt-go v3.2.1-0.20200107013213-dc14462fd587+incompatible - github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d - github.com/docker/docker => github.com/docker/docker v1.4.2-0.20200203170920-46ec8731fbce - github.com/go-kit/kit => github.com/go-kit/kit v0.3.0 - github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.4.1 - github.com/knative/pkg => github.com/rancher/pkg v0.0.0-20190514055449-b30ab9de040e - github.com/openshift/api => github.com/openshift/api v0.0.0-20191219222812-2987a591a72c - github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20200521150516-05eb9880269c - github.com/operator-framework/operator-lifecycle-manager => github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190128024246-5eb7ae5bdb7a - github.com/rancher/rancher/pkg/apis => github.com/rancher/rancher/pkg/apis v0.0.0-20211208233239-77392a65423d - github.com/rancher/rancher/pkg/client => github.com/rancher/rancher/pkg/client v0.0.0-20211208233239-77392a65423d - - helm.sh/helm/v3 => github.com/rancher/helm/v3 v3.5.4-rancher.1 - k8s.io/api => k8s.io/api v0.21.2 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.21.2 - k8s.io/apimachinery => k8s.io/apimachinery v0.21.2 - k8s.io/apiserver => k8s.io/apiserver v0.21.2 - k8s.io/cli-runtime => k8s.io/cli-runtime v0.21.2 - k8s.io/client-go => k8s.io/client-go v0.21.2 - k8s.io/cloud-provider => k8s.io/cloud-provider v0.21.2 - k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.21.2 - k8s.io/code-generator => k8s.io/code-generator v0.21.2 - k8s.io/component-base => k8s.io/component-base v0.21.2 - k8s.io/component-helpers => k8s.io/component-helpers v0.21.2 - k8s.io/controller-manager => k8s.io/controller-manager v0.21.2 - k8s.io/cri-api => k8s.io/cri-api v0.21.2 - k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.21.2 - k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.21.2 - k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.21.2 - k8s.io/kube-proxy => k8s.io/kube-proxy v0.21.2 - k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.21.2 - k8s.io/kubectl => k8s.io/kubectl v0.21.2 - k8s.io/kubelet => k8s.io/kubelet v0.21.2 - k8s.io/kubernetes => k8s.io/kubernetes v1.21.2 - k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.21.2 - k8s.io/metrics => k8s.io/metrics v0.21.2 - k8s.io/mount-utils => k8s.io/mount-utils v0.21.2 - k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.21.2 - - kubevirt.io/client-go => github.com/kubevirt/client-go v0.45.0 - kubevirt.io/containerized-data-importer => github.com/rancher/kubevirt-containerized-data-importer v1.26.1-0.20210802100720-9bcf4e7ba0ce - sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v0.4.4 + gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/api v0.22.9 // indirect + k8s.io/apimachinery v0.22.9 // indirect + k8s.io/client-go v0.22.9 // indirect + k8s.io/klog/v2 v2.80.1 // indirect + k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect + sigs.k8s.io/yaml v1.2.0 // indirect ) diff --git a/go.sum b/go.sum new file mode 100644 index 000000000..adec432d7 --- /dev/null +++ b/go.sum @@ -0,0 +1,1470 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= +cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= +cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= +cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= +cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= +cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= +cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= +cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= +cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= +cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= +cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= +cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= +cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= +cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= +cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= +cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= +cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= +cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= +cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= +cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= +cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= +cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= +cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= +cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= +cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= +cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= +cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= +cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= +cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= +cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= +cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= +cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= +cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= +cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= +cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= +cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= +cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= +cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= +cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= +cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= +cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= +cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= +cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= +cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= +cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= +cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= +cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= +cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= +cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= +cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= +cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= +cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= +cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= +cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= +cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= +cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= +cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= +cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= +cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= +cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= +cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= +cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= +cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= +cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= +cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= +cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= +cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= +cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= +cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= +cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= +cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= +cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= +cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= +cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= +cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= +cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= +cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= +cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= +cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= +cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= +cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= +cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= +cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= +cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= +cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= +cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= +cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= +cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= +cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= +cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= +cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= +cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= +cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= +cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= +cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= +cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= +cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= +cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= +cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= +cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= +cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= +cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= +cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= +cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= +cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= +cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= +cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= +cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= +cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= +cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= +cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= +cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= +cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= +cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= +cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= +cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= +cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= +cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= +cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= +cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= +cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= +cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= +cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= +cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= +cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= +cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= +cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= +cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= +cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= +cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= +cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= +cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= +cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= +cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= +cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= +cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= +cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= +cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= +cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= +cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= +cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= +cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= +cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= +cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= +cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= +cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= +cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= +cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= +cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= +cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= +cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= +cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= +cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= +cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= +cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= +cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= +cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= +cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= +cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= +cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= +cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= +cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= +cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= +cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= +cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= +cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= +cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= +cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= +cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= +cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= +cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= +cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= +cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= +cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= +cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= +cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= +cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= +cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= +cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= +cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= +cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= +cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= +cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= +cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= +cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= +cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= +cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= +cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= +cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= +cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= +cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= +cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= +cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= +cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= +cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= +cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= +cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= +cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= +cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= +cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= +cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= +cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= +cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= +cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= +cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= +cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= +cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= +cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= +cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= +cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= +cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= +cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= +cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= +cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= +cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= +cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= +cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= +cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= +cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= +cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= +cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= +cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= +cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= +cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= +cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= +cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= +cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= +cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= +cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= +cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= +cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= +cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= +cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= +cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= +cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= +cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= +cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= +cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= +cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= +cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= +cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= +cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= +cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= +cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= +cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= +cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= +cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= +cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= +cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= +cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= +cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= +cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= +cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= +cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= +cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= +cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= +cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= +cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= +cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= +cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= +cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= +cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= +cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= +cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= +cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= +cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= +cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= +cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= +cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= +cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= +cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= +cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= +cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= +cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= +cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= +cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= +cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= +cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= +cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= +cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= +cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= +cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= +cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= +cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= +cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/ClickHouse/clickhouse-go v1.5.4/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI= +github.com/ClickHouse/clickhouse-go/v2 v2.0.14/go.mod h1:iq2DUGgpA4BBki2CVwrF8x43zqBjdgHtbexkFkh5a6M= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/sarama v1.30.0/go.mod h1:zujlQQx1kzHsh4jfV1USnptCQrHAEZ2Hk8fTKCulPVs= +github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0= +github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= +github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= +github.com/alicebob/miniredis/v2 v2.30.0 h1:uA3uhDbCxfO9+DI/DuGeAMr9qI+noVWwGPNTFuKID5M= +github.com/alicebob/miniredis/v2 v2.30.0/go.mod h1:84TWKZlxYkfgMucPBf5SOQBYJceZeQRFIaQgNMiCX6Q= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= +github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fullstorydev/grpcurl v1.8.7/go.mod h1:pVtM4qe3CMoLaIzYS8uvTuDj2jVYmXqMUkZeijnXp/E= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= +github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU= +github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20211214055906-6f57359322fd h1:1FjCyPC+syAzJ5/2S8fqdZK1R22vvA0J7JZKcuOIQ7Y= +github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= +github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= +github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= +github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= +github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= +github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= +github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc= +github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= +github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= +github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= +github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= +github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E= +github.com/jhump/protoreflect v1.12.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= +github.com/jhump/protoreflect v1.14.1/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= +github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= +github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mkevac/debugcharts v0.0.0-20191222103121-ae1c48aa8615/go.mod h1:Ad7oeElCZqA1Ufj0U9/liOF4BtVepxRcTvr2ey7zTvM= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= +github.com/openzipkin/zipkin-go v0.4.0 h1:CtfRrOVZtbDj8rt1WXjklw0kqqJQwICrCKmlfUuBUUw= +github.com/openzipkin/zipkin-go v0.4.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ= +github.com/paulmach/orb v0.5.0/go.mod h1:FWRlTgl88VI1RBx/MkrwWDRhQ96ctqMCh8boXhmqB/A= +github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY= +github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= +github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= +github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shirou/gopsutil v2.19.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= +github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sony/sonyflake v1.1.0 h1:wnrEcL3aOkWmPlhScLEGAXKkLAIslnBteNUq4Bw6MM4= +github.com/sony/sonyflake v1.1.0/go.mod h1:LORtCywH/cq10ZbyfhKrHYgAUGH7mOBa76enV9txy/Y= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= +github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= +github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 h1:5mLPGnFdSsevFRFc9q3yYbBkB6tsm4aCwwQV/j1JQAQ= +github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= +github.com/zeromicro/go-zero v1.4.4 h1:J8M768EVFNtIQJ/GCEsoIQPanxbx2HHT0it7r69U76Y= +github.com/zeromicro/go-zero v1.4.4/go.mod h1:5WSUwtJm0bYdDZ69GlckigcT6D0EyAPbDaX3unbSY/4= +go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0= +go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= +go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8= +go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= +go.etcd.io/etcd/client/v3 v3.5.5 h1:q++2WTJbUgpQu4B6hCuT7VkdwaTP7Qz6Daak3WzbrlI= +go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= +go.mongodb.org/mongo-driver v1.11.1/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= +go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4= +go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= +go.opentelemetry.io/otel/exporters/jaeger v1.10.0 h1:7W3aVVjEYayu/GOqOVF4mbTvnCuxF1wWu3eRxFGQXvw= +go.opentelemetry.io/otel/exporters/jaeger v1.10.0/go.mod h1:n9IGyx0fgyXXZ/i0foLHNxtET9CzXHzZeKCucvRBFgA= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 h1:TaB+1rQhddO1sF71MpZOZAuSPW1klK2M8XxfrBMfK7Y= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 h1:pDDYmo0QadUPal5fwXoY1pmMpFcdyhXOmL5drCrI3vU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0/go.mod h1:Krqnjl22jUJ0HgMzw5eveuCvFDXY4nSYb4F8t5gdrag= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 h1:KtiUEhQmj/Pa874bVYKGNVdq8NPKiacPbaRRtgXi+t4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0/go.mod h1:OfUCyyIiDvNXHWpcWgbF+MWvqPZiNa3YDEnivcnYsV0= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.10.0 h1:S8DedULB3gp93Rh+9Z+7NTEv+6Id/KYS7LDyipZ9iCE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.10.0/go.mod h1:5WV40MLWwvWlGP7Xm8g3pMcg0pKOUY609qxJn8y7LmM= +go.opentelemetry.io/otel/exporters/zipkin v1.10.0 h1:HcPAFsFpEBKF+G5NIOA+gBsxifd3Ej+wb+KsdBLa15E= +go.opentelemetry.io/otel/exporters/zipkin v1.10.0/go.mod h1:HdfvgwcOoCB0+zzrTHycW6btjK0zNpkz2oTGO815SCI= +go.opentelemetry.io/otel/sdk v1.10.0 h1:jZ6K7sVn04kk/3DNUdJ4mqRlGDiXAVuIG+MMENpTNdY= +go.opentelemetry.io/otel/sdk v1.10.0/go.mod h1:vO06iKzD5baltJz1zarxMCNHFpUlUiOy4s65ECtn6kE= +go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= +go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E= +go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= +go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/automaxprocs v1.5.1 h1:e1YG66Lrk73dn4qhg8WFSvhF0JuFQF0ERIp4rpuV8Qk= +go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b h1:tvrvnPFcdzp294diPnrdZZZ8XUt2Tyj7svb7X52iDuU= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 h1:nt+Q6cXKz4MosCSpnbMtqiQ8Oz0pxTef2B4Vca2lvfk= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220220014-0732a990476f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220429233432-b5fbb4746d32/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= +google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= +google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= +google.golang.org/genproto v0.0.0-20221111202108-142d8a6fa32e h1:azcyH5lGzGy7pkLCbhPe0KkKxsM7c6UA/FZIXImKE7M= +google.golang.org/genproto v0.0.0-20221111202108-142d8a6fa32e/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY= +gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.22.9 h1:PidjRtgd0zDa6SvyooBLH/SP62uOhEBY0kx0UYRGr1o= +k8s.io/api v0.22.9/go.mod h1:rcjO/FPOuvc3x7nQWx29UcDrFJMx82RxDob71ntNH4A= +k8s.io/apimachinery v0.22.9 h1:5qjnpBk6eC9me0SAzokCUMI0KVF2PENK1PnykF8/Gjo= +k8s.io/apimachinery v0.22.9/go.mod h1:ZvVLP5iLhwVFg2Yx9Gh5W0um0DUauExbRhe+2Z8I1EU= +k8s.io/client-go v0.22.9 h1:5p2R2LsoBfaE6QnXfWFmyyvxrFXtfegUGRMZSpTI+Q8= +k8s.io/client-go v0.22.9/go.mod h1:IoH7exYnoH/zgvHOuVxh2c4yJepcCBt72FzCTisOc4k= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= +k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= +k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8= +k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/tenant/buf.gen.yaml b/tenant/buf.gen.yaml deleted file mode 100644 index f77789935..000000000 --- a/tenant/buf.gen.yaml +++ /dev/null @@ -1,16 +0,0 @@ -version: v1 -plugins: - - name: go - out: gen - opt: - - paths=source_relative - - name: go-grpc - out: gen - opt: - - paths=source_relative - - name: grpc-gateway - out: gen - opt: - - paths=source_relative - - name: openapiv2 - out: gen/openapiv2 \ No newline at end of file diff --git a/tenant/buf.yaml b/tenant/buf.yaml deleted file mode 100644 index ea7eb0163..000000000 --- a/tenant/buf.yaml +++ /dev/null @@ -1,13 +0,0 @@ -version: v1 -name: buf.build/JCCE/PCM -breaking: - use: - - FILE -lint: - use: - - DEFAULT -# ignore: -# - google/type/datetime.proto -deps: - - buf.build/googleapis/googleapis - - buf.build/grpc-ecosystem/grpc-gateway \ No newline at end of file diff --git a/tenant/gen/idl/tenant.pb.go b/tenant/gen/idl/tenant.pb.go deleted file mode 100644 index d54fd84a5..000000000 --- a/tenant/gen/idl/tenant.pb.go +++ /dev/null @@ -1,1052 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: idl/tenant.proto - -package tenantpb - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// 云提供商 -type CloudProvider int32 - -const ( - // 0 - 阿里云 - CloudProvider_ali CloudProvider = 0 - // 1 - 腾讯云 - CloudProvider_tencent CloudProvider = 1 - // 2 - 华为云 - CloudProvider_huawei CloudProvider = 2 - // 3 - K8S - CloudProvider_k8s CloudProvider = 3 - // 3 - Harvester - CloudProvider_harvester CloudProvider = 4 -) - -// Enum value maps for CloudProvider. -var ( - CloudProvider_name = map[int32]string{ - 0: "ali", - 1: "tencent", - 2: "huawei", - 3: "k8s", - 4: "harvester", - } - CloudProvider_value = map[string]int32{ - "ali": 0, - "tencent": 1, - "huawei": 2, - "k8s": 3, - "harvester": 4, - } -) - -func (x CloudProvider) Enum() *CloudProvider { - p := new(CloudProvider) - *p = x - return p -} - -func (x CloudProvider) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CloudProvider) Descriptor() protoreflect.EnumDescriptor { - return file_idl_tenant_proto_enumTypes[0].Descriptor() -} - -func (CloudProvider) Type() protoreflect.EnumType { - return &file_idl_tenant_proto_enumTypes[0] -} - -func (x CloudProvider) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CloudProvider.Descriptor instead. -func (CloudProvider) EnumDescriptor() ([]byte, []int) { - return file_idl_tenant_proto_rawDescGZIP(), []int{0} -} - -// 云产品 -type CloudProduct int32 - -const ( - // 0 - 所有产品 - CloudProduct_product_all CloudProduct = 0 - // 1 - ECS类产品:阿里云ECS,腾讯云CVM,华为云ECS,亚马逊EC2 - CloudProduct_product_ecs CloudProduct = 1 - // 2 - RDS类产品:阿里云RDS,腾讯云CDB - CloudProduct_product_rds CloudProduct = 2 - // 3 - Domain类产品:阿里云Domain - CloudProduct_product_domain CloudProduct = 3 - // 4 - OSS类产品:阿里云OSS - CloudProduct_product_oss CloudProduct = 4 - // 5 - POD类产品:阿里云ECI,华为云CCI,腾讯云EKS - CloudProduct_product_pod CloudProduct = 5 -) - -// Enum value maps for CloudProduct. -var ( - CloudProduct_name = map[int32]string{ - 0: "product_all", - 1: "product_ecs", - 2: "product_rds", - 3: "product_domain", - 4: "product_oss", - 5: "product_pod", - } - CloudProduct_value = map[string]int32{ - "product_all": 0, - "product_ecs": 1, - "product_rds": 2, - "product_domain": 3, - "product_oss": 4, - "product_pod": 5, - } -) - -func (x CloudProduct) Enum() *CloudProduct { - p := new(CloudProduct) - *p = x - return p -} - -func (x CloudProduct) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CloudProduct) Descriptor() protoreflect.EnumDescriptor { - return file_idl_tenant_proto_enumTypes[1].Descriptor() -} - -func (CloudProduct) Type() protoreflect.EnumType { - return &file_idl_tenant_proto_enumTypes[1] -} - -func (x CloudProduct) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CloudProduct.Descriptor instead. -func (CloudProduct) EnumDescriptor() ([]byte, []int) { - return file_idl_tenant_proto_rawDescGZIP(), []int{1} -} - -// 阿里云区域,需要将对应的 _ 转化为 - -type AliRegionId int32 - -const ( - AliRegionId_ali_all AliRegionId = 0 - AliRegionId_ali_cn_qingdao AliRegionId = 1 // 青岛 - AliRegionId_ali_cn_beijing AliRegionId = 2 // 北京 - AliRegionId_ali_cn_zhangjiakou AliRegionId = 3 // 张家口 - AliRegionId_ali_cn_huhehaote AliRegionId = 4 // 呼和浩特 - AliRegionId_ali_cn_wulanchabu AliRegionId = 5 // 乌兰察布 - AliRegionId_ali_cn_hangzhou AliRegionId = 6 // 杭州 - AliRegionId_ali_cn_shanghai AliRegionId = 7 // 上海 - AliRegionId_ali_cn_shenzhen AliRegionId = 8 // 深圳 - AliRegionId_ali_cn_heyuan AliRegionId = 9 // 河源 - AliRegionId_ali_cn_guangzhou AliRegionId = 10 // 广州 - AliRegionId_ali_cn_chengdu AliRegionId = 11 // 成都 - AliRegionId_ali_cn_hongkong AliRegionId = 12 // 中国香港-香港 - AliRegionId_ali_ap_southeast_1 AliRegionId = 13 // 亚太东南1-新加坡 - AliRegionId_ali_ap_southeast_2 AliRegionId = 14 // 亚太东南2-悉尼 - AliRegionId_ali_ap_southeast_3 AliRegionId = 15 // 亚太东南3-吉隆坡 - AliRegionId_ali_ap_southeast_5 AliRegionId = 16 // 亚太东南5-雅加达 - AliRegionId_ali_ap_south_1 AliRegionId = 17 // 亚太南部1-孟买 - AliRegionId_ali_ap_northeast_1 AliRegionId = 18 // 亚太东北1-东京 - AliRegionId_ali_us_west_1 AliRegionId = 19 // 美国西部1-硅谷 - AliRegionId_ali_us_east_1 AliRegionId = 20 // 美国东部1-弗吉尼亚 - AliRegionId_ali_eu_central_1 AliRegionId = 21 // 欧洲中部1-法兰克福 - AliRegionId_ali_eu_west_1 AliRegionId = 22 // 英国(伦敦)-伦敦 -) - -// Enum value maps for AliRegionId. -var ( - AliRegionId_name = map[int32]string{ - 0: "ali_all", - 1: "ali_cn_qingdao", - 2: "ali_cn_beijing", - 3: "ali_cn_zhangjiakou", - 4: "ali_cn_huhehaote", - 5: "ali_cn_wulanchabu", - 6: "ali_cn_hangzhou", - 7: "ali_cn_shanghai", - 8: "ali_cn_shenzhen", - 9: "ali_cn_heyuan", - 10: "ali_cn_guangzhou", - 11: "ali_cn_chengdu", - 12: "ali_cn_hongkong", - 13: "ali_ap_southeast_1", - 14: "ali_ap_southeast_2", - 15: "ali_ap_southeast_3", - 16: "ali_ap_southeast_5", - 17: "ali_ap_south_1", - 18: "ali_ap_northeast_1", - 19: "ali_us_west_1", - 20: "ali_us_east_1", - 21: "ali_eu_central_1", - 22: "ali_eu_west_1", - } - AliRegionId_value = map[string]int32{ - "ali_all": 0, - "ali_cn_qingdao": 1, - "ali_cn_beijing": 2, - "ali_cn_zhangjiakou": 3, - "ali_cn_huhehaote": 4, - "ali_cn_wulanchabu": 5, - "ali_cn_hangzhou": 6, - "ali_cn_shanghai": 7, - "ali_cn_shenzhen": 8, - "ali_cn_heyuan": 9, - "ali_cn_guangzhou": 10, - "ali_cn_chengdu": 11, - "ali_cn_hongkong": 12, - "ali_ap_southeast_1": 13, - "ali_ap_southeast_2": 14, - "ali_ap_southeast_3": 15, - "ali_ap_southeast_5": 16, - "ali_ap_south_1": 17, - "ali_ap_northeast_1": 18, - "ali_us_west_1": 19, - "ali_us_east_1": 20, - "ali_eu_central_1": 21, - "ali_eu_west_1": 22, - } -) - -func (x AliRegionId) Enum() *AliRegionId { - p := new(AliRegionId) - *p = x - return p -} - -func (x AliRegionId) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AliRegionId) Descriptor() protoreflect.EnumDescriptor { - return file_idl_tenant_proto_enumTypes[2].Descriptor() -} - -func (AliRegionId) Type() protoreflect.EnumType { - return &file_idl_tenant_proto_enumTypes[2] -} - -func (x AliRegionId) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AliRegionId.Descriptor instead. -func (AliRegionId) EnumDescriptor() ([]byte, []int) { - return file_idl_tenant_proto_rawDescGZIP(), []int{2} -} - -// 腾讯云区域,需要将对应的 _ 转化为 - -type TencentRegionId int32 - -const ( - TencentRegionId_tc_all TencentRegionId = 0 - TencentRegionId_tc_ap_bangkok TencentRegionId = 1 //亚太东南(曼谷) - TencentRegionId_tc_ap_beijing TencentRegionId = 2 //华北地区(北京) - TencentRegionId_tc_ap_chengdu TencentRegionId = 3 //西南地区(成都) - TencentRegionId_tc_ap_chongqing TencentRegionId = 4 //西南地区(重庆) - TencentRegionId_tc_ap_guangzhou TencentRegionId = 5 //华南地区(广州) - TencentRegionId_tc_ap_hongkong TencentRegionId = 6 //港澳台地区(中国香港) - TencentRegionId_tc_ap_jakarta TencentRegionId = 7 //亚太东南(雅加达) - TencentRegionId_tc_ap_mumbai TencentRegionId = 8 // 亚太南部(孟买) - TencentRegionId_tc_ap_nanjing TencentRegionId = 9 //华东地区(南京) - TencentRegionId_tc_ap_seoul TencentRegionId = 10 //亚太东北(首尔) - TencentRegionId_tc_ap_shanghai TencentRegionId = 11 //华东地区(上海) - TencentRegionId_tc_ap_shanghai_fsi TencentRegionId = 12 //华东地区(上海金融) - TencentRegionId_tc_ap_shenzhen_fsi TencentRegionId = 13 //华南地区(深圳金融) - TencentRegionId_tc_ap_singapore TencentRegionId = 14 //亚太东南(新加坡) - TencentRegionId_tc_ap_tokyo TencentRegionId = 15 //亚太东北(东京) - TencentRegionId_tc_eu_frankfurt TencentRegionId = 16 //欧洲地区(法兰克福) - TencentRegionId_tc_eu_moscow TencentRegionId = 17 //欧洲地区(莫斯科) - TencentRegionId_tc_na_ashburn TencentRegionId = 18 //美国东部(弗吉尼亚) - TencentRegionId_tc_na_siliconvalley TencentRegionId = 19 //美国西部(硅谷) - TencentRegionId_tc_na_toronto TencentRegionId = 20 //北美地区(多伦多) - TencentRegionId_tc_sa_saopaulo TencentRegionId = 21 //南美地区(圣保罗) -) - -// Enum value maps for TencentRegionId. -var ( - TencentRegionId_name = map[int32]string{ - 0: "tc_all", - 1: "tc_ap_bangkok", - 2: "tc_ap_beijing", - 3: "tc_ap_chengdu", - 4: "tc_ap_chongqing", - 5: "tc_ap_guangzhou", - 6: "tc_ap_hongkong", - 7: "tc_ap_jakarta", - 8: "tc_ap_mumbai", - 9: "tc_ap_nanjing", - 10: "tc_ap_seoul", - 11: "tc_ap_shanghai", - 12: "tc_ap_shanghai_fsi", - 13: "tc_ap_shenzhen_fsi", - 14: "tc_ap_singapore", - 15: "tc_ap_tokyo", - 16: "tc_eu_frankfurt", - 17: "tc_eu_moscow", - 18: "tc_na_ashburn", - 19: "tc_na_siliconvalley", - 20: "tc_na_toronto", - 21: "tc_sa_saopaulo", - } - TencentRegionId_value = map[string]int32{ - "tc_all": 0, - "tc_ap_bangkok": 1, - "tc_ap_beijing": 2, - "tc_ap_chengdu": 3, - "tc_ap_chongqing": 4, - "tc_ap_guangzhou": 5, - "tc_ap_hongkong": 6, - "tc_ap_jakarta": 7, - "tc_ap_mumbai": 8, - "tc_ap_nanjing": 9, - "tc_ap_seoul": 10, - "tc_ap_shanghai": 11, - "tc_ap_shanghai_fsi": 12, - "tc_ap_shenzhen_fsi": 13, - "tc_ap_singapore": 14, - "tc_ap_tokyo": 15, - "tc_eu_frankfurt": 16, - "tc_eu_moscow": 17, - "tc_na_ashburn": 18, - "tc_na_siliconvalley": 19, - "tc_na_toronto": 20, - "tc_sa_saopaulo": 21, - } -) - -func (x TencentRegionId) Enum() *TencentRegionId { - p := new(TencentRegionId) - *p = x - return p -} - -func (x TencentRegionId) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TencentRegionId) Descriptor() protoreflect.EnumDescriptor { - return file_idl_tenant_proto_enumTypes[3].Descriptor() -} - -func (TencentRegionId) Type() protoreflect.EnumType { - return &file_idl_tenant_proto_enumTypes[3] -} - -func (x TencentRegionId) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TencentRegionId.Descriptor instead. -func (TencentRegionId) EnumDescriptor() ([]byte, []int) { - return file_idl_tenant_proto_rawDescGZIP(), []int{3} -} - -// 华为云区域,需要将对应的 _ 转化为 - -type HuaweiRegionId int32 - -const ( - HuaweiRegionId_hw_all HuaweiRegionId = 0 - HuaweiRegionId_hw_cn_north_1 HuaweiRegionId = 1 // 华北-北京一 - HuaweiRegionId_hw_cn_north_4 HuaweiRegionId = 2 // 华北-北京四 - HuaweiRegionId_hw_cn_south_1 HuaweiRegionId = 3 // 华南-广州 - HuaweiRegionId_hw_cn_east_2 HuaweiRegionId = 4 // 华东-上海二 - HuaweiRegionId_hw_cn_east_3 HuaweiRegionId = 5 // 华东-上海一 - HuaweiRegionId_hw_cn_southwest_2 HuaweiRegionId = 6 // 西南-贵阳一 - HuaweiRegionId_hw_ap_southeast_1 HuaweiRegionId = 7 // 中国-香港 - HuaweiRegionId_hw_ap_southeast_2 HuaweiRegionId = 8 // 亚太-曼谷 - HuaweiRegionId_hw_ap_southeast_3 HuaweiRegionId = 9 // 亚太-新加坡 - HuaweiRegionId_hw_af_south_1 HuaweiRegionId = 10 //非洲-约翰内斯堡 - HuaweiRegionId_hw_cn_south_2 HuaweiRegionId = 11 // 华南-深圳 -) - -// Enum value maps for HuaweiRegionId. -var ( - HuaweiRegionId_name = map[int32]string{ - 0: "hw_all", - 1: "hw_cn_north_1", - 2: "hw_cn_north_4", - 3: "hw_cn_south_1", - 4: "hw_cn_east_2", - 5: "hw_cn_east_3", - 6: "hw_cn_southwest_2", - 7: "hw_ap_southeast_1", - 8: "hw_ap_southeast_2", - 9: "hw_ap_southeast_3", - 10: "hw_af_south_1", - 11: "hw_cn_south_2", - } - HuaweiRegionId_value = map[string]int32{ - "hw_all": 0, - "hw_cn_north_1": 1, - "hw_cn_north_4": 2, - "hw_cn_south_1": 3, - "hw_cn_east_2": 4, - "hw_cn_east_3": 5, - "hw_cn_southwest_2": 6, - "hw_ap_southeast_1": 7, - "hw_ap_southeast_2": 8, - "hw_ap_southeast_3": 9, - "hw_af_south_1": 10, - "hw_cn_south_2": 11, - } -) - -func (x HuaweiRegionId) Enum() *HuaweiRegionId { - p := new(HuaweiRegionId) - *p = x - return p -} - -func (x HuaweiRegionId) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HuaweiRegionId) Descriptor() protoreflect.EnumDescriptor { - return file_idl_tenant_proto_enumTypes[4].Descriptor() -} - -func (HuaweiRegionId) Type() protoreflect.EnumType { - return &file_idl_tenant_proto_enumTypes[4] -} - -func (x HuaweiRegionId) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HuaweiRegionId.Descriptor instead. -func (HuaweiRegionId) EnumDescriptor() ([]byte, []int) { - return file_idl_tenant_proto_rawDescGZIP(), []int{4} -} - -// 私有云区域 预留 -type K8SRegionId int32 - -const ( - K8SRegionId_k8s_all K8SRegionId = 0 -) - -// Enum value maps for K8SRegionId. -var ( - K8SRegionId_name = map[int32]string{ - 0: "k8s_all", - } - K8SRegionId_value = map[string]int32{ - "k8s_all": 0, - } -) - -func (x K8SRegionId) Enum() *K8SRegionId { - p := new(K8SRegionId) - *p = x - return p -} - -func (x K8SRegionId) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (K8SRegionId) Descriptor() protoreflect.EnumDescriptor { - return file_idl_tenant_proto_enumTypes[5].Descriptor() -} - -func (K8SRegionId) Type() protoreflect.EnumType { - return &file_idl_tenant_proto_enumTypes[5] -} - -func (x K8SRegionId) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use K8SRegionId.Descriptor instead. -func (K8SRegionId) EnumDescriptor() ([]byte, []int) { - return file_idl_tenant_proto_rawDescGZIP(), []int{5} -} - -// 亚马逊云区域,需要将对应的 _ 转化为 - -type AwsRegionId int32 - -const ( - AwsRegionId_aws_all AwsRegionId = 0 - AwsRegionId_aws_us_east_2 AwsRegionId = 1 // US East (Ohio) - AwsRegionId_aws_us_east_1 AwsRegionId = 2 // US East (N. Virginia) - AwsRegionId_aws_us_west_1 AwsRegionId = 3 // US West (N. California) - AwsRegionId_aws_us_west_2 AwsRegionId = 4 // US West (Oregon) - AwsRegionId_aws_af_south_1 AwsRegionId = 5 // Africa (Cape Town) - AwsRegionId_aws_ap_east_1 AwsRegionId = 6 // Asia Pacific (Hong Kong) - AwsRegionId_aws_ap_south_1 AwsRegionId = 7 // Asia Pacific (Mumbai) - AwsRegionId_aws_ap_northeast_3 AwsRegionId = 8 // Asia Pacific (Osaka) - AwsRegionId_aws_ap_northeast_2 AwsRegionId = 9 // Asia Pacific (Seoul) - AwsRegionId_aws_ap_northeast_1 AwsRegionId = 10 // Asia Pacific (Singapore) - AwsRegionId_aws_ap_southeast_2 AwsRegionId = 11 // Asia Pacific (Sydney) - AwsRegionId_aws_ap_southeast_1 AwsRegionId = 12 // Asia Pacific (Tokyo) - AwsRegionId_aws_ca_central_1 AwsRegionId = 13 // Canada (Central) - AwsRegionId_aws_eu_central_1 AwsRegionId = 14 // Europe (Frankfurt) - AwsRegionId_aws_eu_west_1 AwsRegionId = 15 // Europe (Ireland) - AwsRegionId_aws_eu_west_2 AwsRegionId = 16 // Europe (London) - AwsRegionId_aws_eu_south_1 AwsRegionId = 17 // Europe (Milan) - AwsRegionId_aws_eu_west_3 AwsRegionId = 18 // Europe (Paris) - AwsRegionId_aws_eu_north_1 AwsRegionId = 19 // Europe (Stockholm) - AwsRegionId_aws_me_south_1 AwsRegionId = 20 // Middle East (Bahrain) - AwsRegionId_aws_sa_east_1 AwsRegionId = 21 // South America (São Paulo) -) - -// Enum value maps for AwsRegionId. -var ( - AwsRegionId_name = map[int32]string{ - 0: "aws_all", - 1: "aws_us_east_2", - 2: "aws_us_east_1", - 3: "aws_us_west_1", - 4: "aws_us_west_2", - 5: "aws_af_south_1", - 6: "aws_ap_east_1", - 7: "aws_ap_south_1", - 8: "aws_ap_northeast_3", - 9: "aws_ap_northeast_2", - 10: "aws_ap_northeast_1", - 11: "aws_ap_southeast_2", - 12: "aws_ap_southeast_1", - 13: "aws_ca_central_1", - 14: "aws_eu_central_1", - 15: "aws_eu_west_1", - 16: "aws_eu_west_2", - 17: "aws_eu_south_1", - 18: "aws_eu_west_3", - 19: "aws_eu_north_1", - 20: "aws_me_south_1", - 21: "aws_sa_east_1", - } - AwsRegionId_value = map[string]int32{ - "aws_all": 0, - "aws_us_east_2": 1, - "aws_us_east_1": 2, - "aws_us_west_1": 3, - "aws_us_west_2": 4, - "aws_af_south_1": 5, - "aws_ap_east_1": 6, - "aws_ap_south_1": 7, - "aws_ap_northeast_3": 8, - "aws_ap_northeast_2": 9, - "aws_ap_northeast_1": 10, - "aws_ap_southeast_2": 11, - "aws_ap_southeast_1": 12, - "aws_ca_central_1": 13, - "aws_eu_central_1": 14, - "aws_eu_west_1": 15, - "aws_eu_west_2": 16, - "aws_eu_south_1": 17, - "aws_eu_west_3": 18, - "aws_eu_north_1": 19, - "aws_me_south_1": 20, - "aws_sa_east_1": 21, - } -) - -func (x AwsRegionId) Enum() *AwsRegionId { - p := new(AwsRegionId) - *p = x - return p -} - -func (x AwsRegionId) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AwsRegionId) Descriptor() protoreflect.EnumDescriptor { - return file_idl_tenant_proto_enumTypes[6].Descriptor() -} - -func (AwsRegionId) Type() protoreflect.EnumType { - return &file_idl_tenant_proto_enumTypes[6] -} - -func (x AwsRegionId) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AwsRegionId.Descriptor instead. -func (AwsRegionId) EnumDescriptor() ([]byte, []int) { - return file_idl_tenant_proto_rawDescGZIP(), []int{6} -} - -// 云配置信息 -type CloudConfigs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云配置 - Configs []*CloudConfig `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"` -} - -func (x *CloudConfigs) Reset() { - *x = CloudConfigs{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_tenant_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CloudConfigs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CloudConfigs) ProtoMessage() {} - -func (x *CloudConfigs) ProtoReflect() protoreflect.Message { - mi := &file_idl_tenant_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CloudConfigs.ProtoReflect.Descriptor instead. -func (*CloudConfigs) Descriptor() ([]byte, []int) { - return file_idl_tenant_proto_rawDescGZIP(), []int{0} -} - -func (x *CloudConfigs) GetConfigs() []*CloudConfig { - if x != nil { - return x.Configs - } - return nil -} - -type CloudConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 云服务提供商,具体参考 CloudProvider 的定义 - Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=tenant.CloudProvider" json:"provider,omitempty"` - // 账户名称,由用户自定义,必须全局唯一,方便多个系统之间的维护 - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // 认证方式1:与 access_secret 结合使用,两者均非空时生效 - AccessId string `protobuf:"bytes,3,opt,name=access_id,json=accessId,proto3" json:"access_id,omitempty"` - // 认证方式1:与 access_id 结合使用,两者均非空时生效 - AccessSecret string `protobuf:"bytes,4,opt,name=access_secret,json=accessSecret,proto3" json:"access_secret,omitempty"` - // 如果是私有云,需要提供URL - Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"` - // 如果是私有云,需要提供URL - Token string `protobuf:"bytes,6,opt,name=token,proto3" json:"token,omitempty"` -} - -func (x *CloudConfig) Reset() { - *x = CloudConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_tenant_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CloudConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CloudConfig) ProtoMessage() {} - -func (x *CloudConfig) ProtoReflect() protoreflect.Message { - mi := &file_idl_tenant_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CloudConfig.ProtoReflect.Descriptor instead. -func (*CloudConfig) Descriptor() ([]byte, []int) { - return file_idl_tenant_proto_rawDescGZIP(), []int{1} -} - -func (x *CloudConfig) GetProvider() CloudProvider { - if x != nil { - return x.Provider - } - return CloudProvider_ali -} - -func (x *CloudConfig) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CloudConfig) GetAccessId() string { - if x != nil { - return x.AccessId - } - return "" -} - -func (x *CloudConfig) GetAccessSecret() string { - if x != nil { - return x.AccessSecret - } - return "" -} - -func (x *CloudConfig) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *CloudConfig) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -type Region struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // id - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // name - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *Region) Reset() { - *x = Region{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_tenant_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Region) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Region) ProtoMessage() {} - -func (x *Region) ProtoReflect() protoreflect.Message { - mi := &file_idl_tenant_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Region.ProtoReflect.Descriptor instead. -func (*Region) Descriptor() ([]byte, []int) { - return file_idl_tenant_proto_rawDescGZIP(), []int{2} -} - -func (x *Region) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Region) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -var File_idl_tenant_proto protoreflect.FileDescriptor - -var file_idl_tenant_proto_rawDesc = []byte{ - 0x0a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3d, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x65, 0x6e, 0x61, - 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0xbe, 0x01, 0x0a, 0x0b, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x31, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x74, 0x65, 0x6e, 0x61, - 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, - 0x0a, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x2c, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x49, 0x0a, 0x0d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x07, 0x0a, 0x03, 0x61, 0x6c, 0x69, 0x10, 0x00, - 0x12, 0x0b, 0x0a, 0x07, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, - 0x06, 0x68, 0x75, 0x61, 0x77, 0x65, 0x69, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x6b, 0x38, 0x73, - 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x68, 0x61, 0x72, 0x76, 0x65, 0x73, 0x74, 0x65, 0x72, 0x10, - 0x04, 0x2a, 0x77, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, - 0x74, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x6c, - 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x65, 0x63, - 0x73, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x72, - 0x64, 0x73, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, - 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, - 0x75, 0x63, 0x74, 0x5f, 0x6f, 0x73, 0x73, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, - 0x64, 0x75, 0x63, 0x74, 0x5f, 0x70, 0x6f, 0x64, 0x10, 0x05, 0x2a, 0xf3, 0x03, 0x0a, 0x0b, 0x41, - 0x6c, 0x69, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x6c, - 0x69, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x6c, 0x69, 0x5f, 0x63, - 0x6e, 0x5f, 0x71, 0x69, 0x6e, 0x67, 0x64, 0x61, 0x6f, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x61, - 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x62, 0x65, 0x69, 0x6a, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, - 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x7a, 0x68, 0x61, 0x6e, 0x67, 0x6a, - 0x69, 0x61, 0x6b, 0x6f, 0x75, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x63, - 0x6e, 0x5f, 0x68, 0x75, 0x68, 0x65, 0x68, 0x61, 0x6f, 0x74, 0x65, 0x10, 0x04, 0x12, 0x15, 0x0a, - 0x11, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x77, 0x75, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x61, - 0x62, 0x75, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x68, - 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x61, 0x6c, 0x69, - 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x10, 0x07, 0x12, 0x13, - 0x0a, 0x0f, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x68, 0x65, 0x6e, 0x7a, 0x68, 0x65, - 0x6e, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x68, 0x65, - 0x79, 0x75, 0x61, 0x6e, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, - 0x5f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e, - 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x63, 0x68, 0x65, 0x6e, 0x67, 0x64, 0x75, 0x10, 0x0b, - 0x12, 0x13, 0x0a, 0x0f, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x68, 0x6f, 0x6e, 0x67, 0x6b, - 0x6f, 0x6e, 0x67, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, - 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0d, 0x12, 0x16, 0x0a, - 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, - 0x74, 0x5f, 0x32, 0x10, 0x0e, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, - 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x0f, 0x12, 0x16, 0x0a, - 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, - 0x74, 0x5f, 0x35, 0x10, 0x10, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, - 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x11, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, - 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, - 0x12, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x75, 0x73, 0x5f, 0x77, 0x65, 0x73, 0x74, - 0x5f, 0x31, 0x10, 0x13, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x75, 0x73, 0x5f, 0x65, - 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x14, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x65, - 0x75, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x5f, 0x31, 0x10, 0x15, 0x12, 0x11, 0x0a, - 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x16, - 0x2a, 0xc1, 0x03, 0x0a, 0x0f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x63, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, - 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x62, 0x61, 0x6e, 0x67, 0x6b, 0x6f, - 0x6b, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x62, 0x65, 0x69, - 0x6a, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, - 0x63, 0x68, 0x65, 0x6e, 0x67, 0x64, 0x75, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, - 0x61, 0x70, 0x5f, 0x63, 0x68, 0x6f, 0x6e, 0x67, 0x71, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x12, 0x13, - 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, - 0x75, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x68, 0x6f, 0x6e, - 0x67, 0x6b, 0x6f, 0x6e, 0x67, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, - 0x5f, 0x6a, 0x61, 0x6b, 0x61, 0x72, 0x74, 0x61, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x63, - 0x5f, 0x61, 0x70, 0x5f, 0x6d, 0x75, 0x6d, 0x62, 0x61, 0x69, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, - 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x61, 0x6e, 0x6a, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, - 0x0f, 0x0a, 0x0b, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x65, 0x6f, 0x75, 0x6c, 0x10, 0x0a, - 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x68, - 0x61, 0x69, 0x10, 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, - 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x5f, 0x66, 0x73, 0x69, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, - 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x65, 0x6e, 0x7a, 0x68, 0x65, 0x6e, 0x5f, 0x66, - 0x73, 0x69, 0x10, 0x0d, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x69, - 0x6e, 0x67, 0x61, 0x70, 0x6f, 0x72, 0x65, 0x10, 0x0e, 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x63, 0x5f, - 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x79, 0x6f, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, - 0x5f, 0x65, 0x75, 0x5f, 0x66, 0x72, 0x61, 0x6e, 0x6b, 0x66, 0x75, 0x72, 0x74, 0x10, 0x10, 0x12, - 0x10, 0x0a, 0x0c, 0x74, 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x6d, 0x6f, 0x73, 0x63, 0x6f, 0x77, 0x10, - 0x11, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x61, 0x73, 0x68, 0x62, 0x75, - 0x72, 0x6e, 0x10, 0x12, 0x12, 0x17, 0x0a, 0x13, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x73, 0x69, - 0x6c, 0x69, 0x63, 0x6f, 0x6e, 0x76, 0x61, 0x6c, 0x6c, 0x65, 0x79, 0x10, 0x13, 0x12, 0x11, 0x0a, - 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x74, 0x6f, 0x10, 0x14, - 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x73, 0x61, 0x5f, 0x73, 0x61, 0x6f, 0x70, 0x61, 0x75, - 0x6c, 0x6f, 0x10, 0x15, 0x2a, 0xfb, 0x01, 0x0a, 0x0e, 0x48, 0x75, 0x61, 0x77, 0x65, 0x69, 0x52, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x68, 0x77, 0x5f, 0x61, 0x6c, - 0x6c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x6e, 0x6f, 0x72, - 0x74, 0x68, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, - 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x5f, 0x34, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, - 0x63, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, - 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x04, 0x12, 0x10, - 0x0a, 0x0c, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x05, - 0x12, 0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x77, - 0x65, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x61, 0x70, - 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x07, 0x12, 0x15, - 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, - 0x74, 0x5f, 0x32, 0x10, 0x08, 0x12, 0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x61, 0x70, 0x5f, 0x73, - 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, - 0x68, 0x77, 0x5f, 0x61, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x0a, 0x12, - 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x32, - 0x10, 0x0b, 0x2a, 0x1a, 0x0a, 0x0b, 0x4b, 0x38, 0x53, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x6b, 0x38, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x2a, 0xcd, - 0x03, 0x0a, 0x0b, 0x41, 0x77, 0x73, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0b, - 0x0a, 0x07, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x61, - 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x01, 0x12, 0x11, - 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, - 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x77, 0x65, 0x73, 0x74, - 0x5f, 0x31, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x77, - 0x65, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x61, - 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x61, - 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x06, 0x12, 0x12, - 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, - 0x10, 0x07, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, - 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, - 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, - 0x10, 0x09, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, - 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, - 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, - 0x10, 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, - 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0c, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x77, - 0x73, 0x5f, 0x63, 0x61, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x5f, 0x31, 0x10, 0x0d, - 0x12, 0x14, 0x0a, 0x10, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, - 0x61, 0x6c, 0x5f, 0x31, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, - 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, - 0x5f, 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x10, 0x12, 0x12, 0x0a, 0x0e, - 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x11, - 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, - 0x33, 0x10, 0x12, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x6e, 0x6f, - 0x72, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x13, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x6d, - 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x14, 0x12, 0x11, 0x0a, 0x0d, 0x61, - 0x77, 0x73, 0x5f, 0x73, 0x61, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x15, 0x32, 0x79, - 0x0a, 0x0d, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, - 0x68, 0x92, 0x41, 0x65, 0x12, 0x1e, 0xe6, 0x89, 0x80, 0xe6, 0x9c, 0x89, 0xe4, 0xba, 0x91, 0xe7, - 0xa7, 0x9f, 0xe6, 0x88, 0xb7, 0xe7, 0x9a, 0x84, 0xe8, 0xae, 0xa4, 0xe8, 0xaf, 0x81, 0xe6, 0x9c, - 0x8d, 0xe5, 0x8a, 0xa1, 0x1a, 0x43, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74, - 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x50, 0x43, 0x4d, 0x12, - 0x28, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x67, 0x69, - 0x74, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x63, 0x6e, 0x2f, 0x4a, 0x43, 0x43, - 0x45, 0x2f, 0x50, 0x43, 0x4d, 0x2e, 0x67, 0x69, 0x74, 0x42, 0x1d, 0x5a, 0x1b, 0x50, 0x43, 0x4d, - 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2f, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x3b, - 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_idl_tenant_proto_rawDescOnce sync.Once - file_idl_tenant_proto_rawDescData = file_idl_tenant_proto_rawDesc -) - -func file_idl_tenant_proto_rawDescGZIP() []byte { - file_idl_tenant_proto_rawDescOnce.Do(func() { - file_idl_tenant_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_tenant_proto_rawDescData) - }) - return file_idl_tenant_proto_rawDescData -} - -var file_idl_tenant_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_idl_tenant_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_idl_tenant_proto_goTypes = []interface{}{ - (CloudProvider)(0), // 0: tenant.CloudProvider - (CloudProduct)(0), // 1: tenant.CloudProduct - (AliRegionId)(0), // 2: tenant.AliRegionId - (TencentRegionId)(0), // 3: tenant.TencentRegionId - (HuaweiRegionId)(0), // 4: tenant.HuaweiRegionId - (K8SRegionId)(0), // 5: tenant.K8SRegionId - (AwsRegionId)(0), // 6: tenant.AwsRegionId - (*CloudConfigs)(nil), // 7: tenant.CloudConfigs - (*CloudConfig)(nil), // 8: tenant.CloudConfig - (*Region)(nil), // 9: tenant.Region -} -var file_idl_tenant_proto_depIdxs = []int32{ - 8, // 0: tenant.CloudConfigs.configs:type_name -> tenant.CloudConfig - 0, // 1: tenant.CloudConfig.provider:type_name -> tenant.CloudProvider - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_idl_tenant_proto_init() } -func file_idl_tenant_proto_init() { - if File_idl_tenant_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_idl_tenant_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CloudConfigs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_tenant_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CloudConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_tenant_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Region); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_idl_tenant_proto_rawDesc, - NumEnums: 7, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_idl_tenant_proto_goTypes, - DependencyIndexes: file_idl_tenant_proto_depIdxs, - EnumInfos: file_idl_tenant_proto_enumTypes, - MessageInfos: file_idl_tenant_proto_msgTypes, - }.Build() - File_idl_tenant_proto = out.File - file_idl_tenant_proto_rawDesc = nil - file_idl_tenant_proto_goTypes = nil - file_idl_tenant_proto_depIdxs = nil -} diff --git a/tenant/gen/idl/tenant_grpc.pb.go b/tenant/gen/idl/tenant_grpc.pb.go deleted file mode 100644 index 00d106c94..000000000 --- a/tenant/gen/idl/tenant_grpc.pb.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: idl/tenant.proto - -package tenantpb - -import ( - grpc "google.golang.org/grpc" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// TenantServiceClient is the client API for TenantService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type TenantServiceClient interface { -} - -type tenantServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewTenantServiceClient(cc grpc.ClientConnInterface) TenantServiceClient { - return &tenantServiceClient{cc} -} - -// TenantServiceServer is the server API for TenantService service. -// All implementations must embed UnimplementedTenantServiceServer -// for forward compatibility -type TenantServiceServer interface { - mustEmbedUnimplementedTenantServiceServer() -} - -// UnimplementedTenantServiceServer must be embedded to have forward compatible implementations. -type UnimplementedTenantServiceServer struct { -} - -func (UnimplementedTenantServiceServer) mustEmbedUnimplementedTenantServiceServer() {} - -// UnsafeTenantServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TenantServiceServer will -// result in compilation errors. -type UnsafeTenantServiceServer interface { - mustEmbedUnimplementedTenantServiceServer() -} - -func RegisterTenantServiceServer(s grpc.ServiceRegistrar, srv TenantServiceServer) { - s.RegisterService(&TenantService_ServiceDesc, srv) -} - -// TenantService_ServiceDesc is the grpc.ServiceDesc for TenantService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var TenantService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "tenant.TenantService", - HandlerType: (*TenantServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{}, - Metadata: "idl/tenant.proto", -} diff --git a/tenant/gen/openapiv2/idl/tenant.swagger.json b/tenant/gen/openapiv2/idl/tenant.swagger.json deleted file mode 100644 index 727eb16e1..000000000 --- a/tenant/gen/openapiv2/idl/tenant.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "idl/tenant.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/tenant/idl/tenant.proto b/tenant/idl/tenant.proto deleted file mode 100644 index 63dc967e3..000000000 --- a/tenant/idl/tenant.proto +++ /dev/null @@ -1,181 +0,0 @@ -syntax = "proto3"; -package tenant; - -option go_package = "PCM/tenant/idl/gen;tenantpb"; - -import "google/api/annotations.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; - -// 云提供商 -enum CloudProvider { - // 0 - 阿里云 - ali = 0; - // 1 - 腾讯云 - tencent = 1; - // 2 - 华为云 - huawei = 2; - // 3 - K8S - k8s = 3; - // 3 - Harvester - harvester = 4; -} - -// 云产品 -enum CloudProduct { - // 0 - 所有产品 - product_all = 0; - // 1 - ECS类产品:阿里云ECS,腾讯云CVM,华为云ECS,亚马逊EC2 - product_ecs = 1; - // 2 - RDS类产品:阿里云RDS,腾讯云CDB - product_rds = 2; - // 3 - Domain类产品:阿里云Domain - product_domain = 3; - // 4 - OSS类产品:阿里云OSS - product_oss = 4; - // 5 - POD类产品:阿里云ECI,华为云CCI,腾讯云EKS - product_pod = 5; -} - -// 云配置信息 -message CloudConfigs { - // 云配置 - repeated CloudConfig configs = 1; -} - -message CloudConfig { - // 云服务提供商,具体参考 CloudProvider 的定义 - CloudProvider provider = 1; - // 账户名称,由用户自定义,必须全局唯一,方便多个系统之间的维护 - string name = 2; - // 认证方式1:与 access_secret 结合使用,两者均非空时生效 - string access_id = 3; - // 认证方式1:与 access_id 结合使用,两者均非空时生效 - string access_secret = 4; - // 如果是私有云,需要提供URL - string url = 5; - // 如果是私有云,需要提供URL - string token = 6; -} - - -message Region { - //id - int32 id = 1; - //name - string name = 2; -} - - -// 阿里云区域,需要将对应的 _ 转化为 - -enum AliRegionId { - ali_all = 0; - ali_cn_qingdao = 1; // 青岛 - ali_cn_beijing = 2; // 北京 - ali_cn_zhangjiakou = 3; // 张家口 - ali_cn_huhehaote = 4; // 呼和浩特 - ali_cn_wulanchabu = 5; // 乌兰察布 - ali_cn_hangzhou = 6; // 杭州 - ali_cn_shanghai = 7; // 上海 - ali_cn_shenzhen = 8; // 深圳 - ali_cn_heyuan = 9; // 河源 - ali_cn_guangzhou = 10; // 广州 - ali_cn_chengdu = 11; // 成都 - ali_cn_hongkong = 12; // 中国香港-香港 - ali_ap_southeast_1 = 13; // 亚太东南1-新加坡 - ali_ap_southeast_2 = 14; // 亚太东南2-悉尼 - ali_ap_southeast_3 = 15; // 亚太东南3-吉隆坡 - ali_ap_southeast_5 = 16; // 亚太东南5-雅加达 - ali_ap_south_1 = 17; // 亚太南部1-孟买 - ali_ap_northeast_1 = 18; // 亚太东北1-东京 - ali_us_west_1 = 19; // 美国西部1-硅谷 - ali_us_east_1 = 20; // 美国东部1-弗吉尼亚 - ali_eu_central_1 = 21; // 欧洲中部1-法兰克福 - ali_eu_west_1 = 22; // 英国(伦敦)-伦敦 -} - -// 腾讯云区域,需要将对应的 _ 转化为 - -enum TencentRegionId { - tc_all = 0; - tc_ap_bangkok = 1; //亚太东南(曼谷) - tc_ap_beijing = 2; //华北地区(北京) - tc_ap_chengdu = 3; //西南地区(成都) - tc_ap_chongqing = 4; //西南地区(重庆) - tc_ap_guangzhou = 5; //华南地区(广州) - tc_ap_hongkong = 6; //港澳台地区(中国香港) - tc_ap_jakarta = 7; //亚太东南(雅加达) - tc_ap_mumbai = 8; // 亚太南部(孟买) - tc_ap_nanjing = 9; //华东地区(南京) - tc_ap_seoul = 10; //亚太东北(首尔) - tc_ap_shanghai = 11; //华东地区(上海) - tc_ap_shanghai_fsi = 12; //华东地区(上海金融) - tc_ap_shenzhen_fsi = 13; //华南地区(深圳金融) - tc_ap_singapore = 14; //亚太东南(新加坡) - tc_ap_tokyo = 15; //亚太东北(东京) - tc_eu_frankfurt = 16; //欧洲地区(法兰克福) - tc_eu_moscow = 17; //欧洲地区(莫斯科) - tc_na_ashburn = 18; //美国东部(弗吉尼亚) - tc_na_siliconvalley = 19; //美国西部(硅谷) - tc_na_toronto = 20; //北美地区(多伦多) - tc_sa_saopaulo = 21; //南美地区(圣保罗) -} - -// 华为云区域,需要将对应的 _ 转化为 - -enum HuaweiRegionId { - hw_all = 0; - hw_cn_north_1 = 1; // 华北-北京一 - hw_cn_north_4 = 2; // 华北-北京四 - hw_cn_south_1 = 3; // 华南-广州 - hw_cn_east_2 = 4; // 华东-上海二 - hw_cn_east_3 = 5; // 华东-上海一 - hw_cn_southwest_2 = 6; // 西南-贵阳一 - hw_ap_southeast_1 = 7; // 中国-香港 - hw_ap_southeast_2 = 8; // 亚太-曼谷 - hw_ap_southeast_3 = 9; // 亚太-新加坡 - hw_af_south_1 = 10; //非洲-约翰内斯堡 - hw_cn_south_2 = 11; // 华南-深圳 -} - - -// 私有云区域 预留 -enum K8SRegionId { - k8s_all = 0; -} - - -// 亚马逊云区域,需要将对应的 _ 转化为 - -enum AwsRegionId { - aws_all = 0; - aws_us_east_2 = 1; // US East (Ohio) - aws_us_east_1 = 2; // US East (N. Virginia) - aws_us_west_1 = 3; // US West (N. California) - aws_us_west_2 = 4; // US West (Oregon) - aws_af_south_1 = 5; // Africa (Cape Town) - aws_ap_east_1 = 6; // Asia Pacific (Hong Kong) - aws_ap_south_1 = 7; // Asia Pacific (Mumbai) - aws_ap_northeast_3 = 8; // Asia Pacific (Osaka) - aws_ap_northeast_2 = 9; // Asia Pacific (Seoul) - aws_ap_northeast_1 = 10; // Asia Pacific (Singapore) - aws_ap_southeast_2 = 11; // Asia Pacific (Sydney) - aws_ap_southeast_1 = 12; // Asia Pacific (Tokyo) - aws_ca_central_1 = 13; // Canada (Central) - aws_eu_central_1 = 14; // Europe (Frankfurt) - aws_eu_west_1 = 15; // Europe (Ireland) - aws_eu_west_2 = 16; // Europe (London) - aws_eu_south_1 = 17; // Europe (Milan) - aws_eu_west_3 = 18; // Europe (Paris) - aws_eu_north_1 = 19; // Europe (Stockholm) - aws_me_south_1 = 20; // Middle East (Bahrain) - aws_sa_east_1 = 21; // South America (São Paulo) -} - -service TenantService { - - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag) = { - description : "所有云租户的认证服务" - external_docs : { - url : "https://code.gitlink.org.cn/JCCE/PCM.git" - description: "Find out more about PCM" - } - }; - -}